Struct curve25519_dalek::montgomery::MontgomeryPoint [−][src]
Holds the \(u\)-coordinate of a point on the Montgomery form of Curve25519 or its twist.
Methods
impl MontgomeryPoint
[src]
impl MontgomeryPoint
pub fn as_bytes<'a>(&'a self) -> &'a [u8; 32]
[src]
pub fn as_bytes<'a>(&'a self) -> &'a [u8; 32]
View this MontgomeryPoint
as an array of bytes.
pub fn to_bytes(&self) -> [u8; 32]
[src]
pub fn to_bytes(&self) -> [u8; 32]
Convert this MontgomeryPoint
to an array of bytes.
pub fn to_edwards(&self, sign: u8) -> Option<EdwardsPoint>
[src]
pub fn to_edwards(&self, sign: u8) -> Option<EdwardsPoint>
Attempt to convert to an EdwardsPoint
, using the supplied
choice of sign for the EdwardsPoint
.
Return
-
Some(EdwardsPoint)
ifself
is the \(u\)-coordinate of a point on (the Montgomery form of) Curve25519; -
None
ifself
is the \(u\)-coordinate of a point on the twist of (the Montgomery form of) Curve25519;
Trait Implementations
impl Copy for MontgomeryPoint
[src]
impl Copy for MontgomeryPoint
impl Clone for MontgomeryPoint
[src]
impl Clone for MontgomeryPoint
fn clone(&self) -> MontgomeryPoint
[src]
fn clone(&self) -> MontgomeryPoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for MontgomeryPoint
[src]
impl Debug for MontgomeryPoint
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl ConstantTimeEq for MontgomeryPoint
[src]
impl ConstantTimeEq for MontgomeryPoint
Equality of MontgomeryPoint
s is defined mod p.
fn ct_eq(&self, other: &MontgomeryPoint) -> Choice
[src]
fn ct_eq(&self, other: &MontgomeryPoint) -> Choice
Determine if two items are equal. Read more
impl PartialEq for MontgomeryPoint
[src]
impl PartialEq for MontgomeryPoint
fn eq(&self, other: &MontgomeryPoint) -> bool
[src]
fn eq(&self, other: &MontgomeryPoint) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for MontgomeryPoint
[src]
impl Eq for MontgomeryPoint
impl MulAssign<Scalar> for MontgomeryPoint
[src]
impl MulAssign<Scalar> for MontgomeryPoint
fn mul_assign(&mut self, rhs: Scalar)
[src]
fn mul_assign(&mut self, rhs: Scalar)
Performs the *=
operation.
impl<'b> Mul<&'b Scalar> for MontgomeryPoint
[src]
impl<'b> Mul<&'b Scalar> for MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Scalar) -> MontgomeryPoint
[src]
fn mul(self, rhs: &'b Scalar) -> MontgomeryPoint
Performs the *
operation.
impl<'a> Mul<Scalar> for &'a MontgomeryPoint
[src]
impl<'a> Mul<Scalar> for &'a MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> MontgomeryPoint
[src]
fn mul(self, rhs: Scalar) -> MontgomeryPoint
Performs the *
operation.
impl Mul<Scalar> for MontgomeryPoint
[src]
impl Mul<Scalar> for MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> MontgomeryPoint
[src]
fn mul(self, rhs: Scalar) -> MontgomeryPoint
Performs the *
operation.
impl<'b> Mul<&'b MontgomeryPoint> for Scalar
[src]
impl<'b> Mul<&'b MontgomeryPoint> for Scalar
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b MontgomeryPoint) -> MontgomeryPoint
[src]
fn mul(self, rhs: &'b MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation.
impl<'a> Mul<MontgomeryPoint> for &'a Scalar
[src]
impl<'a> Mul<MontgomeryPoint> for &'a Scalar
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
[src]
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation.
impl Mul<MontgomeryPoint> for Scalar
[src]
impl Mul<MontgomeryPoint> for Scalar
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
[src]
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation.
impl<'a, 'b> Mul<&'b Scalar> for &'a MontgomeryPoint
[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a MontgomeryPoint
Multiply this MontgomeryPoint
by a Scalar
.
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, scalar: &'b Scalar) -> MontgomeryPoint
[src]
fn mul(self, scalar: &'b Scalar) -> MontgomeryPoint
Given self
\( = u_0(P) \), and a Scalar
\(n\), return \( u_0([n]P) \).
impl<'b> MulAssign<&'b Scalar> for MontgomeryPoint
[src]
impl<'b> MulAssign<&'b Scalar> for MontgomeryPoint
fn mul_assign(&mut self, scalar: &'b Scalar)
[src]
fn mul_assign(&mut self, scalar: &'b Scalar)
Performs the *=
operation.
impl<'a, 'b> Mul<&'b MontgomeryPoint> for &'a Scalar
[src]
impl<'a, 'b> Mul<&'b MontgomeryPoint> for &'a Scalar
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, point: &'b MontgomeryPoint) -> MontgomeryPoint
[src]
fn mul(self, point: &'b MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation.
Auto Trait Implementations
impl Send for MontgomeryPoint
impl Send for MontgomeryPoint
impl Sync for MontgomeryPoint
impl Sync for MontgomeryPoint