iPXE
Tpm12.h
Go to the documentation of this file.
1/** @file
2 TPM Specification data structures (TCG TPM Specification Version 1.2 Revision 103)
3 See http://trustedcomputinggroup.org for latest specification updates
4
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7**/
8
9#ifndef _TPM12_H_
10#define _TPM12_H_
11
12FILE_LICENCE ( BSD2_PATENT );
13FILE_SECBOOT ( PERMITTED );
14
15///
16/// The start of TPM return codes
17///
18#define TPM_BASE 0
19
20//
21// All structures MUST be packed on a byte boundary.
22//
23
24#pragma pack (1)
25
26//
27// Part 2, section 2.2.3: Helper redefinitions
28//
29///
30/// Indicates the conditions where it is required that authorization be presented
31///
33///
34/// The information as to what the payload is in an encrypted structure
35///
37///
38/// The version info breakdown
39///
41///
42/// The state of the dictionary attack mitigation logic
43///
45///
46/// The request or response authorization type
47///
49///
50/// The protocol in use
51///
53///
54/// Indicates the start state
55///
57///
58/// The definition of the encryption scheme
59///
61///
62/// The definition of the signature scheme
63///
65///
66/// The definition of the migration scheme
67///
69///
70/// Sets the state of the physical presence mechanism
71///
73///
74/// Indicates the types of entity that are supported by the TPM
75///
77///
78/// Indicates the permitted usage of the key
79///
81///
82/// The type of asymmetric encrypted structure in use by the endorsement key
83///
85///
86/// The tag for the structure
87///
89///
90/// The platform specific spec to which the information relates to
91///
93///
94/// The command ordinal
95///
97///
98/// Identifies a TPM capability area
99///
101///
102/// Indicates information regarding a key
103///
105///
106/// Indicates the type of algorithm
107///
109///
110/// The locality modifier
111///
113///
114/// The actual number of a counter
115///
117///
118/// Attributes that define what options are in use for a transport session
119///
121///
122/// Handle to an authorization session
123///
125///
126/// Index to a DIR register
127///
129///
130/// The area where a key is held assigned by the TPM
131///
133///
134/// Index to a PCR register
135///
137///
138/// The return code from a function
139///
141///
142/// The types of resources that a TPM may have using internal resources
143///
145///
146/// Allows for controlling of the key when loaded and how to handle TPM_Startup issues
147///
149///
150/// The index into the NV storage area
151///
153///
154/// The family ID. Family IDs are automatically assigned a sequence number by the TPM.
155/// A trusted process can set the FamilyID value in an individual row to NULL, which
156/// invalidates that row. The family ID resets to NULL on each change of TPM Owner.
157///
159///
160/// IA value used as a label for the most recent verification of this family. Set to zero when not in use.
161///
163///
164/// How the TPM handles var
165///
167///
168/// The mode of a symmetric encryption
169///
171///
172/// The family flags
173///
175///
176/// The index value for the delegate NV table
177///
179///
180/// The restrictions placed on delegation of CMK commands
181///
183///
184/// The ID value of a monotonic counter
185///
187///
188/// A command to execute
189///
191///
192/// A transport session handle
193///
195///
196/// A generic handle could be key, transport etc
197///
199///
200/// What operation is happening
201///
203
204//
205// Part 2, section 2.2.4: Vendor specific
206// The following defines allow for the quick specification of a
207// vendor specific item.
208//
209#define TPM_Vendor_Specific32 ((UINT32) 0x00000400)
210#define TPM_Vendor_Specific8 ((UINT8) 0x80)
211
212//
213// Part 2, section 3.1: TPM_STRUCTURE_TAG
214//
215#define TPM_TAG_CONTEXTBLOB ((TPM_STRUCTURE_TAG) 0x0001)
216#define TPM_TAG_CONTEXT_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0002)
217#define TPM_TAG_CONTEXTPOINTER ((TPM_STRUCTURE_TAG) 0x0003)
218#define TPM_TAG_CONTEXTLIST ((TPM_STRUCTURE_TAG) 0x0004)
219#define TPM_TAG_SIGNINFO ((TPM_STRUCTURE_TAG) 0x0005)
220#define TPM_TAG_PCR_INFO_LONG ((TPM_STRUCTURE_TAG) 0x0006)
221#define TPM_TAG_PERSISTENT_FLAGS ((TPM_STRUCTURE_TAG) 0x0007)
222#define TPM_TAG_VOLATILE_FLAGS ((TPM_STRUCTURE_TAG) 0x0008)
223#define TPM_TAG_PERSISTENT_DATA ((TPM_STRUCTURE_TAG) 0x0009)
224#define TPM_TAG_VOLATILE_DATA ((TPM_STRUCTURE_TAG) 0x000A)
225#define TPM_TAG_SV_DATA ((TPM_STRUCTURE_TAG) 0x000B)
226#define TPM_TAG_EK_BLOB ((TPM_STRUCTURE_TAG) 0x000C)
227#define TPM_TAG_EK_BLOB_AUTH ((TPM_STRUCTURE_TAG) 0x000D)
228#define TPM_TAG_COUNTER_VALUE ((TPM_STRUCTURE_TAG) 0x000E)
229#define TPM_TAG_TRANSPORT_INTERNAL ((TPM_STRUCTURE_TAG) 0x000F)
230#define TPM_TAG_TRANSPORT_LOG_IN ((TPM_STRUCTURE_TAG) 0x0010)
231#define TPM_TAG_TRANSPORT_LOG_OUT ((TPM_STRUCTURE_TAG) 0x0011)
232#define TPM_TAG_AUDIT_EVENT_IN ((TPM_STRUCTURE_TAG) 0x0012)
233#define TPM_TAG_AUDIT_EVENT_OUT ((TPM_STRUCTURE_TAG) 0x0013)
234#define TPM_TAG_CURRENT_TICKS ((TPM_STRUCTURE_TAG) 0x0014)
235#define TPM_TAG_KEY ((TPM_STRUCTURE_TAG) 0x0015)
236#define TPM_TAG_STORED_DATA12 ((TPM_STRUCTURE_TAG) 0x0016)
237#define TPM_TAG_NV_ATTRIBUTES ((TPM_STRUCTURE_TAG) 0x0017)
238#define TPM_TAG_NV_DATA_PUBLIC ((TPM_STRUCTURE_TAG) 0x0018)
239#define TPM_TAG_NV_DATA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0019)
240#define TPM_TAG_DELEGATIONS ((TPM_STRUCTURE_TAG) 0x001A)
241#define TPM_TAG_DELEGATE_PUBLIC ((TPM_STRUCTURE_TAG) 0x001B)
242#define TPM_TAG_DELEGATE_TABLE_ROW ((TPM_STRUCTURE_TAG) 0x001C)
243#define TPM_TAG_TRANSPORT_AUTH ((TPM_STRUCTURE_TAG) 0x001D)
244#define TPM_TAG_TRANSPORT_PUBLIC ((TPM_STRUCTURE_TAG) 0x001E)
245#define TPM_TAG_PERMANENT_FLAGS ((TPM_STRUCTURE_TAG) 0x001F)
246#define TPM_TAG_STCLEAR_FLAGS ((TPM_STRUCTURE_TAG) 0x0020)
247#define TPM_TAG_STANY_FLAGS ((TPM_STRUCTURE_TAG) 0x0021)
248#define TPM_TAG_PERMANENT_DATA ((TPM_STRUCTURE_TAG) 0x0022)
249#define TPM_TAG_STCLEAR_DATA ((TPM_STRUCTURE_TAG) 0x0023)
250#define TPM_TAG_STANY_DATA ((TPM_STRUCTURE_TAG) 0x0024)
251#define TPM_TAG_FAMILY_TABLE_ENTRY ((TPM_STRUCTURE_TAG) 0x0025)
252#define TPM_TAG_DELEGATE_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0026)
253#define TPM_TAG_DELG_KEY_BLOB ((TPM_STRUCTURE_TAG) 0x0027)
254#define TPM_TAG_KEY12 ((TPM_STRUCTURE_TAG) 0x0028)
255#define TPM_TAG_CERTIFY_INFO2 ((TPM_STRUCTURE_TAG) 0x0029)
256#define TPM_TAG_DELEGATE_OWNER_BLOB ((TPM_STRUCTURE_TAG) 0x002A)
257#define TPM_TAG_EK_BLOB_ACTIVATE ((TPM_STRUCTURE_TAG) 0x002B)
258#define TPM_TAG_DAA_BLOB ((TPM_STRUCTURE_TAG) 0x002C)
259#define TPM_TAG_DAA_CONTEXT ((TPM_STRUCTURE_TAG) 0x002D)
260#define TPM_TAG_DAA_ENFORCE ((TPM_STRUCTURE_TAG) 0x002E)
261#define TPM_TAG_DAA_ISSUER ((TPM_STRUCTURE_TAG) 0x002F)
262#define TPM_TAG_CAP_VERSION_INFO ((TPM_STRUCTURE_TAG) 0x0030)
263#define TPM_TAG_DAA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0031)
264#define TPM_TAG_DAA_TPM ((TPM_STRUCTURE_TAG) 0x0032)
265#define TPM_TAG_CMK_MIGAUTH ((TPM_STRUCTURE_TAG) 0x0033)
266#define TPM_TAG_CMK_SIGTICKET ((TPM_STRUCTURE_TAG) 0x0034)
267#define TPM_TAG_CMK_MA_APPROVAL ((TPM_STRUCTURE_TAG) 0x0035)
268#define TPM_TAG_QUOTE_INFO2 ((TPM_STRUCTURE_TAG) 0x0036)
269#define TPM_TAG_DA_INFO ((TPM_STRUCTURE_TAG) 0x0037)
270#define TPM_TAG_DA_LIMITED ((TPM_STRUCTURE_TAG) 0x0038)
271#define TPM_TAG_DA_ACTION_TYPE ((TPM_STRUCTURE_TAG) 0x0039)
272
273//
274// Part 2, section 4: TPM Types
275//
276
277//
278// Part 2, section 4.1: TPM_RESOURCE_TYPE
279//
280#define TPM_RT_KEY ((TPM_RESOURCE_TYPE) 0x00000001) ///< The handle is a key handle and is the result of a LoadKey type operation
281#define TPM_RT_AUTH ((TPM_RESOURCE_TYPE) 0x00000002) ///< The handle is an authorization handle. Auth handles come from TPM_OIAP, TPM_OSAP and TPM_DSAP
282#define TPM_RT_HASH ((TPM_RESOURCE_TYPE) 0x00000003) ///< Reserved for hashes
283#define TPM_RT_TRANS ((TPM_RESOURCE_TYPE) 0x00000004) ///< The handle is for a transport session. Transport handles come from TPM_EstablishTransport
284#define TPM_RT_CONTEXT ((TPM_RESOURCE_TYPE) 0x00000005) ///< Resource wrapped and held outside the TPM using the context save/restore commands
285#define TPM_RT_COUNTER ((TPM_RESOURCE_TYPE) 0x00000006) ///< Reserved for counters
286#define TPM_RT_DELEGATE ((TPM_RESOURCE_TYPE) 0x00000007) ///< The handle is for a delegate row. These are the internal rows held in NV storage by the TPM
287#define TPM_RT_DAA_TPM ((TPM_RESOURCE_TYPE) 0x00000008) ///< The value is a DAA TPM specific blob
288#define TPM_RT_DAA_V0 ((TPM_RESOURCE_TYPE) 0x00000009) ///< The value is a DAA V0 parameter
289#define TPM_RT_DAA_V1 ((TPM_RESOURCE_TYPE) 0x0000000A) ///< The value is a DAA V1 parameter
290
291//
292// Part 2, section 4.2: TPM_PAYLOAD_TYPE
293//
294#define TPM_PT_ASYM ((TPM_PAYLOAD_TYPE) 0x01) ///< The entity is an asymmetric key
295#define TPM_PT_BIND ((TPM_PAYLOAD_TYPE) 0x02) ///< The entity is bound data
296#define TPM_PT_MIGRATE ((TPM_PAYLOAD_TYPE) 0x03) ///< The entity is a migration blob
297#define TPM_PT_MAINT ((TPM_PAYLOAD_TYPE) 0x04) ///< The entity is a maintenance blob
298#define TPM_PT_SEAL ((TPM_PAYLOAD_TYPE) 0x05) ///< The entity is sealed data
299#define TPM_PT_MIGRATE_RESTRICTED ((TPM_PAYLOAD_TYPE) 0x06) ///< The entity is a restricted-migration asymmetric key
300#define TPM_PT_MIGRATE_EXTERNAL ((TPM_PAYLOAD_TYPE) 0x07) ///< The entity is a external migratable key
301#define TPM_PT_CMK_MIGRATE ((TPM_PAYLOAD_TYPE) 0x08) ///< The entity is a CMK migratable blob
302#define TPM_PT_VENDOR_SPECIFIC ((TPM_PAYLOAD_TYPE) 0x80) ///< 0x80 - 0xFF Vendor specific payloads
303
304//
305// Part 2, section 4.3: TPM_ENTITY_TYPE
306//
307#define TPM_ET_KEYHANDLE ((UINT16) 0x0001) ///< The entity is a keyHandle or key
308#define TPM_ET_OWNER ((UINT16) 0x0002) ///< The entity is the TPM Owner
309#define TPM_ET_DATA ((UINT16) 0x0003) ///< The entity is some data
310#define TPM_ET_SRK ((UINT16) 0x0004) ///< The entity is the SRK
311#define TPM_ET_KEY ((UINT16) 0x0005) ///< The entity is a key or keyHandle
312#define TPM_ET_REVOKE ((UINT16) 0x0006) ///< The entity is the RevokeTrust value
313#define TPM_ET_DEL_OWNER_BLOB ((UINT16) 0x0007) ///< The entity is a delegate owner blob
314#define TPM_ET_DEL_ROW ((UINT16) 0x0008) ///< The entity is a delegate row
315#define TPM_ET_DEL_KEY_BLOB ((UINT16) 0x0009) ///< The entity is a delegate key blob
316#define TPM_ET_COUNTER ((UINT16) 0x000A) ///< The entity is a counter
317#define TPM_ET_NV ((UINT16) 0x000B) ///< The entity is a NV index
318#define TPM_ET_OPERATOR ((UINT16) 0x000C) ///< The entity is the operator
319#define TPM_ET_RESERVED_HANDLE ((UINT16) 0x0040) ///< Reserved. This value avoids collisions with the handle MSB setting.
320//
321// TPM_ENTITY_TYPE MSB Values: The MSB is used to indicate the ADIP encryption sheme when applicable
322//
323#define TPM_ET_XOR ((UINT16) 0x0000) ///< ADIP encryption scheme: XOR
324#define TPM_ET_AES128 ((UINT16) 0x0006) ///< ADIP encryption scheme: AES 128 bits
325
326//
327// Part 2, section 4.4.1: Reserved Key Handles
328//
329#define TPM_KH_SRK ((TPM_KEY_HANDLE) 0x40000000) ///< The handle points to the SRK
330#define TPM_KH_OWNER ((TPM_KEY_HANDLE) 0x40000001) ///< The handle points to the TPM Owner
331#define TPM_KH_REVOKE ((TPM_KEY_HANDLE) 0x40000002) ///< The handle points to the RevokeTrust value
332#define TPM_KH_TRANSPORT ((TPM_KEY_HANDLE) 0x40000003) ///< The handle points to the EstablishTransport static authorization
333#define TPM_KH_OPERATOR ((TPM_KEY_HANDLE) 0x40000004) ///< The handle points to the Operator auth
334#define TPM_KH_ADMIN ((TPM_KEY_HANDLE) 0x40000005) ///< The handle points to the delegation administration auth
335#define TPM_KH_EK ((TPM_KEY_HANDLE) 0x40000006) ///< The handle points to the PUBEK, only usable with TPM_OwnerReadInternalPub
336
337//
338// Part 2, section 4.5: TPM_STARTUP_TYPE
339//
340#define TPM_ST_CLEAR ((TPM_STARTUP_TYPE) 0x0001) ///< The TPM is starting up from a clean state
341#define TPM_ST_STATE ((TPM_STARTUP_TYPE) 0x0002) ///< The TPM is starting up from a saved state
342#define TPM_ST_DEACTIVATED ((TPM_STARTUP_TYPE) 0x0003) ///< The TPM is to startup and set the deactivated flag to TRUE
343
344//
345// Part 2, section 4.6: TPM_STATUP_EFFECTS
346// The table makeup is still an open issue.
347//
348
349//
350// Part 2, section 4.7: TPM_PROTOCOL_ID
351//
352#define TPM_PID_OIAP ((TPM_PROTOCOL_ID) 0x0001) ///< The OIAP protocol.
353#define TPM_PID_OSAP ((TPM_PROTOCOL_ID) 0x0002) ///< The OSAP protocol.
354#define TPM_PID_ADIP ((TPM_PROTOCOL_ID) 0x0003) ///< The ADIP protocol.
355#define TPM_PID_ADCP ((TPM_PROTOCOL_ID) 0x0004) ///< The ADCP protocol.
356#define TPM_PID_OWNER ((TPM_PROTOCOL_ID) 0x0005) ///< The protocol for taking ownership of a TPM.
357#define TPM_PID_DSAP ((TPM_PROTOCOL_ID) 0x0006) ///< The DSAP protocol
358#define TPM_PID_TRANSPORT ((TPM_PROTOCOL_ID) 0x0007) ///< The transport protocol
359
360//
361// Part 2, section 4.8: TPM_ALGORITHM_ID
362// The TPM MUST support the algorithms TPM_ALG_RSA, TPM_ALG_SHA, TPM_ALG_HMAC,
363// TPM_ALG_MGF1
364//
365#define TPM_ALG_RSA ((TPM_ALGORITHM_ID) 0x00000001) ///< The RSA algorithm.
366#define TPM_ALG_DES ((TPM_ALGORITHM_ID) 0x00000002) ///< The DES algorithm
367#define TPM_ALG_3DES ((TPM_ALGORITHM_ID) 0x00000003) ///< The 3DES algorithm in EDE mode
368#define TPM_ALG_SHA ((TPM_ALGORITHM_ID) 0x00000004) ///< The SHA1 algorithm
369#define TPM_ALG_HMAC ((TPM_ALGORITHM_ID) 0x00000005) ///< The RFC 2104 HMAC algorithm
370#define TPM_ALG_AES128 ((TPM_ALGORITHM_ID) 0x00000006) ///< The AES algorithm, key size 128
371#define TPM_ALG_MGF1 ((TPM_ALGORITHM_ID) 0x00000007) ///< The XOR algorithm using MGF1 to create a string the size of the encrypted block
372#define TPM_ALG_AES192 ((TPM_ALGORITHM_ID) 0x00000008) ///< AES, key size 192
373#define TPM_ALG_AES256 ((TPM_ALGORITHM_ID) 0x00000009) ///< AES, key size 256
374#define TPM_ALG_XOR ((TPM_ALGORITHM_ID) 0x0000000A) ///< XOR using the rolling nonces
375
376//
377// Part 2, section 4.9: TPM_PHYSICAL_PRESENCE
378//
379#define TPM_PHYSICAL_PRESENCE_HW_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0200) ///< Sets the physicalPresenceHWEnable to FALSE
380#define TPM_PHYSICAL_PRESENCE_CMD_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0100) ///< Sets the physicalPresenceCMDEnable to FALSE
381#define TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0080) ///< Sets the physicalPresenceLifetimeLock to TRUE
382#define TPM_PHYSICAL_PRESENCE_HW_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0040) ///< Sets the physicalPresenceHWEnable to TRUE
383#define TPM_PHYSICAL_PRESENCE_CMD_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0020) ///< Sets the physicalPresenceCMDEnable to TRUE
384#define TPM_PHYSICAL_PRESENCE_NOTPRESENT ((TPM_PHYSICAL_PRESENCE) 0x0010) ///< Sets PhysicalPresence = FALSE
385#define TPM_PHYSICAL_PRESENCE_PRESENT ((TPM_PHYSICAL_PRESENCE) 0x0008) ///< Sets PhysicalPresence = TRUE
386#define TPM_PHYSICAL_PRESENCE_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0004) ///< Sets PhysicalPresenceLock = TRUE
387
388//
389// Part 2, section 4.10: TPM_MIGRATE_SCHEME
390//
391#define TPM_MS_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0001) ///< A public key that can be used with all TPM migration commands other than 'ReWrap' mode.
392#define TPM_MS_REWRAP ((TPM_MIGRATE_SCHEME) 0x0002) ///< A public key that can be used for the ReWrap mode of TPM_CreateMigrationBlob.
393#define TPM_MS_MAINT ((TPM_MIGRATE_SCHEME) 0x0003) ///< A public key that can be used for the Maintenance commands
394#define TPM_MS_RESTRICT_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0004) ///< The key is to be migrated to a Migration Authority.
395#define TPM_MS_RESTRICT_APPROVE_DOUBLE ((TPM_MIGRATE_SCHEME) 0x0005) ///< The key is to be migrated to an entity approved by a Migration Authority using double wrapping
396
397//
398// Part 2, section 4.11: TPM_EK_TYPE
399//
400#define TPM_EK_TYPE_ACTIVATE ((TPM_EK_TYPE) 0x0001) ///< The blob MUST be TPM_EK_BLOB_ACTIVATE
401#define TPM_EK_TYPE_AUTH ((TPM_EK_TYPE) 0x0002) ///< The blob MUST be TPM_EK_BLOB_AUTH
402
403//
404// Part 2, section 4.12: TPM_PLATFORM_SPECIFIC
405//
406#define TPM_PS_PC_11 ((TPM_PLATFORM_SPECIFIC) 0x0001) ///< PC Specific version 1.1
407#define TPM_PS_PC_12 ((TPM_PLATFORM_SPECIFIC) 0x0002) ///< PC Specific version 1.2
408#define TPM_PS_PDA_12 ((TPM_PLATFORM_SPECIFIC) 0x0003) ///< PDA Specific version 1.2
409#define TPM_PS_Server_12 ((TPM_PLATFORM_SPECIFIC) 0x0004) ///< Server Specific version 1.2
410#define TPM_PS_Mobile_12 ((TPM_PLATFORM_SPECIFIC) 0x0005) ///< Mobil Specific version 1.2
411
412//
413// Part 2, section 5: Basic Structures
414//
415
416///
417/// Part 2, section 5.1: TPM_STRUCT_VER
418///
425
426///
427/// Part 2, section 5.3: TPM_VERSION
428///
435
436#define TPM_SHA1_160_HASH_LEN 0x14
437#define TPM_SHA1BASED_NONCE_LEN TPM_SHA1_160_HASH_LEN
438
439///
440/// Part 2, section 5.4: TPM_DIGEST
441///
445
446///
447/// This SHALL be the digest of the chosen identityLabel and privacyCA for a new TPM identity
448///
450///
451/// This SHALL be the hash of a list of PCR indexes and PCR values that a key or data is bound to
452///
454///
455/// This SHALL be the value of a DIR register
456///
458
460///
461/// The value inside of the PCR
462///
464///
465/// This SHALL be the value of the current internal audit state
466///
468
469///
470/// Part 2, section 5.5: TPM_NONCE
471///
472typedef struct tdTPM_NONCE {
475
476///
477/// This SHALL be a random value generated by a TPM immediately after the EK is installed
478/// in that TPM, whenever an EK is installed in that TPM
479///
481///
482/// This SHALL be a random value
483///
485
486//
487// Part 2, section 5.6: TPM_AUTHDATA
488//
489///
490/// The AuthData data is the information that is saved or passed to provide proof of ownership
491/// 296 of an entity
492///
494
496///
497/// A secret plaintext value used in the authorization process
498///
500///
501/// A ciphertext (encrypted) version of AuthData data. The encryption mechanism depends on the context
502///
504
505///
506/// Part 2, section 5.7: TPM_KEY_HANDLE_LIST
507/// Size of handle is loaded * sizeof(TPM_KEY_HANDLE)
508///
513
514//
515// Part 2, section 5.8: TPM_KEY_USAGE values
516//
517///
518/// TPM_KEY_SIGNING SHALL indicate a signing key. The [private] key SHALL be
519/// used for signing operations, only. This means that it MUST be a leaf of the
520/// Protected Storage key hierarchy.
521///
522#define TPM_KEY_SIGNING ((UINT16) 0x0010)
523///
524/// TPM_KEY_STORAGE SHALL indicate a storage key. The key SHALL be used to wrap
525/// and unwrap other keys in the Protected Storage hierarchy
526///
527#define TPM_KEY_STORAGE ((UINT16) 0x0011)
528///
529/// TPM_KEY_IDENTITY SHALL indicate an identity key. The key SHALL be used for
530/// operations that require a TPM identity, only.
531///
532#define TPM_KEY_IDENTITY ((UINT16) 0x0012)
533///
534/// TPM_KEY_AUTHCHANGE SHALL indicate an ephemeral key that is in use during
535/// the ChangeAuthAsym process, only.
536///
537#define TPM_KEY_AUTHCHANGE ((UINT16) 0x0013)
538///
539/// TPM_KEY_BIND SHALL indicate a key that can be used for TPM_Bind and
540/// TPM_Unbind operations only.
541///
542#define TPM_KEY_BIND ((UINT16) 0x0014)
543///
544/// TPM_KEY_LEGACY SHALL indicate a key that can perform signing and binding
545/// operations. The key MAY be used for both signing and binding operations.
546/// The TPM_KEY_LEGACY key type is to allow for use by applications where both
547/// signing and encryption operations occur with the same key. The use of this
548/// key type is not recommended TPM_KEY_MIGRATE 0x0016 This SHALL indicate a
549/// key in use for TPM_MigrateKey
550///
551#define TPM_KEY_LEGACY ((UINT16) 0x0015)
552///
553/// TPM_KEY_MIGRAGE SHALL indicate a key in use for TPM_MigrateKey
554///
555#define TPM_KEY_MIGRATE ((UINT16) 0x0016)
556
557//
558// Part 2, section 5.8.1: Mandatory Key Usage Schemes
559//
560
561#define TPM_ES_NONE ((TPM_ENC_SCHEME) 0x0001)
562#define TPM_ES_RSAESPKCSv15 ((TPM_ENC_SCHEME) 0x0002)
563#define TPM_ES_RSAESOAEP_SHA1_MGF1 ((TPM_ENC_SCHEME) 0x0003)
564#define TPM_ES_SYM_CNT ((TPM_ENC_SCHEME) 0x0004) ///< rev94 defined
565#define TPM_ES_SYM_CTR ((TPM_ENC_SCHEME) 0x0004)
566#define TPM_ES_SYM_OFB ((TPM_ENC_SCHEME) 0x0005)
567
568#define TPM_SS_NONE ((TPM_SIG_SCHEME) 0x0001)
569#define TPM_SS_RSASSAPKCS1v15_SHA1 ((TPM_SIG_SCHEME) 0x0002)
570#define TPM_SS_RSASSAPKCS1v15_DER ((TPM_SIG_SCHEME) 0x0003)
571#define TPM_SS_RSASSAPKCS1v15_INFO ((TPM_SIG_SCHEME) 0x0004)
572
573//
574// Part 2, section 5.9: TPM_AUTH_DATA_USAGE values
575//
576#define TPM_AUTH_NEVER ((TPM_AUTH_DATA_USAGE) 0x00)
577#define TPM_AUTH_ALWAYS ((TPM_AUTH_DATA_USAGE) 0x01)
578#define TPM_AUTH_PRIV_USE_ONLY ((TPM_AUTH_DATA_USAGE) 0x03)
579
580///
581/// Part 2, section 5.10: TPM_KEY_FLAGS
582///
583typedef enum tdTPM_KEY_FLAGS {
584 redirection = 0x00000001,
585 migratable = 0x00000002,
586 isVolatile = 0x00000004,
587 pcrIgnoredOnRead = 0x00000008,
588 migrateAuthority = 0x00000010
590
591///
592/// Part 2, section 5.11: TPM_CHANGEAUTH_VALIDATE
593///
598
599///
600/// Part 2, section 5.12: TPM_MIGRATIONKEYAUTH
601/// declared after section 10 to catch declaration of TPM_PUBKEY
602///
603/// Part 2 section 10.1: TPM_KEY_PARMS
604/// [size_is(parmSize)] BYTE* parms;
605///
613
614///
615/// Part 2, section 10.4: TPM_STORE_PUBKEY
616///
621
622///
623/// Part 2, section 10.5: TPM_PUBKEY
624///
629
630///
631/// Part 2, section 5.12: TPM_MIGRATIONKEYAUTH
632///
638
639///
640/// Part 2, section 5.13: TPM_COUNTER_VALUE
641///
647
648///
649/// Part 2, section 5.14: TPM_SIGN_INFO
650/// Size of data indicated by dataLen
651///
659
660///
661/// Part 2, section 5.15: TPM_MSA_COMPOSITE
662/// Number of migAuthDigest indicated by MSAlist
663///
668
669///
670/// Part 2, section 5.16: TPM_CMK_AUTH
671///
677
678//
679// Part 2, section 5.17: TPM_CMK_DELEGATE
680//
681#define TPM_CMK_DELEGATE_SIGNING ((TPM_CMK_DELEGATE) BIT31)
682#define TPM_CMK_DELEGATE_STORAGE ((TPM_CMK_DELEGATE) BIT30)
683#define TPM_CMK_DELEGATE_BIND ((TPM_CMK_DELEGATE) BIT29)
684#define TPM_CMK_DELEGATE_LEGACY ((TPM_CMK_DELEGATE) BIT28)
685#define TPM_CMK_DELEGATE_MIGRATE ((TPM_CMK_DELEGATE) BIT27)
686
687///
688/// Part 2, section 5.18: TPM_SELECT_SIZE
689///
695
696///
697/// Part 2, section 5,19: TPM_CMK_MIGAUTH
698///
704
705///
706/// Part 2, section 5.20: TPM_CMK_SIGTICKET
707///
713
714///
715/// Part 2, section 5.21: TPM_CMK_MA_APPROVAL
716///
721
722//
723// Part 2, section 6: Command Tags
724//
725#define TPM_TAG_RQU_COMMAND ((TPM_STRUCTURE_TAG) 0x00C1)
726#define TPM_TAG_RQU_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C2)
727#define TPM_TAG_RQU_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C3)
728#define TPM_TAG_RSP_COMMAND ((TPM_STRUCTURE_TAG) 0x00C4)
729#define TPM_TAG_RSP_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C5)
730#define TPM_TAG_RSP_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C6)
731
732///
733/// Part 2, section 7.1: TPM_PERMANENT_FLAGS
734///
758
759//
760// Part 2, section 7.1.1: Flag Restrictions (of TPM_PERMANENT_FLAGS)
761//
762#define TPM_PF_DISABLE ((TPM_CAPABILITY_AREA) 1)
763#define TPM_PF_OWNERSHIP ((TPM_CAPABILITY_AREA) 2)
764#define TPM_PF_DEACTIVATED ((TPM_CAPABILITY_AREA) 3)
765#define TPM_PF_READPUBEK ((TPM_CAPABILITY_AREA) 4)
766#define TPM_PF_DISABLEOWNERCLEAR ((TPM_CAPABILITY_AREA) 5)
767#define TPM_PF_ALLOWMAINTENANCE ((TPM_CAPABILITY_AREA) 6)
768#define TPM_PF_PHYSICALPRESENCELIFETIMELOCK ((TPM_CAPABILITY_AREA) 7)
769#define TPM_PF_PHYSICALPRESENCEHWENABLE ((TPM_CAPABILITY_AREA) 8)
770#define TPM_PF_PHYSICALPRESENCECMDENABLE ((TPM_CAPABILITY_AREA) 9)
771#define TPM_PF_CEKPUSED ((TPM_CAPABILITY_AREA) 10)
772#define TPM_PF_TPMPOST ((TPM_CAPABILITY_AREA) 11)
773#define TPM_PF_TPMPOSTLOCK ((TPM_CAPABILITY_AREA) 12)
774#define TPM_PF_FIPS ((TPM_CAPABILITY_AREA) 13)
775#define TPM_PF_OPERATOR ((TPM_CAPABILITY_AREA) 14)
776#define TPM_PF_ENABLEREVOKEEK ((TPM_CAPABILITY_AREA) 15)
777#define TPM_PF_NV_LOCKED ((TPM_CAPABILITY_AREA) 16)
778#define TPM_PF_READSRKPUB ((TPM_CAPABILITY_AREA) 17)
779#define TPM_PF_TPMESTABLISHED ((TPM_CAPABILITY_AREA) 18)
780#define TPM_PF_MAINTENANCEDONE ((TPM_CAPABILITY_AREA) 19)
781#define TPM_PF_DISABLEFULLDALOGICINFO ((TPM_CAPABILITY_AREA) 20)
782
783///
784/// Part 2, section 7.2: TPM_STCLEAR_FLAGS
785///
794
795//
796// Part 2, section 7.2.1: Flag Restrictions (of TPM_STCLEAR_FLAGS)
797//
798#define TPM_SF_DEACTIVATED ((TPM_CAPABILITY_AREA) 1)
799#define TPM_SF_DISABLEFORCECLEAR ((TPM_CAPABILITY_AREA) 2)
800#define TPM_SF_PHYSICALPRESENCE ((TPM_CAPABILITY_AREA) 3)
801#define TPM_SF_PHYSICALPRESENCELOCK ((TPM_CAPABILITY_AREA) 4)
802#define TPM_SF_BGLOBALLOCK ((TPM_CAPABILITY_AREA) 5)
803
804///
805/// Part 2, section 7.3: TPM_STANY_FLAGS
806///
814
815//
816// Part 2, section 7.3.1: Flag Restrictions (of TPM_STANY_FLAGS)
817//
818#define TPM_AF_POSTINITIALISE ((TPM_CAPABILITY_AREA) 1)
819#define TPM_AF_LOCALITYMODIFIER ((TPM_CAPABILITY_AREA) 2)
820#define TPM_AF_TRANSPORTEXCLUSIVE ((TPM_CAPABILITY_AREA) 3)
821#define TPM_AF_TOSPRESENT ((TPM_CAPABILITY_AREA) 4)
822
823//
824// All those structures defined in section 7.4, 7.5, 7.6 are not normative and
825// thus no definitions here
826//
827// Part 2, section 7.4: TPM_PERMANENT_DATA
828//
829#define TPM_MIN_COUNTERS 4 ///< the minimum number of counters is 4
830#define TPM_DELEGATE_KEY TPM_KEY
831#define TPM_NUM_PCR 16
832#define TPM_MAX_NV_WRITE_NOOWNER 64
833
834//
835// Part 2, section 7.4.1: PERMANENT_DATA Subcap for SetCapability
836//
837#define TPM_PD_REVMAJOR ((TPM_CAPABILITY_AREA) 1)
838#define TPM_PD_REVMINOR ((TPM_CAPABILITY_AREA) 2)
839#define TPM_PD_TPMPROOF ((TPM_CAPABILITY_AREA) 3)
840#define TPM_PD_OWNERAUTH ((TPM_CAPABILITY_AREA) 4)
841#define TPM_PD_OPERATORAUTH ((TPM_CAPABILITY_AREA) 5)
842#define TPM_PD_MANUMAINTPUB ((TPM_CAPABILITY_AREA) 6)
843#define TPM_PD_ENDORSEMENTKEY ((TPM_CAPABILITY_AREA) 7)
844#define TPM_PD_SRK ((TPM_CAPABILITY_AREA) 8)
845#define TPM_PD_DELEGATEKEY ((TPM_CAPABILITY_AREA) 9)
846#define TPM_PD_CONTEXTKEY ((TPM_CAPABILITY_AREA) 10)
847#define TPM_PD_AUDITMONOTONICCOUNTER ((TPM_CAPABILITY_AREA) 11)
848#define TPM_PD_MONOTONICCOUNTER ((TPM_CAPABILITY_AREA) 12)
849#define TPM_PD_PCRATTRIB ((TPM_CAPABILITY_AREA) 13)
850#define TPM_PD_ORDINALAUDITSTATUS ((TPM_CAPABILITY_AREA) 14)
851#define TPM_PD_AUTHDIR ((TPM_CAPABILITY_AREA) 15)
852#define TPM_PD_RNGSTATE ((TPM_CAPABILITY_AREA) 16)
853#define TPM_PD_FAMILYTABLE ((TPM_CAPABILITY_AREA) 17)
854#define TPM_DELEGATETABLE ((TPM_CAPABILITY_AREA) 18)
855#define TPM_PD_EKRESET ((TPM_CAPABILITY_AREA) 19)
856#define TPM_PD_MAXNVBUFSIZE ((TPM_CAPABILITY_AREA) 20)
857#define TPM_PD_LASTFAMILYID ((TPM_CAPABILITY_AREA) 21)
858#define TPM_PD_NOOWNERNVWRITE ((TPM_CAPABILITY_AREA) 22)
859#define TPM_PD_RESTRICTDELEGATE ((TPM_CAPABILITY_AREA) 23)
860#define TPM_PD_TPMDAASEED ((TPM_CAPABILITY_AREA) 24)
861#define TPM_PD_DAAPROOF ((TPM_CAPABILITY_AREA) 25)
862
863///
864/// Part 2, section 7.5: TPM_STCLEAR_DATA
865/// available inside TPM only
866///
876
877//
878// Part 2, section 7.5.1: STCLEAR_DATA Subcap for SetCapability
879//
880#define TPM_SD_CONTEXTNONCEKEY ((TPM_CAPABILITY_AREA)0x00000001)
881#define TPM_SD_COUNTID ((TPM_CAPABILITY_AREA)0x00000002)
882#define TPM_SD_OWNERREFERENCE ((TPM_CAPABILITY_AREA)0x00000003)
883#define TPM_SD_DISABLERESETLOCK ((TPM_CAPABILITY_AREA)0x00000004)
884#define TPM_SD_PCR ((TPM_CAPABILITY_AREA)0x00000005)
885#define TPM_SD_DEFERREDPHYSICALPRESENCE ((TPM_CAPABILITY_AREA)0x00000006)
886
887//
888// Part 2, section 7.6.1: STANY_DATA Subcap for SetCapability
889//
890#define TPM_AD_CONTEXTNONCESESSION ((TPM_CAPABILITY_AREA) 1)
891#define TPM_AD_AUDITDIGEST ((TPM_CAPABILITY_AREA) 2)
892#define TPM_AD_CURRENTTICKS ((TPM_CAPABILITY_AREA) 3)
893#define TPM_AD_CONTEXTCOUNT ((TPM_CAPABILITY_AREA) 4)
894#define TPM_AD_CONTEXTLIST ((TPM_CAPABILITY_AREA) 5)
895#define TPM_AD_SESSIONS ((TPM_CAPABILITY_AREA) 6)
896
897//
898// Part 2, section 8: PCR Structures
899//
900
901///
902/// Part 2, section 8.1: TPM_PCR_SELECTION
903/// Size of pcrSelect[] indicated by sizeOfSelect
904///
909
910///
911/// Part 2, section 8.2: TPM_PCR_COMPOSITE
912/// Size of pcrValue[] indicated by valueSize
913///
919
920///
921/// Part 2, section 8.3: TPM_PCR_INFO
922///
928
929///
930/// Part 2, section 8.6: TPM_LOCALITY_SELECTION
931///
933
934#define TPM_LOC_FOUR ((UINT8) 0x10)
935#define TPM_LOC_THREE ((UINT8) 0x08)
936#define TPM_LOC_TWO ((UINT8) 0x04)
937#define TPM_LOC_ONE ((UINT8) 0x02)
938#define TPM_LOC_ZERO ((UINT8) 0x01)
939
940///
941/// Part 2, section 8.4: TPM_PCR_INFO_LONG
942///
952
953///
954/// Part 2, section 8.5: TPM_PCR_INFO_SHORT
955///
961
962///
963/// Part 2, section 8.8: TPM_PCR_ATTRIBUTES
964///
970
971//
972// Part 2, section 9: Storage Structures
973//
974
975///
976/// Part 2, section 9.1: TPM_STORED_DATA
977/// [size_is(sealInfoSize)] BYTE* sealInfo;
978/// [size_is(encDataSize)] BYTE* encData;
979///
987
988///
989/// Part 2, section 9.2: TPM_STORED_DATA12
990/// [size_is(sealInfoSize)] BYTE* sealInfo;
991/// [size_is(encDataSize)] BYTE* encData;
992///
1001
1002///
1003/// Part 2, section 9.3: TPM_SEALED_DATA
1004/// [size_is(dataSize)] BYTE* data;
1005///
1014
1015///
1016/// Part 2, section 9.4: TPM_SYMMETRIC_KEY
1017/// [size_is(size)] BYTE* data;
1018///
1025
1026///
1027/// Part 2, section 9.5: TPM_BOUND_DATA
1028///
1034
1035//
1036// Part 2 section 10: TPM_KEY complex
1037//
1038
1039//
1040// Section 10.1, 10.4, and 10.5 have been defined previously
1041//
1042
1043///
1044/// Part 2, section 10.2: TPM_KEY
1045/// [size_is(encDataSize)] BYTE* encData;
1046///
1059
1060///
1061/// Part 2, section 10.3: TPM_KEY12
1062/// [size_is(encDataSize)] BYTE* encData;
1063///
1077
1078///
1079/// Part 2, section 10.7: TPM_STORE_PRIVKEY
1080/// [size_is(keyLength)] BYTE* key;
1081///
1086
1087///
1088/// Part 2, section 10.6: TPM_STORE_ASYMKEY
1089///
1090typedef struct tdTPM_STORE_ASYMKEY {
1091 // pos len total
1096 TPM_STORE_PRIVKEY privKey; // 61 132-151 193-214
1098
1099///
1100/// Part 2, section 10.8: TPM_MIGRATE_ASYMKEY
1101/// [size_is(partPrivKeyLen)] BYTE* partPrivKey;
1102///
1104 // pos len total
1109 UINT8 *partPrivKey; // 45 112-127 157-172
1111
1112///
1113/// Part 2, section 10.9: TPM_KEY_CONTROL
1114///
1115#define TPM_KEY_CONTROL_OWNER_EVICT ((UINT32) 0x00000001)
1116
1117//
1118// Part 2, section 11: Signed Structures
1119//
1120
1121///
1122/// Part 2, section 11.1: TPM_CERTIFY_INFO Structure
1123///
1136
1137///
1138/// Part 2, section 11.2: TPM_CERTIFY_INFO2 Structure
1139///
1156
1157///
1158/// Part 2, section 11.3 TPM_QUOTE_INFO Structure
1159///
1166
1167///
1168/// Part 2, section 11.4 TPM_QUOTE_INFO2 Structure
1169///
1176
1177//
1178// Part 2, section 12: Identity Structures
1179//
1180
1181///
1182/// Part 2, section 12.1 TPM_EK_BLOB
1183///
1190
1191///
1192/// Part 2, section 12.2 TPM_EK_BLOB_ACTIVATE
1193///
1200
1201///
1202/// Part 2, section 12.3 TPM_EK_BLOB_AUTH
1203///
1208
1209///
1210/// Part 2, section 12.5 TPM_IDENTITY_CONTENTS
1211///
1218
1219///
1220/// Part 2, section 12.6 TPM_IDENTITY_REQ
1221///
1230
1231///
1232/// Part 2, section 12.7 TPM_IDENTITY_PROOF
1233///
1248
1249///
1250/// Part 2, section 12.8 TPM_ASYM_CA_CONTENTS
1251///
1256
1257///
1258/// Part 2, section 12.9 TPM_SYM_CA_ATTESTATION
1259///
1265
1266///
1267/// Part 2, section 15: Tick Structures
1268/// Placed here out of order because definitions are used in section 13.
1269///
1276
1277///
1278/// Part 2, section 13: Transport structures
1279///
1280
1281///
1282/// Part 2, section 13.1: TPM _TRANSPORT_PUBLIC
1283///
1290
1291//
1292// Part 2, section 13.1.1 TPM_TRANSPORT_ATTRIBUTES Definitions
1293//
1294#define TPM_TRANSPORT_ENCRYPT ((UINT32)BIT0)
1295#define TPM_TRANSPORT_LOG ((UINT32)BIT1)
1296#define TPM_TRANSPORT_EXCLUSIVE ((UINT32)BIT2)
1297
1298///
1299/// Part 2, section 13.2 TPM_TRANSPORT_INTERNAL
1300///
1309
1310///
1311/// Part 2, section 13.3 TPM_TRANSPORT_LOG_IN structure
1312///
1318
1319///
1320/// Part 2, section 13.4 TPM_TRANSPORT_LOG_OUT structure
1321///
1328
1329///
1330/// Part 2, section 13.5 TPM_TRANSPORT_AUTH structure
1331///
1336
1337//
1338// Part 2, section 14: Audit Structures
1339//
1340
1341///
1342/// Part 2, section 14.1 TPM_AUDIT_EVENT_IN structure
1343///
1349
1350///
1351/// Part 2, section 14.2 TPM_AUDIT_EVENT_OUT structure
1352///
1360
1361//
1362// Part 2, section 16: Return Codes
1363//
1364
1365#define TPM_VENDOR_ERROR TPM_Vendor_Specific32
1366#define TPM_NON_FATAL 0x00000800
1367
1368#define TPM_SUCCESS ((TPM_RESULT) TPM_BASE)
1369#define TPM_AUTHFAIL ((TPM_RESULT) (TPM_BASE + 1))
1370#define TPM_BADINDEX ((TPM_RESULT) (TPM_BASE + 2))
1371#define TPM_BAD_PARAMETER ((TPM_RESULT) (TPM_BASE + 3))
1372#define TPM_AUDITFAILURE ((TPM_RESULT) (TPM_BASE + 4))
1373#define TPM_CLEAR_DISABLED ((TPM_RESULT) (TPM_BASE + 5))
1374#define TPM_DEACTIVATED ((TPM_RESULT) (TPM_BASE + 6))
1375#define TPM_DISABLED ((TPM_RESULT) (TPM_BASE + 7))
1376#define TPM_DISABLED_CMD ((TPM_RESULT) (TPM_BASE + 8))
1377#define TPM_FAIL ((TPM_RESULT) (TPM_BASE + 9))
1378#define TPM_BAD_ORDINAL ((TPM_RESULT) (TPM_BASE + 10))
1379#define TPM_INSTALL_DISABLED ((TPM_RESULT) (TPM_BASE + 11))
1380#define TPM_INVALID_KEYHANDLE ((TPM_RESULT) (TPM_BASE + 12))
1381#define TPM_KEYNOTFOUND ((TPM_RESULT) (TPM_BASE + 13))
1382#define TPM_INAPPROPRIATE_ENC ((TPM_RESULT) (TPM_BASE + 14))
1383#define TPM_MIGRATEFAIL ((TPM_RESULT) (TPM_BASE + 15))
1384#define TPM_INVALID_PCR_INFO ((TPM_RESULT) (TPM_BASE + 16))
1385#define TPM_NOSPACE ((TPM_RESULT) (TPM_BASE + 17))
1386#define TPM_NOSRK ((TPM_RESULT) (TPM_BASE + 18))
1387#define TPM_NOTSEALED_BLOB ((TPM_RESULT) (TPM_BASE + 19))
1388#define TPM_OWNER_SET ((TPM_RESULT) (TPM_BASE + 20))
1389#define TPM_RESOURCES ((TPM_RESULT) (TPM_BASE + 21))
1390#define TPM_SHORTRANDOM ((TPM_RESULT) (TPM_BASE + 22))
1391#define TPM_SIZE ((TPM_RESULT) (TPM_BASE + 23))
1392#define TPM_WRONGPCRVAL ((TPM_RESULT) (TPM_BASE + 24))
1393#define TPM_BAD_PARAM_SIZE ((TPM_RESULT) (TPM_BASE + 25))
1394#define TPM_SHA_THREAD ((TPM_RESULT) (TPM_BASE + 26))
1395#define TPM_SHA_ERROR ((TPM_RESULT) (TPM_BASE + 27))
1396#define TPM_FAILEDSELFTEST ((TPM_RESULT) (TPM_BASE + 28))
1397#define TPM_AUTH2FAIL ((TPM_RESULT) (TPM_BASE + 29))
1398#define TPM_BADTAG ((TPM_RESULT) (TPM_BASE + 30))
1399#define TPM_IOERROR ((TPM_RESULT) (TPM_BASE + 31))
1400#define TPM_ENCRYPT_ERROR ((TPM_RESULT) (TPM_BASE + 32))
1401#define TPM_DECRYPT_ERROR ((TPM_RESULT) (TPM_BASE + 33))
1402#define TPM_INVALID_AUTHHANDLE ((TPM_RESULT) (TPM_BASE + 34))
1403#define TPM_NO_ENDORSEMENT ((TPM_RESULT) (TPM_BASE + 35))
1404#define TPM_INVALID_KEYUSAGE ((TPM_RESULT) (TPM_BASE + 36))
1405#define TPM_WRONG_ENTITYTYPE ((TPM_RESULT) (TPM_BASE + 37))
1406#define TPM_INVALID_POSTINIT ((TPM_RESULT) (TPM_BASE + 38))
1407#define TPM_INAPPROPRIATE_SIG ((TPM_RESULT) (TPM_BASE + 39))
1408#define TPM_BAD_KEY_PROPERTY ((TPM_RESULT) (TPM_BASE + 40))
1409#define TPM_BAD_MIGRATION ((TPM_RESULT) (TPM_BASE + 41))
1410#define TPM_BAD_SCHEME ((TPM_RESULT) (TPM_BASE + 42))
1411#define TPM_BAD_DATASIZE ((TPM_RESULT) (TPM_BASE + 43))
1412#define TPM_BAD_MODE ((TPM_RESULT) (TPM_BASE + 44))
1413#define TPM_BAD_PRESENCE ((TPM_RESULT) (TPM_BASE + 45))
1414#define TPM_BAD_VERSION ((TPM_RESULT) (TPM_BASE + 46))
1415#define TPM_NO_WRAP_TRANSPORT ((TPM_RESULT) (TPM_BASE + 47))
1416#define TPM_AUDITFAIL_UNSUCCESSFUL ((TPM_RESULT) (TPM_BASE + 48))
1417#define TPM_AUDITFAIL_SUCCESSFUL ((TPM_RESULT) (TPM_BASE + 49))
1418#define TPM_NOTRESETABLE ((TPM_RESULT) (TPM_BASE + 50))
1419#define TPM_NOTLOCAL ((TPM_RESULT) (TPM_BASE + 51))
1420#define TPM_BAD_TYPE ((TPM_RESULT) (TPM_BASE + 52))
1421#define TPM_INVALID_RESOURCE ((TPM_RESULT) (TPM_BASE + 53))
1422#define TPM_NOTFIPS ((TPM_RESULT) (TPM_BASE + 54))
1423#define TPM_INVALID_FAMILY ((TPM_RESULT) (TPM_BASE + 55))
1424#define TPM_NO_NV_PERMISSION ((TPM_RESULT) (TPM_BASE + 56))
1425#define TPM_REQUIRES_SIGN ((TPM_RESULT) (TPM_BASE + 57))
1426#define TPM_KEY_NOTSUPPORTED ((TPM_RESULT) (TPM_BASE + 58))
1427#define TPM_AUTH_CONFLICT ((TPM_RESULT) (TPM_BASE + 59))
1428#define TPM_AREA_LOCKED ((TPM_RESULT) (TPM_BASE + 60))
1429#define TPM_BAD_LOCALITY ((TPM_RESULT) (TPM_BASE + 61))
1430#define TPM_READ_ONLY ((TPM_RESULT) (TPM_BASE + 62))
1431#define TPM_PER_NOWRITE ((TPM_RESULT) (TPM_BASE + 63))
1432#define TPM_FAMILYCOUNT ((TPM_RESULT) (TPM_BASE + 64))
1433#define TPM_WRITE_LOCKED ((TPM_RESULT) (TPM_BASE + 65))
1434#define TPM_BAD_ATTRIBUTES ((TPM_RESULT) (TPM_BASE + 66))
1435#define TPM_INVALID_STRUCTURE ((TPM_RESULT) (TPM_BASE + 67))
1436#define TPM_KEY_OWNER_CONTROL ((TPM_RESULT) (TPM_BASE + 68))
1437#define TPM_BAD_COUNTER ((TPM_RESULT) (TPM_BASE + 69))
1438#define TPM_NOT_FULLWRITE ((TPM_RESULT) (TPM_BASE + 70))
1439#define TPM_CONTEXT_GAP ((TPM_RESULT) (TPM_BASE + 71))
1440#define TPM_MAXNVWRITES ((TPM_RESULT) (TPM_BASE + 72))
1441#define TPM_NOOPERATOR ((TPM_RESULT) (TPM_BASE + 73))
1442#define TPM_RESOURCEMISSING ((TPM_RESULT) (TPM_BASE + 74))
1443#define TPM_DELEGATE_LOCK ((TPM_RESULT) (TPM_BASE + 75))
1444#define TPM_DELEGATE_FAMILY ((TPM_RESULT) (TPM_BASE + 76))
1445#define TPM_DELEGATE_ADMIN ((TPM_RESULT) (TPM_BASE + 77))
1446#define TPM_TRANSPORT_NOTEXCLUSIVE ((TPM_RESULT) (TPM_BASE + 78))
1447#define TPM_OWNER_CONTROL ((TPM_RESULT) (TPM_BASE + 79))
1448#define TPM_DAA_RESOURCES ((TPM_RESULT) (TPM_BASE + 80))
1449#define TPM_DAA_INPUT_DATA0 ((TPM_RESULT) (TPM_BASE + 81))
1450#define TPM_DAA_INPUT_DATA1 ((TPM_RESULT) (TPM_BASE + 82))
1451#define TPM_DAA_ISSUER_SETTINGS ((TPM_RESULT) (TPM_BASE + 83))
1452#define TPM_DAA_TPM_SETTINGS ((TPM_RESULT) (TPM_BASE + 84))
1453#define TPM_DAA_STAGE ((TPM_RESULT) (TPM_BASE + 85))
1454#define TPM_DAA_ISSUER_VALIDITY ((TPM_RESULT) (TPM_BASE + 86))
1455#define TPM_DAA_WRONG_W ((TPM_RESULT) (TPM_BASE + 87))
1456#define TPM_BAD_HANDLE ((TPM_RESULT) (TPM_BASE + 88))
1457#define TPM_BAD_DELEGATE ((TPM_RESULT) (TPM_BASE + 89))
1458#define TPM_BADCONTEXT ((TPM_RESULT) (TPM_BASE + 90))
1459#define TPM_TOOMANYCONTEXTS ((TPM_RESULT) (TPM_BASE + 91))
1460#define TPM_MA_TICKET_SIGNATURE ((TPM_RESULT) (TPM_BASE + 92))
1461#define TPM_MA_DESTINATION ((TPM_RESULT) (TPM_BASE + 93))
1462#define TPM_MA_SOURCE ((TPM_RESULT) (TPM_BASE + 94))
1463#define TPM_MA_AUTHORITY ((TPM_RESULT) (TPM_BASE + 95))
1464#define TPM_PERMANENTEK ((TPM_RESULT) (TPM_BASE + 97))
1465#define TPM_BAD_SIGNATURE ((TPM_RESULT) (TPM_BASE + 98))
1466#define TPM_NOCONTEXTSPACE ((TPM_RESULT) (TPM_BASE + 99))
1467
1468#define TPM_RETRY ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL))
1469#define TPM_NEEDS_SELFTEST ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 1))
1470#define TPM_DOING_SELFTEST ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 2))
1471#define TPM_DEFEND_LOCK_RUNNING ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 3))
1472
1473//
1474// Part 2, section 17: Ordinals
1475//
1476// Ordinals are 32 bit values. The upper byte contains values that serve as
1477// flag indicators, the next byte contains values indicating what committee
1478// designated the ordinal, and the final two bytes contain the Command
1479// Ordinal Index.
1480// 3 2 1
1481// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
1482// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1483// |P|C|V| Reserved| Purview | Command Ordinal Index |
1484// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1485//
1486// Where:
1487//
1488// * P is Protected/Unprotected command. When 0 the command is a Protected
1489// command, when 1 the command is an Unprotected command.
1490//
1491// * C is Non-Connection/Connection related command. When 0 this command
1492// passes through to either the protected (TPM) or unprotected (TSS)
1493// components.
1494//
1495// * V is TPM/Vendor command. When 0 the command is TPM defined, when 1 the
1496// command is vendor defined.
1497//
1498// * All reserved area bits are set to 0.
1499//
1500
1501#define TPM_ORD_ActivateIdentity ((TPM_COMMAND_CODE) 0x0000007A)
1502#define TPM_ORD_AuthorizeMigrationKey ((TPM_COMMAND_CODE) 0x0000002B)
1503#define TPM_ORD_CertifyKey ((TPM_COMMAND_CODE) 0x00000032)
1504#define TPM_ORD_CertifyKey2 ((TPM_COMMAND_CODE) 0x00000033)
1505#define TPM_ORD_CertifySelfTest ((TPM_COMMAND_CODE) 0x00000052)
1506#define TPM_ORD_ChangeAuth ((TPM_COMMAND_CODE) 0x0000000C)
1507#define TPM_ORD_ChangeAuthAsymFinish ((TPM_COMMAND_CODE) 0x0000000F)
1508#define TPM_ORD_ChangeAuthAsymStart ((TPM_COMMAND_CODE) 0x0000000E)
1509#define TPM_ORD_ChangeAuthOwner ((TPM_COMMAND_CODE) 0x00000010)
1510#define TPM_ORD_CMK_ApproveMA ((TPM_COMMAND_CODE) 0x0000001D)
1511#define TPM_ORD_CMK_ConvertMigration ((TPM_COMMAND_CODE) 0x00000024)
1512#define TPM_ORD_CMK_CreateBlob ((TPM_COMMAND_CODE) 0x0000001B)
1513#define TPM_ORD_CMK_CreateKey ((TPM_COMMAND_CODE) 0x00000013)
1514#define TPM_ORD_CMK_CreateTicket ((TPM_COMMAND_CODE) 0x00000012)
1515#define TPM_ORD_CMK_SetRestrictions ((TPM_COMMAND_CODE) 0x0000001C)
1516#define TPM_ORD_ContinueSelfTest ((TPM_COMMAND_CODE) 0x00000053)
1517#define TPM_ORD_ConvertMigrationBlob ((TPM_COMMAND_CODE) 0x0000002A)
1518#define TPM_ORD_CreateCounter ((TPM_COMMAND_CODE) 0x000000DC)
1519#define TPM_ORD_CreateEndorsementKeyPair ((TPM_COMMAND_CODE) 0x00000078)
1520#define TPM_ORD_CreateMaintenanceArchive ((TPM_COMMAND_CODE) 0x0000002C)
1521#define TPM_ORD_CreateMigrationBlob ((TPM_COMMAND_CODE) 0x00000028)
1522#define TPM_ORD_CreateRevocableEK ((TPM_COMMAND_CODE) 0x0000007F)
1523#define TPM_ORD_CreateWrapKey ((TPM_COMMAND_CODE) 0x0000001F)
1524#define TPM_ORD_DAA_JOIN ((TPM_COMMAND_CODE) 0x00000029)
1525#define TPM_ORD_DAA_SIGN ((TPM_COMMAND_CODE) 0x00000031)
1526#define TPM_ORD_Delegate_CreateKeyDelegation ((TPM_COMMAND_CODE) 0x000000D4)
1527#define TPM_ORD_Delegate_CreateOwnerDelegation ((TPM_COMMAND_CODE) 0x000000D5)
1528#define TPM_ORD_Delegate_LoadOwnerDelegation ((TPM_COMMAND_CODE) 0x000000D8)
1529#define TPM_ORD_Delegate_Manage ((TPM_COMMAND_CODE) 0x000000D2)
1530#define TPM_ORD_Delegate_ReadTable ((TPM_COMMAND_CODE) 0x000000DB)
1531#define TPM_ORD_Delegate_UpdateVerification ((TPM_COMMAND_CODE) 0x000000D1)
1532#define TPM_ORD_Delegate_VerifyDelegation ((TPM_COMMAND_CODE) 0x000000D6)
1533#define TPM_ORD_DirRead ((TPM_COMMAND_CODE) 0x0000001A)
1534#define TPM_ORD_DirWriteAuth ((TPM_COMMAND_CODE) 0x00000019)
1535#define TPM_ORD_DisableForceClear ((TPM_COMMAND_CODE) 0x0000005E)
1536#define TPM_ORD_DisableOwnerClear ((TPM_COMMAND_CODE) 0x0000005C)
1537#define TPM_ORD_DisablePubekRead ((TPM_COMMAND_CODE) 0x0000007E)
1538#define TPM_ORD_DSAP ((TPM_COMMAND_CODE) 0x00000011)
1539#define TPM_ORD_EstablishTransport ((TPM_COMMAND_CODE) 0x000000E6)
1540#define TPM_ORD_EvictKey ((TPM_COMMAND_CODE) 0x00000022)
1541#define TPM_ORD_ExecuteTransport ((TPM_COMMAND_CODE) 0x000000E7)
1542#define TPM_ORD_Extend ((TPM_COMMAND_CODE) 0x00000014)
1543#define TPM_ORD_FieldUpgrade ((TPM_COMMAND_CODE) 0x000000AA)
1544#define TPM_ORD_FlushSpecific ((TPM_COMMAND_CODE) 0x000000BA)
1545#define TPM_ORD_ForceClear ((TPM_COMMAND_CODE) 0x0000005D)
1546#define TPM_ORD_GetAuditDigest ((TPM_COMMAND_CODE) 0x00000085)
1547#define TPM_ORD_GetAuditDigestSigned ((TPM_COMMAND_CODE) 0x00000086)
1548#define TPM_ORD_GetAuditEvent ((TPM_COMMAND_CODE) 0x00000082)
1549#define TPM_ORD_GetAuditEventSigned ((TPM_COMMAND_CODE) 0x00000083)
1550#define TPM_ORD_GetCapability ((TPM_COMMAND_CODE) 0x00000065)
1551#define TPM_ORD_GetCapabilityOwner ((TPM_COMMAND_CODE) 0x00000066)
1552#define TPM_ORD_GetCapabilitySigned ((TPM_COMMAND_CODE) 0x00000064)
1553#define TPM_ORD_GetOrdinalAuditStatus ((TPM_COMMAND_CODE) 0x0000008C)
1554#define TPM_ORD_GetPubKey ((TPM_COMMAND_CODE) 0x00000021)
1555#define TPM_ORD_GetRandom ((TPM_COMMAND_CODE) 0x00000046)
1556#define TPM_ORD_GetTestResult ((TPM_COMMAND_CODE) 0x00000054)
1557#define TPM_ORD_GetTicks ((TPM_COMMAND_CODE) 0x000000F1)
1558#define TPM_ORD_IncrementCounter ((TPM_COMMAND_CODE) 0x000000DD)
1559#define TPM_ORD_Init ((TPM_COMMAND_CODE) 0x00000097)
1560#define TPM_ORD_KeyControlOwner ((TPM_COMMAND_CODE) 0x00000023)
1561#define TPM_ORD_KillMaintenanceFeature ((TPM_COMMAND_CODE) 0x0000002E)
1562#define TPM_ORD_LoadAuthContext ((TPM_COMMAND_CODE) 0x000000B7)
1563#define TPM_ORD_LoadContext ((TPM_COMMAND_CODE) 0x000000B9)
1564#define TPM_ORD_LoadKey ((TPM_COMMAND_CODE) 0x00000020)
1565#define TPM_ORD_LoadKey2 ((TPM_COMMAND_CODE) 0x00000041)
1566#define TPM_ORD_LoadKeyContext ((TPM_COMMAND_CODE) 0x000000B5)
1567#define TPM_ORD_LoadMaintenanceArchive ((TPM_COMMAND_CODE) 0x0000002D)
1568#define TPM_ORD_LoadManuMaintPub ((TPM_COMMAND_CODE) 0x0000002F)
1569#define TPM_ORD_MakeIdentity ((TPM_COMMAND_CODE) 0x00000079)
1570#define TPM_ORD_MigrateKey ((TPM_COMMAND_CODE) 0x00000025)
1571#define TPM_ORD_NV_DefineSpace ((TPM_COMMAND_CODE) 0x000000CC)
1572#define TPM_ORD_NV_ReadValue ((TPM_COMMAND_CODE) 0x000000CF)
1573#define TPM_ORD_NV_ReadValueAuth ((TPM_COMMAND_CODE) 0x000000D0)
1574#define TPM_ORD_NV_WriteValue ((TPM_COMMAND_CODE) 0x000000CD)
1575#define TPM_ORD_NV_WriteValueAuth ((TPM_COMMAND_CODE) 0x000000CE)
1576#define TPM_ORD_OIAP ((TPM_COMMAND_CODE) 0x0000000A)
1577#define TPM_ORD_OSAP ((TPM_COMMAND_CODE) 0x0000000B)
1578#define TPM_ORD_OwnerClear ((TPM_COMMAND_CODE) 0x0000005B)
1579#define TPM_ORD_OwnerReadInternalPub ((TPM_COMMAND_CODE) 0x00000081)
1580#define TPM_ORD_OwnerReadPubek ((TPM_COMMAND_CODE) 0x0000007D)
1581#define TPM_ORD_OwnerSetDisable ((TPM_COMMAND_CODE) 0x0000006E)
1582#define TPM_ORD_PCR_Reset ((TPM_COMMAND_CODE) 0x000000C8)
1583#define TPM_ORD_PcrRead ((TPM_COMMAND_CODE) 0x00000015)
1584#define TPM_ORD_PhysicalDisable ((TPM_COMMAND_CODE) 0x00000070)
1585#define TPM_ORD_PhysicalEnable ((TPM_COMMAND_CODE) 0x0000006F)
1586#define TPM_ORD_PhysicalSetDeactivated ((TPM_COMMAND_CODE) 0x00000072)
1587#define TPM_ORD_Quote ((TPM_COMMAND_CODE) 0x00000016)
1588#define TPM_ORD_Quote2 ((TPM_COMMAND_CODE) 0x0000003E)
1589#define TPM_ORD_ReadCounter ((TPM_COMMAND_CODE) 0x000000DE)
1590#define TPM_ORD_ReadManuMaintPub ((TPM_COMMAND_CODE) 0x00000030)
1591#define TPM_ORD_ReadPubek ((TPM_COMMAND_CODE) 0x0000007C)
1592#define TPM_ORD_ReleaseCounter ((TPM_COMMAND_CODE) 0x000000DF)
1593#define TPM_ORD_ReleaseCounterOwner ((TPM_COMMAND_CODE) 0x000000E0)
1594#define TPM_ORD_ReleaseTransportSigned ((TPM_COMMAND_CODE) 0x000000E8)
1595#define TPM_ORD_Reset ((TPM_COMMAND_CODE) 0x0000005A)
1596#define TPM_ORD_ResetLockValue ((TPM_COMMAND_CODE) 0x00000040)
1597#define TPM_ORD_RevokeTrust ((TPM_COMMAND_CODE) 0x00000080)
1598#define TPM_ORD_SaveAuthContext ((TPM_COMMAND_CODE) 0x000000B6)
1599#define TPM_ORD_SaveContext ((TPM_COMMAND_CODE) 0x000000B8)
1600#define TPM_ORD_SaveKeyContext ((TPM_COMMAND_CODE) 0x000000B4)
1601#define TPM_ORD_SaveState ((TPM_COMMAND_CODE) 0x00000098)
1602#define TPM_ORD_Seal ((TPM_COMMAND_CODE) 0x00000017)
1603#define TPM_ORD_Sealx ((TPM_COMMAND_CODE) 0x0000003D)
1604#define TPM_ORD_SelfTestFull ((TPM_COMMAND_CODE) 0x00000050)
1605#define TPM_ORD_SetCapability ((TPM_COMMAND_CODE) 0x0000003F)
1606#define TPM_ORD_SetOperatorAuth ((TPM_COMMAND_CODE) 0x00000074)
1607#define TPM_ORD_SetOrdinalAuditStatus ((TPM_COMMAND_CODE) 0x0000008D)
1608#define TPM_ORD_SetOwnerInstall ((TPM_COMMAND_CODE) 0x00000071)
1609#define TPM_ORD_SetOwnerPointer ((TPM_COMMAND_CODE) 0x00000075)
1610#define TPM_ORD_SetRedirection ((TPM_COMMAND_CODE) 0x0000009A)
1611#define TPM_ORD_SetTempDeactivated ((TPM_COMMAND_CODE) 0x00000073)
1612#define TPM_ORD_SHA1Complete ((TPM_COMMAND_CODE) 0x000000A2)
1613#define TPM_ORD_SHA1CompleteExtend ((TPM_COMMAND_CODE) 0x000000A3)
1614#define TPM_ORD_SHA1Start ((TPM_COMMAND_CODE) 0x000000A0)
1615#define TPM_ORD_SHA1Update ((TPM_COMMAND_CODE) 0x000000A1)
1616#define TPM_ORD_Sign ((TPM_COMMAND_CODE) 0x0000003C)
1617#define TPM_ORD_Startup ((TPM_COMMAND_CODE) 0x00000099)
1618#define TPM_ORD_StirRandom ((TPM_COMMAND_CODE) 0x00000047)
1619#define TPM_ORD_TakeOwnership ((TPM_COMMAND_CODE) 0x0000000D)
1620#define TPM_ORD_Terminate_Handle ((TPM_COMMAND_CODE) 0x00000096)
1621#define TPM_ORD_TickStampBlob ((TPM_COMMAND_CODE) 0x000000F2)
1622#define TPM_ORD_UnBind ((TPM_COMMAND_CODE) 0x0000001E)
1623#define TPM_ORD_Unseal ((TPM_COMMAND_CODE) 0x00000018)
1624#define TSC_ORD_PhysicalPresence ((TPM_COMMAND_CODE) 0x4000000A)
1625#define TSC_ORD_ResetEstablishmentBit ((TPM_COMMAND_CODE) 0x4000000B)
1626
1627//
1628// Part 2, section 18: Context structures
1629//
1630
1631///
1632/// Part 2, section 18.1: TPM_CONTEXT_BLOB
1633///
1646
1647///
1648/// Part 2, section 18.2 TPM_CONTEXT_SENSITIVE
1649///
1656
1657//
1658// Part 2, section 19: NV Structures
1659//
1660
1661//
1662// Part 2, section 19.1.1: Required TPM_NV_INDEX values
1663//
1664#define TPM_NV_INDEX_LOCK ((UINT32)0xffffffff)
1665#define TPM_NV_INDEX0 ((UINT32)0x00000000)
1666#define TPM_NV_INDEX_DIR ((UINT32)0x10000001)
1667#define TPM_NV_INDEX_EKCert ((UINT32)0x0000f000)
1668#define TPM_NV_INDEX_TPM_CC ((UINT32)0x0000f001)
1669#define TPM_NV_INDEX_PlatformCert ((UINT32)0x0000f002)
1670#define TPM_NV_INDEX_Platform_CC ((UINT32)0x0000f003)
1671//
1672// Part 2, section 19.1.2: Reserved Index values
1673//
1674#define TPM_NV_INDEX_TSS_BASE ((UINT32)0x00011100)
1675#define TPM_NV_INDEX_PC_BASE ((UINT32)0x00011200)
1676#define TPM_NV_INDEX_SERVER_BASE ((UINT32)0x00011300)
1677#define TPM_NV_INDEX_MOBILE_BASE ((UINT32)0x00011400)
1678#define TPM_NV_INDEX_PERIPHERAL_BASE ((UINT32)0x00011500)
1679#define TPM_NV_INDEX_GROUP_RESV_BASE ((UINT32)0x00010000)
1680
1681///
1682/// Part 2, section 19.2: TPM_NV_ATTRIBUTES
1683///
1688
1689#define TPM_NV_PER_READ_STCLEAR (BIT31)
1690#define TPM_NV_PER_AUTHREAD (BIT18)
1691#define TPM_NV_PER_OWNERREAD (BIT17)
1692#define TPM_NV_PER_PPREAD (BIT16)
1693#define TPM_NV_PER_GLOBALLOCK (BIT15)
1694#define TPM_NV_PER_WRITE_STCLEAR (BIT14)
1695#define TPM_NV_PER_WRITEDEFINE (BIT13)
1696#define TPM_NV_PER_WRITEALL (BIT12)
1697#define TPM_NV_PER_AUTHWRITE (BIT2)
1698#define TPM_NV_PER_OWNERWRITE (BIT1)
1699#define TPM_NV_PER_PPWRITE (BIT0)
1700
1701///
1702/// Part 2, section 19.3: TPM_NV_DATA_PUBLIC
1703///
1715
1716//
1717// Part 2, section 20: Delegate Structures
1718//
1719
1720#define TPM_DEL_OWNER_BITS ((UINT32)0x00000001)
1721#define TPM_DEL_KEY_BITS ((UINT32)0x00000002)
1722///
1723/// Part 2, section 20.2: Delegate Definitions
1724///
1731
1732//
1733// Part 2, section 20.2.1: Owner Permission Settings
1734//
1735#define TPM_DELEGATE_SetOrdinalAuditStatus (BIT30)
1736#define TPM_DELEGATE_DirWriteAuth (BIT29)
1737#define TPM_DELEGATE_CMK_ApproveMA (BIT28)
1738#define TPM_DELEGATE_NV_WriteValue (BIT27)
1739#define TPM_DELEGATE_CMK_CreateTicket (BIT26)
1740#define TPM_DELEGATE_NV_ReadValue (BIT25)
1741#define TPM_DELEGATE_Delegate_LoadOwnerDelegation (BIT24)
1742#define TPM_DELEGATE_DAA_Join (BIT23)
1743#define TPM_DELEGATE_AuthorizeMigrationKey (BIT22)
1744#define TPM_DELEGATE_CreateMaintenanceArchive (BIT21)
1745#define TPM_DELEGATE_LoadMaintenanceArchive (BIT20)
1746#define TPM_DELEGATE_KillMaintenanceFeature (BIT19)
1747#define TPM_DELEGATE_OwnerReadInteralPub (BIT18)
1748#define TPM_DELEGATE_ResetLockValue (BIT17)
1749#define TPM_DELEGATE_OwnerClear (BIT16)
1750#define TPM_DELEGATE_DisableOwnerClear (BIT15)
1751#define TPM_DELEGATE_NV_DefineSpace (BIT14)
1752#define TPM_DELEGATE_OwnerSetDisable (BIT13)
1753#define TPM_DELEGATE_SetCapability (BIT12)
1754#define TPM_DELEGATE_MakeIdentity (BIT11)
1755#define TPM_DELEGATE_ActivateIdentity (BIT10)
1756#define TPM_DELEGATE_OwnerReadPubek (BIT9)
1757#define TPM_DELEGATE_DisablePubekRead (BIT8)
1758#define TPM_DELEGATE_SetRedirection (BIT7)
1759#define TPM_DELEGATE_FieldUpgrade (BIT6)
1760#define TPM_DELEGATE_Delegate_UpdateVerification (BIT5)
1761#define TPM_DELEGATE_CreateCounter (BIT4)
1762#define TPM_DELEGATE_ReleaseCounterOwner (BIT3)
1763#define TPM_DELEGATE_DelegateManage (BIT2)
1764#define TPM_DELEGATE_Delegate_CreateOwnerDelegation (BIT1)
1765#define TPM_DELEGATE_DAA_Sign (BIT0)
1766
1767//
1768// Part 2, section 20.2.3: Key Permission settings
1769//
1770#define TPM_KEY_DELEGATE_CMK_ConvertMigration (BIT28)
1771#define TPM_KEY_DELEGATE_TickStampBlob (BIT27)
1772#define TPM_KEY_DELEGATE_ChangeAuthAsymStart (BIT26)
1773#define TPM_KEY_DELEGATE_ChangeAuthAsymFinish (BIT25)
1774#define TPM_KEY_DELEGATE_CMK_CreateKey (BIT24)
1775#define TPM_KEY_DELEGATE_MigrateKey (BIT23)
1776#define TPM_KEY_DELEGATE_LoadKey2 (BIT22)
1777#define TPM_KEY_DELEGATE_EstablishTransport (BIT21)
1778#define TPM_KEY_DELEGATE_ReleaseTransportSigned (BIT20)
1779#define TPM_KEY_DELEGATE_Quote2 (BIT19)
1780#define TPM_KEY_DELEGATE_Sealx (BIT18)
1781#define TPM_KEY_DELEGATE_MakeIdentity (BIT17)
1782#define TPM_KEY_DELEGATE_ActivateIdentity (BIT16)
1783#define TPM_KEY_DELEGATE_GetAuditDigestSigned (BIT15)
1784#define TPM_KEY_DELEGATE_Sign (BIT14)
1785#define TPM_KEY_DELEGATE_CertifyKey2 (BIT13)
1786#define TPM_KEY_DELEGATE_CertifyKey (BIT12)
1787#define TPM_KEY_DELEGATE_CreateWrapKey (BIT11)
1788#define TPM_KEY_DELEGATE_CMK_CreateBlob (BIT10)
1789#define TPM_KEY_DELEGATE_CreateMigrationBlob (BIT9)
1790#define TPM_KEY_DELEGATE_ConvertMigrationBlob (BIT8)
1791#define TPM_KEY_DELEGATE_CreateKeyDelegation (BIT7)
1792#define TPM_KEY_DELEGATE_ChangeAuth (BIT6)
1793#define TPM_KEY_DELEGATE_GetPubKey (BIT5)
1794#define TPM_KEY_DELEGATE_UnBind (BIT4)
1795#define TPM_KEY_DELEGATE_Quote (BIT3)
1796#define TPM_KEY_DELEGATE_Unseal (BIT2)
1797#define TPM_KEY_DELEGATE_Seal (BIT1)
1798#define TPM_KEY_DELEGATE_LoadKey (BIT0)
1799
1800//
1801// Part 2, section 20.3: TPM_FAMILY_FLAGS
1802//
1803#define TPM_DELEGATE_ADMIN_LOCK (BIT1)
1804#define TPM_FAMFLAG_ENABLE (BIT0)
1805
1806///
1807/// Part 2, section 20.4: TPM_FAMILY_LABEL
1808///
1812
1813///
1814/// Part 2, section 20.5: TPM_FAMILY_TABLE_ENTRY
1815///
1823
1824//
1825// Part 2, section 20.6: TPM_FAMILY_TABLE
1826//
1827#define TPM_NUM_FAMILY_TABLE_ENTRY_MIN 8
1828
1832
1833///
1834/// Part 2, section 20.7: TPM_DELEGATE_LABEL
1835///
1839
1840///
1841/// Part 2, section 20.8: TPM_DELEGATE_PUBLIC
1842///
1851
1852///
1853/// Part 2, section 20.9: TPM_DELEGATE_TABLE_ROW
1854///
1860
1861//
1862// Part 2, section 20.10: TPM_DELEGATE_TABLE
1863//
1864#define TPM_NUM_DELEGATE_TABLE_ENTRY_MIN 2
1865
1869
1870///
1871/// Part 2, section 20.11: TPM_DELEGATE_SENSITIVE
1872///
1877
1878///
1879/// Part 2, section 20.12: TPM_DELEGATE_OWNER_BLOB
1880///
1890
1891///
1892/// Part 2, section 20.13: TTPM_DELEGATE_KEY_BLOB
1893///
1904
1905//
1906// Part 2, section 20.14: TPM_FAMILY_OPERATION Values
1907//
1908#define TPM_FAMILY_CREATE ((UINT32)0x00000001)
1909#define TPM_FAMILY_ENABLE ((UINT32)0x00000002)
1910#define TPM_FAMILY_ADMIN ((UINT32)0x00000003)
1911#define TPM_FAMILY_INVALIDATE ((UINT32)0x00000004)
1912
1913//
1914// Part 2, section 21.1: TPM_CAPABILITY_AREA for GetCapability
1915//
1916#define TPM_CAP_ORD ((TPM_CAPABILITY_AREA) 0x00000001)
1917#define TPM_CAP_ALG ((TPM_CAPABILITY_AREA) 0x00000002)
1918#define TPM_CAP_PID ((TPM_CAPABILITY_AREA) 0x00000003)
1919#define TPM_CAP_FLAG ((TPM_CAPABILITY_AREA) 0x00000004)
1920#define TPM_CAP_PROPERTY ((TPM_CAPABILITY_AREA) 0x00000005)
1921#define TPM_CAP_VERSION ((TPM_CAPABILITY_AREA) 0x00000006)
1922#define TPM_CAP_KEY_HANDLE ((TPM_CAPABILITY_AREA) 0x00000007)
1923#define TPM_CAP_CHECK_LOADED ((TPM_CAPABILITY_AREA) 0x00000008)
1924#define TPM_CAP_SYM_MODE ((TPM_CAPABILITY_AREA) 0x00000009)
1925#define TPM_CAP_KEY_STATUS ((TPM_CAPABILITY_AREA) 0x0000000C)
1926#define TPM_CAP_NV_LIST ((TPM_CAPABILITY_AREA) 0x0000000D)
1927#define TPM_CAP_MFR ((TPM_CAPABILITY_AREA) 0x00000010)
1928#define TPM_CAP_NV_INDEX ((TPM_CAPABILITY_AREA) 0x00000011)
1929#define TPM_CAP_TRANS_ALG ((TPM_CAPABILITY_AREA) 0x00000012)
1930#define TPM_CAP_HANDLE ((TPM_CAPABILITY_AREA) 0x00000014)
1931#define TPM_CAP_TRANS_ES ((TPM_CAPABILITY_AREA) 0x00000015)
1932#define TPM_CAP_AUTH_ENCRYPT ((TPM_CAPABILITY_AREA) 0x00000017)
1933#define TPM_CAP_SELECT_SIZE ((TPM_CAPABILITY_AREA) 0x00000018)
1934#define TPM_CAP_VERSION_VAL ((TPM_CAPABILITY_AREA) 0x0000001A)
1935
1936#define TPM_CAP_FLAG_PERMANENT ((TPM_CAPABILITY_AREA) 0x00000108)
1937#define TPM_CAP_FLAG_VOLATILE ((TPM_CAPABILITY_AREA) 0x00000109)
1938
1939//
1940// Part 2, section 21.2: CAP_PROPERTY Subcap values for GetCapability
1941//
1942#define TPM_CAP_PROP_PCR ((TPM_CAPABILITY_AREA) 0x00000101)
1943#define TPM_CAP_PROP_DIR ((TPM_CAPABILITY_AREA) 0x00000102)
1944#define TPM_CAP_PROP_MANUFACTURER ((TPM_CAPABILITY_AREA) 0x00000103)
1945#define TPM_CAP_PROP_KEYS ((TPM_CAPABILITY_AREA) 0x00000104)
1946#define TPM_CAP_PROP_MIN_COUNTER ((TPM_CAPABILITY_AREA) 0x00000107)
1947#define TPM_CAP_PROP_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010A)
1948#define TPM_CAP_PROP_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010B)
1949#define TPM_CAP_PROP_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010C)
1950#define TPM_CAP_PROP_MAX_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010D)
1951#define TPM_CAP_PROP_MAX_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010E)
1952#define TPM_CAP_PROP_MAX_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010F)
1953#define TPM_CAP_PROP_MAX_KEYS ((TPM_CAPABILITY_AREA) 0x00000110)
1954#define TPM_CAP_PROP_OWNER ((TPM_CAPABILITY_AREA) 0x00000111)
1955#define TPM_CAP_PROP_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000112)
1956#define TPM_CAP_PROP_MAX_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000113)
1957#define TPM_CAP_PROP_FAMILYROWS ((TPM_CAPABILITY_AREA) 0x00000114)
1958#define TPM_CAP_PROP_TIS_TIMEOUT ((TPM_CAPABILITY_AREA) 0x00000115)
1959#define TPM_CAP_PROP_STARTUP_EFFECT ((TPM_CAPABILITY_AREA) 0x00000116)
1960#define TPM_CAP_PROP_DELEGATE_ROW ((TPM_CAPABILITY_AREA) 0x00000117)
1961#define TPM_CAP_PROP_DAA_MAX ((TPM_CAPABILITY_AREA) 0x00000119)
1962#define CAP_PROP_SESSION_DAA ((TPM_CAPABILITY_AREA) 0x0000011A)
1963#define TPM_CAP_PROP_CONTEXT_DIST ((TPM_CAPABILITY_AREA) 0x0000011B)
1964#define TPM_CAP_PROP_DAA_INTERRUPT ((TPM_CAPABILITY_AREA) 0x0000011C)
1965#define TPM_CAP_PROP_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011D)
1966#define TPM_CAP_PROP_MAX_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011E)
1967#define TPM_CAP_PROP_CMK_RESTRICTION ((TPM_CAPABILITY_AREA) 0x0000011F)
1968#define TPM_CAP_PROP_DURATION ((TPM_CAPABILITY_AREA) 0x00000120)
1969#define TPM_CAP_PROP_ACTIVE_COUNTER ((TPM_CAPABILITY_AREA) 0x00000122)
1970#define TPM_CAP_PROP_MAX_NV_AVAILABLE ((TPM_CAPABILITY_AREA) 0x00000123)
1971#define TPM_CAP_PROP_INPUT_BUFFER ((TPM_CAPABILITY_AREA) 0x00000124)
1972
1973//
1974// Part 2, section 21.4: TPM_CAPABILITY_AREA for SetCapability
1975//
1976#define TPM_SET_PERM_FLAGS ((TPM_CAPABILITY_AREA) 0x00000001)
1977#define TPM_SET_PERM_DATA ((TPM_CAPABILITY_AREA) 0x00000002)
1978#define TPM_SET_STCLEAR_FLAGS ((TPM_CAPABILITY_AREA) 0x00000003)
1979#define TPM_SET_STCLEAR_DATA ((TPM_CAPABILITY_AREA) 0x00000004)
1980#define TPM_SET_STANY_FLAGS ((TPM_CAPABILITY_AREA) 0x00000005)
1981#define TPM_SET_STANY_DATA ((TPM_CAPABILITY_AREA) 0x00000006)
1982
1983///
1984/// Part 2, section 21.6: TPM_CAP_VERSION_INFO
1985/// [size_is(vendorSpecificSize)] BYTE* vendorSpecific;
1986///
1996
1997///
1998/// Part 2, section 21.10: TPM_DA_ACTION_TYPE
1999///
2004
2005#define TPM_DA_ACTION_FAILURE_MODE (((UINT32)1)<<3)
2006#define TPM_DA_ACTION_DEACTIVATE (((UINT32)1)<<2)
2007#define TPM_DA_ACTION_DISABLE (((UINT32)1)<<1)
2008#define TPM_DA_ACTION_TIMEOUT (((UINT32)1)<<0)
2009
2010///
2011/// Part 2, section 21.7: TPM_DA_INFO
2012///
2023
2024///
2025/// Part 2, section 21.8: TPM_DA_INFO_LIMITED
2026///
2034
2035//
2036// Part 2, section 21.9: CAP_PROPERTY Subcap values for GetCapability
2037//
2038#define TPM_DA_STATE_INACTIVE ((UINT8)0x00)
2039#define TPM_DA_STATE_ACTIVE ((UINT8)0x01)
2040
2041//
2042// Part 2, section 22: DAA Structures
2043//
2044
2045//
2046// Part 2, section 22.1: Size definitions
2047//
2048#define TPM_DAA_SIZE_r0 (43)
2049#define TPM_DAA_SIZE_r1 (43)
2050#define TPM_DAA_SIZE_r2 (128)
2051#define TPM_DAA_SIZE_r3 (168)
2052#define TPM_DAA_SIZE_r4 (219)
2053#define TPM_DAA_SIZE_NT (20)
2054#define TPM_DAA_SIZE_v0 (128)
2055#define TPM_DAA_SIZE_v1 (192)
2056#define TPM_DAA_SIZE_NE (256)
2057#define TPM_DAA_SIZE_w (256)
2058#define TPM_DAA_SIZE_issuerModulus (256)
2059//
2060// Part 2, section 22.2: Constant definitions
2061//
2062#define TPM_DAA_power0 (104)
2063#define TPM_DAA_power1 (1024)
2064
2065///
2066/// Part 2, section 22.3: TPM_DAA_ISSUER
2067///
2078
2079///
2080/// Part 2, section 22.4: TPM_DAA_TPM
2081///
2090
2091///
2092/// Part 2, section 22.5: TPM_DAA_CONTEXT
2093///
2102
2103///
2104/// Part 2, section 22.6: TPM_DAA_JOINDATA
2105///
2111
2112///
2113/// Part 2, section 22.8: TPM_DAA_BLOB
2114///
2125
2126///
2127/// Part 2, section 22.9: TPM_DAA_SENSITIVE
2128///
2134
2135//
2136// Part 2, section 23: Redirection
2137//
2138
2139///
2140/// Part 2 section 23.1: TPM_REDIR_COMMAND
2141/// This section defines exactly one value but does not
2142/// give it a name. The definition of TPM_SetRedirection in Part3
2143/// refers to exactly one name but does not give its value. We join
2144/// them here.
2145///
2146#define TPM_REDIR_GPIO (0x00000001)
2147
2148///
2149/// TPM Command Headers defined in Part 3
2150///
2156
2157///
2158/// TPM Response Headers defined in Part 3
2159///
2165
2166#pragma pack ()
2167
2168#endif
unsigned short UINT16
2-byte unsigned value.
unsigned char BOOLEAN
Logical Boolean.
unsigned long long UINT64
8-byte unsigned value.
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
UINT8 TPM_VERSION_BYTE
The version info breakdown.
Definition Tpm12.h:40
struct tdTPM_EK_BLOB TPM_EK_BLOB
Part 2, section 12.1 TPM_EK_BLOB.
TPM_AUTHDATA TPM_SECRET
A secret plaintext value used in the authorization process.
Definition Tpm12.h:499
UINT32 TPM_MODIFIER_INDICATOR
The locality modifier.
Definition Tpm12.h:112
struct tdTPM_KEY12 TPM_KEY12
Part 2, section 10.3: TPM_KEY12 [size_is(encDataSize)] BYTE* encData;.
struct tdTPM_PCR_COMPOSITE TPM_PCR_COMPOSITE
Part 2, section 8.2: TPM_PCR_COMPOSITE Size of pcrValue[] indicated by valueSize.
UINT16 TPM_STARTUP_TYPE
Indicates the start state.
Definition Tpm12.h:56
struct tdTPM_STCLEAR_FLAGS TPM_STCLEAR_FLAGS
Part 2, section 7.2: TPM_STCLEAR_FLAGS.
TPM_DIGEST TPM_DIRVALUE
This SHALL be the value of a DIR register.
Definition Tpm12.h:457
UINT32 TPM_RESOURCE_TYPE
The types of resources that a TPM may have using internal resources.
Definition Tpm12.h:144
struct tdTPM_DIGEST TPM_DIGEST
Part 2, section 5.4: TPM_DIGEST.
UINT16 TPM_MIGRATE_SCHEME
The definition of the migration scheme.
Definition Tpm12.h:68
struct tdTPM_PCR_ATTRIBUTES TPM_PCR_ATTRIBUTES
Part 2, section 8.8: TPM_PCR_ATTRIBUTES.
struct tdTPM_QUOTE_INFO TPM_QUOTE_INFO
Part 2, section 11.3 TPM_QUOTE_INFO Structure.
TPM_NONCE TPM_DAA_CONTEXT_SEED
This SHALL be a random value.
Definition Tpm12.h:484
struct tdTPM_MIGRATIONKEYAUTH TPM_MIGRATIONKEYAUTH
Part 2, section 5.12: TPM_MIGRATIONKEYAUTH.
struct tdTPM_EK_BLOB_AUTH TPM_EK_BLOB_AUTH
Part 2, section 12.3 TPM_EK_BLOB_AUTH.
UINT32 TPM_REDIT_COMMAND
A command to execute.
Definition Tpm12.h:190
TPM_DIGEST TPM_COMPOSITE_HASH
This SHALL be the hash of a list of PCR indexes and PCR values that a key or data is bound to.
Definition Tpm12.h:453
struct tdTPM_DELEGATE_TABLE TPM_DELEGATE_TABLE
struct tdTPM_SYMMETRIC_KEY TPM_SYMMETRIC_KEY
Part 2, section 9.4: TPM_SYMMETRIC_KEY [size_is(size)] BYTE* data;.
struct tdTPM_STANY_FLAGS TPM_STANY_FLAGS
Part 2, section 7.3: TPM_STANY_FLAGS.
UINT16 TPM_KEY_USAGE
Indicates the permitted usage of the key.
Definition Tpm12.h:80
struct tdTPM_CMK_SIGTICKET TPM_CMK_SIGTICKET
Part 2, section 5.20: TPM_CMK_SIGTICKET.
UINT8 tdTPM_AUTHDATA[20]
The AuthData data is the information that is saved or passed to provide proof of ownership 296 of an ...
Definition Tpm12.h:493
struct tdTPM_NV_DATA_PUBLIC TPM_NV_DATA_PUBLIC
Part 2, section 19.3: TPM_NV_DATA_PUBLIC.
struct tdTPM_STCLEAR_DATA TPM_STCLEAR_DATA
Part 2, section 7.5: TPM_STCLEAR_DATA available inside TPM only.
struct tdTPM_STRUCT_VER TPM_STRUCT_VER
Part 2, section 5.1: TPM_STRUCT_VER.
struct tdTPM_MIGRATE_ASYMKEY TPM_MIGRATE_ASYMKEY
Part 2, section 10.8: TPM_MIGRATE_ASYMKEY [size_is(partPrivKeyLen)] BYTE* partPrivKey;.
UINT32 TPM_ACTUAL_COUNT
The actual number of a counter.
Definition Tpm12.h:116
struct tdTPM_IDENTITY_PROOF TPM_IDENTITY_PROOF
Part 2, section 12.7 TPM_IDENTITY_PROOF.
UINT32 TPM_PCRINDEX
Index to a PCR register.
Definition Tpm12.h:136
struct tdTPM_PCR_SELECTION TPM_PCR_SELECTION
Part 2, section 8.1: TPM_PCR_SELECTION Size of pcrSelect[] indicated by sizeOfSelect.
struct tdTPM_DAA_SENSITIVE TPM_DAA_SENSITIVE
Part 2, section 22.9: TPM_DAA_SENSITIVE.
struct tdTPM_COUNTER_VALUE TPM_COUNTER_VALUE
Part 2, section 5.13: TPM_COUNTER_VALUE.
TPM_DIGEST TPM_AUDITDIGEST
This SHALL be the value of the current internal audit state.
Definition Tpm12.h:467
#define TPM_NUM_PCR
Definition Tpm12.h:831
struct tdTPM_PCR_INFO TPM_PCR_INFO
Part 2, section 8.3: TPM_PCR_INFO.
struct tdTPM_FAMILY_TABLE_ENTRY TPM_FAMILY_TABLE_ENTRY
Part 2, section 20.5: TPM_FAMILY_TABLE_ENTRY.
struct tdTPM_VERSION TPM_VERSION
Part 2, section 5.3: TPM_VERSION.
struct tdTPM_NONCE TPM_NONCE
Part 2, section 5.5: TPM_NONCE.
struct tdTPM_SELECT_SIZE TPM_SELECT_SIZE
Part 2, section 5.18: TPM_SELECT_SIZE.
UINT32 TPM_COMMAND_CODE
The command ordinal.
Definition Tpm12.h:96
struct tdTPM_DAA_ISSUER TPM_DAA_ISSUER
Part 2, section 22.3: TPM_DAA_ISSUER.
struct tdTPM_CMK_MIGAUTH TPM_CMK_MIGAUTH
Part 2, section 5,19: TPM_CMK_MIGAUTH.
struct tdTPM_RSP_COMMAND_HDR TPM_RSP_COMMAND_HDR
TPM Response Headers defined in Part 3.
struct tdTPM_KEY TPM_KEY
Part 2, section 10.2: TPM_KEY [size_is(encDataSize)] BYTE* encData;.
UINT32 TPM_CAPABILITY_AREA
Identifies a TPM capability area.
Definition Tpm12.h:100
UINT32 TPM_DIRINDEX
Index to a DIR register.
Definition Tpm12.h:128
UINT8 TPM_DA_STATE
The state of the dictionary attack mitigation logic.
Definition Tpm12.h:44
UINT32 TPM_KEY_FLAGS
Indicates information regarding a key.
Definition Tpm12.h:104
UINT32 TPM_FAMILY_ID
The family ID.
Definition Tpm12.h:158
struct tdTPM_TRANSPORT_LOG_OUT TPM_TRANSPORT_LOG_OUT
Part 2, section 13.4 TPM_TRANSPORT_LOG_OUT structure.
UINT16 TPM_PROTOCOL_ID
The protocol in use.
Definition Tpm12.h:52
struct tdTPM_NV_ATTRIBUTES TPM_NV_ATTRIBUTES
Part 2, section 19.2: TPM_NV_ATTRIBUTES.
UINT16 TPM_ENC_SCHEME
The definition of the encryption scheme.
Definition Tpm12.h:60
struct tdTPM_DELEGATIONS TPM_DELEGATIONS
Part 2, section 20.2: Delegate Definitions.
struct tdTPM_DELEGATE_OWNER_BLOB TPM_DELEGATE_OWNER_BLOB
Part 2, section 20.12: TPM_DELEGATE_OWNER_BLOB.
UINT32 TPM_KEY_CONTROL
Allows for controlling of the key when loaded and how to handle TPM_Startup issues.
Definition Tpm12.h:148
struct tdTPM_TRANSPORT_LOG_IN TPM_TRANSPORT_LOG_IN
Part 2, section 13.3 TPM_TRANSPORT_LOG_IN structure.
UINT32 TPM_NV_INDEX
The index into the NV storage area.
Definition Tpm12.h:152
#define TPM_NUM_FAMILY_TABLE_ENTRY_MIN
Definition Tpm12.h:1827
struct tdTPM_CERTIFY_INFO2 TPM_CERTIFY_INFO2
Part 2, section 11.2: TPM_CERTIFY_INFO2 Structure.
UINT16 TPM_STRUCTURE_TAG
The tag for the structure.
Definition Tpm12.h:88
TPM_DIGEST TPM_HMAC
Definition Tpm12.h:459
struct tdTPM_CMK_AUTH TPM_CMK_AUTH
Part 2, section 5.16: TPM_CMK_AUTH.
struct tdTPM_STORE_PRIVKEY TPM_STORE_PRIVKEY
Part 2, section 10.7: TPM_STORE_PRIVKEY [size_is(keyLength)] BYTE* key;.
UINT8 TPM_LOCALITY_SELECTION
Part 2, section 8.6: TPM_LOCALITY_SELECTION.
Definition Tpm12.h:932
struct tdTPM_QUOTE_INFO2 TPM_QUOTE_INFO2
Part 2, section 11.4 TPM_QUOTE_INFO2 Structure.
tdTPM_AUTHDATA TPM_AUTHDATA
Definition Tpm12.h:495
struct tdTPM_SEALED_DATA TPM_SEALED_DATA
Part 2, section 9.3: TPM_SEALED_DATA [size_is(dataSize)] BYTE* data;.
struct tdTPM_IDENTITY_REQ TPM_IDENTITY_REQ
Part 2, section 12.6 TPM_IDENTITY_REQ.
UINT32 TPM_CMK_DELEGATE
The restrictions placed on delegation of CMK commands.
Definition Tpm12.h:182
struct tdTPM_CMK_MA_APPROVAL TPM_CMK_MA_APPROVAL
Part 2, section 5.21: TPM_CMK_MA_APPROVAL.
struct tdTPM_CONTEXT_SENSITIVE TPM_CONTEXT_SENSITIVE
Part 2, section 18.2 TPM_CONTEXT_SENSITIVE.
UINT8 TPM_AUTH_DATA_USAGE
Indicates the conditions where it is required that authorization be presented.
Definition Tpm12.h:32
struct tdTPM_AUDIT_EVENT_OUT TPM_AUDIT_EVENT_OUT
Part 2, section 14.2 TPM_AUDIT_EVENT_OUT structure.
TPM_DIGEST TPM_CHOSENID_HASH
This SHALL be the digest of the chosen identityLabel and privacyCA for a new TPM identity.
Definition Tpm12.h:449
struct tdTPM_KEY_HANDLE_LIST TPM_KEY_HANDLE_LIST
Part 2, section 5.7: TPM_KEY_HANDLE_LIST Size of handle is loaded * sizeof(TPM_KEY_HANDLE)
struct tdTPM_CHANGEAUTH_VALIDATE TPM_CHANGEAUTH_VALIDATE
Part 2, section 5.11: TPM_CHANGEAUTH_VALIDATE.
struct tdTPM_TRANSPORT_PUBLIC TPM_TRANSPORT_PUBLIC
Part 2, section 13: Transport structures.
UINT8 TPM_PAYLOAD_TYPE
The information as to what the payload is in an encrypted structure.
Definition Tpm12.h:36
TPM_DIGEST TPM_PCRVALUE
The value inside of the PCR.
Definition Tpm12.h:463
struct tdTPM_DA_INFO_LIMITED TPM_DA_INFO_LIMITED
Part 2, section 21.8: TPM_DA_INFO_LIMITED.
struct tdTPM_DELEGATE_PUBLIC TPM_DELEGATE_PUBLIC
Part 2, section 20.8: TPM_DELEGATE_PUBLIC.
struct tdTPM_PERMANENT_FLAGS TPM_PERMANENT_FLAGS
Part 2, section 7.1: TPM_PERMANENT_FLAGS.
UINT32 TPM_FAMILY_FLAGS
The family flags.
Definition Tpm12.h:174
UINT16 TPM_PHYSICAL_PRESENCE
Sets the state of the physical presence mechanism.
Definition Tpm12.h:72
struct tdTPM_BOUND_DATA TPM_BOUND_DATA
Part 2, section 9.5: TPM_BOUND_DATA.
struct tdTPM_AUDIT_EVENT_IN TPM_AUDIT_EVENT_IN
Part 2, section 14.1 TPM_AUDIT_EVENT_IN structure.
struct tdTPM_CONTEXT_BLOB TPM_CONTEXT_BLOB
Part 2, section 18.1: TPM_CONTEXT_BLOB.
UINT32 TPM_RESULT
The return code from a function.
Definition Tpm12.h:140
struct tdTPM_SYM_CA_ATTESTATION TPM_SYM_CA_ATTESTATION
Part 2, section 12.9 TPM_SYM_CA_ATTESTATION.
struct tdTPM_CERTIFY_INFO TPM_CERTIFY_INFO
Part 2, section 11.1: TPM_CERTIFY_INFO Structure.
UINT32 TPM_FAMILY_OPERATION
What operation is happening.
Definition Tpm12.h:202
struct tdTPM_DELEGATE_SENSITIVE TPM_DELEGATE_SENSITIVE
Part 2, section 20.11: TPM_DELEGATE_SENSITIVE.
UINT32 TPM_ALGORITHM_ID
Indicates the type of algorithm.
Definition Tpm12.h:108
struct tdTPM_IDENTITY_CONTENTS TPM_IDENTITY_CONTENTS
Part 2, section 12.5 TPM_IDENTITY_CONTENTS.
UINT32 TPM_COUNT_ID
The ID value of a monotonic counter.
Definition Tpm12.h:186
struct tdTPM_DELEGATE_TABLE_ROW TPM_DELEGATE_TABLE_ROW
Part 2, section 20.9: TPM_DELEGATE_TABLE_ROW.
struct tdTPM_STORED_DATA TPM_STORED_DATA
Part 2, section 9.1: TPM_STORED_DATA [size_is(sealInfoSize)] BYTE* sealInfo; [size_is(encDataSize)] B...
struct tdTPM_CAP_VERSION_INFO TPM_CAP_VERSION_INFO
Part 2, section 21.6: TPM_CAP_VERSION_INFO [size_is(vendorSpecificSize)] BYTE* vendorSpecific;.
UINT16 TPM_ENTITY_TYPE
Indicates the types of entity that are supported by the TPM.
Definition Tpm12.h:76
struct tdTPM_ASYM_CA_CONTENTS TPM_ASYM_CA_CONTENTS
Part 2, section 12.8 TPM_ASYM_CA_CONTENTS.
#define TPM_SHA1_160_HASH_LEN
Definition Tpm12.h:436
TPM_AUTHDATA TPM_ENCAUTH
A ciphertext (encrypted) version of AuthData data.
Definition Tpm12.h:503
struct tdTPM_TRANSPORT_INTERNAL TPM_TRANSPORT_INTERNAL
Part 2, section 13.2 TPM_TRANSPORT_INTERNAL.
enum tdTPM_KEY_FLAGS TPM_KEY_FLAGS_BITS
Part 2, section 5.10: TPM_KEY_FLAGS.
UINT32 TPM_TRANSPORT_ATTRIBUTES
Attributes that define what options are in use for a transport session.
Definition Tpm12.h:120
UINT32 TPM_AUTHHANDLE
Handle to an authorization session.
Definition Tpm12.h:124
UINT16 TPM_SIG_SCHEME
The definition of the signature scheme.
Definition Tpm12.h:64
struct tdTPM_MSA_COMPOSITE TPM_MSA_COMPOSITE
Part 2, section 5.15: TPM_MSA_COMPOSITE Number of migAuthDigest indicated by MSAlist.
struct tdTPM_DAA_CONTEXT TPM_DAA_CONTEXT
Part 2, section 22.5: TPM_DAA_CONTEXT.
UINT16 TPM_TAG
The request or response authorization type.
Definition Tpm12.h:48
struct tdTPM_STORE_ASYMKEY TPM_STORE_ASYMKEY
Part 2, section 10.6: TPM_STORE_ASYMKEY.
struct tdTPM_DELEGATE_LABEL TPM_DELEGATE_LABEL
Part 2, section 20.7: TPM_DELEGATE_LABEL.
struct tdTPM_FAMILY_LABEL TPM_FAMILY_LABEL
Part 2, section 20.4: TPM_FAMILY_LABEL.
struct tdTPM_DAA_TPM TPM_DAA_TPM
Part 2, section 22.4: TPM_DAA_TPM.
struct tdTPM_PUBKEY TPM_PUBKEY
Part 2, section 10.5: TPM_PUBKEY.
UINT32 TPM_STARTUP_EFFECTS
How the TPM handles var.
Definition Tpm12.h:166
UINT16 TPM_PLATFORM_SPECIFIC
The platform specific spec to which the information relates to.
Definition Tpm12.h:92
struct tdTPM_PCR_INFO_SHORT TPM_PCR_INFO_SHORT
Part 2, section 8.5: TPM_PCR_INFO_SHORT.
TPM_NONCE TPM_DAA_TPM_SEED
This SHALL be a random value generated by a TPM immediately after the EK is installed in that TPM,...
Definition Tpm12.h:480
struct tdTPM_DA_INFO TPM_DA_INFO
Part 2, section 21.7: TPM_DA_INFO.
struct tdTPM_SIGN_INFO TPM_SIGN_INFO
Part 2, section 5.14: TPM_SIGN_INFO Size of data indicated by dataLen.
UINT16 TPM_EK_TYPE
The type of asymmetric encrypted structure in use by the endorsement key.
Definition Tpm12.h:84
struct tdTPM_DELEGATE_KEY_BLOB TPM_DELEGATE_KEY_BLOB
Part 2, section 20.13: TTPM_DELEGATE_KEY_BLOB.
#define TPM_NUM_DELEGATE_TABLE_ENTRY_MIN
Definition Tpm12.h:1864
struct tdTPM_TRANSPORT_AUTH TPM_TRANSPORT_AUTH
Part 2, section 13.5 TPM_TRANSPORT_AUTH structure.
struct tdTPM_DAA_JOINDATA TPM_DAA_JOINDATA
Part 2, section 22.6: TPM_DAA_JOINDATA.
UINT32 TPM_DELEGATE_INDEX
The index value for the delegate NV table.
Definition Tpm12.h:178
struct tdTPM_FAMILY_TABLE TPM_FAMILY_TABLE
struct tdTPM_EK_BLOB_ACTIVATE TPM_EK_BLOB_ACTIVATE
Part 2, section 12.2 TPM_EK_BLOB_ACTIVATE.
UINT32 TPM_HANDLE
A generic handle could be key, transport etc.
Definition Tpm12.h:198
UINT32 TPM_KEY_HANDLE
The area where a key is held assigned by the TPM.
Definition Tpm12.h:132
struct tdTPM_STORE_PUBKEY TPM_STORE_PUBKEY
Part 2, section 10.4: TPM_STORE_PUBKEY.
struct tdTPM_CURRENT_TICKS TPM_CURRENT_TICKS
Part 2, section 15: Tick Structures Placed here out of order because definitions are used in section ...
struct tdTPM_KEY_PARMS TPM_KEY_PARMS
Part 2, section 5.12: TPM_MIGRATIONKEYAUTH declared after section 10 to catch declaration of TPM_PUBK...
struct tdTPM_PCR_INFO_LONG TPM_PCR_INFO_LONG
Part 2, section 8.4: TPM_PCR_INFO_LONG.
struct tdTPM_STORED_DATA12 TPM_STORED_DATA12
Part 2, section 9.2: TPM_STORED_DATA12 [size_is(sealInfoSize)] BYTE* sealInfo; [size_is(encDataSize)]...
UINT32 TPM_FAMILY_VERIFICATION
IA value used as a label for the most recent verification of this family.
Definition Tpm12.h:162
struct tdTPM_RQU_COMMAND_HDR TPM_RQU_COMMAND_HDR
TPM Command Headers defined in Part 3.
struct tdTPM_DA_ACTION_TYPE TPM_DA_ACTION_TYPE
Part 2, section 21.10: TPM_DA_ACTION_TYPE.
struct tdTPM_DAA_BLOB TPM_DAA_BLOB
Part 2, section 22.8: TPM_DAA_BLOB.
UINT32 TPM_SYM_MODE
The mode of a symmetric encryption.
Definition Tpm12.h:170
UINT32 TPM_TRANSHANDLE
A transport session handle.
Definition Tpm12.h:194
tdTPM_KEY_FLAGS
Part 2, section 5.10: TPM_KEY_FLAGS.
Definition Tpm12.h:583
@ migrateAuthority
Definition Tpm12.h:588
@ migratable
Definition Tpm12.h:585
@ isVolatile
Definition Tpm12.h:586
@ redirection
Definition Tpm12.h:584
@ pcrIgnoredOnRead
Definition Tpm12.h:587
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
Part 2, section 12.8 TPM_ASYM_CA_CONTENTS.
Definition Tpm12.h:1252
TPM_SYMMETRIC_KEY sessionKey
Definition Tpm12.h:1253
TPM_DIGEST idDigest
Definition Tpm12.h:1254
Part 2, section 14.1 TPM_AUDIT_EVENT_IN structure.
Definition Tpm12.h:1344
TPM_COUNTER_VALUE auditCount
Definition Tpm12.h:1347
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1345
TPM_DIGEST inputParms
Definition Tpm12.h:1346
Part 2, section 14.2 TPM_AUDIT_EVENT_OUT structure.
Definition Tpm12.h:1353
TPM_COMMAND_CODE ordinal
Definition Tpm12.h:1355
TPM_DIGEST outputParms
Definition Tpm12.h:1356
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1354
TPM_RESULT returnCode
Definition Tpm12.h:1358
TPM_COUNTER_VALUE auditCount
Definition Tpm12.h:1357
Part 2, section 9.5: TPM_BOUND_DATA.
Definition Tpm12.h:1029
TPM_PAYLOAD_TYPE payload
Definition Tpm12.h:1031
UINT8 payloadData[1]
Definition Tpm12.h:1032
TPM_STRUCT_VER ver
Definition Tpm12.h:1030
Part 2, section 21.6: TPM_CAP_VERSION_INFO [size_is(vendorSpecificSize)] BYTE* vendorSpecific;.
Definition Tpm12.h:1987
UINT16 vendorSpecificSize
Definition Tpm12.h:1993
TPM_VERSION version
Definition Tpm12.h:1989
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1988
Part 2, section 11.2: TPM_CERTIFY_INFO2 Structure.
Definition Tpm12.h:1140
TPM_AUTH_DATA_USAGE authDataUsage
Definition Tpm12.h:1146
BOOLEAN parentPCRStatus
Definition Tpm12.h:1150
TPM_NONCE data
Definition Tpm12.h:1149
TPM_DIGEST pubkeyDigest
Definition Tpm12.h:1148
TPM_KEY_FLAGS keyFlags
Definition Tpm12.h:1145
UINT32 migrationAuthoritySize
Definition Tpm12.h:1153
TPM_PAYLOAD_TYPE payloadType
Definition Tpm12.h:1143
UINT8 * migrationAuthority
Definition Tpm12.h:1154
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1141
TPM_KEY_PARMS algorithmParms
Definition Tpm12.h:1147
TPM_KEY_USAGE keyUsage
Definition Tpm12.h:1144
Part 2, section 11.1: TPM_CERTIFY_INFO Structure.
Definition Tpm12.h:1124
TPM_STRUCT_VER version
Definition Tpm12.h:1125
TPM_DIGEST pubkeyDigest
Definition Tpm12.h:1130
TPM_KEY_PARMS algorithmParms
Definition Tpm12.h:1129
TPM_AUTH_DATA_USAGE authDataUsage
Definition Tpm12.h:1128
BOOLEAN parentPCRStatus
Definition Tpm12.h:1132
TPM_KEY_USAGE keyUsage
Definition Tpm12.h:1126
TPM_NONCE data
Definition Tpm12.h:1131
UINT32 PCRInfoSize
Definition Tpm12.h:1133
TPM_KEY_FLAGS keyFlags
Definition Tpm12.h:1127
UINT8 * PCRInfo
Definition Tpm12.h:1134
Part 2, section 5.11: TPM_CHANGEAUTH_VALIDATE.
Definition Tpm12.h:594
TPM_SECRET newAuthSecret
Definition Tpm12.h:595
Part 2, section 5.16: TPM_CMK_AUTH.
Definition Tpm12.h:672
TPM_DIGEST destinationKeyDigest
Definition Tpm12.h:674
TPM_DIGEST migrationAuthorityDigest
Definition Tpm12.h:673
TPM_DIGEST sourceKeyDigest
Definition Tpm12.h:675
Part 2, section 5.21: TPM_CMK_MA_APPROVAL.
Definition Tpm12.h:717
TPM_DIGEST migrationAuthorityDigest
Definition Tpm12.h:719
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:718
Part 2, section 5,19: TPM_CMK_MIGAUTH.
Definition Tpm12.h:699
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:700
TPM_DIGEST msaDigest
Definition Tpm12.h:701
TPM_DIGEST pubKeyDigest
Definition Tpm12.h:702
Part 2, section 5.20: TPM_CMK_SIGTICKET.
Definition Tpm12.h:708
TPM_DIGEST verKeyDigest
Definition Tpm12.h:710
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:709
TPM_DIGEST signedData
Definition Tpm12.h:711
Part 2, section 18.1: TPM_CONTEXT_BLOB.
Definition Tpm12.h:1634
TPM_DIGEST integrityDigest
Definition Tpm12.h:1640
UINT8 * sensitiveData
Definition Tpm12.h:1644
UINT32 sensitiveSize
Definition Tpm12.h:1643
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1635
UINT8 label[16]
Definition Tpm12.h:1638
TPM_RESOURCE_TYPE resourceType
Definition Tpm12.h:1636
UINT32 additionalSize
Definition Tpm12.h:1641
UINT8 * additionalData
Definition Tpm12.h:1642
TPM_HANDLE handle
Definition Tpm12.h:1637
UINT32 contextCount
Definition Tpm12.h:1639
Part 2, section 18.2 TPM_CONTEXT_SENSITIVE.
Definition Tpm12.h:1650
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1651
TPM_NONCE contextNonce
Definition Tpm12.h:1652
Part 2, section 5.13: TPM_COUNTER_VALUE.
Definition Tpm12.h:642
TPM_ACTUAL_COUNT counter
Definition Tpm12.h:645
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:643
UINT8 label[4]
Definition Tpm12.h:644
Part 2, section 15: Tick Structures Placed here out of order because definitions are used in section ...
Definition Tpm12.h:1270
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1271
UINT64 currentTicks
Definition Tpm12.h:1272
TPM_NONCE tickNonce
Definition Tpm12.h:1274
Part 2, section 22.8: TPM_DAA_BLOB.
Definition Tpm12.h:2115
UINT8 * sensitiveData
Definition Tpm12.h:2123
TPM_DIGEST blobIntegrity
Definition Tpm12.h:2119
TPM_RESOURCE_TYPE resourceType
Definition Tpm12.h:2117
UINT32 sensitiveSize
Definition Tpm12.h:2122
UINT32 additionalSize
Definition Tpm12.h:2120
UINT8 label[16]
Definition Tpm12.h:2118
UINT8 * additionalData
Definition Tpm12.h:2121
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2116
Part 2, section 22.5: TPM_DAA_CONTEXT.
Definition Tpm12.h:2094
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2095
TPM_DAA_CONTEXT_SEED DAA_contextSeed
Definition Tpm12.h:2098
UINT8 DAA_scratch[256]
Definition Tpm12.h:2099
TPM_DIGEST DAA_digest
Definition Tpm12.h:2097
TPM_DIGEST DAA_digestContext
Definition Tpm12.h:2096
Part 2, section 22.3: TPM_DAA_ISSUER.
Definition Tpm12.h:2068
TPM_DIGEST DAA_digest_S1
Definition Tpm12.h:2073
TPM_DIGEST DAA_digest_S0
Definition Tpm12.h:2072
UINT8 DAA_generic_q[26]
Definition Tpm12.h:2076
TPM_DIGEST DAA_digest_gamma
Definition Tpm12.h:2075
TPM_DIGEST DAA_digest_n
Definition Tpm12.h:2074
TPM_DIGEST DAA_digest_R0
Definition Tpm12.h:2070
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2069
TPM_DIGEST DAA_digest_R1
Definition Tpm12.h:2071
Part 2, section 22.6: TPM_DAA_JOINDATA.
Definition Tpm12.h:2106
UINT8 DAA_join_u1[138]
Definition Tpm12.h:2108
UINT8 DAA_join_u0[128]
Definition Tpm12.h:2107
TPM_DIGEST DAA_digest_n0
Definition Tpm12.h:2109
Part 2, section 22.9: TPM_DAA_SENSITIVE.
Definition Tpm12.h:2129
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2130
UINT32 internalSize
Definition Tpm12.h:2131
UINT8 * internalData
Definition Tpm12.h:2132
Part 2, section 22.4: TPM_DAA_TPM.
Definition Tpm12.h:2082
TPM_DIGEST DAA_rekey
Definition Tpm12.h:2087
TPM_DIGEST DAA_digest_v1
Definition Tpm12.h:2086
TPM_DIGEST DAA_digest_v0
Definition Tpm12.h:2085
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2083
TPM_DIGEST DAA_digestIssuer
Definition Tpm12.h:2084
UINT32 DAA_count
Definition Tpm12.h:2088
Part 2, section 21.10: TPM_DA_ACTION_TYPE.
Definition Tpm12.h:2000
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2001
Part 2, section 21.8: TPM_DA_INFO_LIMITED.
Definition Tpm12.h:2027
TPM_DA_STATE state
Definition Tpm12.h:2029
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2028
TPM_DA_ACTION_TYPE actionAtThreshold
Definition Tpm12.h:2030
Part 2, section 21.7: TPM_DA_INFO.
Definition Tpm12.h:2013
UINT32 vendorDataSize
Definition Tpm12.h:2020
UINT16 currentCount
Definition Tpm12.h:2016
TPM_DA_STATE state
Definition Tpm12.h:2015
UINT8 * vendorData
Definition Tpm12.h:2021
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2014
UINT32 actionDependValue
Definition Tpm12.h:2019
UINT16 thresholdCount
Definition Tpm12.h:2017
TPM_DA_ACTION_TYPE actionAtThreshold
Definition Tpm12.h:2018
Part 2, section 20.13: TTPM_DELEGATE_KEY_BLOB.
Definition Tpm12.h:1894
TPM_DIGEST pubKeyDigest
Definition Tpm12.h:1898
TPM_DELEGATE_PUBLIC pub
Definition Tpm12.h:1896
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1895
TPM_DIGEST integrityDigest
Definition Tpm12.h:1897
Part 2, section 20.7: TPM_DELEGATE_LABEL.
Definition Tpm12.h:1836
Part 2, section 20.12: TPM_DELEGATE_OWNER_BLOB.
Definition Tpm12.h:1881
TPM_DIGEST integrityDigest
Definition Tpm12.h:1884
TPM_DELEGATE_PUBLIC pub
Definition Tpm12.h:1883
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1882
Part 2, section 20.8: TPM_DELEGATE_PUBLIC.
Definition Tpm12.h:1843
TPM_DELEGATIONS permissions
Definition Tpm12.h:1847
TPM_FAMILY_ID familyID
Definition Tpm12.h:1848
TPM_PCR_INFO_SHORT pcrInfo
Definition Tpm12.h:1846
TPM_FAMILY_VERIFICATION verificationCount
Definition Tpm12.h:1849
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1844
TPM_DELEGATE_LABEL label
Definition Tpm12.h:1845
Part 2, section 20.11: TPM_DELEGATE_SENSITIVE.
Definition Tpm12.h:1873
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1874
Part 2, section 20.9: TPM_DELEGATE_TABLE_ROW.
Definition Tpm12.h:1855
TPM_DELEGATE_PUBLIC pub
Definition Tpm12.h:1857
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1856
TPM_DELEGATE_TABLE_ROW delRow[TPM_NUM_DELEGATE_TABLE_ENTRY_MIN]
Definition Tpm12.h:1867
Part 2, section 20.2: Delegate Definitions.
Definition Tpm12.h:1725
UINT32 delegateType
Definition Tpm12.h:1727
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1726
Part 2, section 5.4: TPM_DIGEST.
Definition Tpm12.h:442
UINT8 digest[TPM_SHA1_160_HASH_LEN]
Definition Tpm12.h:443
Part 2, section 12.2 TPM_EK_BLOB_ACTIVATE.
Definition Tpm12.h:1194
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1195
TPM_SYMMETRIC_KEY sessionKey
Definition Tpm12.h:1196
TPM_PCR_INFO_SHORT pcrInfo
Definition Tpm12.h:1198
TPM_DIGEST idDigest
Definition Tpm12.h:1197
Part 2, section 12.3 TPM_EK_BLOB_AUTH.
Definition Tpm12.h:1204
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1205
TPM_SECRET authValue
Definition Tpm12.h:1206
Part 2, section 12.1 TPM_EK_BLOB.
Definition Tpm12.h:1184
UINT8 * blob
Definition Tpm12.h:1188
UINT32 blobSize
Definition Tpm12.h:1187
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1185
TPM_EK_TYPE ekType
Definition Tpm12.h:1186
Part 2, section 20.4: TPM_FAMILY_LABEL.
Definition Tpm12.h:1809
Part 2, section 20.5: TPM_FAMILY_TABLE_ENTRY.
Definition Tpm12.h:1816
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1817
TPM_FAMILY_FLAGS flags
Definition Tpm12.h:1821
TPM_FAMILY_VERIFICATION verificationCount
Definition Tpm12.h:1820
TPM_FAMILY_ID familyID
Definition Tpm12.h:1819
TPM_FAMILY_LABEL label
Definition Tpm12.h:1818
TPM_FAMILY_TABLE_ENTRY famTableRow[TPM_NUM_FAMILY_TABLE_ENTRY_MIN]
Definition Tpm12.h:1830
Part 2, section 12.5 TPM_IDENTITY_CONTENTS.
Definition Tpm12.h:1212
TPM_PUBKEY identityPubKey
Definition Tpm12.h:1216
TPM_STRUCT_VER ver
Definition Tpm12.h:1213
TPM_CHOSENID_HASH labelPrivCADigest
Definition Tpm12.h:1215
Part 2, section 12.7 TPM_IDENTITY_PROOF.
Definition Tpm12.h:1234
UINT8 * endorsementCredential
Definition Tpm12.h:1244
UINT8 * identityBinding
Definition Tpm12.h:1243
UINT32 identityBindingSize
Definition Tpm12.h:1237
UINT32 endorsementSize
Definition Tpm12.h:1238
UINT8 * conformanceCredential
Definition Tpm12.h:1246
UINT8 * platformCredential
Definition Tpm12.h:1245
TPM_PUBKEY identityKey
Definition Tpm12.h:1241
TPM_STRUCT_VER ver
Definition Tpm12.h:1235
UINT32 conformanceSize
Definition Tpm12.h:1240
Part 2, section 12.6 TPM_IDENTITY_REQ.
Definition Tpm12.h:1222
TPM_KEY_PARMS symAlgorithm
Definition Tpm12.h:1226
TPM_KEY_PARMS asymAlgorithm
Definition Tpm12.h:1225
UINT8 * asymBlob
Definition Tpm12.h:1227
UINT8 * symBlob
Definition Tpm12.h:1228
Part 2, section 10.3: TPM_KEY12 [size_is(encDataSize)] BYTE* encData;.
Definition Tpm12.h:1064
UINT32 encDataSize
Definition Tpm12.h:1074
TPM_AUTH_DATA_USAGE authDataUsage
Definition Tpm12.h:1069
UINT8 * PCRInfo
Definition Tpm12.h:1072
TPM_KEY_USAGE keyUsage
Definition Tpm12.h:1067
TPM_STORE_PUBKEY pubKey
Definition Tpm12.h:1073
TPM_KEY_PARMS algorithmParms
Definition Tpm12.h:1070
UINT8 * encData
Definition Tpm12.h:1075
TPM_KEY_FLAGS keyFlags
Definition Tpm12.h:1068
UINT32 PCRInfoSize
Definition Tpm12.h:1071
UINT16 fill
Definition Tpm12.h:1066
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1065
Part 2, section 5.7: TPM_KEY_HANDLE_LIST Size of handle is loaded * sizeof(TPM_KEY_HANDLE)
Definition Tpm12.h:509
TPM_KEY_HANDLE handle[1]
Definition Tpm12.h:511
Part 2, section 5.12: TPM_MIGRATIONKEYAUTH declared after section 10 to catch declaration of TPM_PUBK...
Definition Tpm12.h:606
TPM_ENC_SCHEME encScheme
Definition Tpm12.h:608
TPM_SIG_SCHEME sigScheme
Definition Tpm12.h:609
UINT8 * parms
Definition Tpm12.h:611
UINT32 parmSize
Definition Tpm12.h:610
TPM_ALGORITHM_ID algorithmID
Definition Tpm12.h:607
Part 2, section 10.2: TPM_KEY [size_is(encDataSize)] BYTE* encData;.
Definition Tpm12.h:1047
TPM_KEY_PARMS algorithmParms
Definition Tpm12.h:1052
TPM_KEY_USAGE keyUsage
Definition Tpm12.h:1049
TPM_STRUCT_VER ver
Definition Tpm12.h:1048
UINT32 PCRInfoSize
Definition Tpm12.h:1053
TPM_AUTH_DATA_USAGE authDataUsage
Definition Tpm12.h:1051
UINT32 encDataSize
Definition Tpm12.h:1056
TPM_STORE_PUBKEY pubKey
Definition Tpm12.h:1055
TPM_KEY_FLAGS keyFlags
Definition Tpm12.h:1050
UINT8 * encData
Definition Tpm12.h:1057
UINT8 * PCRInfo
Definition Tpm12.h:1054
Part 2, section 10.8: TPM_MIGRATE_ASYMKEY [size_is(partPrivKeyLen)] BYTE* partPrivKey;.
Definition Tpm12.h:1103
TPM_PAYLOAD_TYPE payload
Definition Tpm12.h:1105
TPM_DIGEST pubDataDigest
Definition Tpm12.h:1107
TPM_SECRET usageAuth
Definition Tpm12.h:1106
Part 2, section 5.12: TPM_MIGRATIONKEYAUTH.
Definition Tpm12.h:633
TPM_DIGEST digest
Definition Tpm12.h:636
TPM_MIGRATE_SCHEME migrationScheme
Definition Tpm12.h:635
TPM_PUBKEY migrationKey
Definition Tpm12.h:634
Part 2, section 5.15: TPM_MSA_COMPOSITE Number of migAuthDigest indicated by MSAlist.
Definition Tpm12.h:664
TPM_DIGEST migAuthDigest[1]
Definition Tpm12.h:666
Part 2, section 5.5: TPM_NONCE.
Definition Tpm12.h:472
UINT8 nonce[20]
Definition Tpm12.h:473
Part 2, section 19.2: TPM_NV_ATTRIBUTES.
Definition Tpm12.h:1684
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1685
Part 2, section 19.3: TPM_NV_DATA_PUBLIC.
Definition Tpm12.h:1704
TPM_PCR_INFO_SHORT pcrInfoWrite
Definition Tpm12.h:1708
TPM_NV_ATTRIBUTES permission
Definition Tpm12.h:1709
BOOLEAN bWriteSTClear
Definition Tpm12.h:1711
BOOLEAN bReadSTClear
Definition Tpm12.h:1710
BOOLEAN bWriteDefine
Definition Tpm12.h:1712
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1705
TPM_PCR_INFO_SHORT pcrInfoRead
Definition Tpm12.h:1707
TPM_NV_INDEX nvIndex
Definition Tpm12.h:1706
Part 2, section 8.8: TPM_PCR_ATTRIBUTES.
Definition Tpm12.h:965
TPM_LOCALITY_SELECTION pcrResetLocal
Definition Tpm12.h:968
TPM_LOCALITY_SELECTION pcrExtendLocal
Definition Tpm12.h:967
Part 2, section 8.2: TPM_PCR_COMPOSITE Size of pcrValue[] indicated by valueSize.
Definition Tpm12.h:914
TPM_PCRVALUE pcrValue[1]
Definition Tpm12.h:917
TPM_PCR_SELECTION select
Definition Tpm12.h:915
Part 2, section 8.4: TPM_PCR_INFO_LONG.
Definition Tpm12.h:943
TPM_LOCALITY_SELECTION localityAtRelease
Definition Tpm12.h:946
TPM_COMPOSITE_HASH digestAtRelease
Definition Tpm12.h:950
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:944
TPM_PCR_SELECTION releasePCRSelection
Definition Tpm12.h:948
TPM_PCR_SELECTION creationPCRSelection
Definition Tpm12.h:947
TPM_LOCALITY_SELECTION localityAtCreation
Definition Tpm12.h:945
TPM_COMPOSITE_HASH digestAtCreation
Definition Tpm12.h:949
Part 2, section 8.5: TPM_PCR_INFO_SHORT.
Definition Tpm12.h:956
TPM_LOCALITY_SELECTION localityAtRelease
Definition Tpm12.h:958
TPM_PCR_SELECTION pcrSelection
Definition Tpm12.h:957
TPM_COMPOSITE_HASH digestAtRelease
Definition Tpm12.h:959
Part 2, section 8.3: TPM_PCR_INFO.
Definition Tpm12.h:923
TPM_COMPOSITE_HASH digestAtCreation
Definition Tpm12.h:926
TPM_COMPOSITE_HASH digestAtRelease
Definition Tpm12.h:925
TPM_PCR_SELECTION pcrSelection
Definition Tpm12.h:924
Part 2, section 8.1: TPM_PCR_SELECTION Size of pcrSelect[] indicated by sizeOfSelect.
Definition Tpm12.h:905
UINT8 pcrSelect[1]
Definition Tpm12.h:907
UINT16 sizeOfSelect
Definition Tpm12.h:906
Part 2, section 7.1: TPM_PERMANENT_FLAGS.
Definition Tpm12.h:735
BOOLEAN disableFullDALogicInfo
Definition Tpm12.h:756
BOOLEAN physicalPresenceCMDEnable
Definition Tpm12.h:745
BOOLEAN physicalPresenceLifetimeLock
Definition Tpm12.h:743
BOOLEAN TPMpostLock
Definition Tpm12.h:748
BOOLEAN enableRevokeEK
Definition Tpm12.h:751
BOOLEAN disableOwnerClear
Definition Tpm12.h:741
BOOLEAN physicalPresenceHWEnable
Definition Tpm12.h:744
BOOLEAN allowMaintenance
Definition Tpm12.h:742
BOOLEAN tpmEstablished
Definition Tpm12.h:754
BOOLEAN maintenanceDone
Definition Tpm12.h:755
BOOLEAN deactivated
Definition Tpm12.h:739
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:736
Part 2, section 10.5: TPM_PUBKEY.
Definition Tpm12.h:625
TPM_KEY_PARMS algorithmParms
Definition Tpm12.h:626
TPM_STORE_PUBKEY pubKey
Definition Tpm12.h:627
Part 2, section 11.4 TPM_QUOTE_INFO2 Structure.
Definition Tpm12.h:1170
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1171
TPM_NONCE externalData
Definition Tpm12.h:1173
TPM_PCR_INFO_SHORT infoShort
Definition Tpm12.h:1174
UINT8 fixed[4]
Definition Tpm12.h:1172
Part 2, section 11.3 TPM_QUOTE_INFO Structure.
Definition Tpm12.h:1160
TPM_NONCE externalData
Definition Tpm12.h:1164
TPM_STRUCT_VER version
Definition Tpm12.h:1161
TPM_COMPOSITE_HASH digestValue
Definition Tpm12.h:1163
UINT8 fixed[4]
Definition Tpm12.h:1162
TPM Command Headers defined in Part 3.
Definition Tpm12.h:2151
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2152
TPM_COMMAND_CODE ordinal
Definition Tpm12.h:2154
TPM Response Headers defined in Part 3.
Definition Tpm12.h:2160
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:2161
TPM_RESULT returnCode
Definition Tpm12.h:2163
Part 2, section 9.3: TPM_SEALED_DATA [size_is(dataSize)] BYTE* data;.
Definition Tpm12.h:1006
TPM_PAYLOAD_TYPE payload
Definition Tpm12.h:1007
TPM_SECRET authData
Definition Tpm12.h:1008
UINT32 dataSize
Definition Tpm12.h:1011
TPM_DIGEST storedDigest
Definition Tpm12.h:1010
TPM_NONCE tpmProof
Definition Tpm12.h:1009
Part 2, section 5.18: TPM_SELECT_SIZE.
Definition Tpm12.h:690
UINT16 reqSize
Definition Tpm12.h:693
Part 2, section 5.14: TPM_SIGN_INFO Size of data indicated by dataLen.
Definition Tpm12.h:652
UINT32 dataLen
Definition Tpm12.h:656
UINT8 fixed[4]
Definition Tpm12.h:654
UINT8 * data
Definition Tpm12.h:657
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:653
TPM_NONCE replay
Definition Tpm12.h:655
Part 2, section 7.3: TPM_STANY_FLAGS.
Definition Tpm12.h:807
BOOLEAN transportExclusive
Definition Tpm12.h:811
TPM_MODIFIER_INDICATOR localityModifier
Definition Tpm12.h:810
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:808
BOOLEAN postInitialise
Definition Tpm12.h:809
BOOLEAN TOSPresent
Definition Tpm12.h:812
Part 2, section 7.5: TPM_STCLEAR_DATA available inside TPM only.
Definition Tpm12.h:867
UINT32 ownerReference
Definition Tpm12.h:871
TPM_PCRVALUE PCR[TPM_NUM_PCR]
Definition Tpm12.h:873
UINT32 deferredPhysicalPresence
Definition Tpm12.h:874
BOOLEAN disableResetLock
Definition Tpm12.h:872
TPM_NONCE contextNonceKey
Definition Tpm12.h:869
TPM_COUNT_ID countID
Definition Tpm12.h:870
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:868
Part 2, section 7.2: TPM_STCLEAR_FLAGS.
Definition Tpm12.h:786
BOOLEAN deactivated
Definition Tpm12.h:788
BOOLEAN physicalPresence
Definition Tpm12.h:790
BOOLEAN physicalPresenceLock
Definition Tpm12.h:791
BOOLEAN disableForceClear
Definition Tpm12.h:789
BOOLEAN bGlobalLock
Definition Tpm12.h:792
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:787
Part 2, section 9.2: TPM_STORED_DATA12 [size_is(sealInfoSize)] BYTE* sealInfo; [size_is(encDataSize)]...
Definition Tpm12.h:993
UINT8 * encData
Definition Tpm12.h:999
TPM_ENTITY_TYPE et
Definition Tpm12.h:995
UINT8 * sealInfo
Definition Tpm12.h:997
UINT32 sealInfoSize
Definition Tpm12.h:996
UINT32 encDataSize
Definition Tpm12.h:998
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:994
Part 2, section 9.1: TPM_STORED_DATA [size_is(sealInfoSize)] BYTE* sealInfo; [size_is(encDataSize)] B...
Definition Tpm12.h:980
UINT8 * sealInfo
Definition Tpm12.h:983
UINT32 encDataSize
Definition Tpm12.h:984
UINT32 sealInfoSize
Definition Tpm12.h:982
UINT8 * encData
Definition Tpm12.h:985
TPM_STRUCT_VER ver
Definition Tpm12.h:981
Part 2, section 10.6: TPM_STORE_ASYMKEY.
Definition Tpm12.h:1090
TPM_SECRET migrationAuth
Definition Tpm12.h:1094
TPM_STORE_PRIVKEY privKey
Definition Tpm12.h:1096
TPM_DIGEST pubDataDigest
Definition Tpm12.h:1095
TPM_PAYLOAD_TYPE payload
Definition Tpm12.h:1092
TPM_SECRET usageAuth
Definition Tpm12.h:1093
Part 2, section 10.7: TPM_STORE_PRIVKEY [size_is(keyLength)] BYTE* key;.
Definition Tpm12.h:1082
Part 2, section 10.4: TPM_STORE_PUBKEY.
Definition Tpm12.h:617
UINT8 key[1]
Definition Tpm12.h:619
UINT32 keyLength
Definition Tpm12.h:618
Part 2, section 5.1: TPM_STRUCT_VER.
Definition Tpm12.h:419
UINT8 revMajor
Definition Tpm12.h:422
UINT8 revMinor
Definition Tpm12.h:423
Part 2, section 9.4: TPM_SYMMETRIC_KEY [size_is(size)] BYTE* data;.
Definition Tpm12.h:1019
TPM_ENC_SCHEME encScheme
Definition Tpm12.h:1021
TPM_ALGORITHM_ID algId
Definition Tpm12.h:1020
Part 2, section 12.9 TPM_SYM_CA_ATTESTATION.
Definition Tpm12.h:1260
TPM_KEY_PARMS algorithm
Definition Tpm12.h:1262
Part 2, section 13.5 TPM_TRANSPORT_AUTH structure.
Definition Tpm12.h:1332
TPM_AUTHDATA authData
Definition Tpm12.h:1334
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1333
Part 2, section 13.2 TPM_TRANSPORT_INTERNAL.
Definition Tpm12.h:1301
TPM_TRANSHANDLE transHandle
Definition Tpm12.h:1305
TPM_AUTHDATA authData
Definition Tpm12.h:1303
TPM_TRANSPORT_PUBLIC transPublic
Definition Tpm12.h:1304
TPM_NONCE transNonceEven
Definition Tpm12.h:1306
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1302
TPM_DIGEST transDigest
Definition Tpm12.h:1307
Part 2, section 13.3 TPM_TRANSPORT_LOG_IN structure.
Definition Tpm12.h:1313
TPM_DIGEST parameters
Definition Tpm12.h:1315
TPM_DIGEST pubKeyHash
Definition Tpm12.h:1316
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1314
Part 2, section 13.4 TPM_TRANSPORT_LOG_OUT structure.
Definition Tpm12.h:1322
TPM_DIGEST parameters
Definition Tpm12.h:1325
TPM_CURRENT_TICKS currentTicks
Definition Tpm12.h:1324
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1323
TPM_MODIFIER_INDICATOR locality
Definition Tpm12.h:1326
Part 2, section 13: Transport structures.
Definition Tpm12.h:1284
TPM_TRANSPORT_ATTRIBUTES transAttributes
Definition Tpm12.h:1286
TPM_ENC_SCHEME encScheme
Definition Tpm12.h:1288
TPM_STRUCTURE_TAG tag
Definition Tpm12.h:1285
TPM_ALGORITHM_ID algId
Definition Tpm12.h:1287
Part 2, section 5.3: TPM_VERSION.
Definition Tpm12.h:429
TPM_VERSION_BYTE minor
Definition Tpm12.h:431
UINT8 revMinor
Definition Tpm12.h:433
TPM_VERSION_BYTE major
Definition Tpm12.h:430
UINT8 revMajor
Definition Tpm12.h:432