Merge pull request #10311 from dgarske/stm32_gmac

Fix for using STM32 AES hardware crypto with WOLFSSL_ARMASM set
This commit is contained in:
Daniel Pouzzner
2026-04-28 23:58:17 -05:00
committed by GitHub
+7 -1
View File
@@ -7707,7 +7707,13 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
return ret;
#endif /* WOLFSSL_RENESAS_RSIP && WOLFSSL_RENESAS_FSPSM_CRYPTONLY*/
#if defined(WOLFSSL_ARMASM)
/* GCM setup needs one AES block encrypt of the all-zero IV to generate
* the hash subkey H. STM32_CRYPTO stores only the raw key (no expanded
* key schedule), so the ARMASM AES_ECB_encrypt helpers used here cannot
* be used. Excluding STM32_CRYPTO from this block falls back to the
* non-ARMASM wc_AesEncrypt implementation, which on STM32 routes to
* CRYP. */
#if defined(WOLFSSL_ARMASM) && !defined(STM32_CRYPTO)
if (ret == 0) {
#ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO
#if !defined(__aarch64__)