Struct chain_crypto::algorithms::zkps::challenge_context::ChallengeContext
source · pub struct ChallengeContext(Blake2b);
Expand description
Challenge context for Discrete Logarithm Equality proof. The common reference string
are two EC bases, and the statement consists of two EC points.
The challenge computation takes as input the two announcements
computed in the sigma protocol, a1
and a2
, and the full
statement.
Tuple Fields§
§0: Blake2b
Implementations§
source§impl ChallengeContext
impl ChallengeContext
sourcepub(crate) fn new(
base_1: &GroupElement,
base_2: &GroupElement,
point_1: &GroupElement,
point_2: &GroupElement
) -> Self
pub(crate) fn new( base_1: &GroupElement, base_2: &GroupElement, point_1: &GroupElement, point_2: &GroupElement ) -> Self
Initialise the challenge context, by including the common reference string and the full statement
sourcepub(crate) fn first_challenge(
&mut self,
a1: &GroupElement,
a2: &GroupElement
) -> Scalar
pub(crate) fn first_challenge( &mut self, a1: &GroupElement, a2: &GroupElement ) -> Scalar
Generation of the first_challenge
. This challenge is generated after the Announcement
is
“sent”. Hence, we include the latter to the challenge context and generate its
corresponding scalar.
Auto Trait Implementations§
impl RefUnwindSafe for ChallengeContext
impl Send for ChallengeContext
impl Sync for ChallengeContext
impl Unpin for ChallengeContext
impl UnwindSafe for ChallengeContext
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