package secp256k1-internal
Library
Module
Module type
Parameter
Class
Class type
val set_infinity : t -> unit
Set a group element (jacobian) equal to the point at infinity.
Set a group element equal to another which is given in jacobian coordinates.
Set a group element (jacobian) equal to another which is given in affine coordinates.
val is_infinity : t -> bool
Check whether a group element is the point at infinity.
val has_quad_y_var : t -> bool
Check whether a group element's y coordinate is a quadratic residue.
double_nonzero ?rzr r a
Set r
equal to the double of a
. If rzr is not-None, r->z = a->z * *rzr
(where infinity means an implicit z = 0). a
may not be zero. Constant time.
double_var ?rzr r a
Set r
equal to the double of a
. If rzr
is not-None, r->z = a->z * *rzr
(where infinity means an implicit z = 0).
add_var ?rzr r a b
Set r
equal to the sum of a
and b
. If rzr is non-None, r->z = a->z * *rzr
(a
cannot be infinity in that case).
add_ge r a b
Set r
equal to the sum of a
and b
(with b
given in affine coordinates, and not infinity).
add_ge_var ?rzr r a b
Set r
equal to the sum of a
and b
(with b
given in affine coordinates). This is more efficient than add_var
. It is identical to add_ge
but without constant-time guarantee, and b
is allowed to be infinity. If rzr is non-None, 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).
val clear : t -> unit
Clear a t
to prevent leaking sensitive information.