pub struct ZkVerifier { /* private fields */ }Expand description
Zero-knowledge verifier for checking permission proofs
Implementations§
Source§impl ZkVerifier
impl ZkVerifier
Sourcepub fn verify_permission_proof(
&mut self,
proof: &PermissionProof,
) -> Result<bool>
pub fn verify_permission_proof( &mut self, proof: &PermissionProof, ) -> Result<bool>
Verify a permission proof
§Security Checks
- Cryptographic proof verification (zkSNARK/Bulletproof/STARK)
- Public inputs match claimed values
- Nonce hasn’t been used (replay protection)
- Proof is recent (within validity window)
Sourcepub fn batch_verify(&mut self, proofs: &[PermissionProof]) -> Result<Vec<bool>>
pub fn batch_verify(&mut self, proofs: &[PermissionProof]) -> Result<Vec<bool>>
Batch verify multiple proofs (more efficient)
Some zkSNARK schemes support batch verification with significant speedup
Trait Implementations§
Source§impl Debug for ZkVerifier
impl Debug for ZkVerifier
Auto Trait Implementations§
impl Freeze for ZkVerifier
impl RefUnwindSafe for ZkVerifier
impl Send for ZkVerifier
impl Sync for ZkVerifier
impl Unpin for ZkVerifier
impl UnwindSafe for ZkVerifier
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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