Struct libsecp256k1_core::curve::Affine
source · Expand description
A group element of the secp256k1 curve, in affine coordinates.
Fields§
§x: Field
§y: Field
§infinity: bool
Implementations§
source§impl Affine
impl Affine
sourcepub fn set_xy(&mut self, x: &Field, y: &Field)
pub fn set_xy(&mut self, x: &Field, y: &Field)
Set a group element equal to the point with given X and Y coordinates.
sourcepub fn set_xquad(&mut self, x: &Field) -> bool
pub fn set_xquad(&mut self, x: &Field) -> bool
Set a group element (affine) equal to the point with the given X coordinate and a Y coordinate that is a quadratic residue modulo p. The return value is true iff a coordinate with the given X coordinate exists.
sourcepub fn set_xo_var(&mut self, x: &Field, odd: bool) -> bool
pub fn set_xo_var(&mut self, x: &Field, odd: bool) -> bool
Set a group element (affine) equal to the point with the given X coordinate, and given oddness for Y. Return value indicates whether the result is valid.
sourcepub fn is_infinity(&self) -> bool
pub fn is_infinity(&self) -> bool
Check whether a group element is the point at infinity.
sourcepub fn is_valid_var(&self) -> bool
pub fn is_valid_var(&self) -> bool
Check whether a group element is valid (i.e., on the curve).
pub fn neg_in_place(&mut self, other: &Affine)
pub fn neg(&self) -> Affine
sourcepub fn set_gej(&mut self, a: &Jacobian)
pub fn set_gej(&mut self, a: &Jacobian)
Set a group element equal to another which is given in jacobian coordinates.
pub fn from_gej(a: &Jacobian) -> Self
pub fn set_gej_var(&mut self, a: &Jacobian)
pub fn set_gej_zinv(&mut self, a: &Jacobian, zi: &Field)
Trait Implementations§
source§impl From<AffineStorage> for Affine
impl From<AffineStorage> for Affine
source§fn from(a: AffineStorage) -> Affine
fn from(a: AffineStorage) -> Affine
Converts to this type from the input type.
source§impl Into<AffineStorage> for Affine
impl Into<AffineStorage> for Affine
source§fn into(self) -> AffineStorage
fn into(self) -> AffineStorage
Converts this type into the (usually inferred) input type.