Debian Codegraph @

doc/README.tpm_stdll

raw
1 TPM STDLL README
2 Kent Yoder <[email protected]>
3
4 Current architecture:
5
6 SRK
7 |
8 + User Root Key (URK)
9 | |
10 | + [1..N] User Base Key (UBK)
11 | |
12 | + Migratable Leaf Key (MLK)
13 | | |
14 | | + Auth Data for User Created Keys
15 | |
16 | + [1..N] User Created Keys
17 |
18 + Migratable Root Key (MRK)
19 |
20 + Migratable Leaf Key (MLK)
21
22 1. When the SO logs in:
23 A) its verified that she is root (currently commented out)
24 B) the token searches for the User Root Key (URK), and if found, the SO's key
25 chain is loaded, up to the SO's protection key. Some junk data is
26 encrypted and decrypted to challenge the auth data passed in and if that
27 test passes, the SO is logged in
28 C) if the URK isn't found, its assumed that the SO is logging in for the first
29 time, and
30 i. The URK is generated in software
31 ii. The URK's private key is wrapped with the public key of the SRK, and TSS
32 and PKCS#11 objects are created for it, storing it in the PKCS#11 data store
33 D) i and ii are repeated for the Migratable Root Key (MRK)
34 E) The Protection Key is generated by the TPM as a child of the MRK
35 F) Some junk data is encrypted and decrypted to challenge the auth data passed
36 in and if that test passes, the SO is logged in
37
38 2. When the USER logs in:
39 A) The URK is searched for and if not found, failure (The SO has not
40 initialized the token)
41 B) If the URK is found, the User's Base Key (UBK) is searched for and if
42 found, the user's key chain is loaded, up to the USER's protection key.
43 Some junk data is encrypted and decrypted to challenge the auth data passed
44 in and if that test passes, the USER is logged in
45 C) if the UBK is not found:
46 i. The UBK is generated in software
47 ii.The UBK's private key is wrapped with the public key of the URK, and TSS
48 and PKCS#11 objects are created for it, storing it in the PKCS#11 data
49 store
50 D) The User's Protection Key is generated by the TPM as a child of the UBK
51 E) Some junk data is encrypted and decrypted to challenge the auth data passed
52 in and if that test passes, the USER is logged in
53
54
55 Prior to release 2.4.1, the tpm stdll has the password for the SRK hardcoded to
56 NULL and the policy secret mode set to TSS_SECRET_MODE_PLAIN.
57
58 Starting in release 2.4.1, the environment variables,
59 OCK_SRK_SECRET and OCK_SRK_MODE can be set to indicate the Storage Root Key's
60 secret and it's policy's secret mode to the tpm stdll.
61
62 OCK_SRK_MODE
63 The possible secret modes are:
64 - TSS_SECRET_MODE_NONE
65 - TSS_SECRET_MODE_PLAIN
66 - TSS_SECRET_MODE_SHA1
67 - TSS_SECRET_MODE_POPUP
68 - TSS_SECRET_MODE_CALLBACK
69
70 OCK_SRK_SECRET
71 The storage root key may be:
72 - a text string.
73 OCK_SRK_MODE should be set to TSS_SECRET_MODE_PLAIN.
74 i.e. export OCK_SRK_SECRET="MyBigSecret"
75
76 - SHA1 hash string.
77 The SHA1 hash must be expressed as a 40 byte hexadecimal string. Recall a
78 byte value is represented by two hexadecimal digits. So a SHA1 hash length
79 of 20 bytes requires 40 hexadecimal digits to represent it.
80
81 This option also requires that OCK_SRK_MODE is set to TSS_SECRET_MODE_SHA1
82 to indicate the string is a sha1 hash.
83
84 i.e. export OCK_SRK_SECRET="22596363b3de40b06f981fb85d82312e8c0ed511"
85 export OCK_SRK_MODE=TSS_SECRET_MODE_SHA1
86
87 Note: If using the well known secret, then express as a 40 byte hex string
88 of zeroes.
89
90 i.e. export OCK_SRK_SECRET="0000000000000000000000000000000000000000"
91 export OCK_SRK_MODE=TSS_SECRET_MODE_SHA1
92
93 If neither OCK_SRK_MODE nor OCK_SRK_SECRET are set, then the passwd will be set
94 to NULL, and the mode to TSS_SECRET_MODE_PLAIN.