pub struct Data<E: Curve> {
pub gen1: Point<E>,
pub prod1: Point<E>,
pub gen2: Point<E>,
pub prod2: Point<E>,
}Expand description
Object of the proof: log_gen1 prod1 == log_gen2 prod2
Fields§
§gen1: Point<E>G, a generator, in multiplicative notation the base for one logarithm
prod1: Point<E>X, a point G * x, in multiplicative notation the value inside one logarithm
gen2: Point<E>H, a generator, in multiplicative notation the base for the other logarithm
prod2: Point<E>Z, a point H * x, in multiplicative notation the value inside the other logarithm
Implementations§
Source§impl<E: Curve> Data<E>
impl<E: Curve> Data<E>
Sourcepub fn from_secret_key(x: &SecretScalar<E>, gen: Point<E>) -> Data<E>
pub fn from_secret_key(x: &SecretScalar<E>, gen: Point<E>) -> Data<E>
Create the data for the common case where G is the principal group
generator, and x is a secret key
In this case, we set H = gen as gen2 and Z = G * x as prod2
Trait Implementations§
Source§impl<E: Curve> Digestable for Data<E>
impl<E: Curve> Digestable for Data<E>
Source§fn unambiguously_encode<B>(&self, encoder: EncodeValue<'_, B>)where
B: Buffer,
fn unambiguously_encode<B>(&self, encoder: EncodeValue<'_, B>)where
B: Buffer,
Unambiguously encodes the value
impl<E: Copy + Curve> Copy for Data<E>
Auto Trait Implementations§
impl<E> Freeze for Data<E>
impl<E> RefUnwindSafe for Data<E>
impl<E> Send for Data<E>
impl<E> Sync for Data<E>
impl<E> Unpin for Data<E>
impl<E> UnwindSafe for Data<E>
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