#include <subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_aes_ccm.h>
Perform a single-part software AES-CCM encryption.
- Parameters
-
| [in] | attributes | Key attributes. |
| [in] | key_buffer | Key material. |
| [in] | key_buffer_size | Size of the key material. |
| [in] | alg | Algorithm to use. |
| [in] | nonce | Nonce value. |
| [in] | nonce_length | Length of the nonce. |
| [in] | additional_data | Additional authenticated data. |
| [in] | additional_data_length | Length of the additional data. |
| [in] | plaintext | Input plaintext to encrypt. |
| [in] | plaintext_length | Length of the plaintext. |
| [out] | ciphertext | Output buffer for ciphertext and tag. |
| [in] | ciphertext_size | Size of the ciphertext buffer. |
| [out] | ciphertext_length | Pointer to store the actual ciphertext and tag length. |
- Return values
-
| PSA_SUCCESS | Encryption completed successfully. |
| PSA_ERROR_BUFFER_TOO_SMALL | Output buffer too small. |
| PSA_ERROR_INVALID_ARGUMENT | Invalid nonce length or key size. |
| PSA_ERROR_NOT_SUPPORTED | Unsupported algorithm or key type. |