[][src]Struct secp256k1::curve::Jacobian

pub struct Jacobian {
    pub x: Field,
    pub y: Field,
    pub z: Field,
    pub infinity: bool,
}

A group element of the secp256k1 curve, in jacobian coordinates.

Fields

x: Fieldy: Fieldz: Fieldinfinity: bool

Methods

impl Jacobian[src]

pub fn set_infinity(&mut self)[src]

Set a group element (jacobian) equal to the point at infinity.

pub fn set_ge(&mut self, a: &Affine)[src]

Set a group element (jacobian) equal to another which is given in affine coordinates.

pub fn from_ge(a: &Affine) -> Self[src]

pub fn eq_x_var(&self, x: &Field) -> bool[src]

Compare the X coordinate of a group element (jacobian).

pub fn neg_in_place(&mut self, a: &Jacobian)[src]

Set r equal to the inverse of a (i.e., mirrored around the X axis).

pub fn neg(&self) -> Jacobian[src]

pub fn is_infinity(&self) -> bool[src]

Check whether a group element is the point at infinity.

pub fn has_quad_y_var(&self) -> bool[src]

Check whether a group element's y coordinate is a quadratic residue.

pub fn double_nonzero_in_place(&mut self, a: &Jacobian, rzr: Option<&mut Field>)[src]

Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0). a may not be zero. Constant time.

pub fn double_var_in_place(&mut self, a: &Jacobian, rzr: Option<&mut Field>)[src]

Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0).

pub fn double_var(&self, rzr: Option<&mut Field>) -> Jacobian[src]

pub fn add_var_in_place(
    &mut self,
    a: &Jacobian,
    b: &Jacobian,
    rzr: Option<&mut Field>
)
[src]

Set r equal to the sum of a and b. If rzr is non-NULL, r->z = a->z * *rzr (a cannot be infinity in that case).

pub fn add_var(&self, b: &Jacobian, rzr: Option<&mut Field>) -> Jacobian[src]

pub fn add_ge_in_place(&mut self, a: &Jacobian, b: &Affine)[src]

Set r equal to the sum of a and b (with b given in affine coordinates, and not infinity).

pub fn add_ge(&self, b: &Affine) -> Jacobian[src]

pub fn add_ge_var_in_place(
    &mut self,
    a: &Jacobian,
    b: &Affine,
    rzr: Option<&mut Field>
)
[src]

Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time guarantee, and b is allowed to be infinity. If rzr is non-NULL, r->z = a->z * *rzr (a cannot be infinity in that case).

pub fn add_ge_var(&self, b: &Affine, rzr: Option<&mut Field>) -> Jacobian[src]

pub fn add_zinv_var_in_place(&mut self, a: &Jacobian, b: &Affine, bzinv: &Field)[src]

Set r equal to the sum of a and b (with the inverse of b's Z coordinate passed as bzinv).

pub fn add_zinv_var(&mut self, b: &Affine, bzinv: &Field) -> Jacobian[src]

pub fn clear(&mut self)[src]

Clear a secp256k1_gej to prevent leaking sensitive information.

pub fn rescale(&mut self, s: &Field)[src]

Rescale a jacobian point by b which must be non-zero. Constant-time.

Trait Implementations

impl Clone for Jacobian[src]

impl Debug for Jacobian[src]

impl Default for Jacobian[src]

impl Eq for Jacobian[src]

impl PartialEq<Jacobian> for Jacobian[src]

impl StructuralEq for Jacobian[src]

impl StructuralPartialEq for Jacobian[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,