other versions
- stretch 4.9.168-1
CRYPTO_AEAD_DECRYPT(9) | Programming Interface | CRYPTO_AEAD_DECRYPT(9) |
NAME¶
crypto_aead_decrypt - decrypt ciphertextSYNOPSIS¶
int crypto_aead_decrypt(struct aead_request * req);
ARGUMENTS¶
reqreference to the ablkcipher_request handle that holds all
information needed to perform the cipher operation
DESCRIPTION¶
Decrypt ciphertext 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 caller must concatenate the ciphertext followed by the authentication data / tag. That authentication data / tag must have the size defined by the crypto_aead_setauthsize invocation.
RETURN¶
0 if the cipher operation was successful; -EBADMSG: The AEAD cipher operation performs the authentication of the data during the decryption operation. Therefore, the function returns this error if the authentication of the ciphertext was unsuccessful (i.e. the integrity of the ciphertext or the associated data was violated); < 0 if an error occurred.AUTHORS¶
Stephan Mueller <smueller@chronox.de>Author.
Marek Vasut <marek@denx.de>
Author.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |