pub struct PoKOfSignature { /* private fields */ }
Expand description
Proof of Knowledge of a Signature that is used by the prover
to construct PoKOfSignatureProof
.
XXX: An optimization would be to combine the 2 relations into one by using the same techniques as Bulletproofs
Implementations§
Source§impl PoKOfSignature
impl PoKOfSignature
Sourcepub fn init(
signature: &Signature,
vk: &PublicKey,
messages: &[ProofMessage],
) -> Result<Self, BBSError>
pub fn init( signature: &Signature, vk: &PublicKey, messages: &[ProofMessage], ) -> Result<Self, BBSError>
Creates the initial proof data before a Fiat-Shamir calculation
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Return byte representation of public elements so they can be used for challenge computation.
Sourcepub fn gen_proof(
self,
challenge_hash: &ProofChallenge,
) -> Result<PoKOfSignatureProof, BBSError>
pub fn gen_proof( self, challenge_hash: &ProofChallenge, ) -> Result<PoKOfSignatureProof, BBSError>
Given the challenge value, compute the s values for Fiat-Shamir and return the actual proof to be sent to the verifier
Trait Implementations§
Source§impl Clone for PoKOfSignature
impl Clone for PoKOfSignature
Source§fn clone(&self) -> PoKOfSignature
fn clone(&self) -> PoKOfSignature
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PoKOfSignature
impl RefUnwindSafe for PoKOfSignature
impl Send for PoKOfSignature
impl Sync for PoKOfSignature
impl Unpin for PoKOfSignature
impl UnwindSafe for PoKOfSignature
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