pub struct ExtendedPoint(pub(super) FieldElement2625x4);Expand description
A point on Curve25519, using parallel Edwards formulas for curve operations.
§Invariant
The coefficients of an ExtendedPoint are bounded with
\( b < 0.007 \).
Tuple Fields§
§0: FieldElement2625x4Implementations§
Source§impl ExtendedPoint
impl ExtendedPoint
Sourcepub fn double(&self) -> ExtendedPoint
pub fn double(&self) -> ExtendedPoint
Compute the double of this point.
pub fn mul_by_pow_2(&self, k: u32) -> ExtendedPoint
Trait Implementations§
Source§impl Add<&CachedPoint> for &ExtendedPoint
impl Add<&CachedPoint> for &ExtendedPoint
Source§fn add(self, other: &CachedPoint) -> ExtendedPoint
fn add(self, other: &CachedPoint) -> ExtendedPoint
Add an ExtendedPoint and a CachedPoint.
Source§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
+ operator.Source§impl Clone for ExtendedPoint
impl Clone for ExtendedPoint
Source§fn clone(&self) -> ExtendedPoint
fn clone(&self) -> ExtendedPoint
Returns a duplicate 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 ExtendedPoint
impl ConditionallySelectable for ExtendedPoint
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl Debug for ExtendedPoint
impl Debug for ExtendedPoint
Source§impl Default for ExtendedPoint
impl Default for ExtendedPoint
Source§fn default() -> ExtendedPoint
fn default() -> ExtendedPoint
Returns the “default value” for a type. Read more
Source§impl From<EdwardsPoint> for ExtendedPoint
impl From<EdwardsPoint> for ExtendedPoint
Source§fn from(P: EdwardsPoint) -> ExtendedPoint
fn from(P: EdwardsPoint) -> ExtendedPoint
Converts to this type from the input type.
Source§impl From<ExtendedPoint> for CachedPoint
impl From<ExtendedPoint> for CachedPoint
Source§fn from(P: ExtendedPoint) -> CachedPoint
fn from(P: ExtendedPoint) -> CachedPoint
Converts to this type from the input type.
Source§impl From<ExtendedPoint> for EdwardsPoint
impl From<ExtendedPoint> for EdwardsPoint
Source§fn from(P: ExtendedPoint) -> EdwardsPoint
fn from(P: ExtendedPoint) -> EdwardsPoint
Converts to this type from the input type.
Source§impl Identity for ExtendedPoint
impl Identity for ExtendedPoint
Source§fn identity() -> ExtendedPoint
fn identity() -> ExtendedPoint
Returns the identity element of the curve.
Can be used as a constructor.
Source§impl Sub<&CachedPoint> for &ExtendedPoint
impl Sub<&CachedPoint> for &ExtendedPoint
Source§fn sub(self, other: &CachedPoint) -> ExtendedPoint
fn sub(self, other: &CachedPoint) -> ExtendedPoint
Implement subtraction by negating the point and adding.
Empirically, this seems about the same cost as a custom subtraction impl (maybe because the benefit is cancelled by increased code size?)
Source§type Output = ExtendedPoint
type Output = ExtendedPoint
The resulting type after applying the
- operator.impl Copy for ExtendedPoint
Auto Trait Implementations§
impl Freeze for ExtendedPoint
impl RefUnwindSafe for ExtendedPoint
impl Send for ExtendedPoint
impl Sync for ExtendedPoint
impl Unpin for ExtendedPoint
impl UnwindSafe for ExtendedPoint
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