[][src]Struct bbs::pok_sig::PoKOfSignatureProof

pub struct PoKOfSignatureProof { /* fields omitted */ }

The actual proof that is sent from prover to verifier.

Contains the proof of 2 discrete log relations.

Implementations

impl PoKOfSignatureProof[src]

pub fn get_bytes_for_challenge(
    &self,
    revealed_msg_indices: BTreeSet<usize>,
    vk: &PublicKey
) -> Vec<u8>
[src]

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.

pub fn get_resp_for_message(
    &self,
    msg_idx: usize
) -> Result<SignatureMessage, BBSError>
[src]

Get the response from post-challenge phase of the Sigma protocol for the given message index msg_idx. Used when comparing message equality

pub fn verify(
    &self,
    vk: &PublicKey,
    revealed_msgs: &BTreeMap<usize, SignatureMessage>,
    challenge: &ProofChallenge
) -> Result<PoKOfSignatureProofStatus, BBSError>
[src]

Validate the proof

Trait Implementations

impl Clone for PoKOfSignatureProof[src]

impl Debug for PoKOfSignatureProof[src]

impl Default for PoKOfSignatureProof[src]

impl<'a> Deserialize<'a> for PoKOfSignatureProof[src]

impl From<Box<[u8]>> for PoKOfSignatureProof[src]

impl Into<Box<[u8]>> for PoKOfSignatureProof[src]

impl Serialize for PoKOfSignatureProof[src]

impl ToVariableLengthBytes for PoKOfSignatureProof[src]

type Output = PoKOfSignatureProof

The type that implements this trait

type Error = BBSError

The type of error to return

fn to_bytes_compressed_form(&self) -> Vec<u8>[src]

Convert the proof to a compressed raw bytes form.

fn from_bytes_compressed_form<I: AsRef<[u8]>>(data: I) -> Result<Self, BBSError>[src]

Convert compressed byte slice into a proof

impl<'_> TryFrom<&'_ [u8]> for PoKOfSignatureProof[src]

type Error = BBSError

The type returned in the event of a conversion error.

impl TryFrom<Vec<u8>> for PoKOfSignatureProof[src]

type Error = BBSError

The type returned in the event of a conversion error.

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,