pub struct PoKOfSignatureProof { /* private fields */ }
Expand description
The actual proof that is sent from prover to verifier.
Contains the proof of 2 discrete log relations.
Implementations§
Source§impl PoKOfSignatureProof
impl PoKOfSignatureProof
Sourcepub fn get_bytes_for_challenge(
&self,
revealed_msg_indices: BTreeSet<usize>,
vk: &PublicKey,
) -> Vec<u8> ⓘ
pub fn get_bytes_for_challenge( &self, revealed_msg_indices: BTreeSet<usize>, vk: &PublicKey, ) -> Vec<u8> ⓘ
Return bytes that need to be hashed for generating challenge. Takes self.a_bar
,
self.a_prime
and self.d
and commitment and instance data of the two proof of knowledge protocols.
Sourcepub fn get_resp_for_message(
&self,
msg_idx: usize,
) -> Result<SignatureMessage, BBSError>
pub fn get_resp_for_message( &self, msg_idx: usize, ) -> Result<SignatureMessage, BBSError>
Get the response from post-challenge phase of the Sigma protocol for the given message index msg_idx
.
Used when comparing message equality
Sourcepub fn verify(
&self,
vk: &PublicKey,
revealed_msgs: &BTreeMap<usize, SignatureMessage>,
challenge: &ProofChallenge,
) -> Result<PoKOfSignatureProofStatus, BBSError>
pub fn verify( &self, vk: &PublicKey, revealed_msgs: &BTreeMap<usize, SignatureMessage>, challenge: &ProofChallenge, ) -> Result<PoKOfSignatureProofStatus, BBSError>
Validate the proof
Trait Implementations§
Source§impl Clone for PoKOfSignatureProof
impl Clone for PoKOfSignatureProof
Source§fn clone(&self) -> PoKOfSignatureProof
fn clone(&self) -> PoKOfSignatureProof
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 moreSource§impl Debug for PoKOfSignatureProof
impl Debug for PoKOfSignatureProof
Source§impl Default for PoKOfSignatureProof
impl Default for PoKOfSignatureProof
Source§impl<'a> Deserialize<'a> for PoKOfSignatureProof
impl<'a> Deserialize<'a> for PoKOfSignatureProof
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 Serialize for PoKOfSignatureProof
impl Serialize for PoKOfSignatureProof
Source§impl ToVariableLengthBytes for PoKOfSignatureProof
impl ToVariableLengthBytes for PoKOfSignatureProof
Source§fn to_bytes_compressed_form(&self) -> Vec<u8> ⓘ
fn to_bytes_compressed_form(&self) -> Vec<u8> ⓘ
Convert the proof to a compressed raw bytes form.
Source§fn from_bytes_compressed_form<I: AsRef<[u8]>>(data: I) -> Result<Self, BBSError>
fn from_bytes_compressed_form<I: AsRef<[u8]>>(data: I) -> Result<Self, BBSError>
Convert compressed byte slice into a proof
Source§type Output = PoKOfSignatureProof
type Output = PoKOfSignatureProof
The type that implements this trait
Source§impl TryFrom<&[u8]> for PoKOfSignatureProof
impl TryFrom<&[u8]> for PoKOfSignatureProof
Auto Trait Implementations§
impl Freeze for PoKOfSignatureProof
impl RefUnwindSafe for PoKOfSignatureProof
impl Send for PoKOfSignatureProof
impl Sync for PoKOfSignatureProof
impl Unpin for PoKOfSignatureProof
impl UnwindSafe for PoKOfSignatureProof
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