Expand description
A group element of the secp256k1 curve, in affine coordinates.
Fields
x: Field
y: Field
infinity: bool
Implementations
sourceimpl 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
sourceimpl From<AffineStorage> for Affine
impl From<AffineStorage> for Affine
sourcefn from(a: AffineStorage) -> Affine
fn from(a: AffineStorage) -> Affine
Performs the conversion.
sourceimpl Into<AffineStorage> for Affine
impl Into<AffineStorage> for Affine
sourcefn into(self) -> AffineStorage
fn into(self) -> AffineStorage
Performs the conversion.
impl Eq for Affine
impl StructuralEq for Affine
impl StructuralPartialEq for Affine
Auto Trait Implementations
impl RefUnwindSafe for Affine
impl Send for Affine
impl Sync for Affine
impl Unpin for Affine
impl UnwindSafe for Affine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more