package bls12-381-legacy

  1. Overview
  2. Docs
exception Not_in_field of Stdlib.Bytes.t
type t = Fr.t
val order : Z.t
val size_in_bytes : int
val zero : t
val one : t
val is_zero : t -> bool
val is_one : t -> bool
val random : ?state:Stdlib.Random.State.t -> unit -> t
val non_null_random : ?state:Stdlib.Random.State.t -> unit -> t
val add : t -> t -> t
val (+) : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val (*) : t -> t -> t
val eq : t -> t -> bool
val (=) : t -> t -> bool
val negate : t -> t
val (-) : t -> t
val inverse_exn : t -> t
val inverse_opt : t -> t option
val div_exn : t -> t -> t
val div_opt : t -> t -> t option
val (/) : t -> t -> t
val square : t -> t
val double : t -> t
val pow : t -> Z.t -> t
val (**) : t -> Z.t -> t
val of_bytes_exn : Stdlib.Bytes.t -> t
val of_bytes_opt : Stdlib.Bytes.t -> t option
val to_bytes : t -> Stdlib.Bytes.t
val factor_power_of_two : int * Z.t
val of_string : string -> t
val to_string : t -> string
val of_z : Z.t -> t
val to_z : t -> Z.t
val legendre_symbol : t -> Z.t
val is_quadratic_residue : t -> bool
val sqrt_opt : t -> t option
val check_bytes : Stdlib.Bytes.t -> bool
OCaml

Innovation. Community. Security.