[][src]Struct bbs::prover::Prover

pub struct Prover {}

This struct represents a Prover who receives signatures or proves with them. Provided are methods for 2PC where some are only known to the prover and a blind signature is created, unblinding signatures, verifying signatures, and creating signature proofs of knowledge with selective disclosure proofs

Implementations

impl Prover[src]

Generate a unique message that will be used across multiple signatures. This link_secret is the same in all signatures and allows a prover to demonstrate that signatures were issued to the same identity. This value should be a blinded message in all signatures and never revealed to anyone.

pub fn new_blind_signature_context(
    verkey: &PublicKey,
    messages: &BTreeMap<usize, SignatureMessage>,
    nonce: &ProofNonce
) -> Result<(BlindSignatureContext, SignatureBlinding), BBSError>
[src]

Create the structures need to send to an issuer to complete a blinded signature

pub fn complete_signature(
    verkey: &PublicKey,
    messages: &[SignatureMessage],
    blind_signature: &BlindSignature,
    blinding_factor: &SignatureBlinding
) -> Result<Signature, BBSError>
[src]

Unblinds and verifies a signature received from an issuer

pub fn commit_signature_pok(
    request: &ProofRequest,
    proof_messages: &[ProofMessage],
    signature: &Signature
) -> Result<PoKOfSignature, BBSError>
[src]

Create a new signature proof of knowledge and selective disclosure proof from a verifier's request

Arguments

  • request - Proof request from verifier
  • proof_messages - If blinding_factor is Some(Nonce) then it will use that. If None, a blinding factor will be generated at random.

pub fn create_challenge_hash(
    pok_sigs: &[PoKOfSignature],
    claims: Option<&[&[u8]]>,
    nonce: &ProofNonce
) -> Result<ProofChallenge, BBSError>
[src]

Create the challenge hash for a set of proofs

Arguments

  • poks - a vec of PoKOfSignature objects
  • nonce - a SignatureNonce
  • claims - an optional slice of bytes the prover wishes to include in the challenge

pub fn generate_signature_pok(
    pok_sig: PoKOfSignature,
    challenge: &ProofChallenge
) -> Result<SignatureProof, BBSError>
[src]

Convert the a committed proof of signature knowledge to the proof

Auto Trait Implementations

impl RefUnwindSafe for Prover

impl Send for Prover

impl Sync for Prover

impl Unpin for Prover

impl UnwindSafe for Prover

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,