mbedtls_psa_aead_set_nonce() function
Set the nonce for an authenticated encryption or decryption operation. This function sets the nonce for the authenticated encryption or decryption operation. The PSA core calls mbedtls_psa_aead_encrypt_setup() or mbedtls_psa_aead_decrypt_setup() before calling this function. If this function returns an error status, the PSA core will call mbedtls_psa_aead_abort().
Arguments
operation
Active AEAD operation.
nonce
Buffer containing the nonce to use.
nonce_length
Size of the nonce in bytes.
Return value
#PSA_SUCCESS Success. #PSA_ERROR_INVALID_ARGUMENT The size of \p nonce is not acceptable for the chosen algorithm. #PSA_ERROR_NOT_SUPPORTED Algorithm previously set is not supported in this configuration of the library.
Notes
The signature of this function is that of a PSA driver aead_set_nonce entry point. This function behaves as an aead_set_nonce entry point as defined in the PSA driver interface specification for transparent drivers.
mbedtls_psa_aead_set_nonce() is called by 1 function and calls 4 functions:
![]()
mbedtls_psa_aead_set_nonce()
mbedtls_psa_aead_set_nonce() reads 3 variables:
![]()
mbedtls_psa_aead_set_nonce()