Struct test_dalek_docs::backend::serial::curve_models::ProjectivePoint
source · pub struct ProjectivePoint {
pub X: FieldElement51,
pub Y: FieldElement51,
pub Z: FieldElement51,
}
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: FieldElement51
Y: FieldElement51
Z: FieldElement51
Implementations
sourceimpl ProjectivePoint
impl ProjectivePoint
sourcepub fn to_extended(&self) -> EdwardsPoint
pub fn to_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\).
sourceimpl ProjectivePoint
impl ProjectivePoint
sourcepub fn double(&self) -> CompletedPoint
pub fn double(&self) -> CompletedPoint
Double this point: return self + self
Trait Implementations
sourceimpl Clone for ProjectivePoint
impl Clone for ProjectivePoint
sourcefn clone(&self) -> ProjectivePoint
fn clone(&self) -> ProjectivePoint
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 moresourceimpl Debug for ProjectivePoint
impl Debug for ProjectivePoint
sourceimpl Identity for ProjectivePoint
impl Identity for ProjectivePoint
sourcefn identity() -> ProjectivePoint
fn identity() -> ProjectivePoint
Returns the identity element of the curve.
Can be used as a constructor. Read more
impl Copy for ProjectivePoint
Auto Trait Implementations
impl RefUnwindSafe for ProjectivePoint
impl Send for ProjectivePoint
impl Sync for ProjectivePoint
impl Unpin for ProjectivePoint
impl UnwindSafe for ProjectivePoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more