swtpm/tests/data/tpmstate1
Stefan Berger 3845a08e0a test: Recreate TPM 1.2 state files with header
Recreate a TPM 1.2 state file with header.

The state of the TPM 1.2 must be initialized with Startup(ST_CLEAR)
and then saved so that the proper error code appears as a result
when running this test.

The PCR values was originally created by extending PCR 10 with
sha1("test"). This was recreated using this sequence:

s=$(echo -en test | sha1sum | cut -d " " -f1 | sed -n 's/\([a-f0-9]\{2\}\)/\\x\1/pg')
echo -en $s > input
tss1extend  -ha 10 -if input

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-05-09 10:15:08 -04:00
..
README swtpm: integrity protect the encrypt TPM state 2015-05-19 16:35:08 -04:00
tpm-00.permall test: Recreate TPM 1.2 state files with header 2022-05-09 10:15:08 -04:00
tpm-00.volatilestate test: Recreate TPM 1.2 state files with header 2022-05-09 10:15:08 -04:00

The volatile state of this TPM instance has

PCR[10] = c78a6e94c73c4d7fc305c8a66bbf1545f4edb7a5  (extend of 'test')

The state is not encrypted.
The value of PCR 10 can be found as follows:

# od -tx1 tpm-00.volatilestate

[...]
0000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c7
0000440 8a 6e 94 c7 3c 4d 7f c3 05 c8 a6 6b bf 15 45 f4
[...]