type 'a key
type secret_key = secret key
type public_key = public key
type keypair = secret key * public key
type signature
type seed
val primitive : string

Primitive used by this implementation. Currently "ed25519".

val public_key_size : int

Size of public keys, in bytes.

val secret_key_size : int

Size of secret keys, in bytes.

val signature_size : int

Size of signatures, in bytes.

val seed_size : int

Size of signing key seeds, in bytes.

val random_keypair : unit -> keypair

random_keypair () generates a random key pair.

val seed_keypair : seed -> keypair

seed_keypair seed generates a key pair from secret seed.

val secret_key_to_seed : secret key -> seed

secret_key_to_seed sk extracts the secret key sk's seed.

val secret_key_to_public_key : secret key -> public key

secret_key_to_public_key sk extract the secret key sk's public_key.

val wipe_key : 'a key -> unit

wipe_key k overwrites k with zeroes.

val equal_public_keys : public key -> public key -> bool

equal_public_keys a b checks a and b for equality in constant time.

val equal_secret_keys : secret key -> secret key -> bool

equal_secret_keys a b checks a and b for equality in constant time.

val compare_public_keys : public key -> public key -> int

compare_public_keys a b compares a and b.

val box_keypair : keypair -> Box.keypair

box_keypair kp is the Box.keypair extracted from kp.

val box_public_key : public key -> Box.public_key

box_public_key k is the Box.public_key extracted from k.

val box_secret_key : secret key -> Box.secret_key

box_secret_key k is the Box.secret_key extracted from k.

module type S = sig ... end
module Bytes : S with type storage = Bytes.t
module Bigbytes : S with type storage = bigbytes