pub struct ProvingEngine {
pub engine_type: ProvingEngineType,
pub parameters: EngineParameters,
}Expand description
Proving engine for generating proofs
Fields§
§engine_type: ProvingEngineType§parameters: EngineParametersImplementations§
Source§impl ProvingEngine
impl ProvingEngine
Sourcepub fn generate_proof(
&self,
proving_key: &ProvingKey,
witness: &HashMap<String, FieldElement>,
public_inputs: &[FieldElement],
) -> Result<Vec<u8>, ZkError>
pub fn generate_proof( &self, proving_key: &ProvingKey, witness: &HashMap<String, FieldElement>, public_inputs: &[FieldElement], ) -> Result<Vec<u8>, ZkError>
Generate proof
Deterministically combines the proving key, serialised witness, and public
inputs via SHA3-512 chaining to produce a 1024-byte proof. The first four
bytes are set to 0x51 0x4B 0x5A 0x50 (“QKZP”) so they are never
all-zero and pass the structural validator in verify_proof.
Auto Trait Implementations§
impl Freeze for ProvingEngine
impl RefUnwindSafe for ProvingEngine
impl Send for ProvingEngine
impl Sync for ProvingEngine
impl Unpin for ProvingEngine
impl UnsafeUnpin for ProvingEngine
impl UnwindSafe for ProvingEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more