pub struct Ed448Point { /* private fields */ }Expand description
A point on edwards448 in projective coordinates (X : Y : Z).
Affine (x, y) = (X/Z, Y/Z). The neutral element is (0 : 1 : 1).
Addition and doubling use the unified projective formulas from the
RFC 8032 reference code (originally from the EFD), valid for the
untwisted Edwards curve a = 1, d = -39081.
Implementations§
Source§impl Ed448Point
impl Ed448Point
Sourcepub fn add(&self, q: &Ed448Point) -> Ed448Point
pub fn add(&self, q: &Ed448Point) -> Ed448Point
Point addition (unified projective formula, RFC 8032 ref code).
Sourcepub fn double(&self) -> Ed448Point
pub fn double(&self) -> Ed448Point
Point doubling (projective formula, RFC 8032 ref code).
Sourcepub fn ct_select(a: &Ed448Point, b: &Ed448Point, choice: u8) -> Ed448Point
pub fn ct_select(a: &Ed448Point, b: &Ed448Point, choice: u8) -> Ed448Point
Branchless point select: returns b if choice == 1, else a.
Sourcepub fn scalar_mul(&self, scalar_le: &[u8]) -> Ed448Point
pub fn scalar_mul(&self, scalar_le: &[u8]) -> Ed448Point
Scalar multiplication [k]·self, constant-time in k.
scalar_le is the little-endian byte encoding of k; every bit
(MSB→LSB) performs one double and one masked add, so the
operation sequence is independent of the scalar value.
Sourcepub fn equals(&self, q: &Ed448Point) -> bool
pub fn equals(&self, q: &Ed448Point) -> bool
Projective equality: self == q iff X1·Z2 == X2·Z1 && Y1·Z2 == Y2·Z1.
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
true if this is the neutral element (0 : 1 : 1) (projectively).
Trait Implementations§
Source§impl Clone for Ed448Point
impl Clone for Ed448Point
Source§fn clone(&self) -> Ed448Point
fn clone(&self) -> Ed448Point
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more