[−][src]Struct bbs::prover::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]
pub fn new_link_secret() -> SignatureMessage
[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]
verkey: &PublicKey,
messages: &BTreeMap<usize, SignatureMessage>,
nonce: &ProofNonce
) -> Result<(BlindSignatureContext, SignatureBlinding), BBSError>
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]
verkey: &PublicKey,
messages: &[SignatureMessage],
blind_signature: &BlindSignature,
blinding_factor: &SignatureBlinding
) -> Result<Signature, BBSError>
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]
request: &ProofRequest,
proof_messages: &[ProofMessage],
signature: &Signature
) -> Result<PoKOfSignature, BBSError>
Create a new signature proof of knowledge and selective disclosure proof from a verifier's request
Arguments
request
- Proof request from verifierproof_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]
pok_sigs: &[PoKOfSignature],
claims: Option<&[&[u8]]>,
nonce: &ProofNonce
) -> Result<ProofChallenge, BBSError>
Create the challenge hash for a set of proofs
Arguments
poks
- a vec of PoKOfSignature objectsnonce
- a SignatureNonceclaims
- 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]
pok_sig: PoKOfSignature,
challenge: &ProofChallenge
) -> Result<SignatureProof, BBSError>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,