![]() |
nRF Connect SDK API 3.3.99
|
| psa_status_t cracen_aead_decrypt | ( | const psa_key_attributes_t * | attributes, |
| const uint8_t * | key_buffer, | ||
| size_t | key_buffer_size, | ||
| psa_algorithm_t | alg, | ||
| const uint8_t * | nonce, | ||
| size_t | nonce_length, | ||
| const uint8_t * | additional_data, | ||
| size_t | additional_data_length, | ||
| const uint8_t * | ciphertext, | ||
| size_t | ciphertext_length, | ||
| uint8_t * | plaintext, | ||
| size_t | plaintext_size, | ||
| size_t * | plaintext_length ) |
#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_aead.h>
Authenticate and decrypt a message using AEAD.
| [in] | attributes | Key attributes. |
| [in] | key_buffer | Key material buffer. |
| [in] | key_buffer_size | Size of the key buffer in bytes. |
| [in] | alg | AEAD algorithm. |
| [in] | nonce | Nonce or IV. |
| [in] | nonce_length | Length of the nonce in bytes. |
| [in] | additional_data | Additional Authenticated Data (AAD). |
| [in] | additional_data_length | Length of Additional Authenticated Data (AAD) in bytes. |
| [in] | ciphertext | Ciphertext and tag to decrypt. |
| [in] | ciphertext_length | Length of the ciphertext in bytes. |
| [out] | plaintext | Buffer to store the plaintext. |
| [in] | plaintext_size | Size of the plaintext buffer in bytes. |
| [out] | plaintext_length | Length of the decrypted plaintext in bytes. |
| PSA_SUCCESS | The operation completed successfully. |
| PSA_ERROR_INVALID_HANDLE | The key handle is invalid. |
| PSA_ERROR_INVALID_SIGNATURE | The authentication tag is invalid. |
| PSA_ERROR_NOT_SUPPORTED | The algorithm is not supported. |
| PSA_ERROR_BUFFER_TOO_SMALL | The plaintext buffer is too small. |