pub struct EdwardsPoint { /* private fields */ }Expand description
An EdwardsPoint represents a point on the Edwards form of Curve25519.
Implementations§
Source§impl EdwardsPoint
impl EdwardsPoint
Sourcepub fn to_montgomery(&self) -> MontgomeryPoint
pub fn to_montgomery(&self) -> MontgomeryPoint
Convert this EdwardsPoint on the Edwards model to the
corresponding MontgomeryPoint on the Montgomery model.
This function has one exceptional case; the identity point of the Edwards curve is sent to the 2-torsion point \((0,0)\) on the Montgomery curve.
Note that this is a one-way conversion, since the Montgomery model does not retain sign information.
theorem to_montgomery_spec (self : EdwardsPoint)
(hvalid : self.IsValid)
(h_Y_bounds : ∀ i < 5, self.Y[i]!.val < 2 ^ 53)
(h_Z_bounds : ∀ i < 5, self.Z[i]!.val < 2 ^ 53) :
to_montgomery self ⦃ (mp : montgomery.MontgomeryPoint) =>
let Y := Field51_as_Nat self.Y
let Z := Field51_as_Nat self.Z
let u := U8x32_as_Nat mp
if Z % p = Y % p then
u % p = 0 ∧ (∀ n : ℕ, fromEdwards (n • self.toPoint) = 0)
else
((u * Z) % p = (u * Y + (Z + Y)) % p) ∧
abs_montgomery (fromEdwards self.toPoint) = MontgomeryPoint.mkPoint mp ⦄
Sourcepub fn to_montgomery_batch(eds: &[Self]) -> Vec<MontgomeryPoint>
Available on crate feature alloc and non-verify only.
pub fn to_montgomery_batch(eds: &[Self]) -> Vec<MontgomeryPoint>
alloc and non-verify only.Converts a large batch of points to Edwards at once. This has the same
behavior on identity elements as Self::to_montgomery.
Sourcepub fn compress(&self) -> CompressedEdwardsY
pub fn compress(&self) -> CompressedEdwardsY
Compress this point to CompressedEdwardsY format.
theorem compress_spec (self : EdwardsPoint) (hself : self.IsValid) :
compress self ⦃ (result : CompressedEdwardsY) =>
U8x32_as_Nat result = compress_edwards_pure self.toPoint ⦄
Sourcepub fn compress_batch(inputs: &[EdwardsPoint]) -> Vec<CompressedEdwardsY>
Available on crate feature alloc and non-verify only.
pub fn compress_batch(inputs: &[EdwardsPoint]) -> Vec<CompressedEdwardsY>
alloc and non-verify only.Compress several EdwardsPoints into CompressedEdwardsY format, using a batch inversion
for a significant speedup.
Source§impl EdwardsPoint
impl EdwardsPoint
Sourcepub fn mul_base(scalar: &Scalar) -> Self
pub fn mul_base(scalar: &Scalar) -> Self
Fixed-base scalar multiplication by the Ed25519 base point.
Uses precomputed basepoint tables when the precomputed-tables feature
is enabled, trading off increased code size for ~4x better performance.
theorem mul_base_spec (scalar : scalar.Scalar)
(h_s_canonical : U8x32_as_Nat scalar.bytes < 2 ^ 255) :
mul_base scalar ⦃ (res : EdwardsPoint) =>
EdwardsPoint.IsValid res ∧
res.toPoint = (U8x32_as_Nat scalar.bytes) • _root_.Edwards.basepoint ⦄
Sourcepub fn mul_clamped(self, bytes: [u8; 32]) -> Self
pub fn mul_clamped(self, bytes: [u8; 32]) -> Self
Multiply this point by clamp_integer(bytes). For a description of clamping, see
clamp_integer.
theorem mul_clamped_spec (self : EdwardsPoint) (bytes : Array U8 32#usize)
(h_self_valid : self.IsValid) :
mul_clamped self bytes ⦃ (result : EdwardsPoint) =>
result.IsValid ∧
(∃ clamped_scalar,
h ∣ U8x32_as_Nat clamped_scalar ∧
U8x32_as_Nat clamped_scalar < 2 ^ 255 ∧
2 ^ 254 ≤ U8x32_as_Nat clamped_scalar ∧
result.toPoint = (U8x32_as_Nat clamped_scalar) • self.toPoint) ⦄
Sourcepub fn mul_base_clamped(bytes: [u8; 32]) -> Self
pub fn mul_base_clamped(bytes: [u8; 32]) -> Self
Multiply the basepoint by clamp_integer(bytes). For a description of clamping, see
clamp_integer.
theorem mul_base_clamped_spec (bytes : Array U8 32#usize) :
mul_base_clamped bytes ⦃ (result : EdwardsPoint) =>
EdwardsPoint.IsValid result ∧
(∃ clamped_scalar,
h ∣ U8x32_as_Nat clamped_scalar ∧
U8x32_as_Nat clamped_scalar < 2 ^ 255 ∧
2 ^ 254 ≤ U8x32_as_Nat clamped_scalar ∧
result.toPoint = ((U8x32_as_Nat clamped_scalar) • _root_.Edwards.basepoint)) ⦄
Source§impl EdwardsPoint
impl EdwardsPoint
Sourcepub fn vartime_double_scalar_mul_basepoint(
a: &Scalar,
A: &EdwardsPoint,
b: &Scalar,
) -> EdwardsPoint
Available on non-verify only.
pub fn vartime_double_scalar_mul_basepoint( a: &Scalar, A: &EdwardsPoint, b: &Scalar, ) -> EdwardsPoint
verify only.Compute \(aA + bB\) in variable time, where \(B\) is the Ed25519 basepoint.
Source§impl EdwardsPoint
impl EdwardsPoint
Sourcepub fn mul_by_cofactor(&self) -> EdwardsPoint
pub fn mul_by_cofactor(&self) -> EdwardsPoint
Multiply by the cofactor: return \([8]P\).
theorem mul_by_cofactor_spec (self : EdwardsPoint) (hself : self.IsValid) :
mul_by_cofactor self ⦃ (result : EdwardsPoint) =>
result.IsValid ∧
result.toPoint = h • self.toPoint ⦄
Sourcepub fn is_small_order(&self) -> bool
pub fn is_small_order(&self) -> bool
Determine if this point is of small order.
§Return
trueifselfis in the torsion subgroup \( \mathcal E[8] \);falseifselfis not in the torsion subgroup \( \mathcal E[8] \).
§Example
use curve25519_dalek::constants;
// Generator of the prime-order subgroup
let P = constants::ED25519_BASEPOINT_POINT;
// Generator of the torsion subgroup
let Q = constants::EIGHT_TORSION[1];
// P has large order
assert_eq!(P.is_small_order(), false);
// Q has small order
assert_eq!(Q.is_small_order(), true);theorem is_small_order_spec (self : EdwardsPoint) (hself : self.IsValid) :
is_small_order self ⦃ (result : Bool) =>
(result ↔ h • self.toPoint = 0) ⦄
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
trueifselfhas zero torsion component and is in the prime-order subgroup;falseifselfhas a nonzero torsion component and is not in the prime-order subgroup.
§Example
use curve25519_dalek::constants;
// Generator of the prime-order subgroup
let P = constants::ED25519_BASEPOINT_POINT;
// Generator of the torsion subgroup
let Q = constants::EIGHT_TORSION[1];
// P is torsion-free
assert_eq!(P.is_torsion_free(), true);
// P + Q is not torsion-free
assert_eq!((P+Q).is_torsion_free(), false);theorem is_torsion_free_spec
(self : EdwardsPoint) (hself : self.IsValid) :
is_torsion_free self ⦃ (result : Bool) =>
(result ↔ L • self.toPoint = 0) ⦄
Trait Implementations§
Source§impl<'a> Add<&'a AffineNielsPoint> for &EdwardsPoint
impl<'a> Add<&'a AffineNielsPoint> for &EdwardsPoint
Source§type Output = CompletedPoint
type Output = CompletedPoint
+ operator.Source§fn add(self, other: &'a AffineNielsPoint) -> CompletedPoint
fn add(self, other: &'a AffineNielsPoint) -> CompletedPoint
+ operation. Read moreSource§impl<'a> Add<&'a EdwardsPoint> for &EdwardsPoint
impl<'a> Add<&'a EdwardsPoint> for &EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
+ operator.Source§fn add(self, other: &'a EdwardsPoint) -> EdwardsPoint
fn add(self, other: &'a EdwardsPoint) -> EdwardsPoint
+ operation. Read moretheorem add_spec
(self : edwards.EdwardsPoint)
(other : backend.serial.curve_models.AffineNielsPoint)
(h_selfX_bounds : ∀ i, i < 5 → (self.X[i]!).val < 2 ^ 53)
(h_selfY_bounds : ∀ i, i < 5 → (self.Y[i]!).val < 2 ^ 53)
(h_selfZ_bounds : ∀ i, i < 5 → (self.Z[i]!).val < 2 ^ 53)
(h_selfT_bounds : ∀ i, i < 5 → (self.T[i]!).val < 2 ^ 53)
(h_otherYpX_bounds : ∀ i, i < 5 → (other.y_plus_x[i]!).val < 2 ^ 53)
(h_otherYmX_bounds : ∀ i, i < 5 → (other.y_minus_x[i]!).val < 2 ^ 53)
(h_otherXY2d_bounds : ∀ i, i < 5 → (other.xy2d[i]!).val < 2 ^ 53) :
Shared0EdwardsPoint.Insts.CoreOpsArithAddSharedAAffineNielsPointCompletedPoint.add self other
⦃ (c : CompletedPoint) =>
let X := Field51_as_Nat self.X
let Y := Field51_as_Nat self.Y
let Z := Field51_as_Nat self.Z
let T := Field51_as_Nat self.T
let YpX := Field51_as_Nat other.y_plus_x
let YmX := Field51_as_Nat other.y_minus_x
let XY2D := Field51_as_Nat other.xy2d
let X' := Field51_as_Nat c.X
let Y' := Field51_as_Nat c.Y
let Z' := Field51_as_Nat c.Z
let T' := Field51_as_Nat c.T
(X' + Y * YmX) % p = (((Y + X) * YpX) + X * YmX) % p ∧
(Y' + X * YmX) % p = (((Y + X) * YpX) + Y * YmX) % p ∧
Z' % p = ((2 * Z) + (T * XY2D)) % p ∧
(T' + (T * XY2D)) % p = (2 * Z) % p ⦄
Source§impl<'b> Add<&'b EdwardsPoint> for EdwardsPoint
impl<'b> Add<&'b EdwardsPoint> for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
+ operator.Source§fn add(self, rhs: &'b EdwardsPoint) -> EdwardsPoint
fn add(self, rhs: &'b EdwardsPoint) -> EdwardsPoint
+ operation. Read moreSource§impl<'a> Add<&'a ProjectiveNielsPoint> for &EdwardsPoint
impl<'a> Add<&'a ProjectiveNielsPoint> for &EdwardsPoint
Source§type Output = CompletedPoint
type Output = CompletedPoint
+ operator.Source§fn add(self, other: &'a ProjectiveNielsPoint) -> CompletedPoint
fn add(self, other: &'a ProjectiveNielsPoint) -> CompletedPoint
+ operation. Read moreSource§impl<'a> Add<EdwardsPoint> for &'a EdwardsPoint
impl<'a> Add<EdwardsPoint> for &'a EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
+ operator.Source§fn add(self, rhs: EdwardsPoint) -> EdwardsPoint
fn add(self, rhs: EdwardsPoint) -> EdwardsPoint
+ operation. Read moreSource§impl Add for EdwardsPoint
impl Add for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
+ operator.Source§fn add(self, rhs: EdwardsPoint) -> EdwardsPoint
fn add(self, rhs: EdwardsPoint) -> EdwardsPoint
+ operation. Read moreSource§impl<'a> AddAssign<&'a EdwardsPoint> for EdwardsPoint
impl<'a> AddAssign<&'a EdwardsPoint> for EdwardsPoint
Source§fn add_assign(&mut self, _rhs: &'a EdwardsPoint)
fn add_assign(&mut self, _rhs: &'a EdwardsPoint)
+= operation. Read moreSource§impl AddAssign for EdwardsPoint
impl AddAssign for EdwardsPoint
Source§fn add_assign(&mut self, rhs: EdwardsPoint)
fn add_assign(&mut self, rhs: EdwardsPoint)
+= operation. Read moreSource§impl Clone for EdwardsPoint
impl Clone for EdwardsPoint
Source§fn clone(&self) -> EdwardsPoint
fn clone(&self) -> EdwardsPoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConditionallySelectable for EdwardsPoint
impl ConditionallySelectable for EdwardsPoint
Source§fn conditional_select(
a: &EdwardsPoint,
b: &EdwardsPoint,
choice: Choice,
) -> EdwardsPoint
fn conditional_select( a: &EdwardsPoint, b: &EdwardsPoint, choice: Choice, ) -> EdwardsPoint
theorem conditional_select_spec (a b : EdwardsPoint) (choice : subtle.Choice) :
conditional_select a b choice ⦃ (result : EdwardsPoint) =>
result = if choice.val = 1#u8 then b else a ⦄
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl ConstantTimeEq for EdwardsPoint
impl ConstantTimeEq for EdwardsPoint
Source§fn ct_eq(&self, other: &EdwardsPoint) -> Choice
fn ct_eq(&self, other: &EdwardsPoint) -> Choice
theorem ct_eq_spec (self other : EdwardsPoint)
(h_self_X : ∀ i, i < 5 → self.X.val[i]!.val ≤ 2 ^ 53)
(h_self_Y : ∀ i, i < 5 → self.Y.val[i]!.val ≤ 2 ^ 53)
(h_self_Z : ∀ i, i < 5 → self.Z.val[i]!.val ≤ 2 ^ 53)
(h_other_X : ∀ i, i < 5 → other.X.val[i]!.val ≤ 2 ^ 53)
(h_other_Y : ∀ i, i < 5 → other.Y.val[i]!.val ≤ 2 ^ 53)
(h_other_Z : ∀ i, i < 5 → other.Z.val[i]!.val ≤ 2 ^ 53) :
ct_eq self other ⦃ (c : subtle.Choice) =>
(c = Choice.one ↔
(Field51_as_Nat self.X * Field51_as_Nat other.Z)
≡ (Field51_as_Nat other.X * Field51_as_Nat self.Z) [MOD p] ∧
(Field51_as_Nat self.Y * Field51_as_Nat other.Z)
≡ (Field51_as_Nat other.Y * Field51_as_Nat self.Z) [MOD p]) ∧
(self.IsValid → other.IsValid → (c = Choice.one ↔ self.toPoint = other.toPoint)) ⦄
Source§impl Debug for EdwardsPoint
impl Debug for EdwardsPoint
Source§impl Default for EdwardsPoint
impl Default for EdwardsPoint
Source§fn default() -> EdwardsPoint
fn default() -> EdwardsPoint
Source§impl Identity for EdwardsPoint
impl Identity for EdwardsPoint
Source§fn identity() -> EdwardsPoint
fn identity() -> EdwardsPoint
theorem identity_spec :
identity ⦃ (result : EdwardsPoint) =>
Field51_as_Nat result.X = 0 ∧
Field51_as_Nat result.Y = 1 ∧
Field51_as_Nat result.Z = 1 ∧
Field51_as_Nat result.T = 0 ∧
result.IsValid ∧
result.toPoint = 0 ⦄
Source§impl<'a> Mul<&'a EdwardsPoint> for &Scalar
impl<'a> Mul<&'a EdwardsPoint> for &Scalar
Source§fn mul(self, point: &'a EdwardsPoint) -> EdwardsPoint
fn mul(self, point: &'a EdwardsPoint) -> EdwardsPoint
Scalar multiplication: compute scalar * self.
For scalar multiplication of a basepoint,
EdwardsBasepointTable is approximately 4x faster.
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§impl<'b> Mul<&'b EdwardsPoint> for Scalar
impl<'b> Mul<&'b EdwardsPoint> for Scalar
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§fn mul(self, rhs: &'b EdwardsPoint) -> EdwardsPoint
fn mul(self, rhs: &'b EdwardsPoint) -> EdwardsPoint
* operation. Read moreSource§impl<'a> Mul<&'a Scalar> for &EdwardsPoint
impl<'a> Mul<&'a Scalar> for &EdwardsPoint
Source§fn mul(self, scalar: &'a Scalar) -> EdwardsPoint
fn mul(self, scalar: &'a Scalar) -> EdwardsPoint
Scalar multiplication: compute scalar * self.
For scalar multiplication of a basepoint,
EdwardsBasepointTable is approximately 4x faster.
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§impl<'b> Mul<&'b Scalar> for EdwardsPoint
impl<'b> Mul<&'b Scalar> for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§fn mul(self, rhs: &'b Scalar) -> EdwardsPoint
fn mul(self, rhs: &'b Scalar) -> EdwardsPoint
* operation. Read moretheorem mul_spec
(self : edwards.EdwardsPoint) (scalar : scalar.Scalar)
(h_scalar_canonical : U8x32_as_Nat scalar.bytes < 2 ^ 255)
(h_self_valid : self.IsValid) :
mul self scalar ⦃ (result : edwards.EdwardsPoint) =>
result.IsValid ∧
result.toPoint = (U8x32_as_Nat scalar.bytes) • self.toPoint ⦄
Source§impl<'a> Mul<EdwardsPoint> for &'a Scalar
impl<'a> Mul<EdwardsPoint> for &'a Scalar
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§fn mul(self, rhs: EdwardsPoint) -> EdwardsPoint
fn mul(self, rhs: EdwardsPoint) -> EdwardsPoint
* operation. Read moreSource§impl Mul<EdwardsPoint> for Scalar
impl Mul<EdwardsPoint> for Scalar
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§fn mul(self, rhs: EdwardsPoint) -> EdwardsPoint
fn mul(self, rhs: EdwardsPoint) -> EdwardsPoint
* operation. Read moreSource§impl<'a> Mul<Scalar> for &'a EdwardsPoint
impl<'a> Mul<Scalar> for &'a EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§impl Mul<Scalar> for EdwardsPoint
impl Mul<Scalar> for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
* operator.Source§impl<'a> MulAssign<&'a Scalar> for EdwardsPoint
impl<'a> MulAssign<&'a Scalar> for EdwardsPoint
Source§fn mul_assign(&mut self, scalar: &'a Scalar)
fn mul_assign(&mut self, scalar: &'a Scalar)
*= operation. Read moreSource§impl MulAssign<Scalar> for EdwardsPoint
impl MulAssign<Scalar> for EdwardsPoint
Source§fn mul_assign(&mut self, rhs: Scalar)
fn mul_assign(&mut self, rhs: Scalar)
*= operation. Read moreSource§impl MultiscalarMul for EdwardsPoint
Available on crate feature alloc only.
impl MultiscalarMul for EdwardsPoint
alloc only.Source§type Point = EdwardsPoint
type Point = EdwardsPoint
RistrettoPoint.Source§fn multiscalar_mul<I, J>(scalars: I, points: J) -> EdwardsPoint
fn multiscalar_mul<I, J>(scalars: I, points: J) -> EdwardsPoint
Source§impl Neg for &EdwardsPoint
impl Neg for &EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
- operator.Source§fn neg(self) -> EdwardsPoint
fn neg(self) -> EdwardsPoint
- operation. Read moretheorem neg_spec
(self : edwards.EdwardsPoint)
(h_self_valid : self.IsValid) :
neg self ⦃ (result : edwards.EdwardsPoint) =>
result.IsValid ∧
result.toPoint = -self.toPoint ⦄
Source§impl Neg for EdwardsPoint
impl Neg for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
- operator.Source§fn neg(self) -> EdwardsPoint
fn neg(self) -> EdwardsPoint
- operation. Read moreSource§impl PartialEq for EdwardsPoint
impl PartialEq for EdwardsPoint
Source§fn eq(&self, other: &EdwardsPoint) -> bool
fn eq(&self, other: &EdwardsPoint) -> bool
self and other values to be equal, and is used by ==.theorem eq_spec (self other : EdwardsPoint)
(h_self_valid : self.IsValid) (h_other_valid : other.IsValid) :
eq self other ⦃ (result : Bool) =>
result = true ↔ self.toPoint = other.toPoint ⦄
Source§impl<'a> Sub<&'a AffineNielsPoint> for &EdwardsPoint
impl<'a> Sub<&'a AffineNielsPoint> for &EdwardsPoint
Source§type Output = CompletedPoint
type Output = CompletedPoint
- operator.Source§fn sub(self, other: &'a AffineNielsPoint) -> CompletedPoint
fn sub(self, other: &'a AffineNielsPoint) -> CompletedPoint
- operation. Read moreSource§impl<'a> Sub<&'a EdwardsPoint> for &EdwardsPoint
impl<'a> Sub<&'a EdwardsPoint> for &EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
- operator.Source§fn sub(self, other: &'a EdwardsPoint) -> EdwardsPoint
fn sub(self, other: &'a EdwardsPoint) -> EdwardsPoint
- operation. Read moretheorem sub_spec
(self : edwards.EdwardsPoint)
(other : backend.serial.curve_models.AffineNielsPoint)
(h_selfX_bounds : ∀ i, i < 5 → (self.X[i]!).val < 2 ^ 53)
(h_selfY_bounds : ∀ i, i < 5 → (self.Y[i]!).val < 2 ^ 53)
(h_selfZ_bounds : ∀ i, i < 5 → (self.Z[i]!).val < 2 ^ 53)
(h_selfT_bounds : ∀ i, i < 5 → (self.T[i]!).val < 2 ^ 53)
(h_otherYpX_bounds : ∀ i, i < 5 → (other.y_plus_x[i]!).val < 2 ^ 53)
(h_otherYmX_bounds : ∀ i, i < 5 → (other.y_minus_x[i]!).val < 2 ^ 53)
(h_otherXY2d_bounds : ∀ i, i < 5 → (other.xy2d[i]!).val < 2 ^ 53) :
Shared0EdwardsPoint.Insts.CoreOpsArithSubSharedAAffineNielsPointCompletedPoint.sub self other
⦃ (c : CompletedPoint) =>
let X := Field51_as_Nat self.X
let Y := Field51_as_Nat self.Y
let Z := Field51_as_Nat self.Z
let T := Field51_as_Nat self.T
let YpX := Field51_as_Nat other.y_plus_x
let YmX := Field51_as_Nat other.y_minus_x
let XY2D := Field51_as_Nat other.xy2d
let X' := Field51_as_Nat c.X
let Y' := Field51_as_Nat c.Y
let Z' := Field51_as_Nat c.Z
let T' := Field51_as_Nat c.T
(X' + Y * YpX) % p = (((Y + X) * YmX) + X * YpX) % p ∧
(Y' + X * YpX) % p = (((Y + X) * YmX) + Y * YpX) % p ∧
(Z' + (T * XY2D)) % p = (2 * Z) % p ∧
T' % p = ((2 * Z) + (T * XY2D)) % p ⦄
Source§impl<'b> Sub<&'b EdwardsPoint> for EdwardsPoint
impl<'b> Sub<&'b EdwardsPoint> for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
- operator.Source§fn sub(self, rhs: &'b EdwardsPoint) -> EdwardsPoint
fn sub(self, rhs: &'b EdwardsPoint) -> EdwardsPoint
- operation. Read moreSource§impl<'a> Sub<&'a ProjectiveNielsPoint> for &EdwardsPoint
impl<'a> Sub<&'a ProjectiveNielsPoint> for &EdwardsPoint
Source§type Output = CompletedPoint
type Output = CompletedPoint
- operator.Source§fn sub(self, other: &'a ProjectiveNielsPoint) -> CompletedPoint
fn sub(self, other: &'a ProjectiveNielsPoint) -> CompletedPoint
- operation. Read moreSource§impl<'a> Sub<EdwardsPoint> for &'a EdwardsPoint
impl<'a> Sub<EdwardsPoint> for &'a EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
- operator.Source§fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint
fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint
- operation. Read moreSource§impl Sub for EdwardsPoint
impl Sub for EdwardsPoint
Source§type Output = EdwardsPoint
type Output = EdwardsPoint
- operator.Source§fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint
fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint
- operation. Read moreSource§impl<'a> SubAssign<&'a EdwardsPoint> for EdwardsPoint
impl<'a> SubAssign<&'a EdwardsPoint> for EdwardsPoint
Source§fn sub_assign(&mut self, _rhs: &'a EdwardsPoint)
fn sub_assign(&mut self, _rhs: &'a EdwardsPoint)
-= operation. Read moreSource§impl SubAssign for EdwardsPoint
impl SubAssign for EdwardsPoint
Source§fn sub_assign(&mut self, rhs: EdwardsPoint)
fn sub_assign(&mut self, rhs: EdwardsPoint)
-= operation. Read moreSource§impl<T> Sum<T> for EdwardsPointwhere
T: Borrow<EdwardsPoint>,
impl<T> Sum<T> for EdwardsPointwhere
T: Borrow<EdwardsPoint>,
Source§impl VartimeMultiscalarMul for EdwardsPoint
Available on crate feature alloc only.
impl VartimeMultiscalarMul for EdwardsPoint
alloc only.Source§type Point = EdwardsPoint
type Point = EdwardsPoint
RistrettoPoint.Source§fn optional_multiscalar_mul<I, J>(scalars: I, points: J) -> Option<EdwardsPoint>
fn optional_multiscalar_mul<I, J>(scalars: I, points: J) -> Option<EdwardsPoint>
Options of points, compute either Some(Q), where
$$
Q = c_1 P_1 + \cdots + c_n P_n,
$$
if all points were Some(P_i), or else return None. Read moreSource§fn vartime_multiscalar_mul<I, J>(scalars: I, points: J) -> Self::Pointwhere
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Self::Point>,
Self::Point: Clone,
fn vartime_multiscalar_mul<I, J>(scalars: I, points: J) -> Self::Pointwhere
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Self::Point>,
Self::Point: Clone,
Source§impl Zeroize for EdwardsPoint
Available on crate feature zeroize only.
impl Zeroize for EdwardsPoint
zeroize only.