Struct curve25519_dalek::montgomery::MontgomeryPoint
source · [−]Expand description
Holds the \(u\)-coordinate of a point on the Montgomery form of Curve25519 or its twist.
Tuple Fields
0: [u8; 32]
Implementations
sourceimpl MontgomeryPoint
impl MontgomeryPoint
sourcepub fn to_edwards(&self, sign: u8) -> Option<EdwardsPoint>
pub fn to_edwards(&self, sign: u8) -> Option<EdwardsPoint>
Attempt to convert to an EdwardsPoint
, using the supplied
choice of sign for the EdwardsPoint
.
Inputs
sign
: au8
donating the desired sign of the resultingEdwardsPoint
.0
denotes positive and1
negative.
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
sourceimpl Clone for MontgomeryPoint
impl Clone for MontgomeryPoint
sourcefn clone(&self) -> MontgomeryPoint
fn clone(&self) -> MontgomeryPoint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConstantTimeEq for MontgomeryPoint
impl ConstantTimeEq for MontgomeryPoint
Equality of MontgomeryPoint
s is defined mod p.
sourcefn ct_eq(&self, other: &MontgomeryPoint) -> Choice
fn ct_eq(&self, other: &MontgomeryPoint) -> Choice
Determine if two items are equal. Read more
sourceimpl Debug for MontgomeryPoint
impl Debug for MontgomeryPoint
sourceimpl Default for MontgomeryPoint
impl Default for MontgomeryPoint
sourcefn default() -> MontgomeryPoint
fn default() -> MontgomeryPoint
Returns the “default value” for a type. Read more
sourceimpl Hash for MontgomeryPoint
impl Hash for MontgomeryPoint
sourceimpl Identity for MontgomeryPoint
impl Identity for MontgomeryPoint
sourcefn identity() -> MontgomeryPoint
fn identity() -> MontgomeryPoint
Return the group identity element, which has order 4.
sourceimpl<'b> Mul<&'b MontgomeryPoint> for Scalar
impl<'b> Mul<&'b MontgomeryPoint> for Scalar
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: &'b MontgomeryPoint) -> MontgomeryPoint
fn mul(self, rhs: &'b MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl<'a, 'b> Mul<&'b MontgomeryPoint> for &'a Scalar
impl<'a, 'b> Mul<&'b MontgomeryPoint> for &'a Scalar
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, point: &'b MontgomeryPoint) -> MontgomeryPoint
fn mul(self, point: &'b MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl<'b> Mul<&'b Scalar> for MontgomeryPoint
impl<'b> Mul<&'b Scalar> for MontgomeryPoint
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: &'b Scalar) -> MontgomeryPoint
fn mul(self, rhs: &'b Scalar) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl<'a, 'b> Mul<&'b Scalar> for &'a MontgomeryPoint
impl<'a, 'b> Mul<&'b Scalar> for &'a MontgomeryPoint
Multiply this MontgomeryPoint
by a Scalar
.
sourcefn mul(self, scalar: &'b Scalar) -> MontgomeryPoint
fn mul(self, scalar: &'b Scalar) -> MontgomeryPoint
Given self
\( = u_0(P) \), and a Scalar
\(n\), return \( u_0([n]P) \).
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourceimpl<'a> Mul<MontgomeryPoint> for &'a Scalar
impl<'a> Mul<MontgomeryPoint> for &'a Scalar
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl Mul<MontgomeryPoint> for Scalar
impl Mul<MontgomeryPoint> for Scalar
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
fn mul(self, rhs: MontgomeryPoint) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl<'a> Mul<Scalar> for &'a MontgomeryPoint
impl<'a> Mul<Scalar> for &'a MontgomeryPoint
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: Scalar) -> MontgomeryPoint
fn mul(self, rhs: Scalar) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl Mul<Scalar> for MontgomeryPoint
impl Mul<Scalar> for MontgomeryPoint
type Output = MontgomeryPoint
type Output = MontgomeryPoint
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: Scalar) -> MontgomeryPoint
fn mul(self, rhs: Scalar) -> MontgomeryPoint
Performs the *
operation. Read more
sourceimpl<'b> MulAssign<&'b Scalar> for MontgomeryPoint
impl<'b> MulAssign<&'b Scalar> for MontgomeryPoint
sourcefn mul_assign(&mut self, scalar: &'b Scalar)
fn mul_assign(&mut self, scalar: &'b Scalar)
Performs the *=
operation. Read more
sourceimpl MulAssign<Scalar> for MontgomeryPoint
impl MulAssign<Scalar> for MontgomeryPoint
sourcefn mul_assign(&mut self, rhs: Scalar)
fn mul_assign(&mut self, rhs: Scalar)
Performs the *=
operation. Read more
sourceimpl PartialEq<MontgomeryPoint> for MontgomeryPoint
impl PartialEq<MontgomeryPoint> for MontgomeryPoint
sourceimpl Zeroize for MontgomeryPoint
impl Zeroize for MontgomeryPoint
impl Copy for MontgomeryPoint
impl Eq for MontgomeryPoint
Auto Trait Implementations
impl RefUnwindSafe for MontgomeryPoint
impl Send for MontgomeryPoint
impl Sync for MontgomeryPoint
impl Unpin for MontgomeryPoint
impl UnwindSafe for MontgomeryPoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IsIdentity for T where
T: ConstantTimeEq + Identity,
impl<T> IsIdentity for T where
T: ConstantTimeEq + Identity,
sourcefn is_identity(&self) -> bool
fn is_identity(&self) -> bool
Return true if this element is the identity element of the curve.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more