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
sourceimpl<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
sourcefn 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.
sourcefn 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
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn hash_witness<H: Update>(&self, hash: &mut H, witness: &Self::Witness)
fn hash_witness<H: Update>(&self, hash: &mut H, witness: &Self::Witness)
Hashes the witness.
impl<S, N> StructuralPartialEq for EqAll<S, N>
Auto Trait Implementations
impl<S, N> RefUnwindSafe for EqAll<S, N> where
N: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, N> Send for EqAll<S, N> where
N: Send,
S: Send,
impl<S, N> Sync for EqAll<S, N> where
N: Sync,
S: Sync,
impl<S, N> Unpin for EqAll<S, N> where
N: Unpin,
S: Unpin,
impl<S, N> UnwindSafe for EqAll<S, N> where
N: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Mark for T
impl<T> Mark for T
sourcefn mark<M>(self) -> <M as ChangeMark<T>>::Out where
M: ChangeMark<T>,
fn mark<M>(self) -> <M as ChangeMark<T>>::Out where
M: ChangeMark<T>,
Returns a new instance of the invocant that will be marked with M
. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more