iPXE
Tpm20.h
Go to the documentation of this file.
1 /** @file
2  TPM2.0 Specification data structures
3  (Trusted Platform Module Library Specification, Family "2.0", Level 00, Revision 00.96,
4  @http://www.trustedcomputinggroup.org/resources/tpm_library_specification)
5 
6  Check http://trustedcomputinggroup.org for latest specification updates.
7 
8 Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>
9 This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
13 
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 
17 **/
18 
19 
20 #ifndef _TPM20_H_
21 #define _TPM20_H_
22 
23 FILE_LICENCE ( BSD3 );
24 
26 
27 #pragma pack (1)
28 
29 // Annex A Algorithm Constants
30 
31 // Table 205 - Defines for SHA1 Hash Values
32 #define SHA1_DIGEST_SIZE 20
33 #define SHA1_BLOCK_SIZE 64
34 
35 // Table 206 - Defines for SHA256 Hash Values
36 #define SHA256_DIGEST_SIZE 32
37 #define SHA256_BLOCK_SIZE 64
38 
39 // Table 207 - Defines for SHA384 Hash Values
40 #define SHA384_DIGEST_SIZE 48
41 #define SHA384_BLOCK_SIZE 128
42 
43 // Table 208 - Defines for SHA512 Hash Values
44 #define SHA512_DIGEST_SIZE 64
45 #define SHA512_BLOCK_SIZE 128
46 
47 // Table 209 - Defines for SM3_256 Hash Values
48 #define SM3_256_DIGEST_SIZE 32
49 #define SM3_256_BLOCK_SIZE 64
50 
51 // Table 210 - Defines for Architectural Limits Values
52 #define MAX_SESSION_NUMBER 3
53 
54 // Annex B Implementation Definitions
55 
56 // Table 211 - Defines for Logic Values
57 #define YES 1
58 #define NO 0
59 #define SET 1
60 #define CLEAR 0
61 
62 // Table 215 - Defines for RSA Algorithm Constants
63 #define MAX_RSA_KEY_BITS 2048
64 #define MAX_RSA_KEY_BYTES ((MAX_RSA_KEY_BITS + 7) / 8)
65 
66 // Table 216 - Defines for ECC Algorithm Constants
67 #define MAX_ECC_KEY_BITS 256
68 #define MAX_ECC_KEY_BYTES ((MAX_ECC_KEY_BITS + 7) / 8)
69 
70 // Table 217 - Defines for AES Algorithm Constants
71 #define MAX_AES_KEY_BITS 128
72 #define MAX_AES_BLOCK_SIZE_BYTES 16
73 #define MAX_AES_KEY_BYTES ((MAX_AES_KEY_BITS + 7) / 8)
74 
75 // Table 218 - Defines for SM4 Algorithm Constants
76 #define MAX_SM4_KEY_BITS 128
77 #define MAX_SM4_BLOCK_SIZE_BYTES 16
78 #define MAX_SM4_KEY_BYTES ((MAX_SM4_KEY_BITS + 7) / 8)
79 
80 // Table 219 - Defines for Symmetric Algorithm Constants
81 #define MAX_SYM_KEY_BITS MAX_AES_KEY_BITS
82 #define MAX_SYM_KEY_BYTES MAX_AES_KEY_BYTES
83 #define MAX_SYM_BLOCK_SIZE MAX_AES_BLOCK_SIZE_BYTES
84 
85 // Table 220 - Defines for Implementation Values
86 typedef UINT16 BSIZE;
87 #define BUFFER_ALIGNMENT 4
88 #define IMPLEMENTATION_PCR 24
89 #define PLATFORM_PCR 24
90 #define DRTM_PCR 17
91 #define NUM_LOCALITIES 5
92 #define MAX_HANDLE_NUM 3
93 #define MAX_ACTIVE_SESSIONS 64
96 #define MAX_LOADED_SESSIONS 3
97 #define MAX_SESSION_NUM 3
98 #define MAX_LOADED_OBJECTS 3
99 #define MIN_EVICT_OBJECTS 2
100 #define PCR_SELECT_MIN ((PLATFORM_PCR + 7) / 8)
101 #define PCR_SELECT_MAX ((IMPLEMENTATION_PCR + 7) / 8)
102 #define NUM_POLICY_PCR_GROUP 1
103 #define NUM_AUTHVALUE_PCR_GROUP 1
104 #define MAX_CONTEXT_SIZE 4000
105 #define MAX_DIGEST_BUFFER 1024
106 #define MAX_NV_INDEX_SIZE 1024
107 #define MAX_CAP_BUFFER 1024
108 #define NV_MEMORY_SIZE 16384
109 #define NUM_STATIC_PCR 16
110 #define MAX_ALG_LIST_SIZE 64
111 #define TIMER_PRESCALE 100000
112 #define PRIMARY_SEED_SIZE 32
113 #define CONTEXT_ENCRYPT_ALG TPM_ALG_AES
114 #define CONTEXT_ENCRYPT_KEY_BITS MAX_SYM_KEY_BITS
115 #define CONTEXT_ENCRYPT_KEY_BYTES ((CONTEXT_ENCRYPT_KEY_BITS + 7) / 8)
116 #define CONTEXT_INTEGRITY_HASH_ALG TPM_ALG_SHA256
117 #define CONTEXT_INTEGRITY_HASH_SIZE SHA256_DIGEST_SIZE
118 #define PROOF_SIZE CONTEXT_INTEGRITY_HASH_SIZE
119 #define NV_CLOCK_UPDATE_INTERVAL 12
120 #define NUM_POLICY_PCR 1
121 #define MAX_COMMAND_SIZE 4096
122 #define MAX_RESPONSE_SIZE 4096
123 #define ORDERLY_BITS 8
124 #define MAX_ORDERLY_COUNT ((1 << ORDERLY_BITS) - 1)
125 #define ALG_ID_FIRST TPM_ALG_FIRST
126 #define ALG_ID_LAST TPM_ALG_LAST
127 #define MAX_SYM_DATA 128
128 #define MAX_RNG_ENTROPY_SIZE 64
129 #define RAM_INDEX_SPACE 512
130 #define RSA_DEFAULT_PUBLIC_EXPONENT 0x00010001
131 #define CRT_FORMAT_RSA YES
132 #define PRIVATE_VENDOR_SPECIFIC_BYTES ((MAX_RSA_KEY_BYTES / 2) * ( 3 + CRT_FORMAT_RSA * 2))
133 
134 // Capability related MAX_ value
135 #define MAX_CAP_DATA (MAX_CAP_BUFFER - sizeof(TPM_CAP) - sizeof(UINT32))
136 #define MAX_CAP_ALGS (MAX_CAP_DATA / sizeof(TPMS_ALG_PROPERTY))
137 #define MAX_CAP_HANDLES (MAX_CAP_DATA / sizeof(TPM_HANDLE))
138 #define MAX_CAP_CC (MAX_CAP_DATA / sizeof(TPM_CC))
139 #define MAX_TPM_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PROPERTY))
140 #define MAX_PCR_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PCR_SELECT))
141 #define MAX_ECC_CURVES (MAX_CAP_DATA / sizeof(TPM_ECC_CURVE))
142 
143 //
144 // Always set 5 here, because we want to support all hash algo in BIOS.
145 //
146 #define HASH_COUNT 5
147 
148 // 5 Base Types
149 
150 // Table 3 - Definition of Base Types
151 typedef UINT8 BYTE;
152 
153 // Table 4 - Definition of Types for Documentation Clarity
154 //
155 // NOTE: Comment because it has same name as TPM1.2 (value is same, so not runtime issue)
156 //
157 //typedef UINT32 TPM_ALGORITHM_ID;
158 //typedef UINT32 TPM_MODIFIER_INDICATOR;
163 
164 // 6 Constants
165 
166 // Table 6 - TPM_GENERATED Constants
168 #define TPM_GENERATED_VALUE (TPM_GENERATED)(0xff544347)
169 
170 // Table 7 - TPM_ALG_ID Constants
172 //
173 // NOTE: Comment some algo which has same name as TPM1.2 (value is same, so not runtime issue)
174 //
175 #define TPM_ALG_ERROR (TPM_ALG_ID)(0x0000)
176 #define TPM_ALG_FIRST (TPM_ALG_ID)(0x0001)
177 //#define TPM_ALG_RSA (TPM_ALG_ID)(0x0001)
178 //#define TPM_ALG_SHA (TPM_ALG_ID)(0x0004)
179 #define TPM_ALG_SHA1 (TPM_ALG_ID)(0x0004)
180 //#define TPM_ALG_HMAC (TPM_ALG_ID)(0x0005)
181 #define TPM_ALG_AES (TPM_ALG_ID)(0x0006)
182 //#define TPM_ALG_MGF1 (TPM_ALG_ID)(0x0007)
183 #define TPM_ALG_KEYEDHASH (TPM_ALG_ID)(0x0008)
184 //#define TPM_ALG_XOR (TPM_ALG_ID)(0x000A)
185 #define TPM_ALG_SHA256 (TPM_ALG_ID)(0x000B)
186 #define TPM_ALG_SHA384 (TPM_ALG_ID)(0x000C)
187 #define TPM_ALG_SHA512 (TPM_ALG_ID)(0x000D)
188 #define TPM_ALG_NULL (TPM_ALG_ID)(0x0010)
189 #define TPM_ALG_SM3_256 (TPM_ALG_ID)(0x0012)
190 #define TPM_ALG_SM4 (TPM_ALG_ID)(0x0013)
191 #define TPM_ALG_RSASSA (TPM_ALG_ID)(0x0014)
192 #define TPM_ALG_RSAES (TPM_ALG_ID)(0x0015)
193 #define TPM_ALG_RSAPSS (TPM_ALG_ID)(0x0016)
194 #define TPM_ALG_OAEP (TPM_ALG_ID)(0x0017)
195 #define TPM_ALG_ECDSA (TPM_ALG_ID)(0x0018)
196 #define TPM_ALG_ECDH (TPM_ALG_ID)(0x0019)
197 #define TPM_ALG_ECDAA (TPM_ALG_ID)(0x001A)
198 #define TPM_ALG_SM2 (TPM_ALG_ID)(0x001B)
199 #define TPM_ALG_ECSCHNORR (TPM_ALG_ID)(0x001C)
200 #define TPM_ALG_ECMQV (TPM_ALG_ID)(0x001D)
201 #define TPM_ALG_KDF1_SP800_56a (TPM_ALG_ID)(0x0020)
202 #define TPM_ALG_KDF2 (TPM_ALG_ID)(0x0021)
203 #define TPM_ALG_KDF1_SP800_108 (TPM_ALG_ID)(0x0022)
204 #define TPM_ALG_ECC (TPM_ALG_ID)(0x0023)
205 #define TPM_ALG_SYMCIPHER (TPM_ALG_ID)(0x0025)
206 #define TPM_ALG_CTR (TPM_ALG_ID)(0x0040)
207 #define TPM_ALG_OFB (TPM_ALG_ID)(0x0041)
208 #define TPM_ALG_CBC (TPM_ALG_ID)(0x0042)
209 #define TPM_ALG_CFB (TPM_ALG_ID)(0x0043)
210 #define TPM_ALG_ECB (TPM_ALG_ID)(0x0044)
211 #define TPM_ALG_LAST (TPM_ALG_ID)(0x0044)
212 
213 // Table 8 - TPM_ECC_CURVE Constants
215 #define TPM_ECC_NONE (TPM_ECC_CURVE)(0x0000)
216 #define TPM_ECC_NIST_P192 (TPM_ECC_CURVE)(0x0001)
217 #define TPM_ECC_NIST_P224 (TPM_ECC_CURVE)(0x0002)
218 #define TPM_ECC_NIST_P256 (TPM_ECC_CURVE)(0x0003)
219 #define TPM_ECC_NIST_P384 (TPM_ECC_CURVE)(0x0004)
220 #define TPM_ECC_NIST_P521 (TPM_ECC_CURVE)(0x0005)
221 #define TPM_ECC_BN_P256 (TPM_ECC_CURVE)(0x0010)
222 #define TPM_ECC_BN_P638 (TPM_ECC_CURVE)(0x0011)
223 #define TPM_ECC_SM2_P256 (TPM_ECC_CURVE)(0x0020)
224 
225 // Table 11 - TPM_CC Constants (Numeric Order)
226 typedef UINT32 TPM_CC;
227 #define TPM_CC_FIRST (TPM_CC)(0x0000011F)
228 #define TPM_CC_PP_FIRST (TPM_CC)(0x0000011F)
229 #define TPM_CC_NV_UndefineSpaceSpecial (TPM_CC)(0x0000011F)
230 #define TPM_CC_EvictControl (TPM_CC)(0x00000120)
231 #define TPM_CC_HierarchyControl (TPM_CC)(0x00000121)
232 #define TPM_CC_NV_UndefineSpace (TPM_CC)(0x00000122)
233 #define TPM_CC_ChangeEPS (TPM_CC)(0x00000124)
234 #define TPM_CC_ChangePPS (TPM_CC)(0x00000125)
235 #define TPM_CC_Clear (TPM_CC)(0x00000126)
236 #define TPM_CC_ClearControl (TPM_CC)(0x00000127)
237 #define TPM_CC_ClockSet (TPM_CC)(0x00000128)
238 #define TPM_CC_HierarchyChangeAuth (TPM_CC)(0x00000129)
239 #define TPM_CC_NV_DefineSpace (TPM_CC)(0x0000012A)
240 #define TPM_CC_PCR_Allocate (TPM_CC)(0x0000012B)
241 #define TPM_CC_PCR_SetAuthPolicy (TPM_CC)(0x0000012C)
242 #define TPM_CC_PP_Commands (TPM_CC)(0x0000012D)
243 #define TPM_CC_SetPrimaryPolicy (TPM_CC)(0x0000012E)
244 #define TPM_CC_FieldUpgradeStart (TPM_CC)(0x0000012F)
245 #define TPM_CC_ClockRateAdjust (TPM_CC)(0x00000130)
246 #define TPM_CC_CreatePrimary (TPM_CC)(0x00000131)
247 #define TPM_CC_NV_GlobalWriteLock (TPM_CC)(0x00000132)
248 #define TPM_CC_PP_LAST (TPM_CC)(0x00000132)
249 #define TPM_CC_GetCommandAuditDigest (TPM_CC)(0x00000133)
250 #define TPM_CC_NV_Increment (TPM_CC)(0x00000134)
251 #define TPM_CC_NV_SetBits (TPM_CC)(0x00000135)
252 #define TPM_CC_NV_Extend (TPM_CC)(0x00000136)
253 #define TPM_CC_NV_Write (TPM_CC)(0x00000137)
254 #define TPM_CC_NV_WriteLock (TPM_CC)(0x00000138)
255 #define TPM_CC_DictionaryAttackLockReset (TPM_CC)(0x00000139)
256 #define TPM_CC_DictionaryAttackParameters (TPM_CC)(0x0000013A)
257 #define TPM_CC_NV_ChangeAuth (TPM_CC)(0x0000013B)
258 #define TPM_CC_PCR_Event (TPM_CC)(0x0000013C)
259 #define TPM_CC_PCR_Reset (TPM_CC)(0x0000013D)
260 #define TPM_CC_SequenceComplete (TPM_CC)(0x0000013E)
261 #define TPM_CC_SetAlgorithmSet (TPM_CC)(0x0000013F)
262 #define TPM_CC_SetCommandCodeAuditStatus (TPM_CC)(0x00000140)
263 #define TPM_CC_FieldUpgradeData (TPM_CC)(0x00000141)
264 #define TPM_CC_IncrementalSelfTest (TPM_CC)(0x00000142)
265 #define TPM_CC_SelfTest (TPM_CC)(0x00000143)
266 #define TPM_CC_Startup (TPM_CC)(0x00000144)
267 #define TPM_CC_Shutdown (TPM_CC)(0x00000145)
268 #define TPM_CC_StirRandom (TPM_CC)(0x00000146)
269 #define TPM_CC_ActivateCredential (TPM_CC)(0x00000147)
270 #define TPM_CC_Certify (TPM_CC)(0x00000148)
271 #define TPM_CC_PolicyNV (TPM_CC)(0x00000149)
272 #define TPM_CC_CertifyCreation (TPM_CC)(0x0000014A)
273 #define TPM_CC_Duplicate (TPM_CC)(0x0000014B)
274 #define TPM_CC_GetTime (TPM_CC)(0x0000014C)
275 #define TPM_CC_GetSessionAuditDigest (TPM_CC)(0x0000014D)
276 #define TPM_CC_NV_Read (TPM_CC)(0x0000014E)
277 #define TPM_CC_NV_ReadLock (TPM_CC)(0x0000014F)
278 #define TPM_CC_ObjectChangeAuth (TPM_CC)(0x00000150)
279 #define TPM_CC_PolicySecret (TPM_CC)(0x00000151)
280 #define TPM_CC_Rewrap (TPM_CC)(0x00000152)
281 #define TPM_CC_Create (TPM_CC)(0x00000153)
282 #define TPM_CC_ECDH_ZGen (TPM_CC)(0x00000154)
283 #define TPM_CC_HMAC (TPM_CC)(0x00000155)
284 #define TPM_CC_Import (TPM_CC)(0x00000156)
285 #define TPM_CC_Load (TPM_CC)(0x00000157)
286 #define TPM_CC_Quote (TPM_CC)(0x00000158)
287 #define TPM_CC_RSA_Decrypt (TPM_CC)(0x00000159)
288 #define TPM_CC_HMAC_Start (TPM_CC)(0x0000015B)
289 #define TPM_CC_SequenceUpdate (TPM_CC)(0x0000015C)
290 #define TPM_CC_Sign (TPM_CC)(0x0000015D)
291 #define TPM_CC_Unseal (TPM_CC)(0x0000015E)
292 #define TPM_CC_PolicySigned (TPM_CC)(0x00000160)
293 #define TPM_CC_ContextLoad (TPM_CC)(0x00000161)
294 #define TPM_CC_ContextSave (TPM_CC)(0x00000162)
295 #define TPM_CC_ECDH_KeyGen (TPM_CC)(0x00000163)
296 #define TPM_CC_EncryptDecrypt (TPM_CC)(0x00000164)
297 #define TPM_CC_FlushContext (TPM_CC)(0x00000165)
298 #define TPM_CC_LoadExternal (TPM_CC)(0x00000167)
299 #define TPM_CC_MakeCredential (TPM_CC)(0x00000168)
300 #define TPM_CC_NV_ReadPublic (TPM_CC)(0x00000169)
301 #define TPM_CC_PolicyAuthorize (TPM_CC)(0x0000016A)
302 #define TPM_CC_PolicyAuthValue (TPM_CC)(0x0000016B)
303 #define TPM_CC_PolicyCommandCode (TPM_CC)(0x0000016C)
304 #define TPM_CC_PolicyCounterTimer (TPM_CC)(0x0000016D)
305 #define TPM_CC_PolicyCpHash (TPM_CC)(0x0000016E)
306 #define TPM_CC_PolicyLocality (TPM_CC)(0x0000016F)
307 #define TPM_CC_PolicyNameHash (TPM_CC)(0x00000170)
308 #define TPM_CC_PolicyOR (TPM_CC)(0x00000171)
309 #define TPM_CC_PolicyTicket (TPM_CC)(0x00000172)
310 #define TPM_CC_ReadPublic (TPM_CC)(0x00000173)
311 #define TPM_CC_RSA_Encrypt (TPM_CC)(0x00000174)
312 #define TPM_CC_StartAuthSession (TPM_CC)(0x00000176)
313 #define TPM_CC_VerifySignature (TPM_CC)(0x00000177)
314 #define TPM_CC_ECC_Parameters (TPM_CC)(0x00000178)
315 #define TPM_CC_FirmwareRead (TPM_CC)(0x00000179)
316 #define TPM_CC_GetCapability (TPM_CC)(0x0000017A)
317 #define TPM_CC_GetRandom (TPM_CC)(0x0000017B)
318 #define TPM_CC_GetTestResult (TPM_CC)(0x0000017C)
319 #define TPM_CC_Hash (TPM_CC)(0x0000017D)
320 #define TPM_CC_PCR_Read (TPM_CC)(0x0000017E)
321 #define TPM_CC_PolicyPCR (TPM_CC)(0x0000017F)
322 #define TPM_CC_PolicyRestart (TPM_CC)(0x00000180)
323 #define TPM_CC_ReadClock (TPM_CC)(0x00000181)
324 #define TPM_CC_PCR_Extend (TPM_CC)(0x00000182)
325 #define TPM_CC_PCR_SetAuthValue (TPM_CC)(0x00000183)
326 #define TPM_CC_NV_Certify (TPM_CC)(0x00000184)
327 #define TPM_CC_EventSequenceComplete (TPM_CC)(0x00000185)
328 #define TPM_CC_HashSequenceStart (TPM_CC)(0x00000186)
329 #define TPM_CC_PolicyPhysicalPresence (TPM_CC)(0x00000187)
330 #define TPM_CC_PolicyDuplicationSelect (TPM_CC)(0x00000188)
331 #define TPM_CC_PolicyGetDigest (TPM_CC)(0x00000189)
332 #define TPM_CC_TestParms (TPM_CC)(0x0000018A)
333 #define TPM_CC_Commit (TPM_CC)(0x0000018B)
334 #define TPM_CC_PolicyPassword (TPM_CC)(0x0000018C)
335 #define TPM_CC_ZGen_2Phase (TPM_CC)(0x0000018D)
336 #define TPM_CC_EC_Ephemeral (TPM_CC)(0x0000018E)
337 #define TPM_CC_LAST (TPM_CC)(0x0000018E)
338 
339 // Table 15 - TPM_RC Constants (Actions)
340 typedef UINT32 TPM_RC;
341 #define TPM_RC_SUCCESS (TPM_RC)(0x000)
342 #define TPM_RC_BAD_TAG (TPM_RC)(0x030)
343 #define RC_VER1 (TPM_RC)(0x100)
344 #define TPM_RC_INITIALIZE (TPM_RC)(RC_VER1 + 0x000)
345 #define TPM_RC_FAILURE (TPM_RC)(RC_VER1 + 0x001)
346 #define TPM_RC_SEQUENCE (TPM_RC)(RC_VER1 + 0x003)
347 #define TPM_RC_PRIVATE (TPM_RC)(RC_VER1 + 0x00B)
348 #define TPM_RC_HMAC (TPM_RC)(RC_VER1 + 0x019)
349 #define TPM_RC_DISABLED (TPM_RC)(RC_VER1 + 0x020)
350 #define TPM_RC_EXCLUSIVE (TPM_RC)(RC_VER1 + 0x021)
351 #define TPM_RC_AUTH_TYPE (TPM_RC)(RC_VER1 + 0x024)
352 #define TPM_RC_AUTH_MISSING (TPM_RC)(RC_VER1 + 0x025)
353 #define TPM_RC_POLICY (TPM_RC)(RC_VER1 + 0x026)
354 #define TPM_RC_PCR (TPM_RC)(RC_VER1 + 0x027)
355 #define TPM_RC_PCR_CHANGED (TPM_RC)(RC_VER1 + 0x028)
356 #define TPM_RC_UPGRADE (TPM_RC)(RC_VER1 + 0x02D)
357 #define TPM_RC_TOO_MANY_CONTEXTS (TPM_RC)(RC_VER1 + 0x02E)
358 #define TPM_RC_AUTH_UNAVAILABLE (TPM_RC)(RC_VER1 + 0x02F)
359 #define TPM_RC_REBOOT (TPM_RC)(RC_VER1 + 0x030)
360 #define TPM_RC_UNBALANCED (TPM_RC)(RC_VER1 + 0x031)
361 #define TPM_RC_COMMAND_SIZE (TPM_RC)(RC_VER1 + 0x042)
362 #define TPM_RC_COMMAND_CODE (TPM_RC)(RC_VER1 + 0x043)
363 #define TPM_RC_AUTHSIZE (TPM_RC)(RC_VER1 + 0x044)
364 #define TPM_RC_AUTH_CONTEXT (TPM_RC)(RC_VER1 + 0x045)
365 #define TPM_RC_NV_RANGE (TPM_RC)(RC_VER1 + 0x046)
366 #define TPM_RC_NV_SIZE (TPM_RC)(RC_VER1 + 0x047)
367 #define TPM_RC_NV_LOCKED (TPM_RC)(RC_VER1 + 0x048)
368 #define TPM_RC_NV_AUTHORIZATION (TPM_RC)(RC_VER1 + 0x049)
369 #define TPM_RC_NV_UNINITIALIZED (TPM_RC)(RC_VER1 + 0x04A)
370 #define TPM_RC_NV_SPACE (TPM_RC)(RC_VER1 + 0x04B)
371 #define TPM_RC_NV_DEFINED (TPM_RC)(RC_VER1 + 0x04C)
372 #define TPM_RC_BAD_CONTEXT (TPM_RC)(RC_VER1 + 0x050)
373 #define TPM_RC_CPHASH (TPM_RC)(RC_VER1 + 0x051)
374 #define TPM_RC_PARENT (TPM_RC)(RC_VER1 + 0x052)
375 #define TPM_RC_NEEDS_TEST (TPM_RC)(RC_VER1 + 0x053)
376 #define TPM_RC_NO_RESULT (TPM_RC)(RC_VER1 + 0x054)
377 #define TPM_RC_SENSITIVE (TPM_RC)(RC_VER1 + 0x055)
378 #define RC_MAX_FM0 (TPM_RC)(RC_VER1 + 0x07F)
379 #define RC_FMT1 (TPM_RC)(0x080)
380 #define TPM_RC_ASYMMETRIC (TPM_RC)(RC_FMT1 + 0x001)
381 #define TPM_RC_ATTRIBUTES (TPM_RC)(RC_FMT1 + 0x002)
382 #define TPM_RC_HASH (TPM_RC)(RC_FMT1 + 0x003)
383 #define TPM_RC_VALUE (TPM_RC)(RC_FMT1 + 0x004)
384 #define TPM_RC_HIERARCHY (TPM_RC)(RC_FMT1 + 0x005)
385 #define TPM_RC_KEY_SIZE (TPM_RC)(RC_FMT1 + 0x007)
386 #define TPM_RC_MGF (TPM_RC)(RC_FMT1 + 0x008)
387 #define TPM_RC_MODE (TPM_RC)(RC_FMT1 + 0x009)
388 #define TPM_RC_TYPE (TPM_RC)(RC_FMT1 + 0x00A)
389 #define TPM_RC_HANDLE (TPM_RC)(RC_FMT1 + 0x00B)
390 #define TPM_RC_KDF (TPM_RC)(RC_FMT1 + 0x00C)
391 #define TPM_RC_RANGE (TPM_RC)(RC_FMT1 + 0x00D)
392 #define TPM_RC_AUTH_FAIL (TPM_RC)(RC_FMT1 + 0x00E)
393 #define TPM_RC_NONCE (TPM_RC)(RC_FMT1 + 0x00F)
394 #define TPM_RC_PP (TPM_RC)(RC_FMT1 + 0x010)
395 #define TPM_RC_SCHEME (TPM_RC)(RC_FMT1 + 0x012)
396 #define TPM_RC_SIZE (TPM_RC)(RC_FMT1 + 0x015)
397 #define TPM_RC_SYMMETRIC (TPM_RC)(RC_FMT1 + 0x016)
398 #define TPM_RC_TAG (TPM_RC)(RC_FMT1 + 0x017)
399 #define TPM_RC_SELECTOR (TPM_RC)(RC_FMT1 + 0x018)
400 #define TPM_RC_INSUFFICIENT (TPM_RC)(RC_FMT1 + 0x01A)
401 #define TPM_RC_SIGNATURE (TPM_RC)(RC_FMT1 + 0x01B)
402 #define TPM_RC_KEY (TPM_RC)(RC_FMT1 + 0x01C)
403 #define TPM_RC_POLICY_FAIL (TPM_RC)(RC_FMT1 + 0x01D)
404 #define TPM_RC_INTEGRITY (TPM_RC)(RC_FMT1 + 0x01F)
405 #define TPM_RC_TICKET (TPM_RC)(RC_FMT1 + 0x020)
406 #define TPM_RC_RESERVED_BITS (TPM_RC)(RC_FMT1 + 0x021)
407 #define TPM_RC_BAD_AUTH (TPM_RC)(RC_FMT1 + 0x022)
408 #define TPM_RC_EXPIRED (TPM_RC)(RC_FMT1 + 0x023)
409 #define TPM_RC_POLICY_CC (TPM_RC)(RC_FMT1 + 0x024 )
410 #define TPM_RC_BINDING (TPM_RC)(RC_FMT1 + 0x025)
411 #define TPM_RC_CURVE (TPM_RC)(RC_FMT1 + 0x026)
412 #define TPM_RC_ECC_POINT (TPM_RC)(RC_FMT1 + 0x027)
413 #define RC_WARN (TPM_RC)(0x900)
414 #define TPM_RC_CONTEXT_GAP (TPM_RC)(RC_WARN + 0x001)
415 #define TPM_RC_OBJECT_MEMORY (TPM_RC)(RC_WARN + 0x002)
416 #define TPM_RC_SESSION_MEMORY (TPM_RC)(RC_WARN + 0x003)
417 #define TPM_RC_MEMORY (TPM_RC)(RC_WARN + 0x004)
418 #define TPM_RC_SESSION_HANDLES (TPM_RC)(RC_WARN + 0x005)
419 #define TPM_RC_OBJECT_HANDLES (TPM_RC)(RC_WARN + 0x006)
420 #define TPM_RC_LOCALITY (TPM_RC)(RC_WARN + 0x007)
421 #define TPM_RC_YIELDED (TPM_RC)(RC_WARN + 0x008)
422 #define TPM_RC_CANCELED (TPM_RC)(RC_WARN + 0x009)
423 #define TPM_RC_TESTING (TPM_RC)(RC_WARN + 0x00A)
424 #define TPM_RC_REFERENCE_H0 (TPM_RC)(RC_WARN + 0x010)
425 #define TPM_RC_REFERENCE_H1 (TPM_RC)(RC_WARN + 0x011)
426 #define TPM_RC_REFERENCE_H2 (TPM_RC)(RC_WARN + 0x012)
427 #define TPM_RC_REFERENCE_H3 (TPM_RC)(RC_WARN + 0x013)
428 #define TPM_RC_REFERENCE_H4 (TPM_RC)(RC_WARN + 0x014)
429 #define TPM_RC_REFERENCE_H5 (TPM_RC)(RC_WARN + 0x015)
430 #define TPM_RC_REFERENCE_H6 (TPM_RC)(RC_WARN + 0x016)
431 #define TPM_RC_REFERENCE_S0 (TPM_RC)(RC_WARN + 0x018)
432 #define TPM_RC_REFERENCE_S1 (TPM_RC)(RC_WARN + 0x019)
433 #define TPM_RC_REFERENCE_S2 (TPM_RC)(RC_WARN + 0x01A)
434 #define TPM_RC_REFERENCE_S3 (TPM_RC)(RC_WARN + 0x01B)
435 #define TPM_RC_REFERENCE_S4 (TPM_RC)(RC_WARN + 0x01C)
436 #define TPM_RC_REFERENCE_S5 (TPM_RC)(RC_WARN + 0x01D)
437 #define TPM_RC_REFERENCE_S6 (TPM_RC)(RC_WARN + 0x01E)
438 #define TPM_RC_NV_RATE (TPM_RC)(RC_WARN + 0x020)
439 #define TPM_RC_LOCKOUT (TPM_RC)(RC_WARN + 0x021)
440 #define TPM_RC_RETRY (TPM_RC)(RC_WARN + 0x022)
441 #define TPM_RC_NV_UNAVAILABLE (TPM_RC)(RC_WARN + 0x023)
442 #define TPM_RC_NOT_USED (TPM_RC)(RC_WARN + 0x7F)
443 #define TPM_RC_H (TPM_RC)(0x000)
444 #define TPM_RC_P (TPM_RC)(0x040)
445 #define TPM_RC_S (TPM_RC)(0x800)
446 #define TPM_RC_1 (TPM_RC)(0x100)
447 #define TPM_RC_2 (TPM_RC)(0x200)
448 #define TPM_RC_3 (TPM_RC)(0x300)
449 #define TPM_RC_4 (TPM_RC)(0x400)
450 #define TPM_RC_5 (TPM_RC)(0x500)
451 #define TPM_RC_6 (TPM_RC)(0x600)
452 #define TPM_RC_7 (TPM_RC)(0x700)
453 #define TPM_RC_8 (TPM_RC)(0x800)
454 #define TPM_RC_9 (TPM_RC)(0x900)
455 #define TPM_RC_A (TPM_RC)(0xA00)
456 #define TPM_RC_B (TPM_RC)(0xB00)
457 #define TPM_RC_C (TPM_RC)(0xC00)
458 #define TPM_RC_D (TPM_RC)(0xD00)
459 #define TPM_RC_E (TPM_RC)(0xE00)
460 #define TPM_RC_F (TPM_RC)(0xF00)
461 #define TPM_RC_N_MASK (TPM_RC)(0xF00)
462 
463 // Table 16 - TPM_CLOCK_ADJUST Constants
465 #define TPM_CLOCK_COARSE_SLOWER (TPM_CLOCK_ADJUST)(-3)
466 #define TPM_CLOCK_MEDIUM_SLOWER (TPM_CLOCK_ADJUST)(-2)
467 #define TPM_CLOCK_FINE_SLOWER (TPM_CLOCK_ADJUST)(-1)
468 #define TPM_CLOCK_NO_CHANGE (TPM_CLOCK_ADJUST)(0)
469 #define TPM_CLOCK_FINE_FASTER (TPM_CLOCK_ADJUST)(1)
470 #define TPM_CLOCK_MEDIUM_FASTER (TPM_CLOCK_ADJUST)(2)
471 #define TPM_CLOCK_COARSE_FASTER (TPM_CLOCK_ADJUST)(3)
472 
473 // Table 17 - TPM_EO Constants
474 typedef UINT16 TPM_EO;
475 #define TPM_EO_EQ (TPM_EO)(0x0000)
476 #define TPM_EO_NEQ (TPM_EO)(0x0001)
477 #define TPM_EO_SIGNED_GT (TPM_EO)(0x0002)
478 #define TPM_EO_UNSIGNED_GT (TPM_EO)(0x0003)
479 #define TPM_EO_SIGNED_LT (TPM_EO)(0x0004)
480 #define TPM_EO_UNSIGNED_LT (TPM_EO)(0x0005)
481 #define TPM_EO_SIGNED_GE (TPM_EO)(0x0006)
482 #define TPM_EO_UNSIGNED_GE (TPM_EO)(0x0007)
483 #define TPM_EO_SIGNED_LE (TPM_EO)(0x0008)
484 #define TPM_EO_UNSIGNED_LE (TPM_EO)(0x0009)
485 #define TPM_EO_BITSET (TPM_EO)(0x000A)
486 #define TPM_EO_BITCLEAR (TPM_EO)(0x000B)
487 
488 // Table 18 - TPM_ST Constants
489 typedef UINT16 TPM_ST;
490 #define TPM_ST_RSP_COMMAND (TPM_ST)(0x00C4)
491 #define TPM_ST_NULL (TPM_ST)(0X8000)
492 #define TPM_ST_NO_SESSIONS (TPM_ST)(0x8001)
493 #define TPM_ST_SESSIONS (TPM_ST)(0x8002)
494 #define TPM_ST_ATTEST_NV (TPM_ST)(0x8014)
495 #define TPM_ST_ATTEST_COMMAND_AUDIT (TPM_ST)(0x8015)
496 #define TPM_ST_ATTEST_SESSION_AUDIT (TPM_ST)(0x8016)
497 #define TPM_ST_ATTEST_CERTIFY (TPM_ST)(0x8017)
498 #define TPM_ST_ATTEST_QUOTE (TPM_ST)(0x8018)
499 #define TPM_ST_ATTEST_TIME (TPM_ST)(0x8019)
500 #define TPM_ST_ATTEST_CREATION (TPM_ST)(0x801A)
501 #define TPM_ST_CREATION (TPM_ST)(0x8021)
502 #define TPM_ST_VERIFIED (TPM_ST)(0x8022)
503 #define TPM_ST_AUTH_SECRET (TPM_ST)(0x8023)
504 #define TPM_ST_HASHCHECK (TPM_ST)(0x8024)
505 #define TPM_ST_AUTH_SIGNED (TPM_ST)(0x8025)
506 #define TPM_ST_FU_MANIFEST (TPM_ST)(0x8029)
507 
508 // Table 19 - TPM_SU Constants
509 typedef UINT16 TPM_SU;
510 #define TPM_SU_CLEAR (TPM_SU)(0x0000)
511 #define TPM_SU_STATE (TPM_SU)(0x0001)
512 
513 // Table 20 - TPM_SE Constants
514 typedef UINT8 TPM_SE;
515 #define TPM_SE_HMAC (TPM_SE)(0x00)
516 #define TPM_SE_POLICY (TPM_SE)(0x01)
517 #define TPM_SE_TRIAL (TPM_SE)(0x03)
518 
519 // Table 21 - TPM_CAP Constants
520 typedef UINT32 TPM_CAP;
521 #define TPM_CAP_FIRST (TPM_CAP)(0x00000000)
522 #define TPM_CAP_ALGS (TPM_CAP)(0x00000000)
523 #define TPM_CAP_HANDLES (TPM_CAP)(0x00000001)
524 #define TPM_CAP_COMMANDS (TPM_CAP)(0x00000002)
525 #define TPM_CAP_PP_COMMANDS (TPM_CAP)(0x00000003)
526 #define TPM_CAP_AUDIT_COMMANDS (TPM_CAP)(0x00000004)
527 #define TPM_CAP_PCRS (TPM_CAP)(0x00000005)
528 #define TPM_CAP_TPM_PROPERTIES (TPM_CAP)(0x00000006)
529 #define TPM_CAP_PCR_PROPERTIES (TPM_CAP)(0x00000007)
530 #define TPM_CAP_ECC_CURVES (TPM_CAP)(0x00000008)
531 #define TPM_CAP_LAST (TPM_CAP)(0x00000008)
532 #define TPM_CAP_VENDOR_PROPERTY (TPM_CAP)(0x00000100)
533 
534 // Table 22 - TPM_PT Constants
535 typedef UINT32 TPM_PT;
536 #define TPM_PT_NONE (TPM_PT)(0x00000000)
537 #define PT_GROUP (TPM_PT)(0x00000100)
538 #define PT_FIXED (TPM_PT)(PT_GROUP * 1)
539 #define TPM_PT_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 0)
540 #define TPM_PT_LEVEL (TPM_PT)(PT_FIXED + 1)
541 #define TPM_PT_REVISION (TPM_PT)(PT_FIXED + 2)
542 #define TPM_PT_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 3)
543 #define TPM_PT_YEAR (TPM_PT)(PT_FIXED + 4)
544 #define TPM_PT_MANUFACTURER (TPM_PT)(PT_FIXED + 5)
545 #define TPM_PT_VENDOR_STRING_1 (TPM_PT)(PT_FIXED + 6)
546 #define TPM_PT_VENDOR_STRING_2 (TPM_PT)(PT_FIXED + 7)
547 #define TPM_PT_VENDOR_STRING_3 (TPM_PT)(PT_FIXED + 8)
548 #define TPM_PT_VENDOR_STRING_4 (TPM_PT)(PT_FIXED + 9)
549 #define TPM_PT_VENDOR_TPM_TYPE (TPM_PT)(PT_FIXED + 10)
550 #define TPM_PT_FIRMWARE_VERSION_1 (TPM_PT)(PT_FIXED + 11)
551 #define TPM_PT_FIRMWARE_VERSION_2 (TPM_PT)(PT_FIXED + 12)
552 #define TPM_PT_INPUT_BUFFER (TPM_PT)(PT_FIXED + 13)
553 #define TPM_PT_HR_TRANSIENT_MIN (TPM_PT)(PT_FIXED + 14)
554 #define TPM_PT_HR_PERSISTENT_MIN (TPM_PT)(PT_FIXED + 15)
555 #define TPM_PT_HR_LOADED_MIN (TPM_PT)(PT_FIXED + 16)
556 #define TPM_PT_ACTIVE_SESSIONS_MAX (TPM_PT)(PT_FIXED + 17)
557 #define TPM_PT_PCR_COUNT (TPM_PT)(PT_FIXED + 18)
558 #define TPM_PT_PCR_SELECT_MIN (TPM_PT)(PT_FIXED + 19)
559 #define TPM_PT_CONTEXT_GAP_MAX (TPM_PT)(PT_FIXED + 20)
560 #define TPM_PT_NV_COUNTERS_MAX (TPM_PT)(PT_FIXED + 22)
561 #define TPM_PT_NV_INDEX_MAX (TPM_PT)(PT_FIXED + 23)
562 #define TPM_PT_MEMORY (TPM_PT)(PT_FIXED + 24)
563 #define TPM_PT_CLOCK_UPDATE (TPM_PT)(PT_FIXED + 25)
564 #define TPM_PT_CONTEXT_HASH (TPM_PT)(PT_FIXED + 26)
565 #define TPM_PT_CONTEXT_SYM (TPM_PT)(PT_FIXED + 27)
566 #define TPM_PT_CONTEXT_SYM_SIZE (TPM_PT)(PT_FIXED + 28)
567 #define TPM_PT_ORDERLY_COUNT (TPM_PT)(PT_FIXED + 29)
568 #define TPM_PT_MAX_COMMAND_SIZE (TPM_PT)(PT_FIXED + 30)
569 #define TPM_PT_MAX_RESPONSE_SIZE (TPM_PT)(PT_FIXED + 31)
570 #define TPM_PT_MAX_DIGEST (TPM_PT)(PT_FIXED + 32)
571 #define TPM_PT_MAX_OBJECT_CONTEXT (TPM_PT)(PT_FIXED + 33)
572 #define TPM_PT_MAX_SESSION_CONTEXT (TPM_PT)(PT_FIXED + 34)
573 #define TPM_PT_PS_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 35)
574 #define TPM_PT_PS_LEVEL (TPM_PT)(PT_FIXED + 36)
575 #define TPM_PT_PS_REVISION (TPM_PT)(PT_FIXED + 37)
576 #define TPM_PT_PS_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 38)
577 #define TPM_PT_PS_YEAR (TPM_PT)(PT_FIXED + 39)
578 #define TPM_PT_SPLIT_MAX (TPM_PT)(PT_FIXED + 40)
579 #define TPM_PT_TOTAL_COMMANDS (TPM_PT)(PT_FIXED + 41)
580 #define TPM_PT_LIBRARY_COMMANDS (TPM_PT)(PT_FIXED + 42)
581 #define TPM_PT_VENDOR_COMMANDS (TPM_PT)(PT_FIXED + 43)
582 #define PT_VAR (TPM_PT)(PT_GROUP * 2)
583 #define TPM_PT_PERMANENT (TPM_PT)(PT_VAR + 0)
584 #define TPM_PT_STARTUP_CLEAR (TPM_PT)(PT_VAR + 1)
585 #define TPM_PT_HR_NV_INDEX (TPM_PT)(PT_VAR + 2)
586 #define TPM_PT_HR_LOADED (TPM_PT)(PT_VAR + 3)
587 #define TPM_PT_HR_LOADED_AVAIL (TPM_PT)(PT_VAR + 4)
588 #define TPM_PT_HR_ACTIVE (TPM_PT)(PT_VAR + 5)
589 #define TPM_PT_HR_ACTIVE_AVAIL (TPM_PT)(PT_VAR + 6)
590 #define TPM_PT_HR_TRANSIENT_AVAIL (TPM_PT)(PT_VAR + 7)
591 #define TPM_PT_HR_PERSISTENT (TPM_PT)(PT_VAR + 8)
592 #define TPM_PT_HR_PERSISTENT_AVAIL (TPM_PT)(PT_VAR + 9)
593 #define TPM_PT_NV_COUNTERS (TPM_PT)(PT_VAR + 10)
594 #define TPM_PT_NV_COUNTERS_AVAIL (TPM_PT)(PT_VAR + 11)
595 #define TPM_PT_ALGORITHM_SET (TPM_PT)(PT_VAR + 12)
596 #define TPM_PT_LOADED_CURVES (TPM_PT)(PT_VAR + 13)
597 #define TPM_PT_LOCKOUT_COUNTER (TPM_PT)(PT_VAR + 14)
598 #define TPM_PT_MAX_AUTH_FAIL (TPM_PT)(PT_VAR + 15)
599 #define TPM_PT_LOCKOUT_INTERVAL (TPM_PT)(PT_VAR + 16)
600 #define TPM_PT_LOCKOUT_RECOVERY (TPM_PT)(PT_VAR + 17)
601 #define TPM_PT_NV_WRITE_RECOVERY (TPM_PT)(PT_VAR + 18)
602 #define TPM_PT_AUDIT_COUNTER_0 (TPM_PT)(PT_VAR + 19)
603 #define TPM_PT_AUDIT_COUNTER_1 (TPM_PT)(PT_VAR + 20)
604 
605 // Table 23 - TPM_PT_PCR Constants
607 #define TPM_PT_PCR_FIRST (TPM_PT_PCR)(0x00000000)
608 #define TPM_PT_PCR_SAVE (TPM_PT_PCR)(0x00000000)
609 #define TPM_PT_PCR_EXTEND_L0 (TPM_PT_PCR)(0x00000001)
610 #define TPM_PT_PCR_RESET_L0 (TPM_PT_PCR)(0x00000002)
611 #define TPM_PT_PCR_EXTEND_L1 (TPM_PT_PCR)(0x00000003)
612 #define TPM_PT_PCR_RESET_L1 (TPM_PT_PCR)(0x00000004)
613 #define TPM_PT_PCR_EXTEND_L2 (TPM_PT_PCR)(0x00000005)
614 #define TPM_PT_PCR_RESET_L2 (TPM_PT_PCR)(0x00000006)
615 #define TPM_PT_PCR_EXTEND_L3 (TPM_PT_PCR)(0x00000007)
616 #define TPM_PT_PCR_RESET_L3 (TPM_PT_PCR)(0x00000008)
617 #define TPM_PT_PCR_EXTEND_L4 (TPM_PT_PCR)(0x00000009)
618 #define TPM_PT_PCR_RESET_L4 (TPM_PT_PCR)(0x0000000A)
619 #define TPM_PT_PCR_NO_INCREMENT (TPM_PT_PCR)(0x00000011)
620 #define TPM_PT_PCR_DRTM_RESET (TPM_PT_PCR)(0x00000012)
621 #define TPM_PT_PCR_POLICY (TPM_PT_PCR)(0x00000013)
622 #define TPM_PT_PCR_AUTH (TPM_PT_PCR)(0x00000014)
623 #define TPM_PT_PCR_LAST (TPM_PT_PCR)(0x00000014)
624 
625 // Table 24 - TPM_PS Constants
626 typedef UINT32 TPM_PS;
627 #define TPM_PS_MAIN (TPM_PS)(0x00000000)
628 #define TPM_PS_PC (TPM_PS)(0x00000001)
629 #define TPM_PS_PDA (TPM_PS)(0x00000002)
630 #define TPM_PS_CELL_PHONE (TPM_PS)(0x00000003)
631 #define TPM_PS_SERVER (TPM_PS)(0x00000004)
632 #define TPM_PS_PERIPHERAL (TPM_PS)(0x00000005)
633 #define TPM_PS_TSS (TPM_PS)(0x00000006)
634 #define TPM_PS_STORAGE (TPM_PS)(0x00000007)
635 #define TPM_PS_AUTHENTICATION (TPM_PS)(0x00000008)
636 #define TPM_PS_EMBEDDED (TPM_PS)(0x00000009)
637 #define TPM_PS_HARDCOPY (TPM_PS)(0x0000000A)
638 #define TPM_PS_INFRASTRUCTURE (TPM_PS)(0x0000000B)
639 #define TPM_PS_VIRTUALIZATION (TPM_PS)(0x0000000C)
640 #define TPM_PS_TNC (TPM_PS)(0x0000000D)
641 #define TPM_PS_MULTI_TENANT (TPM_PS)(0x0000000E)
642 #define TPM_PS_TC (TPM_PS)(0x0000000F)
643 
644 // 7 Handles
645 
646 // Table 25 - Handles Types
647 //
648 // NOTE: Comment because it has same name as TPM1.2 (value is same, so not runtime issue)
649 //
650 //typedef UINT32 TPM_HANDLE;
651 
652 // Table 26 - TPM_HT Constants
653 typedef UINT8 TPM_HT;
654 #define TPM_HT_PCR (TPM_HT)(0x00)
655 #define TPM_HT_NV_INDEX (TPM_HT)(0x01)
656 #define TPM_HT_HMAC_SESSION (TPM_HT)(0x02)
657 #define TPM_HT_LOADED_SESSION (TPM_HT)(0x02)
658 #define TPM_HT_POLICY_SESSION (TPM_HT)(0x03)
659 #define TPM_HT_ACTIVE_SESSION (TPM_HT)(0x03)
660 #define TPM_HT_PERMANENT (TPM_HT)(0x40)
661 #define TPM_HT_TRANSIENT (TPM_HT)(0x80)
662 #define TPM_HT_PERSISTENT (TPM_HT)(0x81)
663 
664 // Table 27 - TPM_RH Constants
665 typedef UINT32 TPM_RH;
666 #define TPM_RH_FIRST (TPM_RH)(0x40000000)
667 #define TPM_RH_SRK (TPM_RH)(0x40000000)
668 #define TPM_RH_OWNER (TPM_RH)(0x40000001)
669 #define TPM_RH_REVOKE (TPM_RH)(0x40000002)
670 #define TPM_RH_TRANSPORT (TPM_RH)(0x40000003)
671 #define TPM_RH_OPERATOR (TPM_RH)(0x40000004)
672 #define TPM_RH_ADMIN (TPM_RH)(0x40000005)
673 #define TPM_RH_EK (TPM_RH)(0x40000006)
674 #define TPM_RH_NULL (TPM_RH)(0x40000007)
675 #define TPM_RH_UNASSIGNED (TPM_RH)(0x40000008)
676 #define TPM_RS_PW (TPM_RH)(0x40000009)
677 #define TPM_RH_LOCKOUT (TPM_RH)(0x4000000A)
678 #define TPM_RH_ENDORSEMENT (TPM_RH)(0x4000000B)
679 #define TPM_RH_PLATFORM (TPM_RH)(0x4000000C)
680 #define TPM_RH_PLATFORM_NV (TPM_RH)(0x4000000D)
681 #define TPM_RH_AUTH_00 (TPM_RH)(0x40000010)
682 #define TPM_RH_AUTH_FF (TPM_RH)(0x4000010F)
683 #define TPM_RH_LAST (TPM_RH)(0x4000010F)
684 
685 // Table 28 - TPM_HC Constants
687 #define HR_HANDLE_MASK (TPM_HC)(0x00FFFFFF)
688 #define HR_RANGE_MASK (TPM_HC)(0xFF000000)
689 #define HR_SHIFT (TPM_HC)(24)
690 #define HR_PCR (TPM_HC)((TPM_HC)TPM_HT_PCR << HR_SHIFT)
691 #define HR_HMAC_SESSION (TPM_HC)((TPM_HC)TPM_HT_HMAC_SESSION << HR_SHIFT)
692 #define HR_POLICY_SESSION (TPM_HC)((TPM_HC)TPM_HT_POLICY_SESSION << HR_SHIFT)
693 #define HR_TRANSIENT (TPM_HC)((TPM_HC)TPM_HT_TRANSIENT << HR_SHIFT)
694 #define HR_PERSISTENT (TPM_HC)((TPM_HC)TPM_HT_PERSISTENT << HR_SHIFT)
695 #define HR_NV_INDEX (TPM_HC)((TPM_HC)TPM_HT_NV_INDEX << HR_SHIFT)
696 #define HR_PERMANENT (TPM_HC)((TPM_HC)TPM_HT_PERMANENT << HR_SHIFT)
697 #define PCR_FIRST (TPM_HC)(HR_PCR + 0)
698 #define PCR_LAST (TPM_HC)(PCR_FIRST + IMPLEMENTATION_PCR - 1)
699 #define HMAC_SESSION_FIRST (TPM_HC)(HR_HMAC_SESSION + 0)
700 #define HMAC_SESSION_LAST (TPM_HC)(HMAC_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1)
701 #define LOADED_SESSION_FIRST (TPM_HC)(HMAC_SESSION_FIRST)
702 #define LOADED_SESSION_LAST (TPM_HC)(HMAC_SESSION_LAST)
703 #define POLICY_SESSION_FIRST (TPM_HC)(HR_POLICY_SESSION + 0)
704 #define POLICY_SESSION_LAST (TPM_HC)(POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1)
705 #define TRANSIENT_FIRST (TPM_HC)(HR_TRANSIENT + 0)
706 #define ACTIVE_SESSION_FIRST (TPM_HC)(POLICY_SESSION_FIRST)
707 #define ACTIVE_SESSION_LAST (TPM_HC)(POLICY_SESSION_LAST)
708 #define TRANSIENT_LAST (TPM_HC)(TRANSIENT_FIRST+MAX_LOADED_OBJECTS - 1)
709 #define PERSISTENT_FIRST (TPM_HC)(HR_PERSISTENT + 0)
710 #define PERSISTENT_LAST (TPM_HC)(PERSISTENT_FIRST + 0x00FFFFFF)
711 #define PLATFORM_PERSISTENT (TPM_HC)(PERSISTENT_FIRST + 0x00800000)
712 #define NV_INDEX_FIRST (TPM_HC)(HR_NV_INDEX + 0)
713 #define NV_INDEX_LAST (TPM_HC)(NV_INDEX_FIRST + 0x00FFFFFF)
714 #define PERMANENT_FIRST (TPM_HC)(TPM_RH_FIRST)
715 #define PERMANENT_LAST (TPM_HC)(TPM_RH_LAST)
716 
717 // 8 Attribute Structures
718 
719 // Table 29 - TPMA_ALGORITHM Bits
720 typedef struct {
731 
732 // Table 30 - TPMA_OBJECT Bits
733 typedef struct {
750 } TPMA_OBJECT;
751 
752 // Table 31 - TPMA_SESSION Bits
753 typedef struct {
761 } TPMA_SESSION;
762 
763 // Table 32 - TPMA_LOCALITY Bits
764 //
765 // NOTE: Use low case here to resolve conflict
766 //
767 typedef struct {
774 } TPMA_LOCALITY;
775 
776 // Table 33 - TPMA_PERMANENT Bits
777 typedef struct {
787 
788 // Table 34 - TPMA_STARTUP_CLEAR Bits
789 typedef struct {
796 
797 // Table 35 - TPMA_MEMORY Bits
798 typedef struct {
803 } TPMA_MEMORY;
804 
805 // Table 36 - TPMA_CC Bits
806 typedef struct {
809  UINT32 nv : 1;
814  UINT32 V : 1;
815  UINT32 Res : 2;
816 } TPMA_CC;
817 
818 // 9 Interface Types
819 
820 // Table 37 - TPMI_YES_NO Type
822 
823 // Table 38 - TPMI_DH_OBJECT Type
825 
826 // Table 39 - TPMI_DH_PERSISTENT Type
828 
829 // Table 40 - TPMI_DH_ENTITY Type
831 
832 // Table 41 - TPMI_DH_PCR Type
834 
835 // Table 42 - TPMI_SH_AUTH_SESSION Type
837 
838 // Table 43 - TPMI_SH_HMAC Type
840 
841 // Table 44 - TPMI_SH_POLICY Type
843 
844 // Table 45 - TPMI_DH_CONTEXT Type
846 
847 // Table 46 - TPMI_RH_HIERARCHY Type
849 
850 // Table 47 - TPMI_RH_HIERARCHY_AUTH Type
852 
853 // Table 48 - TPMI_RH_PLATFORM Type
855 
856 // Table 49 - TPMI_RH_OWNER Type
858 
859 // Table 50 - TPMI_RH_ENDORSEMENT Type
861 
862 // Table 51 - TPMI_RH_PROVISION Type
864 
865 // Table 52 - TPMI_RH_CLEAR Type
867 
868 // Table 53 - TPMI_RH_NV_AUTH Type
870 
871 // Table 54 - TPMI_RH_LOCKOUT Type
873 
874 // Table 55 - TPMI_RH_NV_INDEX Type
876 
877 // Table 56 - TPMI_ALG_HASH Type
879 
880 // Table 57 - TPMI_ALG_ASYM Type
882 
883 // Table 58 - TPMI_ALG_SYM Type
885 
886 // Table 59 - TPMI_ALG_SYM_OBJECT Type
888 
889 // Table 60 - TPMI_ALG_SYM_MODE Type
891 
892 // Table 61 - TPMI_ALG_KDF Type
894 
895 // Table 62 - TPMI_ALG_SIG_SCHEME Type
897 
898 // Table 63 - TPMI_ECC_KEY_EXCHANGE Type
900 
901 // Table 64 - TPMI_ST_COMMAND_TAG Type
903 
904 // 10 Structure Definitions
905 
906 // Table 65 - TPMS_ALGORITHM_DESCRIPTION Structure
907 typedef struct {
911 
912 // Table 66 - TPMU_HA Union
913 typedef union {
919 } TPMU_HA;
920 
921 // Table 67 - TPMT_HA Structure
922 typedef struct {
925 } TPMT_HA;
926 
927 // Table 68 - TPM2B_DIGEST Structure
928 typedef struct {
930  BYTE buffer[sizeof(TPMU_HA)];
931 } TPM2B_DIGEST;
932 
933 // Table 69 - TPM2B_DATA Structure
934 typedef struct {
936  BYTE buffer[sizeof(TPMT_HA)];
937 } TPM2B_DATA;
938 
939 // Table 70 - TPM2B_NONCE Types
941 
942 // Table 71 - TPM2B_AUTH Types
944 
945 // Table 72 - TPM2B_OPERAND Types
947 
948 // Table 73 - TPM2B_EVENT Structure
949 typedef struct {
951  BYTE buffer[1024];
952 } TPM2B_EVENT;
953 
954 // Table 74 - TPM2B_MAX_BUFFER Structure
955 typedef struct {
959 
960 // Table 75 - TPM2B_MAX_NV_BUFFER Structure
961 typedef struct {
965 
966 // Table 76 - TPM2B_TIMEOUT Structure
967 typedef struct {
969  BYTE buffer[sizeof(UINT64)];
970 } TPM2B_TIMEOUT;
971 
972 // Table 77 -- TPM2B_IV Structure <I/O>
973 typedef struct {
976 } TPM2B_IV;
977 
978 // Table 78 - TPMU_NAME Union
979 typedef union {
982 } TPMU_NAME;
983 
984 // Table 79 - TPM2B_NAME Structure
985 typedef struct {
987  BYTE name[sizeof(TPMU_NAME)];
988 } TPM2B_NAME;
989 
990 // Table 80 - TPMS_PCR_SELECT Structure
991 typedef struct {
993  BYTE pcrSelect[PCR_SELECT_MAX];
995 
996 // Table 81 - TPMS_PCR_SELECTION Structure
997 typedef struct {
1000  BYTE pcrSelect[PCR_SELECT_MAX];
1002 
1003 // Table 84 - TPMT_TK_CREATION Structure
1004 typedef struct {
1009 
1010 // Table 85 - TPMT_TK_VERIFIED Structure
1011 typedef struct {
1016 
1017 // Table 86 - TPMT_TK_AUTH Structure
1018 typedef struct {
1022 } TPMT_TK_AUTH;
1023 
1024 // Table 87 - TPMT_TK_HASHCHECK Structure
1025 typedef struct {
1030 
1031 // Table 88 - TPMS_ALG_PROPERTY Structure
1032 typedef struct {
1036 
1037 // Table 89 - TPMS_TAGGED_PROPERTY Structure
1038 typedef struct {
1042 
1043 // Table 90 - TPMS_TAGGED_PCR_SELECT Structure
1044 typedef struct {
1047  BYTE pcrSelect[PCR_SELECT_MAX];
1049 
1050 // Table 91 - TPML_CC Structure
1051 typedef struct {
1053  TPM_CC commandCodes[MAX_CAP_CC];
1054 } TPML_CC;
1055 
1056 // Table 92 - TPML_CCA Structure
1057 typedef struct {
1059  TPMA_CC commandAttributes[MAX_CAP_CC];
1060 } TPML_CCA;
1061 
1062 // Table 93 - TPML_ALG Structure
1063 typedef struct {
1066 } TPML_ALG;
1067 
1068 // Table 94 - TPML_HANDLE Structure
1069 typedef struct {
1072 } TPML_HANDLE;
1073 
1074 // Table 95 - TPML_DIGEST Structure
1075 typedef struct {
1077  TPM2B_DIGEST digests[8];
1078 } TPML_DIGEST;
1079 
1080 // Table 96 -- TPML_DIGEST_VALUES Structure <I/O>
1081 typedef struct {
1085 
1086 // Table 97 - TPM2B_DIGEST_VALUES Structure
1087 typedef struct {
1091 
1092 // Table 98 - TPML_PCR_SELECTION Structure
1093 typedef struct {
1097 
1098 // Table 99 - TPML_ALG_PROPERTY Structure
1099 typedef struct {
1103 
1104 // Table 100 - TPML_TAGGED_TPM_PROPERTY Structure
1105 typedef struct {
1109 
1110 // Table 101 - TPML_TAGGED_PCR_PROPERTY Structure
1111 typedef struct {
1115 
1116 // Table 102 - TPML_ECC_CURVE Structure
1117 typedef struct {
1120 } TPML_ECC_CURVE;
1121 
1122 // Table 103 - TPMU_CAPABILITIES Union
1123 typedef union {
1134 
1135 // Table 104 - TPMS_CAPABILITY_DATA Structure
1136 typedef struct {
1140 
1141 // Table 105 - TPMS_CLOCK_INFO Structure
1142 typedef struct {
1147 } TPMS_CLOCK_INFO;
1148 
1149 // Table 106 - TPMS_TIME_INFO Structure
1150 typedef struct {
1153 } TPMS_TIME_INFO;
1154 
1155 // Table 107 - TPMS_TIME_ATTEST_INFO Structure
1156 typedef struct {
1160 
1161 // Table 108 - TPMS_CERTIFY_INFO Structure
1162 typedef struct {
1166 
1167 // Table 109 - TPMS_QUOTE_INFO Structure
1168 typedef struct {
1171 } TPMS_QUOTE_INFO;
1172 
1173 // Table 110 - TPMS_COMMAND_AUDIT_INFO Structure
1174 typedef struct {
1180 
1181 // Table 111 - TPMS_SESSION_AUDIT_INFO Structure
1182 typedef struct {
1186 
1187 // Table 112 - TPMS_CREATION_INFO Structure
1188 typedef struct {
1192 
1193 // Table 113 - TPMS_NV_CERTIFY_INFO Structure
1194 typedef struct {
1199 
1200 // Table 114 - TPMI_ST_ATTEST Type
1202 
1203 // Table 115 - TPMU_ATTEST Union
1204 typedef union {
1212 } TPMU_ATTEST;
1213 
1214 // Table 116 - TPMS_ATTEST Structure
1215 typedef struct {
1223 } TPMS_ATTEST;
1224 
1225 // Table 117 - TPM2B_ATTEST Structure
1226 typedef struct {
1228  BYTE attestationData[sizeof(TPMS_ATTEST)];
1229 } TPM2B_ATTEST;
1230 
1231 // Table 118 - TPMS_AUTH_COMMAND Structure
1232 typedef struct {
1238 
1239 // Table 119 - TPMS_AUTH_RESPONSE Structure
1240 typedef struct {
1245 
1246 // 11 Algorithm Parameters and Structures
1247 
1248 // Table 120 - TPMI_AES_KEY_BITS Type
1250 
1251 // Table 121 - TPMI_SM4_KEY_BITS Type
1253 
1254 // Table 122 - TPMU_SYM_KEY_BITS Union
1255 typedef union {
1261 
1262 // Table 123 - TPMU_SYM_MODE Union
1263 typedef union {
1267 } TPMU_SYM_MODE;
1268 
1269 // Table 125 - TPMT_SYM_DEF Structure
1270 typedef struct {
1274 } TPMT_SYM_DEF;
1275 
1276 // Table 126 - TPMT_SYM_DEF_OBJECT Structure
1277 typedef struct {
1282 
1283 // Table 127 - TPM2B_SYM_KEY Structure
1284 typedef struct {
1287 } TPM2B_SYM_KEY;
1288 
1289 // Table 128 - TPMS_SYMCIPHER_PARMS Structure
1290 typedef struct {
1293 
1294 // Table 129 - TPM2B_SENSITIVE_DATA Structure
1295 typedef struct {
1299 
1300 // Table 130 - TPMS_SENSITIVE_CREATE Structure
1301 typedef struct {
1305 
1306 // Table 131 - TPM2B_SENSITIVE_CREATE Structure
1307 typedef struct {
1311 
1312 // Table 132 - TPMS_SCHEME_SIGHASH Structure
1313 typedef struct {
1316 
1317 // Table 133 - TPMI_ALG_KEYEDHASH_SCHEME Type
1319 
1320 // Table 134 - HMAC_SIG_SCHEME Types
1322 
1323 // Table 135 - TPMS_SCHEME_XOR Structure
1324 typedef struct {
1327 } TPMS_SCHEME_XOR;
1328 
1329 // Table 136 - TPMU_SCHEME_KEYEDHASH Union
1330 typedef union {
1334 
1335 // Table 137 - TPMT_KEYEDHASH_SCHEME Structure
1336 typedef struct {
1340 
1341 // Table 138 - RSA_SIG_SCHEMES Types
1344 
1345 // Table 139 - ECC_SIG_SCHEMES Types
1349 
1350 // Table 140 - TPMS_SCHEME_ECDAA Structure
1351 typedef struct {
1355 
1356 // Table 141 - TPMU_SIG_SCHEME Union
1357 typedef union {
1365 } TPMU_SIG_SCHEME;
1366 
1367 // Table 142 - TPMT_SIG_SCHEME Structure
1368 typedef struct {
1371 } TPMT_SIG_SCHEME;
1372 
1373 // Table 143 - TPMS_SCHEME_OAEP Structure
1374 typedef struct {
1377 
1378 // Table 144 - TPMS_SCHEME_ECDH Structure
1379 typedef struct {
1382 
1383 // Table 145 - TPMS_SCHEME_MGF1 Structure
1384 typedef struct {
1387 
1388 // Table 146 - TPMS_SCHEME_KDF1_SP800_56a Structure
1389 typedef struct {
1392 
1393 // Table 147 - TPMS_SCHEME_KDF2 Structure
1394 typedef struct {
1397 
1398 // Table 148 - TPMS_SCHEME_KDF1_SP800_108 Structure
1399 typedef struct {
1402 
1403 // Table 149 - TPMU_KDF_SCHEME Union
1404 typedef union {
1409 } TPMU_KDF_SCHEME;
1410 
1411 // Table 150 - TPMT_KDF_SCHEME Structure
1412 typedef struct {
1415 } TPMT_KDF_SCHEME;
1416 
1417 // Table 151 - TPMI_ALG_ASYM_SCHEME Type
1419 
1420 // Table 152 - TPMU_ASYM_SCHEME Union
1421 typedef union {
1430 
1431 // Table 153 - TPMT_ASYM_SCHEME Structure
1432 typedef struct {
1436 
1437 // Table 154 - TPMI_ALG_RSA_SCHEME Type
1439 
1440 // Table 155 - TPMT_RSA_SCHEME Structure
1441 typedef struct {
1444 } TPMT_RSA_SCHEME;
1445 
1446 // Table 156 - TPMI_ALG_RSA_DECRYPT Type
1448 
1449 // Table 157 - TPMT_RSA_DECRYPT Structure
1450 typedef struct {
1454 
1455 // Table 158 - TPM2B_PUBLIC_KEY_RSA Structure
1456 typedef struct {
1460 
1461 // Table 159 - TPMI_RSA_KEY_BITS Type
1463 
1464 // Table 160 - TPM2B_PRIVATE_KEY_RSA Structure
1465 typedef struct {
1469 
1470 // Table 161 - TPM2B_ECC_PARAMETER Structure
1471 typedef struct {
1475 
1476 // Table 162 - TPMS_ECC_POINT Structure
1477 typedef struct {
1480 } TPMS_ECC_POINT;
1481 
1482 // Table 163 -- TPM2B_ECC_POINT Structure <I/O>
1483 typedef struct {
1486 } TPM2B_ECC_POINT;
1487 
1488 // Table 164 - TPMI_ALG_ECC_SCHEME Type
1490 
1491 // Table 165 - TPMI_ECC_CURVE Type
1493 
1494 // Table 166 - TPMT_ECC_SCHEME Structure
1495 typedef struct {
1498 } TPMT_ECC_SCHEME;
1499 
1500 // Table 167 - TPMS_ALGORITHM_DETAIL_ECC Structure
1501 typedef struct {
1514 
1515 // Table 168 - TPMS_SIGNATURE_RSASSA Structure
1516 typedef struct {
1520 
1521 // Table 169 - TPMS_SIGNATURE_RSAPSS Structure
1522 typedef struct {
1526 
1527 // Table 170 - TPMS_SIGNATURE_ECDSA Structure
1528 typedef struct {
1533 
1534 // Table 171 - TPMU_SIGNATURE Union
1535 typedef union {
1544 } TPMU_SIGNATURE;
1545 
1546 // Table 172 - TPMT_SIGNATURE Structure
1547 typedef struct {
1550 } TPMT_SIGNATURE;
1551 
1552 // Table 173 - TPMU_ENCRYPTED_SECRET Union
1553 typedef union {
1554  BYTE ecc[sizeof(TPMS_ECC_POINT)];
1556  BYTE symmetric[sizeof(TPM2B_DIGEST)];
1557  BYTE keyedHash[sizeof(TPM2B_DIGEST)];
1559 
1560 // Table 174 - TPM2B_ENCRYPTED_SECRET Structure
1561 typedef struct {
1563  BYTE secret[sizeof(TPMU_ENCRYPTED_SECRET)];
1565 
1566 // 12 Key/Object Complex
1567 
1568 // Table 175 - TPMI_ALG_PUBLIC Type
1570 
1571 // Table 176 - TPMU_PUBLIC_ID Union
1572 typedef union {
1577 } TPMU_PUBLIC_ID;
1578 
1579 // Table 177 - TPMS_KEYEDHASH_PARMS Structure
1580 typedef struct {
1583 
1584 // Table 178 - TPMS_ASYM_PARMS Structure
1585 typedef struct {
1588 } TPMS_ASYM_PARMS;
1589 
1590 // Table 179 - TPMS_RSA_PARMS Structure
1591 typedef struct {
1596 } TPMS_RSA_PARMS;
1597 
1598 // Table 180 - TPMS_ECC_PARMS Structure
1599 typedef struct {
1604 } TPMS_ECC_PARMS;
1605 
1606 // Table 181 - TPMU_PUBLIC_PARMS Union
1607 typedef union {
1614 
1615 // Table 182 - TPMT_PUBLIC_PARMS Structure
1616 typedef struct {
1620 
1621 // Table 183 - TPMT_PUBLIC Structure
1622 typedef struct {
1629 } TPMT_PUBLIC;
1630 
1631 // Table 184 - TPM2B_PUBLIC Structure
1632 typedef struct {
1635 } TPM2B_PUBLIC;
1636 
1637 // Table 185 - TPM2B_PRIVATE_VENDOR_SPECIFIC Structure
1638 typedef struct {
1642 
1643 // Table 186 - TPMU_SENSITIVE_COMPOSITE Union
1644 typedef union {
1651 
1652 // Table 187 - TPMT_SENSITIVE Structure
1653 typedef struct {
1658 } TPMT_SENSITIVE;
1659 
1660 // Table 188 - TPM2B_SENSITIVE Structure
1661 typedef struct {
1664 } TPM2B_SENSITIVE;
1665 
1666 // Table 189 - _PRIVATE Structure
1667 typedef struct {
1671 } _PRIVATE;
1672 
1673 // Table 190 - TPM2B_PRIVATE Structure
1674 typedef struct {
1677 } TPM2B_PRIVATE;
1678 
1679 // Table 191 - _ID_OBJECT Structure
1680 typedef struct {
1683 } _ID_OBJECT;
1684 
1685 // Table 192 - TPM2B_ID_OBJECT Structure
1686 typedef struct {
1688  BYTE credential[sizeof(_ID_OBJECT)];
1689 } TPM2B_ID_OBJECT;
1690 
1691 // 13 NV Storage Structures
1692 
1693 // Table 193 - TPM_NV_INDEX Bits
1694 //
1695 // NOTE: Comment here to resolve conflict
1696 //
1697 //typedef struct {
1698 // UINT32 index : 22;
1699 // UINT32 space : 2;
1700 // UINT32 RH_NV : 8;
1701 //} TPM_NV_INDEX;
1702 
1703 // Table 195 - TPMA_NV Bits
1704 typedef struct {
1731 } TPMA_NV;
1732 
1733 // Table 196 - TPMS_NV_PUBLIC Structure
1734 typedef struct {
1740 } TPMS_NV_PUBLIC;
1741 
1742 // Table 197 - TPM2B_NV_PUBLIC Structure
1743 typedef struct {
1746 } TPM2B_NV_PUBLIC;
1747 
1748 // 14 Context Data
1749 
1750 // Table 198 - TPM2B_CONTEXT_SENSITIVE Structure
1751 typedef struct {
1755 
1756 // Table 199 - TPMS_CONTEXT_DATA Structure
1757 typedef struct {
1761 
1762 // Table 200 - TPM2B_CONTEXT_DATA Structure
1763 typedef struct {
1767 
1768 // Table 201 - TPMS_CONTEXT Structure
1769 typedef struct {
1774 } TPMS_CONTEXT;
1775 
1776 // 15 Creation Data
1777 
1778 // Table 203 - TPMS_CREATION_DATA Structure
1779 typedef struct {
1788 
1789 // Table 204 - TPM2B_CREATION_DATA Structure
1790 typedef struct {
1794 
1795 
1796 //
1797 // Command Header
1798 //
1799 typedef struct {
1804 
1805 typedef struct {
1810 
1811 #pragma pack ()
1812 
1813 //
1814 // TCG Algorithm Registry
1815 //
1816 #define HASH_ALG_SHA1 0x00000001
1817 #define HASH_ALG_SHA256 0x00000002
1818 #define HASH_ALG_SHA384 0x00000004
1819 #define HASH_ALG_SHA512 0x00000008
1820 #define HASH_ALG_SM3_256 0x00000010
1821 
1822 #endif
#define MAX_CAP_HANDLES
Definition: Tpm20.h:137
UINT32 signing
Definition: Tpm20.h:726
UINT8 decrypt
Definition: Tpm20.h:758
UINT32 method
Definition: Tpm20.h:728
TPMS_SESSION_AUDIT_INFO sessionAudit
Definition: Tpm20.h:1209
TPMS_ECC_POINT point
Definition: Tpm20.h:1485
TPM_HANDLE TPMI_SH_AUTH_SESSION
Definition: Tpm20.h:836
UINT32 reserved11_31
Definition: Tpm20.h:785
UINT8 sizeofSelect
Definition: Tpm20.h:992
UINT32 tpmGeneratedEPS
Definition: Tpm20.h:784
UINT8 locZero
Definition: Tpm20.h:768
UINT16 size
Definition: Tpm20.h:929
const char * name
Definition: ath9k_hw.c:1984
TPMU_SCHEME_KEYEDHASH details
Definition: Tpm20.h:1338
UINT32 count
Definition: Tpm20.h:1076
UINT16 TPM_SU
Definition: Tpm20.h:509
TPMS_SCHEME_KDF1_SP800_108 kdf1_sp800_108
Definition: Tpm20.h:1408
TPM2B_DIGEST digest
Definition: Tpm20.h:1028
TPMS_NV_PUBLIC nvPublic
Definition: Tpm20.h:1745
#define SM3_256_DIGEST_SIZE
Definition: Tpm20.h:48
UINT16 size
Definition: Tpm20.h:1744
TPM2B_NAME qualifiedSigner
Definition: Tpm20.h:1218
TPM2B_DIGEST digest
Definition: Tpm20.h:1007
TPMS_NV_CERTIFY_INFO nv
Definition: Tpm20.h:1211
TPMT_SYM_DEF_OBJECT symmetric
Definition: Tpm20.h:1592
UINT32 resetCount
Definition: Tpm20.h:1144
UINT8 sizeofSelect
Definition: Tpm20.h:999
#define SHA256_DIGEST_SIZE
Definition: Tpm20.h:36
UINT8 BYTE
Definition: Tpm20.h:151
TPMI_ST_ATTEST type
Definition: Tpm20.h:1217
TPM2B_DIGEST integrityHMAC
Definition: Tpm20.h:1681
TPMI_ALG_HASH hash
Definition: Tpm20.h:1523
TPMI_ALG_HASH nameAlg
Definition: Tpm20.h:1736
UINT32 TPMA_NV_PLATFORMCREATE
Definition: Tpm20.h:1729
TPMS_SCHEME_RSASSA rsassa
Definition: Tpm20.h:1358
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1352
TPM2B_NONCE nonce
Definition: Tpm20.h:1241
TPML_CC ppCommands
Definition: Tpm20.h:1127
TPM_HANDLE TPMI_DH_ENTITY
Definition: Tpm20.h:830
TPMI_ALG_KDF kdf
Definition: Tpm20.h:1326
UINT32 rHandle
Definition: Tpm20.h:813
TPMS_TIME_INFO time
Definition: Tpm20.h:1157
TPMS_CREATION_INFO creation
Definition: Tpm20.h:1206
TPM_HANDLE handle
Definition: Tpm20.h:981
UINT8 auditExclusive
Definition: Tpm20.h:755
UINT32 reserved3_31
Definition: Tpm20.h:802
TPMU_SYM_KEY_BITS keyBits
Definition: Tpm20.h:1279
INT8 TPM_CLOCK_ADJUST
Definition: Tpm20.h:464
TPM_ALG_ID TPMI_ALG_RSA_DECRYPT
Definition: Tpm20.h:1447
TPMT_ASYM_SCHEME scheme
Definition: Tpm20.h:1587
TPM_ALG_ID alg
Definition: Tpm20.h:1033
TPM_HANDLE TPMI_RH_LOCKOUT
Definition: Tpm20.h:872
TPM_ST TPMI_ST_COMMAND_TAG
Definition: Tpm20.h:902
TPM_ALG_ID TPMI_ALG_KEYEDHASH_SCHEME
Definition: Tpm20.h:1318
UINT16 CONTEXT_SLOT
Definition: Tpm20.h:94
UINT32 TPMA_NV_PPREAD
Definition: Tpm20.h:1719
TPM2B_ECC_PARAMETER p
Definition: Tpm20.h:1506
UINT32 TPMA_NV_PPWRITE
Definition: Tpm20.h:1705
TPMU_HA digest
Definition: Tpm20.h:924
TPM_GENERATED magic
Definition: Tpm20.h:1216
UINT16 TPM_EO
Definition: Tpm20.h:474
TPM_HANDLE TPMI_SH_POLICY
Definition: Tpm20.h:842
TPMS_SCHEME_RSAPSS rsapss
Definition: Tpm20.h:1359
TPM2B_PUBLIC_KEY_RSA rsa
Definition: Tpm20.h:1575
TPM2B_ECC_PARAMETER y
Definition: Tpm20.h:1479
UINT32 reserved3_30
Definition: Tpm20.h:793
UINT32 TPM_HANDLE
A generic handle could be key, transport etc.
Definition: Tpm12.h:204
UINT32 reserved11_31
Definition: Tpm20.h:729
TPMS_SCHEME_SIGHASH any
Definition: Tpm20.h:1543
UINT32 ehEnable
Definition: Tpm20.h:792
UINT32 extensive
Definition: Tpm20.h:810
TPMS_SCHEME_RSASSA rsassa
Definition: Tpm20.h:1422
TPMS_SENSITIVE_CREATE sensitive
Definition: Tpm20.h:1309
TPMU_ASYM_SCHEME details
Definition: Tpm20.h:1434
TPM_CAP capability
Definition: Tpm20.h:1137
TPM2B_DIGEST authPolicy
Definition: Tpm20.h:1626
UINT32 Res
Definition: Tpm20.h:815
UINT32 TPM_RC
Definition: Tpm20.h:340
TPM2B_DIGEST digest
Definition: Tpm20.h:1021
TPMS_SCHEME_RSAPSS rsapss
Definition: Tpm20.h:1423
TPM_ALG_ID TPMI_ALG_SYM_MODE
Definition: Tpm20.h:890
TPMT_SYM_DEF_OBJECT symmetric
Definition: Tpm20.h:1600
TPMS_ECC_PARMS eccDetail
Definition: Tpm20.h:1611
TPM_ST TPMI_ST_ATTEST
Definition: Tpm20.h:1201
TPM_HANDLE TPMI_DH_PCR
Definition: Tpm20.h:833
TPM_ALG_ID TPMI_ECC_KEY_EXCHANGE
Definition: Tpm20.h:899
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1380
TPMI_ALG_KEYEDHASH_SCHEME scheme
Definition: Tpm20.h:1337
TPMT_HA hmac
Definition: Tpm20.h:1542
UINT16 size
Definition: Tpm20.h:935
TPMS_CLOCK_INFO clockInfo
Definition: Tpm20.h:1152
UINT32 reserved8_9
Definition: Tpm20.h:742
UINT8 locFour
Definition: Tpm20.h:772
UINT32 TPM_RH
Definition: Tpm20.h:665
TPMT_SENSITIVE sensitiveArea
Definition: Tpm20.h:1663
TPMI_ALG_RSA_SCHEME scheme
Definition: Tpm20.h:1442
unsigned int UINT32
Definition: ProcessorBind.h:56
BYTE TPMI_YES_NO
Definition: Tpm20.h:821
TPM2B_ECC_PARAMETER ecc
Definition: Tpm20.h:1646
TPML_CCA command
Definition: Tpm20.h:1126
TPM_ALG_ID TPMI_ALG_ECC_SCHEME
Definition: Tpm20.h:1489
TPM2B_DIGEST TPM2B_OPERAND
Definition: Tpm20.h:946
TPMI_ALG_HASH xor
Definition: Tpm20.h:1259
UINT8 audit
Definition: Tpm20.h:760
TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSAPSS
Definition: Tpm20.h:1343
UINT32 TPMA_NV_WRITEALL
Definition: Tpm20.h:1715
TPM2B_DIGEST integrity
Definition: Tpm20.h:1758
TPMS_SCHEME_SIGHASH TPMS_SCHEME_SM2
Definition: Tpm20.h:1347
UINT64 firmwareVersion
Definition: Tpm20.h:1158
TPM2B_DIGEST TPM2B_AUTH
Definition: Tpm20.h:943
TPMT_ECC_SCHEME scheme
Definition: Tpm20.h:1601
TPMA_OBJECT objectAttributes
Definition: Tpm20.h:1625
TPM_KEY_BITS TPMI_RSA_KEY_BITS
Definition: Tpm20.h:1462
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1325
#define MAX_SYM_KEY_BYTES
Definition: Tpm20.h:82
TPMI_ALG_HASH hash
Definition: Tpm20.h:1529
UINT16 size
Definition: Tpm20.h:1484
TPMI_YES_NO safe
Definition: Tpm20.h:1146
TPM_ALG_ID TPMI_ALG_KDF
Definition: Tpm20.h:893
TPMI_RH_HIERARCHY hierarchy
Definition: Tpm20.h:1013
TPM2B_DIGEST pcrDigest
Definition: Tpm20.h:1170
UINT64 firmwareVersion
Definition: Tpm20.h:1221
TPMI_ALG_PUBLIC sensitiveType
Definition: Tpm20.h:1654
TPM2B_DIGEST creationHash
Definition: Tpm20.h:1190
TPMU_SIG_SCHEME details
Definition: Tpm20.h:1497
TPM2B_DATA extraData
Definition: Tpm20.h:1219
UINT16 TPM_KEY_BITS
Definition: Tpm20.h:162
unsigned char UINT8
Definition: ProcessorBind.h:62
TPMU_ASYM_SCHEME details
Definition: Tpm20.h:1452
TPMT_RSA_SCHEME scheme
Definition: Tpm20.h:1593
UINT16 size
Definition: Tpm20.h:974
UINT32 decrypt
Definition: Tpm20.h:747
TPM_ALG_ID TPMI_ALG_HASH
Definition: Tpm20.h:878
TPM_HANDLE TPMI_RH_PLATFORM
Definition: Tpm20.h:854
TPM2B_ECC_PARAMETER h
Definition: Tpm20.h:1512
UINT32 TPMA_NV_CLEAR_STCLEAR
Definition: Tpm20.h:1726
UINT16 size
Definition: Tpm20.h:986
TPM_ALG_ID TPMI_ALG_ASYM_SCHEME
Definition: Tpm20.h:1418
TPM2B_ECC_PARAMETER x
Definition: Tpm20.h:1478
TPM2B_CONTEXT_SENSITIVE encrypted
Definition: Tpm20.h:1759
TPM_HANDLE TPMI_SH_HMAC
Definition: Tpm20.h:839
UINT16 dataSize
Definition: Tpm20.h:1739
TPMI_ALG_SYM_MODE aes
Definition: Tpm20.h:1264
UINT32 asymmetric
Definition: Tpm20.h:721
TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECSCHNORR
Definition: Tpm20.h:1348
UINT32 reserved7_9
Definition: Tpm20.h:1712
TPMI_SM4_KEY_BITS SM4
Definition: Tpm20.h:1257
UINT32 reserved20_24
Definition: Tpm20.h:1723
TPMS_SCHEME_SIGHASH any
Definition: Tpm20.h:1364
TPML_PCR_SELECTION pcrSelect
Definition: Tpm20.h:1169
TPMT_KEYEDHASH_SCHEME scheme
Definition: Tpm20.h:1581
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1385
TPMU_SENSITIVE_COMPOSITE sensitive
Definition: Tpm20.h:1657
TPM_ALG_ID TPMI_ALG_SYM_OBJECT
Definition: Tpm20.h:887
TPMI_ALG_ASYM_SCHEME scheme
Definition: Tpm20.h:1433
UINT32 TPMA_NV_POLICY_DELETE
Definition: Tpm20.h:1713
TPM_KEY_BITS TPMI_SM4_KEY_BITS
Definition: Tpm20.h:1252
TPMS_SCHEME_KDF1_SP800_56a kdf1_SP800_56a
Definition: Tpm20.h:1406
TPMU_CAPABILITIES data
Definition: Tpm20.h:1138
UINT32 sharedRAM
Definition: Tpm20.h:799
TPMI_SH_AUTH_SESSION sessionHandle
Definition: Tpm20.h:1233
TPM2B_ECC_PARAMETER n
Definition: Tpm20.h:1511
TPM2B_ECC_PARAMETER a
Definition: Tpm20.h:1507
TPMU_KDF_SCHEME details
Definition: Tpm20.h:1414
UINT32 commandIndex
Definition: Tpm20.h:807
UINT64 clock
Definition: Tpm20.h:1143
TPMI_RH_HIERARCHY hierarchy
Definition: Tpm20.h:1772
TPM_ALG_ID digestAlg
Definition: Tpm20.h:1176
UINT16 TPM_ALG_ID
Definition: Tpm20.h:171
TPMS_SCHEME_KDF2 kdf2
Definition: Tpm20.h:1407
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1314
UINT32 cHandles
Definition: Tpm20.h:812
TPMI_YES_NO exclusiveSession
Definition: Tpm20.h:1183
UINT8 TPM_HT
Definition: Tpm20.h:653
UINT32 reserved12_15
Definition: Tpm20.h:745
TPMS_SCHEME_ECDAA ecdaa
Definition: Tpm20.h:1361
UINT32 reserved16_21
Definition: Tpm20.h:808
UINT32 orderly
Definition: Tpm20.h:794
#define MAX_CONTEXT_SIZE
Definition: Tpm20.h:104
UINT32 ownerAuthSet
Definition: Tpm20.h:778
TPM2B_ECC_PARAMETER gX
Definition: Tpm20.h:1509
UINT16 size
Definition: Tpm20.h:1662
TPM2B_DIGEST authPolicy
Definition: Tpm20.h:1738
UINT32 TPM_PS
Definition: Tpm20.h:626
TPMS_SCHEME_SIGHASH anySig
Definition: Tpm20.h:1428
TPMI_ALG_HASH hash
Definition: Tpm20.h:1517
TPMU_PUBLIC_PARMS parameters
Definition: Tpm20.h:1618
UINT32 TPMA_NV_BITS
Definition: Tpm20.h:1710
TPMI_ALG_SIG_SCHEME sigAlg
Definition: Tpm20.h:1548
TPMI_AES_KEY_BITS aes
Definition: Tpm20.h:1256
TPMI_RSA_KEY_BITS keyBits
Definition: Tpm20.h:1594
TPM2B_DATA outsideInfo
Definition: Tpm20.h:1786
TPMA_SESSION sessionAttributes
Definition: Tpm20.h:1242
UINT32 disableClear
Definition: Tpm20.h:782
Definition: Tpm20.h:806
UINT16 size
Definition: Tpm20.h:1687
TPM_HANDLE TPMI_RH_HIERARCHY_AUTH
Definition: Tpm20.h:851
TPM2B_ECC_PARAMETER signatureS
Definition: Tpm20.h:1531
TPMU_SYM_KEY_BITS keyBits
Definition: Tpm20.h:1272
TPM2B_DIGEST TPM2B_NONCE
Definition: Tpm20.h:940
TPMS_CERTIFY_INFO certify
Definition: Tpm20.h:1205
UINT32 TPMA_NV_AUTHWRITE
Definition: Tpm20.h:1707
UINT32 nv
Definition: Tpm20.h:809
TPMI_ALG_SYM_OBJECT algorithm
Definition: Tpm20.h:1278
UINT32 sensitiveDataOrigin
Definition: Tpm20.h:739
TPMS_SCHEME_HMAC hmac
Definition: Tpm20.h:1363
TPMI_RH_HIERARCHY hierarchy
Definition: Tpm20.h:1027
TPMS_TIME_ATTEST_INFO time
Definition: Tpm20.h:1210
UINT32 count
Definition: Tpm20.h:1070
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1400
TPM2B_ECC_PARAMETER signatureR
Definition: Tpm20.h:1530
TPM_HANDLE TPMI_RH_OWNER
Definition: Tpm20.h:857
TPMT_SYM_DEF_OBJECT symDetail
Definition: Tpm20.h:1609
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1395
TPM_CC commandCode
Definition: Tpm20.h:1802
TPMI_ALG_HASH nameAlg
Definition: Tpm20.h:1624
UINT32 count
Definition: Tpm20.h:1100
UINT32 TPMA_NV_WRITEDEFINE
Definition: Tpm20.h:1716
UINT32 TPMA_NV_OWNERWRITE
Definition: Tpm20.h:1706
TPMI_RH_HIERARCHY hierarchy
Definition: Tpm20.h:1006
UINT16 size
Definition: Tpm20.h:1285
UINT32 TPMA_NV_COUNTER
Definition: Tpm20.h:1709
UINT32 TPMA_NV_OWNERREAD
Definition: Tpm20.h:1720
TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSASSA
Definition: Tpm20.h:1342
TPML_ALG_PROPERTY algorithms
Definition: Tpm20.h:1124
UINT32 object
Definition: Tpm20.h:724
TPM_ALG_ID TPMI_ALG_ASYM
Definition: Tpm20.h:881
UINT32 symmetric
Definition: Tpm20.h:722
UINT8 Extended
Definition: Tpm20.h:773
TPM_HANDLE TPMI_RH_CLEAR
Definition: Tpm20.h:866
UINT8 locOne
Definition: Tpm20.h:769
TPMS_SCHEME_HMAC hmac
Definition: Tpm20.h:1331
UINT64 sequence
Definition: Tpm20.h:1770
unsigned short UINT16
Definition: ProcessorBind.h:58
TPM_HANDLE TPMI_RH_NV_AUTH
Definition: Tpm20.h:869
#define MAX_NV_INDEX_SIZE
Definition: Tpm20.h:106
TPM2B_DIGEST encIdentity
Definition: Tpm20.h:1682
TPM2B_DIGEST pcrDigest
Definition: Tpm20.h:1781
TPM2B_MAX_NV_BUFFER nvContents
Definition: Tpm20.h:1197
UINT32 TPMA_NV_WRITELOCKED
Definition: Tpm20.h:1714
TPM2B_NAME parentName
Definition: Tpm20.h:1784
TPM2B_ECC_PARAMETER gY
Definition: Tpm20.h:1510
UINT32 noDA
Definition: Tpm20.h:743
TPM2B_PUBLIC_KEY_RSA sig
Definition: Tpm20.h:1518
UINT32 TPMA_NV_READLOCKED
Definition: Tpm20.h:1727
TPMS_CLOCK_INFO clockInfo
Definition: Tpm20.h:1220
UINT8 auditReset
Definition: Tpm20.h:756
TPM2B_SYM_KEY sym
Definition: Tpm20.h:1648
UINT32 exponent
Definition: Tpm20.h:1595
UINT64 CONTEXT_COUNTER
Definition: Tpm20.h:95
UINT32 TPMA_NV_WRITTEN
Definition: Tpm20.h:1728
UINT32 TPM_CAP
Definition: Tpm20.h:520
TPML_CC auditCommands
Definition: Tpm20.h:1128
TPM_ALG_ID TPMI_ALG_PUBLIC
Definition: Tpm20.h:1569
TPM_ST tag
Definition: Tpm20.h:1012
TPM_KEY_BITS TPMI_AES_KEY_BITS
Definition: Tpm20.h:1249
TPMT_KDF_SCHEME kdf
Definition: Tpm20.h:1603
UINT32 TPMA_NV_READ_STCLEAR
Definition: Tpm20.h:1730
UINT32 reserved19_31
Definition: Tpm20.h:749
UINT32 endorsementAuthSet
Definition: Tpm20.h:779
TPMS_SCHEME_ECSCHNORR ecSchnorr
Definition: Tpm20.h:1362
TPMT_HA digest
Definition: Tpm20.h:980
#define PCR_SELECT_MAX
Definition: Tpm20.h:101
TPMS_SCHEME_ECDAA ecdaa
Definition: Tpm20.h:1426
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:923
TPMI_ALG_KDF scheme
Definition: Tpm20.h:1413
UINT32 TPMA_NV_ORDERLY
Definition: Tpm20.h:1725
TPM2B_DIGEST sessionDigest
Definition: Tpm20.h:1184
UINT32 shEnable
Definition: Tpm20.h:791
UINT32 restartCount
Definition: Tpm20.h:1145
TPM_ST tag
Definition: Tpm20.h:1005
UINT16 TPM_ST
Definition: Tpm20.h:489
UINT32 phEnable
Definition: Tpm20.h:790
#define MAX_ALG_LIST_SIZE
Definition: Tpm20.h:110
UINT32 hash
Definition: Tpm20.h:723
#define MAX_RSA_KEY_BYTES
Definition: Tpm20.h:64
TPM2B_CONTEXT_DATA contextBlob
Definition: Tpm20.h:1773
UINT16 TPM_KEY_SIZE
Definition: Tpm20.h:161
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1375
TPM2B_NAME qualifiedName
Definition: Tpm20.h:1164
TPMS_SIGNATURE_ECDSA ecschnorr
Definition: Tpm20.h:1541
TPML_PCR_SELECTION pcrSelect
Definition: Tpm20.h:1780
TPMS_SCHEME_MGF1 mgf1
Definition: Tpm20.h:1405
UINT32 sharedNV
Definition: Tpm20.h:800
Definition: Tpm20.h:913
TPML_ECC_CURVE eccCurves
Definition: Tpm20.h:1132
unsigned long long UINT64
Definition: ProcessorBind.h:54
#define MAX_DIGEST_BUFFER
Definition: Tpm20.h:105
TPM_HANDLE TPMI_DH_PERSISTENT
Definition: Tpm20.h:827
Definition: Tpm20.h:922
TPM2B_PRIVATE_KEY_RSA rsa
Definition: Tpm20.h:1645
UINT32 count
Definition: Tpm20.h:1058
TPMS_SIGNATURE_ECDSA ecdaa
Definition: Tpm20.h:1540
TPM2B_AUTH hmac
Definition: Tpm20.h:1243
TPM2B_PUBLIC_KEY_RSA sig
Definition: Tpm20.h:1524
TPMS_SCHEME_ECDSA ecdsa
Definition: Tpm20.h:1360
UINT8 reserved3_4
Definition: Tpm20.h:757
UINT32 lockoutAuthSet
Definition: Tpm20.h:780
TPMU_SIGNATURE signature
Definition: Tpm20.h:1549
UINT32 encrypting
Definition: Tpm20.h:727
UINT32 TPMA_NV_GLOBALLOCK
Definition: Tpm20.h:1718
TPMI_RH_HIERARCHY hierarchy
Definition: Tpm20.h:1020
UINT32 encryptedDuplication
Definition: Tpm20.h:744
TPMT_SYM_DEF_OBJECT sym
Definition: Tpm20.h:1291
UINT32 reserved4_7
Definition: Tpm20.h:725
TPM2B_SENSITIVE_DATA bits
Definition: Tpm20.h:1647
TPM2B_AUTH userAuth
Definition: Tpm20.h:1302
UINT16 count
Definition: Tpm20.h:1353
TPM2B_NAME indexName
Definition: Tpm20.h:1195
TPMS_ASYM_PARMS asymDetail
Definition: Tpm20.h:1612
TPM_ALG_ID parentNameAlg
Definition: Tpm20.h:1783
TPMA_SESSION sessionAttributes
Definition: Tpm20.h:1235
TPM Specification data structures (TCG TPM Specification Version 1.2 Revision 103) See http://trusted...
#define MAX_CAP_ALGS
Definition: Tpm20.h:136
FILE_LICENCE(BSD3)
TPM_KEY_BITS sym
Definition: Tpm20.h:1258
TPM2B_DIGEST keyedHash
Definition: Tpm20.h:1573
TPMA_ALGORITHM attributes
Definition: Tpm20.h:909
UINT8 encrypt
Definition: Tpm20.h:759
TPMI_ECC_CURVE curveID
Definition: Tpm20.h:1602
UINT16 size
Definition: Tpm20.h:950
TPML_TAGGED_PCR_PROPERTY pcrProperties
Definition: Tpm20.h:1131
TPMU_SYM_MODE mode
Definition: Tpm20.h:1273
TPMI_ALG_PUBLIC type
Definition: Tpm20.h:1617
UINT32 stClear
Definition: Tpm20.h:736
UINT32 objectCopiedToRam
Definition: Tpm20.h:801
UINT32 adminWithPolicy
Definition: Tpm20.h:741
TPM2B_DIGEST auditDigest
Definition: Tpm20.h:1177
TPM2B_AUTH hmac
Definition: Tpm20.h:1236
TPMS_ECC_POINT ecc
Definition: Tpm20.h:1576
TPML_HANDLE handles
Definition: Tpm20.h:1125
UINT32 TPMA_NV_POLICYREAD
Definition: Tpm20.h:1722
TPMU_SYM_MODE mode
Definition: Tpm20.h:1280
TPMT_ECC_SCHEME sign
Definition: Tpm20.h:1505
UINT32 fixedTPM
Definition: Tpm20.h:735
TPM_ECC_CURVE TPMI_ECC_CURVE
Definition: Tpm20.h:1492
TPM2B_NAME objectName
Definition: Tpm20.h:1189
TPMA_ALGORITHM algProperties
Definition: Tpm20.h:1034
#define HASH_COUNT
Definition: Tpm20.h:146
#define SHA1_DIGEST_SIZE
Definition: Tpm20.h:32
#define MAX_SYM_BLOCK_SIZE
Definition: Tpm20.h:83
TPMS_SCHEME_SIGHASH TPMS_SCHEME_HMAC
Definition: Tpm20.h:1321
#define MAX_ECC_CURVES
Definition: Tpm20.h:141
TPM_HANDLE TPM_HC
Definition: Tpm20.h:686
TPMS_SIGNATURE_RSAPSS rsapss
Definition: Tpm20.h:1537
UINT32 flushed
Definition: Tpm20.h:811
TPM2B_DIGEST digest
Definition: Tpm20.h:1014
TPM2B_NAME parentQualifiedName
Definition: Tpm20.h:1785
UINT8 TPM_SE
Definition: Tpm20.h:514
TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECDSA
Definition: Tpm20.h:1346
UINT32 reserved3_7
Definition: Tpm20.h:781
TPM_ALG_ID TPMI_ALG_RSA_SCHEME
Definition: Tpm20.h:1438
TPMU_PUBLIC_ID unique
Definition: Tpm20.h:1628
TPMS_SCHEME_ECDSA ecdsa
Definition: Tpm20.h:1425
UINT32 TPM_PARAMETER_SIZE
Definition: Tpm20.h:160
UINT32 TPM_GENERATED
Definition: Tpm20.h:167
TPMI_ALG_SIG_SCHEME scheme
Definition: Tpm20.h:1369
#define SHA512_DIGEST_SIZE
Definition: Tpm20.h:44
#define MAX_TPM_PROPERTIES
Definition: Tpm20.h:139
#define PRIVATE_VENDOR_SPECIFIC_BYTES
Definition: Tpm20.h:132
TPM_ALG_ID TPMI_ALG_SIG_SCHEME
Definition: Tpm20.h:896
UINT32 TPM_PT_PCR
Definition: Tpm20.h:606
TPM_HANDLE TPMI_RH_NV_INDEX
Definition: Tpm20.h:875
UINT32 paramSize
Definition: Tpm20.h:1801
TPMS_QUOTE_INFO quote
Definition: Tpm20.h:1207
UINT16 size
Definition: Tpm20.h:956
TPMS_KEYEDHASH_PARMS keyedHashDetail
Definition: Tpm20.h:1608
TPMA_NV attributes
Definition: Tpm20.h:1737
UINT32 inLockout
Definition: Tpm20.h:783
UINT32 TPM_PT
Definition: Tpm20.h:535
UINT8 continueSession
Definition: Tpm20.h:754
TPM_ECC_CURVE curveID
Definition: Tpm20.h:1502
UINT32 V
Definition: Tpm20.h:814
#define MAX_PCR_PROPERTIES
Definition: Tpm20.h:140
TPM_HANDLE TPMI_RH_ENDORSEMENT
Definition: Tpm20.h:860
TPM2B_DIGEST integrityInner
Definition: Tpm20.h:1669
TPM_HANDLE TPMI_RH_HIERARCHY
Definition: Tpm20.h:848
TPMI_ALG_HASH hashAlg
Definition: Tpm20.h:1390
TPML_TAGGED_TPM_PROPERTY tpmProperties
Definition: Tpm20.h:1130
UINT32 TPM_CC
Definition: Tpm20.h:226
TPM2B_DIGEST integrityOuter
Definition: Tpm20.h:1668
TPMS_CREATION_DATA creationData
Definition: Tpm20.h:1792
TPM2B_SENSITIVE_DATA data
Definition: Tpm20.h:1303
TPM_HANDLE TPMI_DH_OBJECT
Definition: Tpm20.h:824
UINT32 fixedParent
Definition: Tpm20.h:738
TPMI_ALG_PUBLIC type
Definition: Tpm20.h:1623
UINT32 count
Definition: Tpm20.h:1118
TPMA_LOCALITY locality
Definition: Tpm20.h:1782
TPM2B_ECC_PARAMETER b
Definition: Tpm20.h:1508
TPMU_ASYM_SCHEME details
Definition: Tpm20.h:1443
TPMU_ATTEST attested
Definition: Tpm20.h:1222
UINT32 sign
Definition: Tpm20.h:748
UINT32 TPMA_NV_NO_DA
Definition: Tpm20.h:1724
TPMI_ALG_SYM_MODE sym
Definition: Tpm20.h:1266
TPMT_SENSITIVE sensitive
Definition: Tpm20.h:1670
TPM_RC responseCode
Definition: Tpm20.h:1808
TPMI_DH_CONTEXT savedHandle
Definition: Tpm20.h:1771
TPMI_ALG_RSA_DECRYPT scheme
Definition: Tpm20.h:1451
UINT16 size
Definition: Tpm20.h:968
TPMI_ALG_ECC_SCHEME scheme
Definition: Tpm20.h:1496
TPMI_ALG_SYM_MODE SM4
Definition: Tpm20.h:1265
UINT8 locTwo
Definition: Tpm20.h:770
TPM_HANDLE TPMI_DH_CONTEXT
Definition: Tpm20.h:845
UINT32 count
Definition: Tpm20.h:1052
#define MAX_SYM_DATA
Definition: Tpm20.h:127
UINT8 locThree
Definition: Tpm20.h:771
#define MAX_ECC_KEY_BYTES
Definition: Tpm20.h:68
#define SHA384_DIGEST_SIZE
Definition: Tpm20.h:40
TPM2B_AUTH authValue
Definition: Tpm20.h:1655
TPM_ST tag
Definition: Tpm20.h:1019
TPMS_SIGNATURE_ECDSA sm2
Definition: Tpm20.h:1539
UINT32 userWithAuth
Definition: Tpm20.h:740
UINT32 count
Definition: Tpm20.h:1064
TPM2B_NAME name
Definition: Tpm20.h:1163
UINT32 reserved4
Definition: Tpm20.h:737
UINT16 TPM_ECC_CURVE
Definition: Tpm20.h:214
TPMI_RH_NV_INDEX nvIndex
Definition: Tpm20.h:1735
TPM_ALG_ID TPMI_ALG_SYM
Definition: Tpm20.h:884
TPM2B_DIGEST commandDigest
Definition: Tpm20.h:1178
uint16_t handle
Handle.
Definition: smbios.h:16
TPMS_SCHEME_ECSCHNORR ecSchnorr
Definition: Tpm20.h:1427
UINT32 TPM_AUTHORIZATION_SIZE
Definition: Tpm20.h:159
UINT16 BSIZE
Definition: Tpm20.h:86
TPMS_COMMAND_AUDIT_INFO commandAudit
Definition: Tpm20.h:1208
TPMS_RSA_PARMS rsaDetail
Definition: Tpm20.h:1610
TPMI_ALG_HASH hash
Definition: Tpm20.h:998
TPM2B_DIGEST sym
Definition: Tpm20.h:1574
TPMS_SIGNATURE_RSASSA rsassa
Definition: Tpm20.h:1536
TPMU_PUBLIC_PARMS parameters
Definition: Tpm20.h:1627
#define MAX_CAP_CC
Definition: Tpm20.h:138
UINT32 restricted
Definition: Tpm20.h:746
UINT32 TPMA_NV_WRITE_STCLEAR
Definition: Tpm20.h:1717
UINT16 size
Definition: Tpm20.h:1227
TPM2B_PRIVATE_VENDOR_SPECIFIC any
Definition: Tpm20.h:1649
UINT32 TPMA_NV_AUTHREAD
Definition: Tpm20.h:1721
TPMI_ALG_SYM algorithm
Definition: Tpm20.h:1271
TPMT_SYM_DEF_OBJECT symmetric
Definition: Tpm20.h:1586
UINT64 time
Definition: Tpm20.h:1151
signed char INT8
Definition: ProcessorBind.h:64
UINT32 reserved1
Definition: Tpm20.h:734
TPM2B_NONCE nonce
Definition: Tpm20.h:1234
UINT16 size
Definition: Tpm20.h:1633
TPML_PCR_SELECTION assignedPCR
Definition: Tpm20.h:1129
TPMT_PUBLIC publicArea
Definition: Tpm20.h:1634
UINT32 TPMA_NV_EXTEND
Definition: Tpm20.h:1711
TPMS_SCHEME_XOR xor
Definition: Tpm20.h:1332
TPMS_SCHEME_OAEP oaep
Definition: Tpm20.h:1424
UINT16 size
Definition: Tpm20.h:1675
TPM_HANDLE TPMI_RH_PROVISION
Definition: Tpm20.h:863
TPM2B_DIGEST seedValue
Definition: Tpm20.h:1656
TPMS_SIGNATURE_ECDSA ecdsa
Definition: Tpm20.h:1538
UINT32 TPMA_NV_POLICYWRITE
Definition: Tpm20.h:1708
TPMT_KDF_SCHEME kdf
Definition: Tpm20.h:1504
TPMU_SIG_SCHEME details
Definition: Tpm20.h:1370