package secp256k1-internal
Library
Module
Module type
Parameter
Class
Class type
type ge = t
module Storage : sig ... end
module Jacobian : sig ... end
val g : t
Set a group element equal to the point with given X and Y coordinates
Set a group element (affine) equal to the point with the given X coordinate and a Y coordinate that is a quadratic residue modulo p. The return value is true iff a coordinate with the given X coordinate exists.
Set a group element (affine) equal to the point with the given X coordinate, and given oddness for Y. Return value indicates whether the result is valid.
val is_infinity : t -> bool
Check whether a group element is the point at infinity.
val is_valid_var : t -> bool
Check whether a group element is valid (i.e., on the curve).
val clear : t -> unit
Clear a t
to prevent leaking sensitive information.
val to_pubkey : ?compress:bool -> Cstruct.t -> t -> Cstruct.t
to_pubkey ?compress buf ge
serializes ge
in buf
and returns buf
, adjusted to the actual size.
val from_pubkey : t -> Cstruct.t -> unit
from_pubkey ge buf
parses a serialized pubkey in buf
and writes the result in ge
.