fix(mbedtls/gcm): Add support for software fallback for non-AES ciphers in a GCM operation

- Even if the config MBEDTLS_HARDWARE_AES is enabled, we now support fallback
to software implementation of GCM operations when non-AES ciphers are used.
This commit is contained in:
harshal.patil
2023-12-19 13:31:49 +05:30
parent 98373a3c2a
commit 8977be856d
6 changed files with 172 additions and 1 deletions

View File

@@ -155,6 +155,12 @@
#ifdef CONFIG_MBEDTLS_HARDWARE_AES
#define MBEDTLS_GCM_ALT
#ifdef CONFIG_MBEDTLS_GCM_SUPPORT_NON_AES_CIPHER
/* Prefer hardware and fallback to software */
#define MBEDTLS_GCM_NON_AES_CIPHER_SOFT_FALLBACK
#else
#undef MBEDTLS_GCM_NON_AES_CIPHER_SOFT_FALLBACK
#endif
#endif
/* MBEDTLS_SHAxx_ALT to enable hardware SHA support