pub struct Verifier;
Expand description
This struct represents an Verifier of signatures. Provided are methods for generating a context to ask for revealed messages and the prover keep all others hidden.
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn new_proof_request(
revealed_message_indices: &[usize],
verkey: &PublicKey,
) -> Result<ProofRequest, BBSError>
pub fn new_proof_request( revealed_message_indices: &[usize], verkey: &PublicKey, ) -> Result<ProofRequest, BBSError>
Create a nonce used for the zero-knowledge proof context verkey: issuer’s public key
Sourcepub fn verify_signature_pok(
proof_request: &ProofRequest,
signature_proof: &SignatureProof,
nonce: &ProofNonce,
) -> Result<Vec<SignatureMessage>, BBSError>
pub fn verify_signature_pok( proof_request: &ProofRequest, signature_proof: &SignatureProof, nonce: &ProofNonce, ) -> Result<Vec<SignatureMessage>, BBSError>
Check a signature proof of knowledge and selective disclosure proof
Sourcepub fn generate_proof_nonce() -> ProofNonce
pub fn generate_proof_nonce() -> ProofNonce
Create a nonce used for the proof request context
Sourcepub fn create_challenge_hash(
proofs: &[SignatureProof],
proof_requests: &[ProofRequest],
nonce: &ProofNonce,
claims: Option<&[&[u8]]>,
) -> Result<ProofChallenge, BBSError>
pub fn create_challenge_hash( proofs: &[SignatureProof], proof_requests: &[ProofRequest], nonce: &ProofNonce, claims: Option<&[&[u8]]>, ) -> Result<ProofChallenge, BBSError>
create the challenge hash for a set of proofs
§Arguments
proofs
- a slice of SignatureProof objectsproof_requests
- a corresponding slice of ProofRequest objectsnonce
- a SignatureNonceclaims
- an optional slice of bytes the prover wishes to include in the challenge
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnwindSafe for Verifier
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> 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