Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type storage = Bytes.t
of_public_key k
converts k
to type storage
. The result is public_key_size
bytes long.
of_secret_key k
converts k
to storage
. The result is secret_key_size
bytes long.
of_channel_key k
converts k
to storage
. The result is channel_key_size
bytes long.
of_nonce n
converts n
to storage
. The result is nonce_size
bytes long.
box sk pk m n
encrypts and authenticates a message m
using the sender's secret key sk
, the receiver's public key pk
, and a nonce n
.
box_open sk pk c n
verifies and decrypts a ciphertext c
using the receiver's secret key sk
, the sender's public key pk
, and a nonce n
.
fast_box ck m n
encrypts and authenticates a message m
using the channel key ck
precomputed from sender's secret key and the receiver's public key, and a nonce n
.