Struct sigma_fun::EqAll [−][src]
pub struct EqAll<S, N> { /* fields omitted */ }
Expand description
Combinator for proving any number of statements of the same kind have the same witness.
Implementations
Trait Implementations
type AnnounceSecret = S::AnnounceSecret
type AnnounceSecret = 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 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
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.
Uniformly samples a response from the response space of the Sigma protocol.
fn implied_announcement(
&self,
statements: &Self::Statement,
challenge: &GenericArray<u8, Self::ChallengeLength>,
response: &Self::Response
) -> Option<Self::Announcement>
fn implied_announcement(
&self,
statements: &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 EqAll<S, N> where
N: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, N> UnwindSafe for EqAll<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
type Output = T
type Output = T
Should always be Self