Struct salty::EdwardsPoint
source · pub struct EdwardsPoint(/* private fields */);
Expand description
These represent the (X,Y,Z,T) coordinates
Implementations§
source§impl EdwardsPoint
impl EdwardsPoint
pub fn basepoint() -> EdwardsPoint
pub fn neutral_element() -> EdwardsPoint
pub fn compressed(&self) -> CompressedY
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.
sourcepub fn x(&self) -> FieldElement
pub fn x(&self) -> FieldElement
The x-coordinate of the point
sourcepub fn y(&self) -> FieldElement
pub fn y(&self) -> FieldElement
The y-coordinate of the point
sourcepub fn u(&self) -> FieldElement
pub fn u(&self) -> FieldElement
The u-coordinate of the X25519 point
Trait Implementations§
source§impl<'a, 'b> Add<&'b EdwardsPoint> for &'a EdwardsPoint
impl<'a, 'b> Add<&'b EdwardsPoint> for &'a EdwardsPoint
§type Output = EdwardsPoint
type Output = EdwardsPoint
The resulting type after applying the
+
operator.source§impl Clone for EdwardsPoint
impl Clone for EdwardsPoint
source§fn clone(&self) -> EdwardsPoint
fn clone(&self) -> EdwardsPoint
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 EdwardsPoint
impl ConditionallySelectable for EdwardsPoint
source§impl ConstantTimeEq for EdwardsPoint
impl ConstantTimeEq for EdwardsPoint
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
Returns the “default value” for a type. Read more
source§impl<'a, 'b> Mul<&'b EdwardsPoint> for &'a Scalar
impl<'a, 'b> Mul<&'b EdwardsPoint> for &'a Scalar
§type Output = EdwardsPoint
type Output = EdwardsPoint
The resulting type after applying the
*
operator.source§fn mul(self, point: &'b EdwardsPoint) -> EdwardsPoint
fn mul(self, point: &'b EdwardsPoint) -> EdwardsPoint
Performs the
*
operation. Read moresource§impl<'a> Neg for &'a EdwardsPoint
impl<'a> Neg for &'a EdwardsPoint
§type Output = EdwardsPoint
type Output = EdwardsPoint
The resulting type after applying the
-
operator.source§fn neg(self) -> EdwardsPoint
fn neg(self) -> EdwardsPoint
Performs the unary
-
operation. Read moresource§impl PartialEq for EdwardsPoint
impl PartialEq for EdwardsPoint
impl Copy for EdwardsPoint
Auto Trait Implementations§
impl RefUnwindSafe for EdwardsPoint
impl Send for EdwardsPoint
impl Sync for EdwardsPoint
impl Unpin for EdwardsPoint
impl UnwindSafe for EdwardsPoint
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more