mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-08 12:24:40 +00:00
tpm2: Reset the internal CMAC state when starting a CMAC
Initialize the internal CMAC state to 0s when starting a CMAC. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
a829ddbdeb
commit
137b9da5c8
@ -87,6 +87,7 @@ CryptCmacStart(
|
||||
//
|
||||
if(macAlg != TPM_ALG_CMAC)
|
||||
return 0;
|
||||
MemorySet(cState, 0, sizeof(*cState));
|
||||
// set up the encryption algorithm and parameters
|
||||
cState->symAlg = def->algorithm;
|
||||
cState->keySizeBits = def->keyBits.sym;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user