pub struct ProofG1 { /* private fields */ }
Expand description
A proof of knowledge of a signature and hidden messages
Implementations§
Source§impl ProofG1
impl ProofG1
Sourcepub fn get_challenge_contribution(
&self,
bases: &[GeneratorG1],
commitment: &Commitment,
challenge: &ProofChallenge,
) -> Result<GeneratorG1, BBSError>
pub fn get_challenge_contribution( &self, bases: &[GeneratorG1], commitment: &Commitment, challenge: &ProofChallenge, ) -> Result<GeneratorG1, BBSError>
Computes the piece that goes into verifying the overall proof component by computing the c == H(U || \widehat{U} || nonce) This returns the \widehat{U} commitment is U
Sourcepub fn verify(
&self,
bases: &[GeneratorG1],
commitment: &Commitment,
challenge: &ProofChallenge,
) -> Result<bool, BBSError>
pub fn verify( &self, bases: &[GeneratorG1], commitment: &Commitment, challenge: &ProofChallenge, ) -> Result<bool, BBSError>
Verify that bases[0]^responses[0] * bases[0]^responses[0] * … bases[i]^responses[i] * commitment^challenge == random_commitment
Sourcepub fn verify_complete_proof(
&self,
bases: &[GeneratorG1],
commitment: &Commitment,
challenge: &ProofChallenge,
nonce: &[u8],
) -> Result<bool, BBSError>
pub fn verify_complete_proof( &self, bases: &[GeneratorG1], commitment: &Commitment, challenge: &ProofChallenge, nonce: &[u8], ) -> Result<bool, BBSError>
Assumes this is the entire proof and is not a sub proof Used primarily during 2-PC signature creation
Trait Implementations§
Source§impl<'a> Deserialize<'a> for ProofG1
impl<'a> Deserialize<'a> for ProofG1
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ToVariableLengthBytes for ProofG1
impl ToVariableLengthBytes for ProofG1
Auto Trait Implementations§
impl Freeze for ProofG1
impl RefUnwindSafe for ProofG1
impl Send for ProofG1
impl Sync for ProofG1
impl Unpin for ProofG1
impl UnwindSafe for ProofG1
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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