Skip to contentSkip to conversation

Hash sequence duplication without ContextSave/ContextLoad

tpm2 Petr Gotthard 1 participant 1 message May 16, 2022

lore
Share & tools
lore

Petr Gotthard

author
#0 lore raw

Hello,

I need to duplicate a hash sequence. This is to implement TPM-based version of OpenSSL's EVP_MD_CTX_dup.

Background: EVP_MD_CTX_dup can be used to duplicate the message digest state. This is useful [...] if large amounts of data are to be hashed which only differ in the last few bytes.

So far I am using ContextSave/ContextLoad, but Windows is blocking these TPM commands.
https://docs.microsoft.com/en-us/windows/win32/tbs/command-blocking

Is there some other way to duplicate a TPM hash sequence, please?


Petr