MW_AES_CcmDecryptInit

C

uint16_t MW_AES_CcmDecryptInit(MW_AES_Ctx_T * p_ctx, uint8_t *p_aesKey, uint8_t *p_nonce, uint8_t nonceSz, uint8_t tagSz, uint8_t *p_aad, uint16_t aadSz, uint16_t dataSz);

Description

Initializes AES CCM decryption.

Parameters

ParameterDescription
[out] p_ctxPointer to the AES context structure.
[in] p_aesKeyPointer to the 16-byte encryption key.
[in] p_noncePointer to the nonce used for encryption.
[in] nonceSzThe size of p_nonce, between 7 and 13 bytes.
[in] tagSzThe tag size used for encryption, must be a value in {4, 6, 8, 10, 12, 14, 16}.
[in] p_aadPointer to the additional authentication data.
[in] aadSzThe size of p_aad, can be 0 if p_aad is NULL.
[in] dataSzThe size of the data to be decrypted.

Return values

Return valueDescription
MBA_RES_SUCCESSInitialization successful.
MBA_RES_FAILInitialization failed.