Struct sigma_fun::ed25519::DLG [−][src]
pub struct DLG<L> { /* fields omitted */ }
Expand description
Proves knowledge of x
such that A = x * G
for some A
included in the statement.
G
is the standard basepoint used in the ed25519 signature scheme and is not included in the statement.
Trait Implementations
impl<L: ArrayLength<u8>> Sigma for DLG<L> where
L: IsLessOrEqual<U31>,
<L as IsLessOrEqual<U31>>::Output: NonZero,
impl<L: ArrayLength<u8>> Sigma for DLG<L> where
L: IsLessOrEqual<U31>,
<L as IsLessOrEqual<U31>>::Output: NonZero,
type Statement = EdwardsPoint
type Statement = EdwardsPoint
The elements of the statement the prover is proving.
type AnnounceSecret = Scalar
type AnnounceSecret = Scalar
The type for the secret the prover creates when generating the proof.
type Announcement = EdwardsPoint
type Announcement = EdwardsPoint
The type for the public announcement the prover sends in the first round of the protocol.
type ChallengeLength = L
type ChallengeLength = L
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<L> RefUnwindSafe for DLG<L> where
L: RefUnwindSafe,
impl<L> UnwindSafe for DLG<L> where
L: 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