Struct curve25519_dalek::backend::serial::curve_models::ProjectivePoint
source · pub struct ProjectivePoint {
pub X: FieldElement2625,
pub Y: FieldElement2625,
pub Z: FieldElement2625,
}
Expand description
A ProjectivePoint
is a point \((X:Y:Z)\) on the \(\mathbb
P^2\) model of the curve.
A point \((x,y)\) in the affine model corresponds to
\((x:y:1)\).
More details on the relationships between the different curve models can be found in the module-level documentation.
Fields§
§X: FieldElement2625
§Y: FieldElement2625
§Z: FieldElement2625
Implementations§
source§impl ProjectivePoint
impl ProjectivePoint
sourcepub fn as_extended(&self) -> EdwardsPoint
pub fn as_extended(&self) -> EdwardsPoint
Convert this point from the \( \mathbb P^2 \) model to the \( \mathbb P^3 \) model.
This costs \(3 \mathrm M + 1 \mathrm S\).
source§impl ProjectivePoint
impl ProjectivePoint
sourcepub fn double(&self) -> CompletedPoint
pub fn double(&self) -> CompletedPoint
Double this point: return self + self
Trait Implementations§
source§impl Clone for ProjectivePoint
impl Clone for ProjectivePoint
source§fn clone(&self) -> ProjectivePoint
fn clone(&self) -> ProjectivePoint
Returns a copy 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 Debug for ProjectivePoint
impl Debug for ProjectivePoint
source§impl Identity for ProjectivePoint
impl Identity for ProjectivePoint
source§fn identity() -> ProjectivePoint
fn identity() -> ProjectivePoint
Returns the identity element of the curve.
Can be used as a constructor.