pub struct ProofVerificationEngine { /* private fields */ }Expand description
Proof verification engine
Implementations§
Source§impl ProofVerificationEngine
impl ProofVerificationEngine
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates the engine with an empty algorithm registry, batch verifier, and performance optimizer.
Sourcepub fn verify_commitment_proof_data(
proof_data: &[u8],
public_inputs: &[Vec<u8>],
) -> Result<bool, CryptographicError>
pub fn verify_commitment_proof_data( proof_data: &[u8], public_inputs: &[Vec<u8>], ) -> Result<bool, CryptographicError>
Directly verifies a commitment proof of knowledge blob against public inputs.
Sourcepub fn generate_commitment_proof_data(
circuit_id: &str,
witness: &[Vec<u8>],
public_inputs: &[Vec<u8>],
) -> Result<Vec<u8>, CryptographicError>
pub fn generate_commitment_proof_data( circuit_id: &str, witness: &[Vec<u8>], public_inputs: &[Vec<u8>], ) -> Result<Vec<u8>, CryptographicError>
Directly generates a commitment proof of knowledge blob from circuit, witness, and public inputs.
Sourcepub fn initialize(&mut self) -> Result<(), CryptographicError>
pub fn initialize(&mut self) -> Result<(), CryptographicError>
Initializes the verification performance optimizer.
Sourcepub fn add_verification_algorithm(
&mut self,
name: String,
algorithm: VerificationAlgorithm,
)
pub fn add_verification_algorithm( &mut self, name: String, algorithm: VerificationAlgorithm, )
Register a verification algorithm under a named key.
Sourcepub fn get_verification_algorithm(
&self,
name: &str,
) -> Option<&VerificationAlgorithm>
pub fn get_verification_algorithm( &self, name: &str, ) -> Option<&VerificationAlgorithm>
Look up a verification algorithm by name.
Sourcepub fn list_verification_algorithms(
&self,
) -> impl Iterator<Item = &VerificationAlgorithm>
pub fn list_verification_algorithms( &self, ) -> impl Iterator<Item = &VerificationAlgorithm>
Iterate over all registered verification algorithms.
Sourcepub fn batch_verifier(&self) -> &BatchVerifier
pub fn batch_verifier(&self) -> &BatchVerifier
Get a reference to the batch verifier.
Sourcepub fn batch_verifier_mut(&mut self) -> &mut BatchVerifier
pub fn batch_verifier_mut(&mut self) -> &mut BatchVerifier
Get a mutable reference to the batch verifier.
Auto Trait Implementations§
impl Freeze for ProofVerificationEngine
impl RefUnwindSafe for ProofVerificationEngine
impl Send for ProofVerificationEngine
impl Sync for ProofVerificationEngine
impl Unpin for ProofVerificationEngine
impl UnsafeUnpin for ProofVerificationEngine
impl UnwindSafe for ProofVerificationEngine
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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