Struct ed448_goldilocks::curve::edwards::ExtendedPoint
source · pub struct ExtendedPoint { /* private fields */ }
Expand description
Represent points on the (untwisted) edwards curve using Extended Homogenous Projective Co-ordinates (x, y) -> (X/Z, Y/Z, Z, T) a = 1, d = -39081 XXX: Make this more descriptive Should this be renamed to EdwardsPoint so that we are consistent with Dalek crypto? Necessary as ExtendedPoint is not regular lingo?
Implementations§
source§impl ExtendedPoint
impl ExtendedPoint
sourcepub fn identity() -> ExtendedPoint
pub fn identity() -> ExtendedPoint
Identity point
sourcepub const fn generator() -> ExtendedPoint
pub const fn generator() -> ExtendedPoint
Generator for the prime subgroup
pub fn to_montgomery(&self) -> MontgomeryPoint
sourcepub fn scalar_mul(&self, scalar: &Scalar) -> ExtendedPoint
pub fn scalar_mul(&self, scalar: &Scalar) -> ExtendedPoint
Generic scalar multiplication to compute s*P
sourcepub fn scalar_mod_four(&self, scalar: &Scalar) -> ExtendedPoint
pub fn scalar_mod_four(&self, scalar: &Scalar) -> ExtendedPoint
Returns (scalar mod 4) * P in constant time
pub fn compress(&self) -> CompressedEdwardsY
pub fn add(&self, other: &ExtendedPoint) -> ExtendedPoint
pub fn double(&self) -> ExtendedPoint
pub fn to_affine(&self) -> AffinePoint
pub fn to_twisted(&self) -> TwistedExtendedPoint
pub fn negate(&self) -> ExtendedPoint
pub fn torque(&self) -> ExtendedPoint
sourcepub fn is_torsion_free(&self) -> bool
pub fn is_torsion_free(&self) -> bool
Determine if this point is “torsion-free”, i.e., is contained in the prime-order subgroup.
Return
true
ifself
has zero torsion component and is in the prime-order subgroup;false
ifself
has a nonzero torsion component and is not in the prime-order subgroup.
Trait Implementations§
source§impl<'a, 'b> Add<&'b ExtendedPoint> for &'a ExtendedPoint
impl<'a, 'b> Add<&'b ExtendedPoint> for &'a ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
+
operator.source§fn add(self, other: &'b ExtendedPoint) -> ExtendedPoint
fn add(self, other: &'b ExtendedPoint) -> ExtendedPoint
Performs the
+
operation. Read moresource§impl<'b> Add<&'b ExtendedPoint> for ExtendedPoint
impl<'b> Add<&'b ExtendedPoint> for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
+
operator.source§fn add(self, rhs: &'b ExtendedPoint) -> ExtendedPoint
fn add(self, rhs: &'b ExtendedPoint) -> ExtendedPoint
Performs the
+
operation. Read moresource§impl<'a> Add<ExtendedPoint> for &'a ExtendedPoint
impl<'a> Add<ExtendedPoint> for &'a ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
+
operator.source§fn add(self, rhs: ExtendedPoint) -> ExtendedPoint
fn add(self, rhs: ExtendedPoint) -> ExtendedPoint
Performs the
+
operation. Read moresource§impl Add<ExtendedPoint> for ExtendedPoint
impl Add<ExtendedPoint> for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
+
operator.source§fn add(self, rhs: ExtendedPoint) -> ExtendedPoint
fn add(self, rhs: ExtendedPoint) -> ExtendedPoint
Performs the
+
operation. Read moresource§impl<'b> AddAssign<&'b ExtendedPoint> for ExtendedPoint
impl<'b> AddAssign<&'b ExtendedPoint> for ExtendedPoint
source§fn add_assign(&mut self, _rhs: &'b ExtendedPoint)
fn add_assign(&mut self, _rhs: &'b ExtendedPoint)
Performs the
+=
operation. Read moresource§impl AddAssign<ExtendedPoint> for ExtendedPoint
impl AddAssign<ExtendedPoint> for ExtendedPoint
source§fn add_assign(&mut self, rhs: ExtendedPoint)
fn add_assign(&mut self, rhs: ExtendedPoint)
Performs the
+=
operation. Read moresource§impl Clone for ExtendedPoint
impl Clone for ExtendedPoint
source§fn clone(&self) -> ExtendedPoint
fn clone(&self) -> ExtendedPoint
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 ConditionallySelectable for ExtendedPoint
impl ConditionallySelectable for ExtendedPoint
source§impl ConstantTimeEq for ExtendedPoint
impl ConstantTimeEq for ExtendedPoint
source§impl Debug for ExtendedPoint
impl Debug for ExtendedPoint
source§impl Default for ExtendedPoint
impl Default for ExtendedPoint
source§fn default() -> ExtendedPoint
fn default() -> ExtendedPoint
Returns the “default value” for a type. Read more
source§impl<'a, 'b> Mul<&'b ExtendedPoint> for &'a Scalar
impl<'a, 'b> Mul<&'b ExtendedPoint> for &'a Scalar
source§fn mul(self, point: &'b ExtendedPoint) -> ExtendedPoint
fn mul(self, point: &'b ExtendedPoint) -> ExtendedPoint
Scalar multiplication: compute scalar * self
.
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§impl<'b> Mul<&'b ExtendedPoint> for Scalar
impl<'b> Mul<&'b ExtendedPoint> for Scalar
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§fn mul(self, rhs: &'b ExtendedPoint) -> ExtendedPoint
fn mul(self, rhs: &'b ExtendedPoint) -> ExtendedPoint
Performs the
*
operation. Read moresource§impl<'a, 'b> Mul<&'b Scalar> for &'a ExtendedPoint
impl<'a, 'b> Mul<&'b Scalar> for &'a ExtendedPoint
source§fn mul(self, scalar: &'b Scalar) -> ExtendedPoint
fn mul(self, scalar: &'b Scalar) -> ExtendedPoint
Scalar multiplication: compute scalar * self
.
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§impl<'b> Mul<&'b Scalar> for ExtendedPoint
impl<'b> Mul<&'b Scalar> for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§impl<'a> Mul<ExtendedPoint> for &'a Scalar
impl<'a> Mul<ExtendedPoint> for &'a Scalar
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§fn mul(self, rhs: ExtendedPoint) -> ExtendedPoint
fn mul(self, rhs: ExtendedPoint) -> ExtendedPoint
Performs the
*
operation. Read moresource§impl Mul<ExtendedPoint> for Scalar
impl Mul<ExtendedPoint> for Scalar
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§fn mul(self, rhs: ExtendedPoint) -> ExtendedPoint
fn mul(self, rhs: ExtendedPoint) -> ExtendedPoint
Performs the
*
operation. Read moresource§impl<'a> Mul<Scalar> for &'a ExtendedPoint
impl<'a> Mul<Scalar> for &'a ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§impl Mul<Scalar> for ExtendedPoint
impl Mul<Scalar> for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
*
operator.source§impl<'b> MulAssign<&'b Scalar> for ExtendedPoint
impl<'b> MulAssign<&'b Scalar> for ExtendedPoint
source§fn mul_assign(&mut self, scalar: &'b Scalar)
fn mul_assign(&mut self, scalar: &'b Scalar)
Performs the
*=
operation. Read moresource§impl MulAssign<Scalar> for ExtendedPoint
impl MulAssign<Scalar> for ExtendedPoint
source§fn mul_assign(&mut self, rhs: Scalar)
fn mul_assign(&mut self, rhs: Scalar)
Performs the
*=
operation. Read moresource§impl<'a> Neg for &'a ExtendedPoint
impl<'a> Neg for &'a ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
-
operator.source§fn neg(self) -> ExtendedPoint
fn neg(self) -> ExtendedPoint
Performs the unary
-
operation. Read moresource§impl Neg for ExtendedPoint
impl Neg for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
-
operator.source§fn neg(self) -> ExtendedPoint
fn neg(self) -> ExtendedPoint
Performs the unary
-
operation. Read moresource§impl PartialEq<ExtendedPoint> for ExtendedPoint
impl PartialEq<ExtendedPoint> for ExtendedPoint
source§fn eq(&self, other: &ExtendedPoint) -> bool
fn eq(&self, other: &ExtendedPoint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a, 'b> Sub<&'b ExtendedPoint> for &'a ExtendedPoint
impl<'a, 'b> Sub<&'b ExtendedPoint> for &'a ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
-
operator.source§fn sub(self, other: &'b ExtendedPoint) -> ExtendedPoint
fn sub(self, other: &'b ExtendedPoint) -> ExtendedPoint
Performs the
-
operation. Read moresource§impl<'b> Sub<&'b ExtendedPoint> for ExtendedPoint
impl<'b> Sub<&'b ExtendedPoint> for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
-
operator.source§fn sub(self, rhs: &'b ExtendedPoint) -> ExtendedPoint
fn sub(self, rhs: &'b ExtendedPoint) -> ExtendedPoint
Performs the
-
operation. Read moresource§impl<'a> Sub<ExtendedPoint> for &'a ExtendedPoint
impl<'a> Sub<ExtendedPoint> for &'a ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
-
operator.source§fn sub(self, rhs: ExtendedPoint) -> ExtendedPoint
fn sub(self, rhs: ExtendedPoint) -> ExtendedPoint
Performs the
-
operation. Read moresource§impl Sub<ExtendedPoint> for ExtendedPoint
impl Sub<ExtendedPoint> for ExtendedPoint
§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
-
operator.source§fn sub(self, rhs: ExtendedPoint) -> ExtendedPoint
fn sub(self, rhs: ExtendedPoint) -> ExtendedPoint
Performs the
-
operation. Read moresource§impl<'b> SubAssign<&'b ExtendedPoint> for ExtendedPoint
impl<'b> SubAssign<&'b ExtendedPoint> for ExtendedPoint
source§fn sub_assign(&mut self, _rhs: &'b ExtendedPoint)
fn sub_assign(&mut self, _rhs: &'b ExtendedPoint)
Performs the
-=
operation. Read moresource§impl SubAssign<ExtendedPoint> for ExtendedPoint
impl SubAssign<ExtendedPoint> for ExtendedPoint
source§fn sub_assign(&mut self, rhs: ExtendedPoint)
fn sub_assign(&mut self, rhs: ExtendedPoint)
Performs the
-=
operation. Read more