pub struct AffinePoint {
pub x: BigUint,
pub y: BigUint,
pub infinity: bool,
}Expand description
An affine curve point, or the point at infinity.
The coordinates are ordinary residues in [0, p). The point at infinity
is the group identity: P + ∞ = P and n·G = ∞.
Fields§
§x: BigUintx-coordinate. Meaningful only when !infinity.
y: BigUinty-coordinate. Meaningful only when !infinity.
infinity: booltrue when this represents the point at infinity (the group identity).
Implementations§
Source§impl AffinePoint
impl AffinePoint
Sourcepub fn new(x: BigUint, y: BigUint) -> Self
pub fn new(x: BigUint, y: BigUint) -> Self
A finite affine point (x, y).
The caller is responsible for ensuring that (x, y) lies on the
intended curve; use CurveParams::is_on_curve to validate.
Sourcepub fn is_infinity(&self) -> bool
pub fn is_infinity(&self) -> bool
Return true if this is the point at infinity.
Trait Implementations§
Source§impl Clone for AffinePoint
impl Clone for AffinePoint
Source§fn clone(&self) -> AffinePoint
fn clone(&self) -> AffinePoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AffinePoint
impl Debug for AffinePoint
Source§impl PartialEq for AffinePoint
impl PartialEq for AffinePoint
Source§fn eq(&self, other: &AffinePoint) -> bool
fn eq(&self, other: &AffinePoint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AffinePoint
impl StructuralPartialEq for AffinePoint
Auto Trait Implementations§
impl Freeze for AffinePoint
impl RefUnwindSafe for AffinePoint
impl Send for AffinePoint
impl Sync for AffinePoint
impl Unpin for AffinePoint
impl UnsafeUnpin for AffinePoint
impl UnwindSafe for AffinePoint
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