esp_aes_gcm_auth_decrypt() function
This function performs a GCM authenticated decryption of a buffer.
Arguments
length
The length of the input data. This must be a multiple of 16 except in the last call before mbedtls_gcm_finish().
iv
The initialization vector.
iv_len
The length of the IV.
aad
The buffer holding the additional data.
aad_len
The length of the additional data.
tag
The buffer holding the tag.
tag_len
The length of the tag.
input
The buffer holding the input data.
output
The buffer for holding the output data.
Return value
0 if successful and authenticated. #MBEDTLS_ERR_GCM_AUTH_FAILED if the tag does not match.
Notes
For decryption, the output buffer cannot be the same as input buffer. If the buffers overlap, the output buffer must trail at least 8 Bytes behind the input buffer.
esp_aes_gcm_auth_decrypt() is called by 2 functions and calls 2 functions:
![]()
esp_aes_gcm_auth_decrypt()
esp_aes_gcm_auth_decrypt() reads 1 variable:
![]()
esp_aes_gcm_auth_decrypt()