Struct curve25519_dalek::montgomery::MontgomeryPoint [−][src]
Holds the \(u\)-coordinate of a point on the Montgomery form of Curve25519 or its twist.
Implementations
impl MontgomeryPoint[src]
impl MontgomeryPoint[src]pub fn as_bytes<'a>(&'a self) -> &'a [u8; 32][src]
View this MontgomeryPoint as an array of bytes.
pub fn to_bytes(&self) -> [u8; 32][src]
Convert this MontgomeryPoint to an array of bytes.
pub fn to_edwards(&self, sign: u8) -> Option<EdwardsPoint>[src]
Attempt to convert to an EdwardsPoint, using the supplied
choice of sign for the EdwardsPoint.
Inputs
sign: au8donating the desired sign of the resultingEdwardsPoint.0denotes positive and1negative.
Return
-
Some(EdwardsPoint)ifselfis the \(u\)-coordinate of a point on (the Montgomery form of) Curve25519; -
Noneifselfis the \(u\)-coordinate of a point on the twist of (the Montgomery form of) Curve25519;
Trait Implementations
impl Clone for MontgomeryPoint[src]
impl Clone for MontgomeryPoint[src]fn clone(&self) -> MontgomeryPoint[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl ConstantTimeEq for MontgomeryPoint[src]
impl ConstantTimeEq for MontgomeryPoint[src]Equality of MontgomeryPoints is defined mod p.
fn ct_eq(&self, other: &MontgomeryPoint) -> Choice[src]
impl Default for MontgomeryPoint[src]
impl Default for MontgomeryPoint[src]fn default() -> MontgomeryPoint[src]
impl Hash for MontgomeryPoint[src]
impl Hash for MontgomeryPoint[src]impl<'b> Mul<&'b MontgomeryPoint> for Scalar[src]
impl<'b> Mul<&'b MontgomeryPoint> for Scalar[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, rhs: &'b MontgomeryPoint) -> MontgomeryPoint[src]
impl<'a, 'b> Mul<&'b MontgomeryPoint> for &'a Scalar[src]
impl<'a, 'b> Mul<&'b MontgomeryPoint> for &'a Scalar[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, point: &'b MontgomeryPoint) -> MontgomeryPoint[src]
impl<'b> Mul<&'b Scalar> for MontgomeryPoint[src]
impl<'b> Mul<&'b Scalar> for MontgomeryPoint[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, rhs: &'b Scalar) -> MontgomeryPoint[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a MontgomeryPoint[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a MontgomeryPoint[src]Multiply this MontgomeryPoint by a Scalar.
type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, scalar: &'b Scalar) -> MontgomeryPoint[src]
Given self \( = u_0(P) \), and a Scalar \(n\), return \( u_0([n]P) \).
impl<'a> Mul<MontgomeryPoint> for &'a Scalar[src]
impl<'a> Mul<MontgomeryPoint> for &'a Scalar[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint[src]
impl Mul<MontgomeryPoint> for Scalar[src]
impl Mul<MontgomeryPoint> for Scalar[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint[src]
impl<'a> Mul<Scalar> for &'a MontgomeryPoint[src]
impl<'a> Mul<Scalar> for &'a MontgomeryPoint[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, rhs: Scalar) -> MontgomeryPoint[src]
impl Mul<Scalar> for MontgomeryPoint[src]
impl Mul<Scalar> for MontgomeryPoint[src]type Output = MontgomeryPoint
The resulting type after applying the * operator.
fn mul(self, rhs: Scalar) -> MontgomeryPoint[src]
impl<'b> MulAssign<&'b Scalar> for MontgomeryPoint[src]
impl<'b> MulAssign<&'b Scalar> for MontgomeryPoint[src]fn mul_assign(&mut self, scalar: &'b Scalar)[src]
impl MulAssign<Scalar> for MontgomeryPoint[src]
impl MulAssign<Scalar> for MontgomeryPoint[src]fn mul_assign(&mut self, rhs: Scalar)[src]
impl PartialEq<MontgomeryPoint> for MontgomeryPoint[src]
impl PartialEq<MontgomeryPoint> for MontgomeryPoint[src]impl Zeroize for MontgomeryPoint[src]
impl Zeroize for MontgomeryPoint[src]