Fix for AES GCM Decrypt auth tag. ZD 9507

This commit is contained in:
David Garske
2019-11-18 06:46:50 -08:00
parent b676c69561
commit 7e17904c54

View File

@@ -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);