Module nacl::public_box[][src]

Modules

Constants

NaCl public box algorithm name for JWK’s (JSON Web Key)

Key length for NaCl’s boxes

Nonce length for NaCl’s boxes

Length of Poly hash, used in NaCl’s boxes

Functions

This function calculates a dh-style shared key (or stream key), for given public and secret keys. This is an analog of crypto_box_beforenm in crypto_box/curve25519xsalsa20poly1305/ref/before.c

This function generates a public for any given secret key, which itself should be randomly generated. This is an analog of crypto_box_keypair in crypto_box/curve25519xsalsa20poly1305/ref/keypair.c

This function opens xsalsa20+poly1305 formatted cipher, returning a message. This is an analog of crypto_box_open in crypto_box/curve25519xsalsa20poly1305/ref/box.c

This function packs given message into xsalsa20+poly1305 secret-box bytes layout. This is an analog of crypto_box in crypto_box/curve25519xsalsa20poly1305/ref/box.c