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

source

pub fn identity() -> ExtendedPoint

Identity point

source

pub const fn generator() -> ExtendedPoint

Generator for the prime subgroup

source

pub fn to_montgomery(&self) -> MontgomeryPoint

source

pub fn scalar_mul(&self, scalar: &Scalar) -> ExtendedPoint

Generic scalar multiplication to compute s*P

source

pub fn scalar_mod_four(&self, scalar: &Scalar) -> ExtendedPoint

Returns (scalar mod 4) * P in constant time

source

pub fn compress(&self) -> CompressedEdwardsY

source

pub fn add(&self, other: &ExtendedPoint) -> ExtendedPoint

source

pub fn double(&self) -> ExtendedPoint

source

pub fn to_affine(&self) -> AffinePoint

source

pub fn to_twisted(&self) -> TwistedExtendedPoint

source

pub fn negate(&self) -> ExtendedPoint

source

pub fn torque(&self) -> ExtendedPoint

source

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 if self has zero torsion component and is in the prime-order subgroup;
  • false if self 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

§

type Output = ExtendedPoint

The resulting type after applying the + operator.
source§

fn add(self, other: &'b ExtendedPoint) -> ExtendedPoint

Performs the + operation. Read more
source§

impl<'b> Add<&'b ExtendedPoint> for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the + operator.
source§

fn add(self, rhs: &'b ExtendedPoint) -> ExtendedPoint

Performs the + operation. Read more
source§

impl<'a> Add<ExtendedPoint> for &'a ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the + operator.
source§

fn add(self, rhs: ExtendedPoint) -> ExtendedPoint

Performs the + operation. Read more
source§

impl Add<ExtendedPoint> for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the + operator.
source§

fn add(self, rhs: ExtendedPoint) -> ExtendedPoint

Performs the + operation. Read more
source§

impl<'b> AddAssign<&'b ExtendedPoint> for ExtendedPoint

source§

fn add_assign(&mut self, _rhs: &'b ExtendedPoint)

Performs the += operation. Read more
source§

impl AddAssign<ExtendedPoint> for ExtendedPoint

source§

fn add_assign(&mut self, rhs: ExtendedPoint)

Performs the += operation. Read more
source§

impl Clone for ExtendedPoint

source§

fn clone(&self) -> ExtendedPoint

Returns a copy 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 ConditionallySelectable for ExtendedPoint

source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Select a or b according to choice. Read more
source§

fn conditional_assign(&mut self, other: &Self, choice: Choice)

Conditionally assign other to self, according to choice. Read more
source§

fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)

Conditionally swap self and other if choice == 1; otherwise, reassign both unto themselves. Read more
source§

impl ConstantTimeEq for ExtendedPoint

source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
source§

impl Debug for ExtendedPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ExtendedPoint

source§

fn default() -> ExtendedPoint

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

impl<'a, 'b> Mul<&'b ExtendedPoint> for &'a Scalar

source§

fn mul(self, point: &'b ExtendedPoint) -> ExtendedPoint

Scalar multiplication: compute scalar * self.

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

impl<'b> Mul<&'b ExtendedPoint> for Scalar

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b ExtendedPoint) -> ExtendedPoint

Performs the * operation. Read more
source§

impl<'a, 'b> Mul<&'b Scalar> for &'a ExtendedPoint

source§

fn mul(self, scalar: &'b Scalar) -> ExtendedPoint

Scalar multiplication: compute scalar * self.

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

impl<'b> Mul<&'b Scalar> for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Scalar) -> ExtendedPoint

Performs the * operation. Read more
source§

impl<'a> Mul<ExtendedPoint> for &'a Scalar

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

fn mul(self, rhs: ExtendedPoint) -> ExtendedPoint

Performs the * operation. Read more
source§

impl Mul<ExtendedPoint> for Scalar

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

fn mul(self, rhs: ExtendedPoint) -> ExtendedPoint

Performs the * operation. Read more
source§

impl<'a> Mul<Scalar> for &'a ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scalar) -> ExtendedPoint

Performs the * operation. Read more
source§

impl Mul<Scalar> for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scalar) -> ExtendedPoint

Performs the * operation. Read more
source§

impl<'b> MulAssign<&'b Scalar> for ExtendedPoint

source§

fn mul_assign(&mut self, scalar: &'b Scalar)

Performs the *= operation. Read more
source§

impl MulAssign<Scalar> for ExtendedPoint

source§

fn mul_assign(&mut self, rhs: Scalar)

Performs the *= operation. Read more
source§

impl<'a> Neg for &'a ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the - operator.
source§

fn neg(self) -> ExtendedPoint

Performs the unary - operation. Read more
source§

impl Neg for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the - operator.
source§

fn neg(self) -> ExtendedPoint

Performs the unary - operation. Read more
source§

impl PartialEq<ExtendedPoint> for ExtendedPoint

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, 'b> Sub<&'b ExtendedPoint> for &'a ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the - operator.
source§

fn sub(self, other: &'b ExtendedPoint) -> ExtendedPoint

Performs the - operation. Read more
source§

impl<'b> Sub<&'b ExtendedPoint> for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &'b ExtendedPoint) -> ExtendedPoint

Performs the - operation. Read more
source§

impl<'a> Sub<ExtendedPoint> for &'a ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the - operator.
source§

fn sub(self, rhs: ExtendedPoint) -> ExtendedPoint

Performs the - operation. Read more
source§

impl Sub<ExtendedPoint> for ExtendedPoint

§

type Output = ExtendedPoint

The resulting type after applying the - operator.
source§

fn sub(self, rhs: ExtendedPoint) -> ExtendedPoint

Performs the - operation. Read more
source§

impl<'b> SubAssign<&'b ExtendedPoint> for ExtendedPoint

source§

fn sub_assign(&mut self, _rhs: &'b ExtendedPoint)

Performs the -= operation. Read more
source§

impl SubAssign<ExtendedPoint> for ExtendedPoint

source§

fn sub_assign(&mut self, rhs: ExtendedPoint)

Performs the -= operation. Read more
source§

impl<T> Sum<T> for ExtendedPointwhere T: Borrow<ExtendedPoint>,

source§

fn sum<I>(iter: I) -> Selfwhere I: Iterator<Item = T>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl Copy for ExtendedPoint

source§

impl Eq for ExtendedPoint

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> ConditionallyNegatable for Twhere T: ConditionallySelectable, &'a T: for<'a> Neg<Output = T>,

source§

fn conditional_negate(&mut self, choice: Choice)

Negate self if choice == Choice(1); otherwise, leave it unchanged. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.