Skip to content

Commit d0f5778

Browse files
fix for state of aes.gcm.H on re-use
1 parent 6e14889 commit d0f5778

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)