Poly1305.aead_encrypt
You're seeing just the function
aead_encrypt
, go back to Poly1305 module for more information.
Specs
authenticated encryption with additional data - encryption
- message to be encrypted
- shared secret key
- one-time use nonce
- additional authenticated data
The return value will be a tuple of {ciphertext, MAC}
The algorithm is applied as described in RFC7539:
- The key and nonce are used to encrypt the message with ChaCha20.
- The one-time MAC key is derived from the cipher key and nonce.
- The ciphertext and additional data are authenticated with the MAC