pub struct All<S, N> { /* private fields */ }
Expand description
Combinator for proving all of N statements of the same type is true.
Implementations
Trait Implementations
type AnnounceSecret = Vec<S::AnnounceSecret>
type AnnounceSecret = Vec<S::AnnounceSecret>
The type for the secret the prover creates when generating the proof.
type Announcement = Vec<S::Announcement>
type Announcement = Vec<S::Announcement>
The type for the public announcement the prover sends in the first round of the protocol.
The type for the response the prover sends in the last round of the protocol.
type ChallengeLength = S::ChallengeLength
type ChallengeLength = S::ChallengeLength
fn respond(
&self,
witness: &Self::Witness,
statement: &Self::Statement,
announce_secret: Self::AnnounceSecret,
announce: &Self::Announcement,
challenge: &GenericArray<u8, Self::ChallengeLength>
) -> Self::Response
fn respond(
&self,
witness: &Self::Witness,
statement: &Self::Statement,
announce_secret: Self::AnnounceSecret,
announce: &Self::Announcement,
challenge: &GenericArray<u8, Self::ChallengeLength>
) -> Self::Response
Generates the prover’s response for the verifier’s challenge.
fn announce(
&self,
statement: &Self::Statement,
announce_secret: &Self::AnnounceSecret
) -> Self::Announcement
fn announce(
&self,
statement: &Self::Statement,
announce_secret: &Self::AnnounceSecret
) -> Self::Announcement
Generates the prover’s announcement message.
fn gen_announce_secret<Rng: CryptoRng + RngCore>(
&self,
witness: &Self::Witness,
rng: &mut Rng
) -> Self::AnnounceSecret
fn gen_announce_secret<Rng: CryptoRng + RngCore>(
&self,
witness: &Self::Witness,
rng: &mut Rng
) -> Self::AnnounceSecret
Generates the secret data to create the announcement
Uniformly samples a response from the response space of the Sigma protocol.
fn implied_announcement(
&self,
statement: &Self::Statement,
challenge: &GenericArray<u8, Self::ChallengeLength>,
response: &Self::Response
) -> Option<Self::Announcement>
fn implied_announcement(
&self,
statement: &Self::Statement,
challenge: &GenericArray<u8, Self::ChallengeLength>,
response: &Self::Response
) -> Option<Self::Announcement>
Computes what the announcement must be for the response
to be valid.
Hashes the statement.
Hashes the announcement.
Hashes the witness.
Auto Trait Implementations
impl<S, N> RefUnwindSafe for All<S, N> where
N: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, N> UnwindSafe for All<S, N> where
N: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a new instance of the invocant that will be marked with M
. Read more