pub struct DLG<L> { /* private fields */ }
Available on crate feature
ed25519
only.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§
source§impl<L: PartialEq> PartialEq for DLG<L>
impl<L: PartialEq> PartialEq for DLG<L>
source§impl<L> Sigma for DLG<L>
impl<L> Sigma for DLG<L>
§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 Response = Scalar
type Response = Scalar
The type for the response the prover sends in the last round of the protocol.
§type ChallengeLength = L
type ChallengeLength = L
The length as a
typenum
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 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 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 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,
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.source§fn hash_statement<H: Update>(&self, hash: &mut H, statement: &Self::Statement)
fn hash_statement<H: Update>(&self, hash: &mut H, statement: &Self::Statement)
Hashes the statement.
source§fn hash_announcement<H: Update>(
&self,
hash: &mut H,
announcement: &Self::Announcement
)
fn hash_announcement<H: Update>( &self, hash: &mut H, announcement: &Self::Announcement )
Hashes the announcement.
impl<L> StructuralPartialEq for DLG<L>
Auto Trait Implementations§
impl<L> RefUnwindSafe for DLG<L>where
L: RefUnwindSafe,
impl<L> Send for DLG<L>where
L: Send,
impl<L> Sync for DLG<L>where
L: Sync,
impl<L> Unpin for DLG<L>where
L: Unpin,
impl<L> UnwindSafe for DLG<L>where
L: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more