struct ProjectivePoint {
pub U: FieldElement51,
pub W: FieldElement51,
}Expand description
A ProjectivePoint holds a point on the projective line
\( \mathbb P(\mathbb F_p) \), which we identify with the Kummer
line of the Montgomery curve.
Fields§
§U: FieldElement51§W: FieldElement51Implementations§
Source§impl ProjectivePoint
impl ProjectivePoint
Sourcepub fn as_affine(&self) -> MontgomeryPoint
pub fn as_affine(&self) -> MontgomeryPoint
Dehomogenize this point to affine coordinates.
§Return
- \( u = U / W \) if \( W \neq 0 \);
- \( 0 \) if \( W \eq 0 \);
Trait Implementations§
Source§impl Clone for ProjectivePoint
impl Clone for ProjectivePoint
Source§fn clone(&self) -> ProjectivePoint
fn clone(&self) -> ProjectivePoint
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 ProjectivePoint
impl ConditionallySelectable for ProjectivePoint
Source§fn conditional_select(
a: &ProjectivePoint,
b: &ProjectivePoint,
choice: Choice,
) -> ProjectivePoint
fn conditional_select( a: &ProjectivePoint, b: &ProjectivePoint, choice: Choice, ) -> ProjectivePoint
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 ProjectivePoint
impl Debug for ProjectivePoint
Source§impl Default for ProjectivePoint
impl Default for ProjectivePoint
Source§fn default() -> ProjectivePoint
fn default() -> ProjectivePoint
Returns the “default value” for a type. Read more
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.
impl Copy for ProjectivePoint
Auto Trait Implementations§
impl Freeze for ProjectivePoint
impl RefUnwindSafe for ProjectivePoint
impl Send for ProjectivePoint
impl Sync for ProjectivePoint
impl Unpin for ProjectivePoint
impl UnwindSafe for ProjectivePoint
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