Struct decaf377::AffineElement
source · pub struct AffineElement { /* private fields */ }
Trait Implementations§
source§impl<'a, 'b> Add<&'b AffineElement> for &'a AffineElement
impl<'a, 'b> Add<&'b AffineElement> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
+
operator.source§fn add(self, other: &'b AffineElement) -> AffineElement
fn add(self, other: &'b AffineElement) -> AffineElement
Performs the
+
operation. Read moresource§impl<'b> Add<&'b AffineElement> for AffineElement
impl<'b> Add<&'b AffineElement> for AffineElement
source§impl<'a> Add<&'a AffineElement> for Element
impl<'a> Add<&'a AffineElement> for Element
source§impl<'a> Add<&'a Element> for AffineElement
impl<'a> Add<&'a Element> for AffineElement
source§impl<'a> Add<AffineElement> for &'a AffineElement
impl<'a> Add<AffineElement> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
+
operator.source§fn add(self, other: AffineElement) -> AffineElement
fn add(self, other: AffineElement) -> AffineElement
Performs the
+
operation. Read moresource§impl Add<AffineElement> for Element
impl Add<AffineElement> for Element
source§impl Add<Element> for AffineElement
impl Add<Element> for AffineElement
source§impl Add for AffineElement
impl Add for AffineElement
source§impl<'b> AddAssign<&'b AffineElement> for AffineElement
impl<'b> AddAssign<&'b AffineElement> for AffineElement
source§fn add_assign(&mut self, other: &'b AffineElement)
fn add_assign(&mut self, other: &'b AffineElement)
Performs the
+=
operation. Read moresource§impl<'a> AddAssign<&'a AffineElement> for Element
impl<'a> AddAssign<&'a AffineElement> for Element
source§fn add_assign(&mut self, other: &'a AffineElement)
fn add_assign(&mut self, other: &'a AffineElement)
Performs the
+=
operation. Read moresource§impl AddAssign<AffineElement> for Element
impl AddAssign<AffineElement> for Element
source§fn add_assign(&mut self, other: AffineElement)
fn add_assign(&mut self, other: AffineElement)
Performs the
+=
operation. Read moresource§impl AddAssign for AffineElement
impl AddAssign for AffineElement
source§fn add_assign(&mut self, other: AffineElement)
fn add_assign(&mut self, other: AffineElement)
Performs the
+=
operation. Read moresource§impl AffineRepr for AffineElement
impl AffineRepr for AffineElement
type Config = EdwardsConfig
type ScalarField = Fp<MontBackend<FrConfig, 4>, 4>
source§fn xy(&self) -> Option<(&Self::BaseField, &Self::BaseField)>
fn xy(&self) -> Option<(&Self::BaseField, &Self::BaseField)>
Returns the x and y coordinates of this affine point.
source§fn from_random_bytes(bytes: &[u8]) -> Option<Self>
fn from_random_bytes(bytes: &[u8]) -> Option<Self>
Returns a group element if the set of bytes forms a valid group element,
otherwise returns None. This function is primarily intended for sampling
random group elements from a hash-function or RNG output.
source§fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self::Group
fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self::Group
Performs scalar multiplication of this element with mixed addition.
source§fn clear_cofactor(&self) -> Self
fn clear_cofactor(&self) -> Self
Performs cofactor clearing.
The default method is simply to multiply by the cofactor.
For some curve families more efficient methods exist.
source§fn mul_by_cofactor_to_group(&self) -> Self::Group
fn mul_by_cofactor_to_group(&self) -> Self::Group
Multiplies this element by the cofactor and output the
resulting projective element.
§fn into_group(self) -> Self::Group
fn into_group(self) -> Self::Group
Converts self into the projective representation.
§fn mul_by_cofactor(&self) -> Self
fn mul_by_cofactor(&self) -> Self
Multiplies this element by the cofactor.
§fn mul_by_cofactor_inv(&self) -> Self
fn mul_by_cofactor_inv(&self) -> Self
Multiplies this element by the inverse of the cofactor in
Self::ScalarField
.source§impl AllocVar<AffineElement, Fp<MontBackend<FrConfig, 4>, 4>> for ElementVar
impl AllocVar<AffineElement, Fp<MontBackend<FrConfig, 4>, 4>> for ElementVar
source§fn new_variable<T: Borrow<AffineElement>>(
cs: impl Into<Namespace<Fq>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<AffineElement>>( cs: impl Into<Namespace<Fq>>, f: impl FnOnce() -> Result<T, SynthesisError>, mode: AllocationMode ) -> Result<Self, SynthesisError>
Allocates a new variable of type
Self
in the ConstraintSystem
cs
.
The mode of allocation is decided by mode
.§fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
fn new_constant( cs: impl Into<Namespace<F>>, t: impl Borrow<V> ) -> Result<Self, SynthesisError>
source§impl CanonicalDeserialize for AffineElement
impl CanonicalDeserialize for AffineElement
source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate ) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
source§impl CanonicalSerialize for AffineElement
impl CanonicalSerialize for AffineElement
fn serialized_size(&self, compress: Compress) -> usize
source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
mode: Compress
) -> Result<(), SerializationError>
fn serialize_with_mode<W: Write>( &self, writer: W, mode: Compress ) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
source§impl Clone for AffineElement
impl Clone for AffineElement
source§fn clone(&self) -> AffineElement
fn clone(&self) -> AffineElement
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 AffineElement
impl Debug for AffineElement
source§impl Default for AffineElement
impl Default for AffineElement
source§impl Display for AffineElement
impl Display for AffineElement
source§impl Distribution<AffineElement> for Standard
impl Distribution<AffineElement> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> AffineElement
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> AffineElement
Generate a random value of
T
, using rng
as the source of randomness.source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
Create an iterator that generates random values of
T
, using rng
as
the source of randomness. Read moresource§impl From<&AffineElement> for Element
impl From<&AffineElement> for Element
source§fn from(point: &AffineElement) -> Self
fn from(point: &AffineElement) -> Self
Converts to this type from the input type.
source§impl From<&Element> for AffineElement
impl From<&Element> for AffineElement
source§impl From<AffineElement> for Element
impl From<AffineElement> for Element
source§fn from(point: AffineElement) -> Self
fn from(point: AffineElement) -> Self
Converts to this type from the input type.
source§impl From<Element> for AffineElement
impl From<Element> for AffineElement
source§impl Hash for AffineElement
impl Hash for AffineElement
source§impl<'a, 'b> Mul<&'b AffineElement> for &'a Fr
impl<'a, 'b> Mul<&'b AffineElement> for &'a Fr
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
*
operator.source§fn mul(self, point: &'b AffineElement) -> AffineElement
fn mul(self, point: &'b AffineElement) -> AffineElement
Performs the
*
operation. Read moresource§impl<'b> Mul<&'b AffineElement> for Fr
impl<'b> Mul<&'b AffineElement> for Fr
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
*
operator.source§fn mul(self, other: &'b AffineElement) -> AffineElement
fn mul(self, other: &'b AffineElement) -> AffineElement
Performs the
*
operation. Read moresource§impl<'a, 'b> Mul<&'b Fp<MontBackend<FrConfig, 4>, 4>> for &'a AffineElement
impl<'a, 'b> Mul<&'b Fp<MontBackend<FrConfig, 4>, 4>> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
*
operator.source§impl<'b> Mul<&'b Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
impl<'b> Mul<&'b Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
source§impl<'a> Mul<AffineElement> for &'a Fr
impl<'a> Mul<AffineElement> for &'a Fr
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
*
operator.source§fn mul(self, other: AffineElement) -> AffineElement
fn mul(self, other: AffineElement) -> AffineElement
Performs the
*
operation. Read moresource§impl Mul<AffineElement> for Fr
impl Mul<AffineElement> for Fr
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
*
operator.source§fn mul(self, other: AffineElement) -> AffineElement
fn mul(self, other: AffineElement) -> AffineElement
Performs the
*
operation. Read moresource§impl<'a> Mul<Fp<MontBackend<FrConfig, 4>, 4>> for &'a AffineElement
impl<'a> Mul<Fp<MontBackend<FrConfig, 4>, 4>> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
*
operator.source§impl Mul<Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
impl Mul<Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
source§impl<'b> MulAssign<&'b Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
impl<'b> MulAssign<&'b Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
source§fn mul_assign(&mut self, point: &'b Fr)
fn mul_assign(&mut self, point: &'b Fr)
Performs the
*=
operation. Read moresource§impl MulAssign<Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
impl MulAssign<Fp<MontBackend<FrConfig, 4>, 4>> for AffineElement
source§fn mul_assign(&mut self, other: Fr)
fn mul_assign(&mut self, other: Fr)
Performs the
*=
operation. Read moresource§impl Neg for AffineElement
impl Neg for AffineElement
source§impl PartialEq for AffineElement
impl PartialEq for AffineElement
source§fn eq(&self, other: &AffineElement) -> bool
fn eq(&self, other: &AffineElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a, 'b> Sub<&'b AffineElement> for &'a AffineElement
impl<'a, 'b> Sub<&'b AffineElement> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
-
operator.source§fn sub(self, other: &'b AffineElement) -> AffineElement
fn sub(self, other: &'b AffineElement) -> AffineElement
Performs the
-
operation. Read moresource§impl<'b> Sub<&'b AffineElement> for AffineElement
impl<'b> Sub<&'b AffineElement> for AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
-
operator.source§fn sub(self, other: &'b AffineElement) -> AffineElement
fn sub(self, other: &'b AffineElement) -> AffineElement
Performs the
-
operation. Read moresource§impl<'a> Sub<&'a AffineElement> for Element
impl<'a> Sub<&'a AffineElement> for Element
source§impl<'a> Sub<AffineElement> for &'a AffineElement
impl<'a> Sub<AffineElement> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
-
operator.source§fn sub(self, other: AffineElement) -> AffineElement
fn sub(self, other: AffineElement) -> AffineElement
Performs the
-
operation. Read moresource§impl Sub<AffineElement> for Element
impl Sub<AffineElement> for Element
source§impl Sub for AffineElement
impl Sub for AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
-
operator.source§fn sub(self, other: AffineElement) -> AffineElement
fn sub(self, other: AffineElement) -> AffineElement
Performs the
-
operation. Read moresource§impl<'b> SubAssign<&'b AffineElement> for AffineElement
impl<'b> SubAssign<&'b AffineElement> for AffineElement
source§fn sub_assign(&mut self, other: &'b AffineElement)
fn sub_assign(&mut self, other: &'b AffineElement)
Performs the
-=
operation. Read moresource§impl<'a> SubAssign<&'a AffineElement> for Element
impl<'a> SubAssign<&'a AffineElement> for Element
source§fn sub_assign(&mut self, other: &'a AffineElement)
fn sub_assign(&mut self, other: &'a AffineElement)
Performs the
-=
operation. Read moresource§impl SubAssign<AffineElement> for Element
impl SubAssign<AffineElement> for Element
source§fn sub_assign(&mut self, other: AffineElement)
fn sub_assign(&mut self, other: AffineElement)
Performs the
-=
operation. Read moresource§impl SubAssign for AffineElement
impl SubAssign for AffineElement
source§fn sub_assign(&mut self, other: AffineElement)
fn sub_assign(&mut self, other: AffineElement)
Performs the
-=
operation. Read moresource§impl<'a> Sum<&'a AffineElement> for Element
impl<'a> Sum<&'a AffineElement> for Element
source§fn sum<I: Iterator<Item = &'a AffineElement>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a AffineElement>>(iter: I) -> Self
Method which takes an iterator and generates
Self
from the elements by
“summing up” the items.source§impl Sum<AffineElement> for Element
impl Sum<AffineElement> for Element
source§fn sum<I: Iterator<Item = AffineElement>>(iter: I) -> Self
fn sum<I: Iterator<Item = AffineElement>>(iter: I) -> Self
Method which takes an iterator and generates
Self
from the elements by
“summing up” the items.source§impl Valid for AffineElement
impl Valid for AffineElement
source§impl Zeroize for AffineElement
impl Zeroize for AffineElement
impl Copy for AffineElement
impl Eq for AffineElement
Auto Trait Implementations§
impl Freeze for AffineElement
impl RefUnwindSafe for AffineElement
impl Send for AffineElement
impl Sync for AffineElement
impl Unpin for AffineElement
impl UnwindSafe for AffineElement
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
§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more