Expand description
A group element of the secp256k1 curve, in jacobian coordinates.
Fields
x: Field
y: Field
z: Field
infinity: bool
Implementations
sourceimpl Jacobian
impl Jacobian
sourcepub fn set_infinity(&mut self)
pub fn set_infinity(&mut self)
Set a group element (jacobian) equal to the point at infinity.
sourcepub fn set_ge(&mut self, a: &Affine)
pub fn set_ge(&mut self, a: &Affine)
Set a group element (jacobian) equal to another which is given in affine coordinates.
pub fn from_ge(a: &Affine) -> Self
sourcepub fn eq_x_var(&self, x: &Field) -> bool
pub fn eq_x_var(&self, x: &Field) -> bool
Compare the X coordinate of a group element (jacobian).
sourcepub fn neg_in_place(&mut self, a: &Jacobian)
pub fn neg_in_place(&mut self, a: &Jacobian)
Set r equal to the inverse of a (i.e., mirrored around the X axis).
pub fn neg(&self) -> Jacobian
sourcepub fn is_infinity(&self) -> bool
pub fn is_infinity(&self) -> bool
Check whether a group element is the point at infinity.
sourcepub fn has_quad_y_var(&self) -> bool
pub fn has_quad_y_var(&self) -> bool
Check whether a group element’s y coordinate is a quadratic residue.
sourcepub fn double_nonzero_in_place(&mut self, a: &Jacobian, rzr: Option<&mut Field>)
pub fn double_nonzero_in_place(&mut self, a: &Jacobian, rzr: Option<&mut Field>)
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.
sourcepub fn double_var_in_place(&mut self, a: &Jacobian, rzr: Option<&mut Field>)
pub fn double_var_in_place(&mut self, a: &Jacobian, rzr: Option<&mut Field>)
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
sourcepub fn add_var_in_place(
&mut self,
a: &Jacobian,
b: &Jacobian,
rzr: Option<&mut Field>
)
pub fn add_var_in_place(
&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).
pub fn add_var(&self, b: &Jacobian, rzr: Option<&mut Field>) -> Jacobian
sourcepub fn add_ge_in_place(&mut self, a: &Jacobian, b: &Affine)
pub fn add_ge_in_place(&mut self, a: &Jacobian, b: &Affine)
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
sourcepub fn add_ge_var_in_place(
&mut self,
a: &Jacobian,
b: &Affine,
rzr: Option<&mut Field>
)
pub fn add_ge_var_in_place(
&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).
pub fn add_ge_var(&self, b: &Affine, rzr: Option<&mut Field>) -> Jacobian
sourcepub fn add_zinv_var_in_place(&mut self, a: &Jacobian, b: &Affine, bzinv: &Field)
pub fn add_zinv_var_in_place(&mut self, a: &Jacobian, b: &Affine, bzinv: &Field)
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
Trait Implementations
impl Eq for Jacobian
impl StructuralEq for Jacobian
impl StructuralPartialEq for Jacobian
Auto Trait Implementations
impl RefUnwindSafe for Jacobian
impl Send for Jacobian
impl Sync for Jacobian
impl Unpin for Jacobian
impl UnwindSafe for Jacobian
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