Skip to content

Commit 8227309

Browse files
authored
Merge pull request #8107 from JacobBarthelmeh/aesgcm
fix for state of aes.gcm.H on re-use
2 parents 1d25e0f + d0f5778 commit 8227309

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wolfcrypt/src/aes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8063,6 +8063,8 @@ static void GHASH_FINAL(Aes* aes, byte* s, word32 sSz)
80638063
GHASH_LEN_BLOCK(aes);
80648064
/* Copy the result into s. */
80658065
XMEMCPY(s, AES_TAG(aes), sSz);
8066+
/* reset aes->gcm.H in case of re-use */
8067+
GHASH_INIT_EXTRA(aes);
80668068
}
80678069
#endif /* WOLFSSL_AESGCM_STREAM */
80688070

0 commit comments

Comments
 (0)