![]() |
nRF Connect SDK API 3.4.99
|
| psa_status_t cracen_aead_encrypt | ( | 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 * | plaintext, | ||
| size_t | plaintext_length, | ||
| uint8_t * | ciphertext, | ||
| size_t | ciphertext_size, | ||
| size_t * | ciphertext_length ) |
#include <cracen_sw_aead.h>
Perform a single software AEAD encryption.
| [in] | attributes | Key attributes. |
| [in] | key_buffer | Key material. |
| [in] | key_buffer_size | Size of key material. |
| [in] | alg | AEAD algorithm. |
| [in] | nonce | Nonce/IV. |
| [in] | nonce_length | Length of nonce. |
| [in] | additional_data | Additional data. |
| [in] | additional_data_length | Length of additional data. |
| [in] | plaintext | Plaintext to encrypt. |
| [in] | plaintext_length | Length of plaintext. |
| [out] | ciphertext | Output buffer for ciphertext and tag. |
| [in] | ciphertext_size | Size of ciphertext buffer. |
| [out] | ciphertext_length | Pointer to store actual output length. |
| PSA_SUCCESS | Encryption completed successfully. |
| PSA_ERROR_NOT_SUPPORTED | Unsupported algorithm. |
| PSA_ERROR_BUFFER_TOO_SMALL | Output buffer too small. |
| PSA_ERROR_INVALID_ARGUMENT | Invalid parameters. |