crypto_aead_encrypt(9)

crypto_aead_encrypt9

Encrypt plaintext

Usage

int crypto_aead_encrypt(struct aead_request * req);

Arguments

req

reference to the aead_request handle that holds all information needed to perform the cipher operation

Overview

Encrypt plaintext data using the aead_request handle. That data structure and how it is filled with data is discussed with the aead_request_* functions.

IMPORTANT NOTE The encryption operation creates the authentication data / tag. That data is concatenated with the created ciphertext. The ciphertext memory size is therefore the given number of block cipher blocks + the size defined by the crypto_aead_setauthsize invocation. The caller must ensure that sufficient memory is available for the ciphertext and the authentication tag.

Return

0 if the cipher operation was successful; < 0 if an error occurred

Authors

Stephan Mueller <[email protected]>

Author.

Marek Vasut <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.