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

◆ cracen_aead_verify()

psa_status_t cracen_aead_verify ( cracen_aead_operation_t * operation,
uint8_t * plaintext,
size_t plaintext_size,
size_t * plaintext_length,
const uint8_t * tag,
size_t tag_length )

#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_aead.h>

Finish an AEAD decryption operation and verify the tag.

Parameters
[in,out]operationAEAD operation context.
[out]plaintextBuffer to store the final plaintext.
[in]plaintext_sizeSize of the plaintext buffer in bytes.
[out]plaintext_lengthLength of the generated plaintext in bytes.
[in]tagAuthentication tag to verify.
[in]tag_lengthLength of the tag in bytes.
Return values
PSA_SUCCESSThe operation completed successfully and the tag is valid.
PSA_ERROR_INVALID_SIGNATUREThe authentication tag is invalid.
PSA_ERROR_BAD_STATEThe operation is not in a valid state.
PSA_ERROR_BUFFER_TOO_SMALLThe plaintext buffer is too small.