nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ cracen_sw_aes_ccm_encrypt()

psa_status_t cracen_sw_aes_ccm_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 <subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_aes_ccm.h>

Perform a single-part software AES-CCM encryption.

Parameters
[in]attributesKey attributes.
[in]key_bufferKey material.
[in]key_buffer_sizeSize of the key material.
[in]algAlgorithm to use.
[in]nonceNonce value.
[in]nonce_lengthLength of the nonce.
[in]additional_dataAdditional authenticated data.
[in]additional_data_lengthLength of the additional data.
[in]plaintextInput plaintext to encrypt.
[in]plaintext_lengthLength of the plaintext.
[out]ciphertextOutput buffer for ciphertext and tag.
[in]ciphertext_sizeSize of the ciphertext buffer.
[out]ciphertext_lengthPointer to store the actual ciphertext and tag length.
Return values
PSA_SUCCESSEncryption completed successfully.
PSA_ERROR_BUFFER_TOO_SMALLOutput buffer too small.
PSA_ERROR_INVALID_ARGUMENTInvalid nonce length or key size.
PSA_ERROR_NOT_SUPPORTEDUnsupported algorithm or key type.