forked from wolfSSL/wolfssl
Fix for AES GCM Decrypt auth tag. ZD 9507
This commit is contained in:
@@ -6054,7 +6054,7 @@ static int wc_AesGcmDecrypt_STM32(Aes* aes, byte* out,
|
||||
#endif /* WOLFSSL_STM32_CUBEMX */
|
||||
|
||||
/* STM32 GCM hardware only supports IV of 12 bytes, so use software for auth */
|
||||
if (sz == 0 || partial != 0 || ivSz != GCM_NONCE_MID_SZ) {
|
||||
if (sz == 0 || ivSz != GCM_NONCE_MID_SZ) {
|
||||
DecrementGcmCounter(ctr); /* hardware requires +1, so subtract it */
|
||||
GHASH(aes, authIn, authInSz, in, sz, tag, sizeof(tag));
|
||||
wc_AesEncrypt(aes, ctr, partialBlock);
|
||||
|
Reference in New Issue
Block a user