tpm2-tools icon indicating copy to clipboard operation
tpm2-tools copied to clipboard

TPM2 integrity check failed

Open KyleKang0603 opened this issue 1 year ago • 1 comments

I ran into error below when I reboot and decrypt

My sequence was as below

  1. tpm2_createprimary -c primary.ctx
  2. tpm2_create -C primary.ctx -u a.pub -r b.priv
  3. tpm2_load -C primary.ctx -u a.pub -r b.priv -c [Handler]
  4. tpm2_rsaencrypt -c [Handler] -o [Encrypted] [Key]
  5. reboot
  6. tpm2_rsadecrypt -c [Handler] -o [Key] [Encrypted] and I encountered this error
WARNING:esys:src/tss2-esys/api/Esys_ContextLoad.c:279:Esys_ContextLoad_Finish() Received TPM Error 
ERROR:esys:src/tss2-esys/api/Esys_ContextLoad.c:93:Esys_ContextLoad() Esys Finish ErrorCode (0x000001df) 
ERROR: Esys_ContextLoad(0x1DF) - tpm:parameter(1):integrity check failed
ERROR: Unable to run tpm2_load

if I restart service step 6 works, but if I reboot it failed as above. Am I missing something?

KyleKang0603 avatar Mar 15 '23 10:03 KyleKang0603

After a reboot you must recreate the context files.

JuergenReppSIT avatar Mar 15 '23 14:03 JuergenReppSIT