Struct eccoxide::curve::sec2::p256k1::PointAffine [−][src]
pub struct PointAffine(_);
Expand description
Affine Point on the curve of type (X,Y)
Note that this representation cannot handle the point at infinity
Implementations
Try to create an affine point with X, Y coordinates.
check if the equation y^2 = x^3 + a*x + b (mod p) holds for this curve, if it doesn’t None is returned
Return the tuple of coordinate (x, y) associated with this affine point
Double the affine point Self
This is equivalent to Self + Self at the mathematic level, but is implemented more quickly than the normal addition of double possibly arbitrary point
Turn an affine point into the X component and the sign of the Y component
This is often refered as point compression, and related to the fact there two point on the curve for a valid x component as (x,y) and (x,-y), unless y is 0. So it is sufficient to know just the sign of y to know which point is in use for a given x component
Try to create an affine point given a X component and the sign of the Y component.
This is often refered as point decompression
Trait Implementations
type Output = PointAffine
type Output = PointAffine
The resulting type after applying the +
operator.
Performs the +
operation. Read more
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for PointAffine
impl Send for PointAffine
impl Sync for PointAffine
impl Unpin for PointAffine
impl UnwindSafe for PointAffine
Blanket Implementations
Mutably borrows from an owned value. Read more