Curve25519Config

Struct Curve25519Config 

Source
pub struct Curve25519Config;
Expand description

Curve25519’s Curve Details.

Trait Implementations§

Source§

impl Clone for Curve25519Config

Source§

fn clone(&self) -> Curve25519Config

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CurveConfig for Curve25519Config

Source§

const COFACTOR: &'static [u64]

The cofactor of this curve, represented as a sequence of little-endian limbs.
Source§

const COFACTOR_INV: Fr

The inverse of the cofactor.
Source§

type BaseField = Fp<Curve25519FqParam, { usize::div_ceil( $bits, $crate::arithmetic::limb::Limb::BITS as usize, ) }>

Base field that the curve is defined over.
Source§

type ScalarField = Fp<Curve25519FrParam, { usize::div_ceil( $bits, $crate::arithmetic::limb::Limb::BITS as usize, ) }>

Finite prime field corresponding to an appropriate prime-order subgroup of the curve group.
Source§

fn cofactor_is_one() -> bool

Returns true if the cofactor is one.
Source§

impl Default for Curve25519Config

Source§

fn default() -> Curve25519Config

Returns the “default value” for a type. Read more
Source§

impl MontCurveConfig for Curve25519Config

Source§

const COEFF_A: Self::BaseField

Coefficient a of the curve equation.
Source§

const COEFF_B: Self::BaseField

Coefficient b of the curve equation.
Source§

type TECurveConfig = Curve25519Config

Model parameters for the Twisted Edwards curve that is birationally equivalent to this curve.
Source§

impl PartialEq for Curve25519Config

Source§

fn eq(&self, other: &Curve25519Config) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TECurveConfig for Curve25519Config

Source§

const COEFF_A: Self::BaseField

Coefficient a of the curve equation.
Source§

const COEFF_D: Self::BaseField

Coefficient d of the curve equation.
Source§

const GENERATOR: Affine<Self>

Generator of the prime-order subgroup.
Source§

type MontCurveConfig = Curve25519Config

Model parameters for the Montgomery curve that is birationally equivalent to this curve.
Source§

fn mul_by_a(elem: Self::BaseField) -> Self::BaseField

Helper method for computing elem * Self::COEFF_A. Read more
Source§

fn is_in_prime_order_subgroup(item: &Affine<Self>) -> bool

Checks that the current point is in the prime order subgroup, assuming the point is already on the curve.
Source§

fn clear_cofactor(item: &Affine<Self>) -> Affine<Self>

Performs cofactor clearing. The default method is simply to multiply by the cofactor. For some curve families though, it is sufficient to multiply by a smaller scalar.
Source§

fn mul_projective( base: &Projective<Self>, scalar: impl BitIteratorBE, ) -> Projective<Self>

Default implementation of group multiplication for projective coordinates.
Source§

fn mul_affine( base: &Affine<Self>, scalar: impl BitIteratorBE, ) -> Projective<Self>

Default implementation of group multiplication for affine coordinates.
Source§

impl Eq for Curve25519Config

Source§

impl StructuralPartialEq for Curve25519Config

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.