HomeFreeBSD

GMAC: Reset initial hash value and counter in AES_GMAC_Reinit().

Description

GMAC: Reset initial hash value and counter in AES_GMAC_Reinit().

Previously, these values were only cleared in AES_GMAC_Init(), so a
second set of operations could reuse the final hash as the initial
hash. Currently this bug does not trigger in cryptosoft as existing
GMAC and GCM operations always use an on-stack auth context
initialized from a template context.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33315

(cherry picked from commit 356c922f74bfcece1f139026897a79c62adbdf50)

Details

Provenance
jhbAuthored on Dec 9 2021, 7:52 PM
Reviewer
markj
Differential Revision
D33315: GMAC: Reset initial hash value and counter in AES_GMAC_Reinit().
Parents
rGaf2c2a9cb59d: crypto: Don't assert for empty output buffers.
Branches
Unknown
Tags
Unknown