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
§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<'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 AffineElement
impl Add<AffineElement> for 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<'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 AddAssign<AffineElement> for AffineElement
impl AddAssign<AffineElement> for AffineElement
source§fn add_assign(&mut self, other: AffineElement)
fn add_assign(&mut self, other: AffineElement)
Performs the
+= operation. Read moresource§impl AffineCurve for AffineElement
impl AffineCurve for AffineElement
const COFACTOR: &'static [u64] = _
type ScalarField = Fp256<FrParameters>
type BaseField = Fp256<FrParameters>
type Projective = Element
source§fn prime_subgroup_generator() -> Self
fn prime_subgroup_generator() -> Self
Returns a fixed generator of unknown exponent.
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<S: Into<<Self::ScalarField as PrimeField>::BigInt>>(
&self,
other: S
) -> Self::Projective
fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInt>>( &self, other: S ) -> Self::Projective
Performs scalar multiplication of this element with mixed addition.
source§fn mul_by_cofactor_to_projective(&self) -> Self::Projective
fn mul_by_cofactor_to_projective(&self) -> Self::Projective
Multiply this element by the cofactor and output the
resulting projective element.
source§fn mul_by_cofactor_inv(&self) -> Self
fn mul_by_cofactor_inv(&self) -> Self
Multiply this element by the inverse of the cofactor in
Self::ScalarField.source§fn into_projective(&self) -> Self::Projective
fn into_projective(&self) -> Self::Projective
Converts self into the projective representation.
source§fn mul_by_cofactor(&self) -> Self
fn mul_by_cofactor(&self) -> Self
Multiply this element by the cofactor.
source§impl CanonicalDeserialize for AffineElement
impl CanonicalDeserialize for AffineElement
source§fn deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>
fn deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>
Reads
Self from reader.source§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
Reads
Self from reader without compression.source§fn deserialize_unchecked<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_unchecked<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
Reads
self from reader without compression, and without performing
validity checks. Should be used only when the input is trusted.source§impl CanonicalSerialize for AffineElement
impl CanonicalSerialize for AffineElement
fn serialized_size(&self) -> usize
source§fn serialize<W: Write>(&self, writer: W) -> Result<(), SerializationError>
fn serialize<W: Write>(&self, writer: W) -> Result<(), SerializationError>
Serializes
self into writer.
It is left up to a particular type for how it strikes the
serialization efficiency vs compression tradeoff.
For standard types (e.g. bool, lengths, etc.) typically an uncompressed
form is used, whereas for algebraic types compressed forms are used. Read moresource§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
Serializes
self into writer without compression.source§fn serialize_unchecked<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn serialize_unchecked<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
Serializes
self into writer without compression, and without
performing validity checks. Should be used only when there is no
danger of adversarial manipulation of the output.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 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 FromBytes for AffineElement
impl FromBytes 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 Fp256<FrParameters>> for &'a AffineElement
impl<'a, 'b> Mul<&'b Fp256<FrParameters>> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
* operator.source§impl<'b> Mul<&'b Fp256<FrParameters>> for AffineElement
impl<'b> Mul<&'b Fp256<FrParameters>> for AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
* operator.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<Fp256<FrParameters>> for &'a AffineElement
impl<'a> Mul<Fp256<FrParameters>> for &'a AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
* operator.source§impl Mul<Fp256<FrParameters>> for AffineElement
impl Mul<Fp256<FrParameters>> for AffineElement
§type Output = AffineElement
type Output = AffineElement
The resulting type after applying the
* operator.source§impl<'b> MulAssign<&'b Fp256<FrParameters>> for AffineElement
impl<'b> MulAssign<&'b Fp256<FrParameters>> 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<Fp256<FrParameters>> for AffineElement
impl MulAssign<Fp256<FrParameters>> 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<AffineElement> for AffineElement
impl PartialEq<AffineElement> 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<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 AffineElement
impl Sub<AffineElement> 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 SubAssign<AffineElement> for AffineElement
impl SubAssign<AffineElement> for AffineElement
source§fn sub_assign(&mut self, other: AffineElement)
fn sub_assign(&mut self, other: AffineElement)
Performs the
-= operation. Read more