Struct sigma_fun::secp256k1::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 for secp256k1 and is ommited from the statement.
Trait Implementations
impl<L: ArrayLength<u8>> Sigma for DLG<L> where
L: IsLessOrEqual<U32>,
<L as IsLessOrEqual<U32>>::Output: NonZero,
impl<L: ArrayLength<u8>> Sigma for DLG<L> where
L: IsLessOrEqual<U32>,
<L as IsLessOrEqual<U32>>::Output: NonZero,
type AnnounceSecret = Scalar
type AnnounceSecret = Scalar
The type for the secret the prover creates when generating the proof.
type Announcement = Point
type Announcement = Point
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 = 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.
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.
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
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