Struct curve25519_dalek::montgomery::MontgomeryPoint
[−]
[src]
pub struct MontgomeryPoint(pub [u8; 32]);
Holds the \(u\)-coordinate of a point on the Montgomery form of Curve25519 or its twist.
Methods
impl MontgomeryPoint
[src]
fn as_bytes<'a>(&'a self) -> &'a [u8; 32]
[src]
View this MontgomeryPoint
as an array of bytes.
fn to_bytes(&self) -> [u8; 32]
[src]
Convert this MontgomeryPoint
to an array of bytes.
fn to_edwards(&self, sign: u8) -> Option<EdwardsPoint>
[src]
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 Clone for MontgomeryPoint
[src]
fn clone(&self) -> MontgomeryPoint
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for MontgomeryPoint
[src]
impl Equal for MontgomeryPoint
[src]
Equality of MontgomeryPoint
s is defined mod p.
fn ct_eq(&self, other: &MontgomeryPoint) -> u8
[src]
Determine if two items are equal in constant time. Read more
impl PartialEq for MontgomeryPoint
[src]
fn eq(&self, other: &MontgomeryPoint) -> bool
[src]
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]
This method tests for !=
.
impl Eq for MontgomeryPoint
[src]
impl Mul<Scalar> for MontgomeryPoint
[src]
Multiply this MontgomeryPoint
by a Scalar
.
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
fn mul(self, scalar: Scalar) -> MontgomeryPoint
[src]
Given self
\( = u_0(P) \), and a Scalar
\(n\), return \( u_0([n]P) \).
impl MulAssign<Scalar> for MontgomeryPoint
[src]
fn mul_assign(&mut self, scalar: Scalar)
[src]
Performs the *=
operation.