Struct chain_crypto::ec::ristretto255::GroupElement
source · pub struct GroupElement(RistrettoPoint);
Tuple Fields§
§0: RistrettoPoint
Implementations§
source§impl GroupElement
impl GroupElement
sourcepub const BYTES_LEN: usize = 32usize
pub const BYTES_LEN: usize = 32usize
Size of the byte representation of GroupElement
. We always encode the compressed value
pub fn generator() -> Self
pub fn zero() -> Self
pub(crate) fn compress(&self) -> CompressedRistretto
pub fn to_bytes(&self) -> [u8; 32]
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
pub fn sum<'a, I>(i: I) -> Selfwhere I: Iterator<Item = &'a Self>,
sourcepub fn multiscalar_multiplication<I, J>(scalars: I, points: J) -> Selfwhere
I: IntoIterator<Item = Scalar>,
J: IntoIterator<Item = GroupElement>,
pub fn multiscalar_multiplication<I, J>(scalars: I, points: J) -> Selfwhere I: IntoIterator<Item = Scalar>, J: IntoIterator<Item = GroupElement>,
Constant-time multiscalar multiplication using Straus algorithm
sourcepub fn vartime_multiscalar_multiplication<I, J>(scalars: I, points: J) -> Selfwhere
I: IntoIterator<Item = Scalar>,
J: IntoIterator<Item = GroupElement>,
pub fn vartime_multiscalar_multiplication<I, J>(scalars: I, points: J) -> Selfwhere I: IntoIterator<Item = Scalar>, J: IntoIterator<Item = GroupElement>,
Variable multiscalar multiplication. This function is vulnerable to side-channel attacks and should only be used when the scalars are not secret.
Trait Implementations§
source§impl<'a, 'b> Add<&'b GroupElement> for &'a GroupElement
impl<'a, 'b> Add<&'b GroupElement> for &'a GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
+
operator.source§fn add(self, other: &'b GroupElement) -> GroupElement
fn add(self, other: &'b GroupElement) -> GroupElement
Performs the
+
operation. Read moresource§impl<'b> Add<&'b GroupElement> for GroupElement
impl<'b> Add<&'b GroupElement> for GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
+
operator.source§impl<'a> Add<GroupElement> for &'a GroupElement
impl<'a> Add<GroupElement> for &'a GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
+
operator.source§impl Add<GroupElement> for GroupElement
impl Add<GroupElement> for GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
+
operator.source§impl Arbitrary for GroupElement
impl Arbitrary for GroupElement
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<GroupElement>
type Strategy = BoxedStrategy<GroupElement>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with((): ()) -> Self::Strategy
fn arbitrary_with((): ()) -> Self::Strategy
source§impl Clone for GroupElement
impl Clone for GroupElement
source§fn clone(&self) -> GroupElement
fn clone(&self) -> GroupElement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GroupElement
impl Debug for GroupElement
source§impl Hash for GroupElement
impl Hash for GroupElement
source§impl<'a> Mul<&'a GroupElement> for u64
impl<'a> Mul<&'a GroupElement> for u64
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§fn mul(self, other: &'a GroupElement) -> GroupElement
fn mul(self, other: &'a GroupElement) -> GroupElement
Performs the
*
operation. Read moresource§impl<'a, 'b> Mul<&'b GroupElement> for &'a Scalar
impl<'a, 'b> Mul<&'b GroupElement> for &'a Scalar
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§fn mul(self, other: &'b GroupElement) -> GroupElement
fn mul(self, other: &'b GroupElement) -> GroupElement
Performs the
*
operation. Read moresource§impl<'b> Mul<&'b GroupElement> for Scalar
impl<'b> Mul<&'b GroupElement> for Scalar
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§impl<'a, 'b> Mul<&'b Scalar> for &'a GroupElement
impl<'a, 'b> Mul<&'b Scalar> for &'a GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§impl<'b> Mul<&'b Scalar> for GroupElement
impl<'b> Mul<&'b Scalar> for GroupElement
source§impl<'a> Mul<GroupElement> for &'a Scalar
impl<'a> Mul<GroupElement> for &'a Scalar
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§impl Mul<GroupElement> for Scalar
impl Mul<GroupElement> for Scalar
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§impl<'a> Mul<Scalar> for &'a GroupElement
impl<'a> Mul<Scalar> for &'a GroupElement
source§impl Mul<Scalar> for GroupElement
impl Mul<Scalar> for GroupElement
source§impl<'a> Mul<u64> for &'a GroupElement
impl<'a> Mul<u64> for &'a GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
*
operator.source§impl PartialEq<GroupElement> for GroupElement
impl PartialEq<GroupElement> for GroupElement
source§fn eq(&self, other: &GroupElement) -> bool
fn eq(&self, other: &GroupElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a, 'b> Sub<&'b GroupElement> for &'a GroupElement
impl<'a, 'b> Sub<&'b GroupElement> for &'a GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
-
operator.source§fn sub(self, other: &'b GroupElement) -> GroupElement
fn sub(self, other: &'b GroupElement) -> GroupElement
Performs the
-
operation. Read moresource§impl<'b> Sub<&'b GroupElement> for GroupElement
impl<'b> Sub<&'b GroupElement> for GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
-
operator.source§impl<'a> Sub<GroupElement> for &'a GroupElement
impl<'a> Sub<GroupElement> for &'a GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
-
operator.source§impl Sub<GroupElement> for GroupElement
impl Sub<GroupElement> for GroupElement
§type Output = GroupElement
type Output = GroupElement
The resulting type after applying the
-
operator.impl Eq for GroupElement
impl StructuralEq for GroupElement
impl StructuralPartialEq for GroupElement
Auto Trait Implementations§
impl RefUnwindSafe for GroupElement
impl Send for GroupElement
impl Sync for GroupElement
impl Unpin for GroupElement
impl UnwindSafe for GroupElement
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