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

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

Fields§

§x: Field§y: Field§z: Field§infinity: bool

Implementations§

Create a new jacobian.

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

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

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

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

Check whether a group element is the point at infinity.

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

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.

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).

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).

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

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).

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

Clear a secp256k1_gej to prevent leaking sensitive information.

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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.