DoxigAlpha

SecretBox

NaCl-compatible secretbox API.

A secretbox contains both an encrypted message and an authentication tag to verify that it hasn't been tampered with. A secret key shared by all the recipients must be already known in order to use this API.

Nonces are 192-bit large and can safely be chosen with a random number generator.

Encrypt and authenticate `m` using a nonce `npub` and a key `k`.

Functions

#
seal
Encrypt and authenticate `m` using a nonce `npub` and a key `k`.
open
Verify and decrypt `c` using a nonce `npub` and a key `k`.

Key length in bytes.

Values

#
key_length
Key length in bytes.
nonce_length
Nonce length in bytes.
tag_length
Authentication tag length in bytes.