Struct secp256k1::curve::Jacobian
[−]
[src]
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: Field
y: Field
z: Field
infinity: bool
Methods
impl Jacobian
[src]
fn set_infinity(&mut self)
[src]
Set a group element (jacobian) equal to the point at infinity.
fn set_ge(&mut self, a: &Affine)
[src]
Set a group element (jacobian) equal to another which is given in affine coordinates.
fn eq_x_var(&self, x: &Field) -> bool
[src]
Compare the X coordinate of a group element (jacobian).
fn neg_in_place(&mut self, a: &Jacobian)
[src]
Set r equal to the inverse of a (i.e., mirrored around the X axis).
fn neg(&self) -> Jacobian
[src]
fn is_infinity(&self) -> bool
[src]
Check whether a group element is the point at infinity.
fn has_quad_y_var(&self) -> bool
[src]
Check whether a group element's y coordinate is a quadratic residue.
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.
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).
fn double_var(&self, rzr: Option<&mut Field>) -> Jacobian
[src]
fn add_var_in_place(
&mut self,
a: &Jacobian,
b: &Jacobian,
rzr: Option<&mut Field>
)
[src]
&mut self,
a: &Jacobian,
b: &Jacobian,
rzr: Option<&mut Field>
)
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).
fn add_var(&self, b: &Jacobian, rzr: Option<&mut Field>) -> Jacobian
[src]
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).
fn add_ge(&self, b: &Affine) -> Jacobian
[src]
fn add_ge_var_in_place(
&mut self,
a: &Jacobian,
b: &Affine,
rzr: Option<&mut Field>
)
[src]
&mut self,
a: &Jacobian,
b: &Affine,
rzr: Option<&mut Field>
)
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).
fn add_ge_var(&self, b: &Affine, rzr: Option<&mut Field>) -> Jacobian
[src]
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).
fn add_zinv_var(&mut self, b: &Affine, bzinv: &Field) -> Jacobian
[src]
fn clear(&mut self)
[src]
Clear a secp256k1_gej to prevent leaking sensitive information.
fn rescale(&mut self, s: &Field)
[src]
Rescale a jacobian point by b which must be non-zero. Constant-time.
Trait Implementations
impl Debug for Jacobian
[src]
impl Clone for Jacobian
[src]
fn clone(&self) -> Jacobian
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Jacobian
[src]
impl PartialEq for Jacobian
[src]
fn eq(&self, __arg_0: &Jacobian) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Jacobian) -> bool
[src]
This method tests for !=
.