我想在sha1
和sha256
银行中拥有所有 PCR(0-23),但现在我只sha256
设置并且sha1
为空但存在,tpm2_pcrread
输出:
sha1:
sha256:
0 : 0xC373FA10837B62B48E9CA87E5F31440FCDC8F5C51FB1BF0FC72D4E241E680ABC
1 : 0x6182DB76DAE2E1F0540C5EFAB413141D2F1957BA4F1344087A744CD36B34D1A1
2 : 0x3D458CFE55CC03EA1F443F1562BEEC8DF51C75E14A9FCF9A7234A13F198E7969
3 : 0x3D458CFE55CC03EA1F443F1562BEEC8DF51C75E14A9FCF9A7234A13F198E7969
4 : 0x30FBEFFB0D106992F28146DEDF62A2154164585F9606ACBDAB9FD4FA89806FD9
5 : 0x514DDD32584089DC386AD6C28FD03B70D42AAE7B7029A0899A9287BE6646D7EB
6 : 0x3D458CFE55CC03EA1F443F1562BEEC8DF51C75E14A9FCF9A7234A13F198E7969
7 : 0x65CAF8DD1E0EA7A6347B635D2B379C93B9A1351EDC2AFC3ECDA700E534EB3068
8 : 0x0000000000000000000000000000000000000000000000000000000000000000
9 : 0x0000000000000000000000000000000000000000000000000000000000000000
10: 0xA63AFE1C978C162B2D0BCEC08ABC0D1F31D7988D7A9F3CC0AB9A48A34399573A
11: 0x0000000000000000000000000000000000000000000000000000000000000000
12: 0x0000000000000000000000000000000000000000000000000000000000000000
13: 0x0000000000000000000000000000000000000000000000000000000000000000
14: 0x0000000000000000000000000000000000000000000000000000000000000000
15: 0x0000000000000000000000000000000000000000000000000000000000000000
16: 0x0000000000000000000000000000000000000000000000000000000000000000
17: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
18: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
19: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
20: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
21: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
23: 0x0000000000000000000000000000000000000000000000000000000000000000
我试过了tpm2_pcrallocate
,因为这里默认情况下它会分配sha1
和sha256
:
如果未指定分配,则分配 PCR 为 0 - 23 的 SHA1 和 SHA256 bank。
但我收到了错误消息:
WARNING:esys:src/tss2-esys/api/Esys_PCR_Allocate.c:321:Esys_PCR_Allocate_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_PCR_Allocate.c:114:Esys_PCR_Allocate() Esys Finish ErrorCode (0x000009a2)
ERROR: Could not allocate PCRs.
ERROR: Esys_PCR_Allocate(0x9A2) - tpm:session(1):authorization failure without DA implications
ERROR: Unable to run tpm2_pcrallocate
AFAIK,对于 TPM 1.2,这是不可能的,因为“硬编码”哈希算法,但对于 TPM 2.0(我有),我可以为 PCR 库选择几种算法。
那么,你能帮我解决这个问题吗?