Struct salty::EdwardsPoint[][src]

pub struct EdwardsPoint(_);

These represent the (X,Y,Z,T) coordinates

Implementations

impl EdwardsPoint[src]

pub fn basepoint() -> EdwardsPoint[src]

pub fn neutral_element() -> EdwardsPoint[src]

pub fn compressed(&self) -> CompressedY[src]

pub fn to_montgomery(&self) -> MontgomeryPoint[src]

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.

pub fn x(&self) -> FieldElement[src]

The x-coordinate of the point

pub fn y(&self) -> FieldElement[src]

The y-coordinate of the point

pub fn u(&self) -> FieldElement[src]

The u-coordinate of the X25519 point

Trait Implementations

impl<'a, 'b> Add<&'b EdwardsPoint> for &'a EdwardsPoint[src]

type Output = EdwardsPoint

The resulting type after applying the + operator.

impl Clone for EdwardsPoint[src]

impl ConditionallySelectable for EdwardsPoint[src]

impl ConstantTimeEq for EdwardsPoint[src]

impl Copy for EdwardsPoint[src]

impl Debug for EdwardsPoint[src]

impl Default for EdwardsPoint[src]

impl<'a, 'b> Mul<&'b EdwardsPoint> for &'a Scalar[src]

type Output = EdwardsPoint

The resulting type after applying the * operator.

impl<'a> Neg for &'a EdwardsPoint[src]

type Output = EdwardsPoint

The resulting type after applying the - operator.

impl PartialEq<EdwardsPoint> for EdwardsPoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> ConditionallyNegatable for T where
    T: ConditionallySelectable,
    &'a T: for<'a> Neg,
    <&'a T as Neg>::Output == T, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.