mbedtls: GCM implementation is replaced with CTR-based calculation

- GCM operation in mbedtls used ECB, which calculated only 16 bytes of data each time.
	- Therefore, when processing a large amount of data, it is necessary to frequently set hardware acceleration calculations,
	- which could not make good use of the AES DMA function to improve efficiency.
	- Hence, GCM implementation is replaced with CTR-based calculation which utilizes AES DMA to improve efficiency.
This commit is contained in:
LiPeng
2022-06-28 11:19:58 +08:00
committed by harshal.patil
parent f9f10c2590
commit 5c93fe47cb
5 changed files with 16 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ extern "C" {
#if defined(MBEDTLS_GCM_ALT)
#if SOC_AES_SUPPORT_GCM
#include "aes/esp_aes_gcm.h"
@@ -34,8 +34,6 @@ typedef esp_gcm_context mbedtls_gcm_context;
#define mbedtls_gcm_auth_decrypt esp_aes_gcm_auth_decrypt
#define mbedtls_gcm_crypt_and_tag esp_aes_gcm_crypt_and_tag
#endif // SOC_AES_SUPPORT_GCM
#endif /* MBEDTLS_GCM_ALT */
#ifdef __cplusplus