package cryptokit

  1. Overview
  2. Docs

Module CryptokitBignumSource

Operations on big integers, used for the implementation of module Cryptokit.

Sourcetype t = Z.t
Sourceval relative_prime : t -> t -> bool
Sourceval addm : t -> t -> t -> t
Sourceval subm : t -> t -> t -> t
Sourceval mulm : t -> t -> t -> t
Sourceval sqrm : t -> t -> t
Sourceval invm : t -> t -> t
Sourceval divm : t -> t -> t -> t
Sourceval powm : t -> t -> t -> t
Sourceval sqrtm : t -> t -> t option
Sourceval mod_power_CRT : t -> t -> t -> t -> t -> t -> t
Sourceval of_bytes : string -> t
Sourceval to_bytes : ?numbits:int -> t -> string
Sourceval random : rng:(bytes -> int -> int -> unit) -> ?odd:bool -> int -> t
Sourceval random_prime : rng:(bytes -> int -> int -> unit) -> int -> t
Sourceval random_upto : rng:(bytes -> int -> int -> unit) -> t -> t
Sourceval wipe : t -> unit

The following definitions are no longer used by Cryptokit. We keep them in case clients of Cryptokit use them.

Sourceval zero : t
Sourceval one : t
Sourceval of_int : int -> t
Sourceval compare : t -> t -> int
Sourceval add : t -> t -> t
Sourceval sub : t -> t -> t
Sourceval mult : t -> t -> t
Sourceval div : t -> t -> t
Sourceval lcm : t -> t -> t
Sourceval mod_ : t -> t -> t
Sourceval mod_power : t -> t -> t -> t
Sourceval mod_inv : t -> t -> t