pub struct EqAll<S, N> { /* private fields */ }Expand description
Combinator for proving any number of statements of the same kind have the same witness.
Implementations§
Trait Implementations§
source§impl<S: PartialEq, N: PartialEq> PartialEq<EqAll<S, N>> for EqAll<S, N>
impl<S: PartialEq, N: PartialEq> PartialEq<EqAll<S, N>> for EqAll<S, N>
source§impl<N: Unsigned, S: Sigma> Sigma for EqAll<S, N>
impl<N: Unsigned, S: Sigma> Sigma for EqAll<S, N>
§type Statement = Vec<<S as Sigma>::Statement, Global>
type Statement = Vec<<S as Sigma>::Statement, Global>
The elements of the statement the prover is proving.
§type AnnounceSecret = <S as Sigma>::AnnounceSecret
type AnnounceSecret = <S as Sigma>::AnnounceSecret
The type for the secret the prover creates when generating the proof.
§type Announcement = Vec<<S as Sigma>::Announcement, Global>
type Announcement = Vec<<S as Sigma>::Announcement, Global>
The type for the public announcement the prover sends in the first round of the protocol.
§type Response = <S as Sigma>::Response
type Response = <S as Sigma>::Response
The type for the response the prover sends in the last round of the protocol.
§type ChallengeLength = <S as Sigma>::ChallengeLength
type ChallengeLength = <S as Sigma>::ChallengeLength
source§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.
source§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
source§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.
source§fn sample_response<Rng: CryptoRng + RngCore>(
&self,
rng: &mut Rng
) -> Self::Response
fn sample_response<Rng: CryptoRng + RngCore>(
&self,
rng: &mut Rng
) -> Self::Response
Uniformly samples a response from the response space of the Sigma protocol.
source§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.source§fn hash_statement<H: Update>(&self, hash: &mut H, statements: &Self::Statement)
fn hash_statement<H: Update>(&self, hash: &mut H, statements: &Self::Statement)
Hashes the statement.
source§fn hash_announcement<H: Update>(
&self,
hash: &mut H,
announcements: &Self::Announcement
)
fn hash_announcement<H: Update>(
&self,
hash: &mut H,
announcements: &Self::Announcement
)
Hashes the announcement.