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

◆ cracen_sw_aes_ccm_decrypt()

psa_status_t cracen_sw_aes_ccm_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/cracen_sw/include/cracen_sw_aes_ccm.h>

Perform a single-part software AES-CCM decryption.

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]ciphertextInput ciphertext and tag to decrypt.
[in]ciphertext_lengthLength of the ciphertext and tag.
[out]plaintextOutput buffer for plaintext.
[in]plaintext_sizeSize of the plaintext buffer.
[out]plaintext_lengthPointer to store the actual plaintext length.
Return values
PSA_SUCCESSDecryption and verification completed successfully.
PSA_ERROR_INVALID_SIGNATUREAuthentication tag verification failed.
PSA_ERROR_BUFFER_TOO_SMALLOutput buffer too small.
PSA_ERROR_INVALID_ARGUMENTInvalid nonce length, invalid key size, or ciphertext too short.
PSA_ERROR_NOT_SUPPORTEDUnsupported algorithm or key type.