1Trusted Platform Module Library
2Part 2: Structures
3Family “2.0”
4Level 00 Revision 00.99
5October 31, 2013
6
7Contact: admin@trustedcomputinggroup.org
8
9Published
10Copyright © TCG 2006-2013
11
12TCG
13
14Part 2: Structures
15
16Trusted Platform Module Library
17
18Licenses and Notices
191. Copyright Licenses:
2021
22Trusted Computing Group (TCG) grants to the user of the source code in this specification (the
23“Source Code”) a worldwide, irrevocable, nonexclusive, royalty free, copyright license to
24reproduce, create derivative works, distribute, display and perform the Source Code and
25derivative works thereof, and to grant others the rights granted herein.
26
2728
29The TCG grants to the user of the other parts of the specification (other than the Source Code)
30the rights to reproduce, distribute, display, and perform the specification solely for the purpose of
31developing products based on such documents.
32
332. Source Code Distribution Conditions:
3435
36Redistributions of Source Code must retain the above copyright licenses, this list of conditions
37and the following disclaimers.
38
3940
41Redistributions in binary form must reproduce the above copyright licenses, this list of conditions
42and the following disclaimers in the documentation and/or other materials provided with the
43distribution.
44
453. Disclaimers:
4647
48THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF
49LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH
50RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES)
51THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE.
52Contact TCG Administration (admin@trustedcomputinggroup.org) for information on specification
53licensing rights available through TCG membership agreements.
54
5556
57THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED WARRANTIES
58WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
59PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR NONINFRINGEMENT OF
60INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY OTHERWISE ARISING OUT OF
61ANY PROPOSAL, SPECIFICATION OR SAMPLE.
62
6364
65Without limitation, TCG and its members and licensors disclaim all liability, including liability for
66infringement of any proprietary rights, relating to use of information in this specification and to the
67implementation of this specification, and TCG disclaims all liability for cost of procurement of
68substitute goods or services, lost profits, loss of use, loss of data or any incidental, consequential,
69direct, indirect, or special damages, whether under contract, tort, warranty or otherwise, arising in
70any way out of use or reliance upon this specification or any information herein.
71
72Any marks and brands contained herein are the property of their respective owners.
73
74Page ii
75October 31, 2013
76
77Published
78Copyright © TCG 2006-2013
79
80Family “2.0”
81Level 00 Revision 00.99
82
83Trusted Platform Module Library
84
85Part 2: Structures
86
87CONTENTS
881
89
90Scope .................................................................................................................................................... 1
91
922
93
94Terms and definitions ............................................................................................................................ 1
95
963
97
98Symbols and abbreviated terms ............................................................................................................ 1
99
1004
101
102Notation ................................................................................................................................................. 1
1034.1
104Introduction ................................................................................................................................ 1
1054.2
106Named Constants ...................................................................................................................... 2
1074.3
108Data Type Aliases (typedefs) .................................................................................................... 3
1094.4
110Enumerations............................................................................................................................. 3
1114.5
112Interface Type ............................................................................................................................ 4
1134.6
114Arrays ........................................................................................................................................ 5
1154.7
116Structure Definitions .................................................................................................................. 6
1174.8
118Conditional Types ...................................................................................................................... 7
1194.9
120Unions........................................................................................................................................ 8
1214.9.1
122Introduction...................................................................................................................... 8
1234.9.2
124Union Definition ............................................................................................................... 8
1254.9.3
126Union Instance ................................................................................................................ 9
1274.9.4
128Union Selector Definition ............................................................................................... 10
1294.10 Bit Field Definitions .................................................................................................................. 11
1304.11 Parameter Limits ..................................................................................................................... 11
1314.12 Enumeration Macro ................................................................................................................. 13
1324.13 Size Checking .......................................................................................................................... 13
1334.14 Data Direction .......................................................................................................................... 14
1344.15 Structure Validations ............................................................................................................... 14
1354.16 Name Prefix Convention .......................................................................................................... 14
1364.17 Data Alignment ........................................................................................................................ 15
1374.18 Parameter Unmarshaling Errors .............................................................................................. 15
138
1395
140
141Base Types ......................................................................................................................................... 17
1425.1
143Primitive Types ........................................................................................................................ 17
1445.2
145Miscellaneous Types ............................................................................................................... 17
146
1476
148
149Constants ............................................................................................................................................ 18
1506.1
151TPM_SPEC (Specification Version Values) ............................................................................ 18
1526.2
153TPM_GENERATED ................................................................................................................. 18
1546.3
155TPM_ALG_ID .......................................................................................................................... 19
1566.4
157TPM_ECC_CURVE ................................................................................................................. 22
1586.5
159TPM_CC (Command Codes) .................................................................................................. 22
1606.5.1
161Format ........................................................................................................................... 22
1626.5.2
163Description .................................................................................................................... 23
1646.5.3
165TPM_CC Listing ............................................................................................................ 24
1666.6
167TPM_RC (Response Codes) ................................................................................................... 28
1686.6.1
169Description .................................................................................................................... 28
1706.6.2
171Response Code Formats .............................................................................................. 29
1726.6.3
173TPM_RC Values ........................................................................................................... 32
1746.7
175TPM_CLOCK_ADJUST ........................................................................................................... 37
1766.8
177TPM_EO (EA Arithmetic Operands) ........................................................................................ 37
1786.9
179TPM_ST (Structure Tags) ....................................................................................................... 38
1806.10 TPM_SU (Startup Type) .......................................................................................................... 40
1816.11 TPM_SE (Session Type) ......................................................................................................... 40
1826.12 TPM_CAP (Capabilities) .......................................................................................................... 41
1836.13 TPM_PT (Property Tag) .......................................................................................................... 41
1846.14 TPM_PT_PCR (PCR Property Tag) ........................................................................................ 47
1856.15 TPM_PS (Platform Specific) .................................................................................................... 49
186
187Family “2.0”
188Level 00 Revision 00.99
189
190Published
191Copyright © TCG 2006-2013
192
193Page iii
194October 31, 2013
195
196Part 2: Structures
197
198Trusted Platform Module Library
199
2007
201
202Handles ............................................................................................................................................... 50
2037.1
204Introduction .............................................................................................................................. 50
2057.2
206TPM_HT (Handle Types) ......................................................................................................... 50
2077.3
208Persistent Handle Sub-ranges................................................................................................. 51
2097.4
210TPM_RH (Permanent Handles)............................................................................................... 52
2117.5
212TPM_HC (Handle Value Constants) ....................................................................................... 53
213
2148
215
216Attribute Structures .............................................................................................................................. 55
2178.1
218Description ............................................................................................................................... 55
2198.2
220TPMA_ALGORITHM ............................................................................................................... 55
2218.3
222TPMA_OBJECT (Object Attributes) ........................................................................................ 55
2238.3.1
224Introduction.................................................................................................................... 55
2258.3.2
226Structure Definition ........................................................................................................ 56
2278.3.3
228Attribute Descriptions .................................................................................................... 57
2298.3.3.1
230Introduction ............................................................................................................ 57
2318.3.3.2
232Bit[1] – fixedTPM ................................................................................................... 57
2338.3.3.3
234Bit[2] – stClear ....................................................................................................... 58
2358.3.3.4
236Bit[4] – fixedParent ................................................................................................ 58
2378.3.3.5
238Bit[5] – sensitiveDataOrigin ................................................................................... 58
2398.3.3.6
240Bit[6] – userWithAuth............................................................................................. 59
2418.3.3.7
242Bit[7] – adminWithPolicy........................................................................................ 59
2438.3.3.8
244Bit[10] – noDA ....................................................................................................... 59
2458.3.3.9
246Bit[11] – encryptedDuplication .............................................................................. 60
2478.3.3.10
248Bit[16] – restricted ................................................................................................. 60
2498.3.3.11
250Bit[17] – decrypt .................................................................................................... 61
2518.3.3.12
252Bit[18] – sign .......................................................................................................... 61
2538.4
254TPMA_SESSION (Session Attributes) .................................................................................... 62
2558.5
256TPMA_LOCALITY (Locality Attribute) ..................................................................................... 63
2578.6
258TPMA_PERMANENT .............................................................................................................. 64
2598.7
260TPMA_STARTUP_CLEAR ...................................................................................................... 65
2618.8
262TPMA_MEMORY .................................................................................................................... 66
2638.9
264TPMA_CC (Command Code Attributes) ................................................................................. 67
2658.9.1
266Introduction.................................................................................................................... 67
2678.9.2
268Structure Definition ........................................................................................................ 67
2698.9.3
270Field Descriptions .......................................................................................................... 67
2718.9.3.1
272Bits[15:0] – commandIndex ................................................................................... 67
2738.9.3.2
274Bit[22] – nv ............................................................................................................ 67
2758.9.3.3
276Bit[23] – extensive ................................................................................................. 67
2778.9.3.4
278Bit[24] – flushed ..................................................................................................... 68
2798.9.3.5
280Bits[27:25] – cHandles .......................................................................................... 68
2818.9.3.6
282Bit[28] – rHandle .................................................................................................... 68
2838.9.3.7
284Bit[29] – V .............................................................................................................. 69
2858.9.3.8
286Bits[31:30] – Res ................................................................................................... 69
287
2889
289
290Interface Types .................................................................................................................................... 70
2919.1
292Introduction .............................................................................................................................. 70
2939.2
294TPMI_YES_NO ....................................................................................................................... 70
2959.3
296TPMI_DH_OBJECT ................................................................................................................. 70
2979.4
298TPMI_DH_PERSISTENT ........................................................................................................ 71
2999.5
300TPMI_DH_ENTITY .................................................................................................................. 71
3019.6
302TPMI_DH_PCR ....................................................................................................................... 72
3039.7
304TPMI_SH_AUTH_SESSION ................................................................................................... 72
3059.8
306TPMI_SH_HMAC .................................................................................................................... 72
3079.9
308TPMI_SH_POLICY .................................................................................................................. 72
3099.10 TPMI_DH_CONTEXT .............................................................................................................. 73
3109.11 TPMI_RH_HIERARCHY .......................................................................................................... 73
3119.12 TPMI_RH_ENABLES .............................................................................................................. 73
312
313Page iv
314October 31, 2013
315
316Published
317Copyright © TCG 2006-2013
318
319Family “2.0”
320Level 00 Revision 00.99
321
322Trusted Platform Module Library
3239.13
3249.14
3259.15
3269.16
3279.17
3289.18
3299.19
3309.20
3319.21
3329.22
3339.23
3349.24
3359.25
3369.26
3379.27
3389.28
3399.29
3409.30
34110
342
343Part 2: Structures
344
345TPMI_RH_HIERARCHY_AUTH .............................................................................................. 74
346TPMI_RH_PLATFORM ........................................................................................................... 74
347TPMI_RH_OWNER ................................................................................................................. 74
348TPMI_RH_ENDORSEMENT ................................................................................................... 75
349TPMI_RH_PROVISION ........................................................................................................... 75
350TPMI_RH_CLEAR ................................................................................................................... 75
351TPMI_RH_NV_AUTH .............................................................................................................. 76
352TPMI_RH_LOCKOUT ............................................................................................................. 76
353TPMI_RH_NV_INDEX ............................................................................................................. 76
354TPMI_ALG_HASH ................................................................................................................... 77
355TPMI_ALG_ASYM (Asymmetric Algorithms) .......................................................................... 77
356TPMI_ALG_SYM (Symmetric Algorithms) .............................................................................. 78
357TPMI_ALG_SYM_OBJECT ..................................................................................................... 78
358TPMI_ALG_SYM_MODE ........................................................................................................ 79
359TPMI_ALG_KDF (Key and Mask Generation Functions) ........................................................ 79
360TPMI_ALG_SIG_SCHEME ..................................................................................................... 80
361TPMI_ECC_KEY_EXCHANGE ............................................................................................... 80
362TPMI_ST_COMMAND_TAG ................................................................................................... 80
363
364Structure Definitions ............................................................................................................................ 81
36510.1 TPMS_ALGORITHM_DESCRIPTION .................................................................................... 81
36610.2 Hash/Digest Structures ............................................................................................................ 81
36710.2.1
368TPMU_HA (Hash) ......................................................................................................... 81
36910.2.2
370TPMT_HA...................................................................................................................... 82
37110.3 Sized Buffers ........................................................................................................................... 82
37210.3.1
373Introduction.................................................................................................................... 82
37410.3.2
375TPM2B_DIGEST ........................................................................................................... 83
37610.3.3
377TPM2B_DATA ............................................................................................................... 83
37810.3.4
379TPM2B_NONCE ........................................................................................................... 83
38010.3.5
381TPM2B_AUTH .............................................................................................................. 83
38210.3.6
383TPM2B_OPERAND ...................................................................................................... 84
38410.3.7
385TPM2B_EVENT ............................................................................................................ 84
38610.3.8
387TPM2B_MAX_BUFFER ................................................................................................ 84
38810.3.9
389TPM2B_MAX_NV_BUFFER ......................................................................................... 84
39010.3.10 TPM2B_TIMEOUT ........................................................................................................ 85
39110.3.11 TPM2B_IV ..................................................................................................................... 85
39210.4 Names ..................................................................................................................................... 85
39310.4.1
394Introduction.................................................................................................................... 85
39510.4.2
396TPMU_NAME ................................................................................................................ 85
39710.4.3
398TPM2B_NAME .............................................................................................................. 86
39910.5 PCR Structures ........................................................................................................................ 86
40010.5.1
401TPMS_PCR_SELECT ................................................................................................... 86
40210.5.2
403TPMS_PCR_SELECTION ............................................................................................ 87
40410.6 Tickets ..................................................................................................................................... 87
40510.6.1
406Introduction.................................................................................................................... 87
40710.6.2
408A NULL Ticket ............................................................................................................... 88
40910.6.3
410TPMT_TK_CREATION ................................................................................................. 89
41110.6.4
412TPMT_TK_VERIFIED ................................................................................................... 90
41310.6.5
414TPMT_TK_AUTH .......................................................................................................... 91
41510.6.6
416TPMT_TK_HASHCHECK ............................................................................................. 92
41710.7 Property Structures .................................................................................................................. 92
41810.7.1
419TPMS_ALG_PROPERTY ............................................................................................. 92
42010.7.2
421TPMS_TAGGED_PROPERTY ..................................................................................... 92
42210.7.3
423TPMS_TAGGED_PCR_SELECT ................................................................................. 93
42410.8 Lists ......................................................................................................................................... 93
425
426Family “2.0”
427Level 00 Revision 00.99
428
429Published
430Copyright © TCG 2006-2013
431
432Page v
433October 31, 2013
434
435Part 2: Structures
436
437Trusted Platform Module Library
438
43910.8.1
440TPML_CC...................................................................................................................... 93
44110.8.2
442TPML_CCA ................................................................................................................... 94
44310.8.3
444TPML_ALG.................................................................................................................... 94
44510.8.4
446TPML_HANDLE ............................................................................................................ 94
44710.8.5
448TPML_DIGEST ............................................................................................................. 95
44910.8.6
450TPML_DIGEST_VALUES ............................................................................................. 95
45110.8.7
452TPM2B_DIGEST_VALUES........................................................................................... 95
45310.8.8
454TPML_PCR_SELECTION............................................................................................. 96
45510.8.9
456TPML_ALG_PROPERTY.............................................................................................. 96
45710.8.10 TPML_TAGGED_TPM_PROPERTY ............................................................................ 96
45810.8.11 TPML_TAGGED_PCR_PROPERTY ............................................................................ 97
45910.8.12 TPML_ECC_CURVE .................................................................................................... 97
46010.9 Capabilities Structures ............................................................................................................. 97
46110.9.1
462TPMU_CAPABILITIES .................................................................................................. 97
46310.9.2
464TPMS_CAPABILITY_DATA .......................................................................................... 98
46510.10 Clock/Counter Structures ........................................................................................................ 98
46610.10.1 TPMS_CLOCK_INFO ................................................................................................... 98
46710.10.2 Clock ............................................................................................................................. 98
46810.10.3 ResetCount ................................................................................................................... 98
46910.10.4 RestartCount ................................................................................................................. 99
47010.10.5 Safe ............................................................................................................................... 99
47110.10.6 TPMS_TIME_INFO ....................................................................................................... 99
47210.11 TPM Attestation Structures .................................................................................................... 100
47310.11.1 Introduction.................................................................................................................. 100
47410.11.2 TPMS_TIME_ATTEST_INFO ..................................................................................... 100
47510.11.3 TPMS_CERTIFY_INFO .............................................................................................. 100
47610.11.1 TPMS_QUOTE_INFO ................................................................................................. 100
47710.11.2 TPMS_COMMAND_AUDIT_INFO .............................................................................. 101
47810.11.3 TPMS_SESSION_AUDIT_INFO ................................................................................. 101
47910.11.4 TPMS_CREATION_INFO ........................................................................................... 101
48010.11.5 TPMS_NV_CERTIFY_INFO ....................................................................................... 101
48110.11.6 TPMI_ST_ATTEST ..................................................................................................... 102
48210.11.7 TPMU_ATTEST .......................................................................................................... 102
48310.11.8 TPMS_ATTEST .......................................................................................................... 103
48410.11.9 TPM2B_ATTEST ........................................................................................................ 103
48510.12 Authorization Structures ........................................................................................................ 104
48610.12.1 TPMS_AUTH_COMMAND ......................................................................................... 104
48710.12.2 TPMS_AUTH_RESPONSE ........................................................................................ 104
48811
489
490Algorithm Parameters and Structures ............................................................................................... 105
49111.1 Symmetric .............................................................................................................................. 105
49211.1.1
493Introduction.................................................................................................................. 105
49411.1.2
495TPMI_AES_KEY_BITS ............................................................................................... 105
49611.1.3
497TPMI_SM4_KEY_BITS ............................................................................................... 105
49811.1.4
499TPMU_SYM_KEY_BITS ............................................................................................. 106
50011.1.5
501TPMU_SYM_MODE ................................................................................................... 106
50211.1.6
503TPMU_SYM_DETAILS ............................................................................................... 107
50411.1.7
505TPMT_SYM_DEF ....................................................................................................... 107
50611.1.8
507TPMT_SYM_DEF_OBJECT ....................................................................................... 107
50811.1.9
509TPM2B_SYM_KEY ..................................................................................................... 108
51011.1.10 TPMS_SYMCIPHER_PARMS .................................................................................... 108
51111.1.11 TPM2B_SENSITIVE_DATA ........................................................................................ 108
51211.1.12 TPMS_SENSITIVE_CREATE ..................................................................................... 109
51311.1.13 TPM2B_SENSITIVE_CREATE ................................................................................... 110
51411.1.14 TPMS_SCHEME_SIGHASH....................................................................................... 110
51511.1.15 TPMI_ALG_HASH_SCHEME ..................................................................................... 110
516
517Page vi
518October 31, 2013
519
520Published
521Copyright © TCG 2006-2013
522
523Family “2.0”
524Level 00 Revision 00.99
525
526Trusted Platform Module Library
527
528Part 2: Structures
529
53011.1.16 HMAC_SIG_SCHEME ................................................................................................ 110
53111.1.17 TPMS_SCHEME_XOR ............................................................................................... 111
53211.1.18 TPMU_SCHEME_HMAC ............................................................................................ 111
53311.1.19 TPMT_KEYEDHASH_SCHEME ................................................................................. 111
53411.2 Asymmetric ............................................................................................................................ 112
53511.2.1
536Signing Schemes ........................................................................................................ 112
53711.2.1.1
538Introduction .......................................................................................................... 112
53911.2.1.2
540RSA_SIG_SCHEMES ......................................................................................... 112
54111.2.1.3
542ECC_SIG_SCHEMES ......................................................................................... 112
54311.2.1.4
544TPMS_SCHEME_ECDAA................................................................................... 112
54511.2.1.5
546TPMU_SIG_SCHEME......................................................................................... 113
54711.2.1.6
548TPMT_SIG_SCHEME ......................................................................................... 113
54911.2.2
550Encryption Schemes ................................................................................................... 114
55111.2.2.1
552Introduction .......................................................................................................... 114
55311.2.2.2
554TPMS_SCHEME_OAEP ..................................................................................... 114
55511.2.2.3
556TPMS_SCHEME_ECDH ..................................................................................... 114
55711.2.3
558Key Derivation Schemes ............................................................................................. 114
55911.2.3.1
560Introduction .......................................................................................................... 114
56111.2.3.2
562TPMS_SCHEME_MGF1 ..................................................................................... 114
56311.2.3.3
564TPMS_SCHEME_KDF1_SP800_56a ................................................................. 114
56511.2.3.4
566TPMS_SCHEME_KDF2 ...................................................................................... 115
56711.2.3.5
568TPMS_SCHEME_KDF1_SP800_108 ................................................................. 115
56911.2.3.6
570TPMU_KDF_SCHEME........................................................................................ 115
57111.2.3.7
572TPMT_KDF_SCHEME ........................................................................................ 115
57311.2.3.8
574TPMI_ALG_ASYM_SCHEME ............................................................................. 116
57511.2.3.9
576TPMU_ASYM_SCHEME..................................................................................... 116
57711.2.3.10 TPMT_ASYM_SCHEME ..................................................................................... 117
57811.2.4
579RSA ............................................................................................................................. 117
58011.2.4.1
581TPMI_ALG_RSA_SCHEME ................................................................................ 117
58211.2.4.2
583TPMT_RSA_SCHEME ........................................................................................ 117
58411.2.4.3
585TPMI_ALG_RSA_DECRYPT .............................................................................. 118
58611.2.4.4
587TPMT_RSA_DECRYPT ...................................................................................... 118
58811.2.4.5
589TPM2B_PUBLIC_KEY_RSA ............................................................................... 118
59011.2.4.6
591TPMI_RSA_KEY_BITS ....................................................................................... 118
59211.2.4.7
593TPM2B_PRIVATE_KEY_RSA ............................................................................ 119
59411.2.5
595ECC ............................................................................................................................. 120
59611.2.5.1
597TPM2B_ECC_PARAMETER .............................................................................. 120
59811.2.5.2
599TPMS_ECC_POINT ............................................................................................ 120
60011.2.5.3
601TPM2B_ECC_POINT .......................................................................................... 120
60211.2.5.4
603TPMI_ALG_ECC_SCHEME ............................................................................... 121
60411.2.5.5
605TPMI_ECC_CURVE ............................................................................................ 121
60611.2.5.6
607TPMT_ECC_SCHEME........................................................................................ 121
60811.2.5.7
609TPMS_ALGORITHM_DETAIL_ECC ................................................................... 122
61011.3 Signatures.............................................................................................................................. 122
61111.3.1
612TPMS_SIGNATURE_RSASSA .................................................................................. 122
61311.3.2
614TPMS_SIGNATURE_RSAPSS .................................................................................. 122
61511.3.3
616TPMS_SIGNATURE_ECDSA ..................................................................................... 123
61711.3.4
618TPMU_SIGNATURE ................................................................................................... 123
61911.3.5
620TPMT_SIGNATURE ................................................................................................... 124
62111.4 Key/Secret Exchange ............................................................................................................ 124
62211.4.1
623Introduction.................................................................................................................. 124
62411.4.2
625TPMU_ENCRYPTED_SECRET ................................................................................. 124
62611.4.3
627TPM2B_ENCRYPTED_SECRET ............................................................................... 125
62812
629
630Key/Object Complex.......................................................................................................................... 126
631
632Family “2.0”
633Level 00 Revision 00.99
634
635Published
636Copyright © TCG 2006-2013
637
638Page vii
639October 31, 2013
640
641Part 2: Structures
642
643Trusted Platform Module Library
644
64512.1 Introduction ............................................................................................................................ 126
64612.2 Public Area Structures ........................................................................................................... 126
64712.2.1
648Description .................................................................................................................. 126
64912.2.2
650TPMI_ALG_PUBLIC ................................................................................................... 126
65112.2.3
652Type-Specific Parameters ........................................................................................... 126
65312.2.3.1
654Description .......................................................................................................... 126
65512.2.3.2
656TPMU_PUBLIC_ID .............................................................................................. 127
65712.2.3.3
658TPMS_KEYEDHASH_PARMS ........................................................................... 127
65912.2.3.4
660TPMS_ASYM_PARMS ....................................................................................... 127
66112.2.3.5
662TPMS_RSA_PARMS .......................................................................................... 128
66312.2.3.6
664TPMS_ECC_PARMS .......................................................................................... 129
66512.2.3.7
666TPMU_PUBLIC_PARMS .................................................................................... 129
66712.2.3.8
668TPMT_PUBLIC_PARMS ..................................................................................... 130
66912.2.4
670TPMT_PUBLIC ........................................................................................................... 130
67112.2.5
672TPM2B_PUBLIC ......................................................................................................... 131
67312.3 Private Area Structures ......................................................................................................... 131
67412.3.1
675Introduction.................................................................................................................. 131
67612.3.2
677Sensitive Data Structures ............................................................................................ 131
67812.3.2.1
679Introduction .......................................................................................................... 131
68012.3.2.2
681TPM2B_PRIVATE_VENDOR_SPECIFIC ........................................................... 131
68212.3.2.3
683TPMU_SENSITIVE_COMPOSITE ...................................................................... 132
68412.3.2.4
685TPMT_SENSITIVE .............................................................................................. 132
68612.3.3
687TPM2B_SENSITIVE ................................................................................................... 132
68812.3.4
689Encryption ................................................................................................................... 133
69012.3.5
691Integrity........................................................................................................................ 133
69212.3.6
693_PRIVATE ................................................................................................................... 133
69412.3.7
695TPM2B_PRIVATE ....................................................................................................... 133
69612.4 Identity Object ........................................................................................................................ 134
69712.4.1
698Description .................................................................................................................. 134
69912.4.2
700_ID_OBJECT .............................................................................................................. 134
70112.4.3
702TPM2B_ID_OBJECT .................................................................................................. 134
70313
704
705NV Storage Structures ...................................................................................................................... 135
70613.1 TPM_NV_INDEX ................................................................................................................... 135
70713.2 TPMA_NV (NV Index Attributes) ........................................................................................... 136
70813.3 TPMS_NV_PUBLIC ............................................................................................................... 139
70913.4 TPM2B_NV_PUBLIC ............................................................................................................. 139
710
71114
712
713Context Data ..................................................................................................................................... 140
71414.1 Introduction ............................................................................................................................ 140
71514.2 TPM2B_CONTEXT_SENSITIVE........................................................................................... 140
71614.3 TPMS_CONTEXT_DATA ...................................................................................................... 140
71714.4 TPM2B_CONTEXT_DATA .................................................................................................... 140
71814.5 TPMS_CONTEXT ................................................................................................................. 141
71914.6 Parameters of TPMS_CONTEXT .......................................................................................... 142
72014.6.1
721sequence ..................................................................................................................... 142
72214.6.2
723savedHandle ............................................................................................................... 142
72414.6.3
725hierarchy...................................................................................................................... 143
72614.7 Context Protection ................................................................................................................. 143
72714.7.1
728Context Integrity .......................................................................................................... 143
72914.7.2
730Context Confidentiality ................................................................................................ 143
731
73215
733
734Creation Data .................................................................................................................................... 144
73515.1 TPMS_CREATION_DATA .................................................................................................... 144
73615.2 TPM2B_CREATION_DATA .................................................................................................. 144
737
738Page viii
739October 31, 2013
740
741Published
742Copyright © TCG 2006-2013
743
744Family “2.0”
745Level 00 Revision 00.99
746
747Trusted Platform Module Library
748
749Part 2: Structures
750
751Annex A (informative) Algorithm Constants ............................................................................................. 145
752A.1
753Introduction ............................................................................................................................ 145
754A.2
755Allowed Hash Algorithms....................................................................................................... 145
756A.2.1
757SHA1 ........................................................................................................................... 145
758A.2.2
759SHA256 ....................................................................................................................... 145
760A.2.3
761SHA384 ....................................................................................................................... 145
762A.2.4
763SHA512 ....................................................................................................................... 146
764A.2.5
765SM3_256 ..................................................................................................................... 146
766A.3
767Architectural Limits ................................................................................................................ 146
768Annex B (informative) Implementation Definitions ................................................................................... 147
769B.1
770Introduction ............................................................................................................................ 147
771B.2
772Logic Values .......................................................................................................................... 147
773B.3
774Processor Values .................................................................................................................. 147
775B.4
776Implemented Algorithms ........................................................................................................ 148
777B.5
778Implemented Commands ...................................................................................................... 148
779B.6
780Algorithm Constants .............................................................................................................. 151
781B.6.1
782RSA ............................................................................................................................. 152
783B.6.2
784ECC ............................................................................................................................. 152
785B.6.3
786AES ............................................................................................................................. 152
787B.6.4
788SM4 ............................................................................................................................. 152
789B.6.5
790Symmetric ................................................................................................................... 153
791B.7
792Implementation Specific Values ............................................................................................ 154
793
794Family “2.0”
795Level 00 Revision 00.99
796
797Published
798Copyright © TCG 2006-2013
799
800Page ix
801October 31, 2013
802
803Part 2: Structures
804
805Trusted Platform Module Library
806
807Tables
808Table 1 — Name Prefix Convention ........................................................................................................... 15
809Table 2 — Unmarshaling Errors ................................................................................................................. 16
810Table 3 — Definition of Base Types ........................................................................................................... 17
811Table 4 — Definition of Types for Documentation Clarity ........................................................................... 17
812Table 5 — Definition of (UINT32) TPM_SPEC Constants <> ..................................................................... 18
813Table 6 — Definition of (UINT32) TPM_GENERATED Constants <O> ..................................................... 18
814Table 7 — Definition of (UINT16) TPM_ALG_ID Constants <IN/OUT, S> ................................................. 19
815Table 8 — Definition of (UINT16) {ECC} TPM_ECC_CURVE Constants <IN/OUT, S> ............................ 22
816Table 9 — TPM Command Format Fields Description ............................................................................... 22
817Table 10 — Legend for Command Code Tables ........................................................................................ 23
818Table 11 — Definition of (UINT32) TPM_CC Constants (Numeric Order) <IN/OUT, S> ........................... 24
819Table 12 — Format-Zero Response Codes ................................................................................................ 30
820Table 13 — Format-One Response Codes ................................................................................................ 31
821Table 14 — Response Code Groupings ..................................................................................................... 31
822Table 15 — Definition of (UINT32) TPM_RC Constants (Actions) <OUT> ................................................ 32
823Table 16 — Definition of (INT8) TPM_CLOCK_ADJUST Constants <IN> ................................................. 37
824Table 17 — Definition of (UINT16) TPM_EO Constants <IN/OUT> ........................................................... 37
825Table 18 — Definition of (UINT16) TPM_ST Constants <IN/OUT, S> ....................................................... 38
826Table 19 — Definition of (UINT16) TPM_SU Constants <IN> .................................................................... 40
827Table 20 — Definition of (UINT8) TPM_SE Constants <IN> ...................................................................... 40
828Table 21 — Definition of (UINT32) TPM_CAP Constants .......................................................................... 41
829Table 22 — Definition of (UINT32) TPM_PT Constants <IN/OUT, S> ....................................................... 41
830Table 23 — Definition of (UINT32) TPM_PT_PCR Constants <IN/OUT, S> ............................................. 47
831Table 24 — Definition of (UINT32) TPM_PS Constants <OUT> ................................................................ 49
832Table 25 — Definition of Types for Handles ............................................................................................... 50
833Table 26 — Definition of (UINT8) TPM_HT Constants <S> ....................................................................... 50
834Table 27 — Definition of (UINT32) TPM_RH Constants <IN, S> ............................................................... 52
835Table 28 — Definition of (TPM_HANDLE) TPM_HC Constants <IN, S> ................................................... 54
836Table 29 — Definition of (UINT32) TPMA_ALGORITHM Bits .................................................................... 55
837Table 30 — Definition of (UINT32) TPMA_OBJECT Bits ........................................................................... 56
838Table 31 — Definition of (UINT8) TPMA_SESSION Bits <IN/OUT> .......................................................... 62
839Table 32 — Definition of (UINT8) TPMA_LOCALITY Bits <IN/OUT> ........................................................ 64
840Table 33 — Definition of (UINT32) TPMA_PERMANENT Bits <OUT> ...................................................... 64
841Table 34 — Definition of (UINT32) TPMA_STARTUP_CLEAR Bits <OUT> .............................................. 65
842Table 35 — Definition of (UINT32) TPMA_MEMORY Bits <Out> .............................................................. 66
843Table 36 — Definition of (TPM_CC) TPMA_CC Bits <OUT> ..................................................................... 67
844Table 37 — Definition of (BYTE) TPMI_YES_NO Type ............................................................................. 70
845
846Page x
847October 31, 2013
848
849Published
850Copyright © TCG 2006-2013
851
852Family “2.0”
853Level 00 Revision 00.99
854
855Trusted Platform Module Library
856
857Part 2: Structures
858
859Table 38 — Definition of (TPM_HANDLE) TPMI_DH_OBJECT Type........................................................ 70
860Table 39 — Definition of (TPM_HANDLE) TPMI_DH_PERSISTENT Type ............................................... 71
861Table 40 — Definition of (TPM_HANDLE) TPMI_DH_ENTITY Type <IN> ................................................ 71
862Table 41 — Definition of (TPM_HANDLE) TPMI_DH_PCR Type <IN> ..................................................... 72
863Table 42 — Definition of (TPM_HANDLE) TPMI_SH_AUTH_SESSION Type <IN/OUT> ........................ 72
864Table 43 — Definition of (TPM_HANDLE) TPMI_SH_HMAC Type <IN/OUT> .......................................... 72
865Table 44 — Definition of (TPM_HANDLE) TPMI_SH_POLICY Type <IN/OUT> ....................................... 72
866Table 45 — Definition of (TPM_HANDLE) TPMI_DH_CONTEXT Type .................................................... 73
867Table 46 — Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY Type ................................................ 73
868Table 47 — Definition of (TPM_HANDLE) TPMI_RH_ENABLES Type ..................................................... 73
869Table 48 — Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY_AUTH Type <IN> ............................ 74
870Table 49 — Definition of (TPM_HANDLE) TPMI_RH_PLATFORM Type <IN> ......................................... 74
871Table 50 — Definition of (TPM_HANDLE) TPMI_RH_OWNER Type <IN> ............................................... 74
872Table 51 — Definition of (TPM_HANDLE) TPMI_RH_ENDORSEMENT Type <IN> ................................. 75
873Table 52 — Definition of (TPM_HANDLE) TPMI_RH_PROVISION Type <IN> ......................................... 75
874Table 53 — Definition of (TPM_HANDLE) TPMI_RH_CLEAR Type <IN> ................................................. 75
875Table 54 — Definition of (TPM_HANDLE) TPMI_RH_NV_AUTH Type <IN> ............................................ 76
876Table 55 — Definition of (TPM_HANDLE) TPMI_RH_LOCKOUT Type <IN> ........................................... 76
877Table 56 — Definition of (TPM_HANDLE) TPMI_RH_NV_INDEX Type <IN/OUT> .................................. 76
878Table 57 — Definition of (TPM_ALG_ID) TPMI_ALG_HASH Type............................................................ 77
879Table 58 — Definition of (TPM_ALG_ID) TPMI_ALG_ASYM Type ........................................................... 77
880Table 59 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM Type .............................................................. 78
881Table 60 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM_OBJECT Type ............................................. 78
882Table 61 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM_MODE Type ................................................. 79
883Table 62 — Definition of (TPM_ALG_ID) TPMI_ALG_KDF Type .............................................................. 79
884Table 63 — Definition of (TPM_ALG_ID) TPMI_ALG_SIG_SCHEME Type .............................................. 80
885Table 64 — Definition of (TPM_ALG_ID) TPMI_ECC_KEY_EXCHANGE Type ........................................ 80
886Table 65 — Definition of (TPM_ST) TPMI_ST_COMMAND_TAG Type .................................................... 80
887Table 66 — Definition of TPMS_ALGORITHM_DESCRIPTION Structure <OUT> .................................... 81
888Table 67 — Definition of TPMU_HA Union <IN/OUT, S> ........................................................................... 81
889Table 68 — Definition of TPMT_HA Structure <IN/OUT> .......................................................................... 82
890Table 69 — Definition of TPM2B_DIGEST Structure ................................................................................. 83
891Table 70 — Definition of TPM2B_DATA Structure ..................................................................................... 83
892Table 71 — Definition of Types for TPM2B_NONCE ................................................................................. 83
893Table 72 — Definition of Types for TPM2B_AUTH .................................................................................... 83
894Table 73 — Definition of Types for TPM2B_OPERAND ............................................................................ 84
895Table 74 — Definition of TPM2B_EVENT Structure ................................................................................... 84
896Table 75 — Definition of TPM2B_MAX_BUFFER Structure ...................................................................... 84
897
898Family “2.0”
899Level 00 Revision 00.99
900
901Published
902Copyright © TCG 2006-2013
903
904Page xi
905October 31, 2013
906
907Part 2: Structures
908
909Trusted Platform Module Library
910
911Table 76 — Definition of TPM2B_MAX_NV_BUFFER Structure ............................................................... 84
912Table 77 — Definition of TPM2B_TIMEOUT Structure <IN/OUT> ............................................................. 85
913Table 78 — Definition of TPM2B_IV Structure <IN/OUT> .......................................................................... 85
914Table 79 — Definition of TPMU_NAME Union <> ...................................................................................... 85
915Table 80 — Definition of TPM2B_NAME Structure .................................................................................... 86
916Table 81 — Definition of TPMS_PCR_SELECT Structure ......................................................................... 87
917Table 82 — Definition of TPMS_PCR_SELECTION Structure ................................................................... 87
918Table 83 — Values for proof Used in Tickets ............................................................................................. 88
919Table 84 — General Format of a Ticket ...................................................................................................... 88
920Table 85 — Definition of TPMT_TK_CREATION Structure ........................................................................ 89
921Table 86 — Definition of TPMT_TK_VERIFIED Structure .......................................................................... 90
922Table 87 — Definition of TPMT_TK_AUTH Structure ................................................................................ 91
923Table 88 — Definition of TPMT_TK_HASHCHECK Structure .................................................................... 92
924Table 89 — Definition of TPMS_ALG_PROPERTY Structure <OUT> ....................................................... 92
925Table 90 — Definition of TPMS_TAGGED_PROPERTY Structure <OUT> ............................................... 92
926Table 91 — Definition of TPMS_TAGGED_PCR_SELECT Structure <OUT> ........................................... 93
927Table 92 — Definition of TPML_CC Structure ............................................................................................ 93
928Table 93 — Definition of TPML_CCA Structure <OUT> ............................................................................. 94
929Table 94 — Definition of TPML_ALG Structure .......................................................................................... 94
930Table 95 — Definition of TPML_HANDLE Structure <OUT>...................................................................... 94
931Table 96 — Definition of TPML_DIGEST Structure .................................................................................... 95
932Table 97 — Definition of TPML_DIGEST_VALUES Structure ................................................................... 95
933Table 98 — Definition of TPM2B_DIGEST_VALUES Structure ................................................................. 95
934Table 99 — Definition of TPML_PCR_SELECTION Structure ................................................................... 96
935Table 100 — Definition of TPML_ALG_PROPERTY Structure <OUT> ..................................................... 96
936Table 101 — Definition of TPML_TAGGED_TPM_PROPERTY Structure <OUT> ................................... 96
937Table 102 — Definition of TPML_TAGGED_PCR_PROPERTY Structure <OUT> ................................... 97
938Table 103 — Definition of {ECC} TPML_ECC_CURVE Structure <OUT> ................................................. 97
939Table 104 — Definition of TPMU_CAPABILITIES Union <OUT>............................................................... 97
940Table 105 — Definition of TPMS_CAPABILITY_DATA Structure <OUT> ................................................. 98
941Table 106 — Definition of TPMS_CLOCK_INFO Structure ........................................................................ 98
942Table 107 — Definition of TPMS_TIME_INFO Structure ........................................................................... 99
943Table 108 — Definition of TPMS_TIME_ATTEST_INFO Structure <OUT> ............................................. 100
944Table 109 — Definition of TPMS_CERTIFY_INFO Structure <OUT> ...................................................... 100
945Table 110 — Definition of TPMS_QUOTE_INFO Structure <OUT> ........................................................ 100
946Table 111 — Definition of TPMS_COMMAND_AUDIT_INFO Structure <OUT> ..................................... 101
947Table 112 — Definition of TPMS_SESSION_AUDIT_INFO Structure <OUT> ........................................ 101
948Table 113 — Definition of TPMS_CREATION_INFO Structure <OUT> .................................................. 101
949Table 114 — Definition of TPMS_NV_CERTIFY_INFO Structure <OUT> ............................................... 101
950Page xii
951October 31, 2013
952
953Published
954Copyright © TCG 2006-2013
955
956Family “2.0”
957Level 00 Revision 00.99
958
959Trusted Platform Module Library
960
961Part 2: Structures
962
963Table 115 — Definition of (TPM_ST) TPMI_ST_ATTEST Type <OUT> .................................................. 102
964Table 116 — Definition of TPMU_ATTEST Union <OUT> ....................................................................... 102
965Table 117 — Definition of TPMS_ATTEST Structure <OUT> .................................................................. 103
966Table 118 — Definition of TPM2B_ATTEST Structure <OUT> ................................................................ 103
967Table 119 — Definition of TPMS_AUTH_COMMAND Structure <IN> ..................................................... 104
968Table 120 — Definition of TPMS_AUTH_RESPONSE Structure <OUT> ................................................ 104
969Table 121 — Definition of {AES} (TPM_KEY_BITS) TPMI_AES_KEY_BITS Type ................................. 105
970Table 122 — Definition of {SM4} (TPM_KEY_BITS) TPMI_SM4_KEY_BITS Type ................................. 105
971Table 123 — Definition of TPMU_SYM_KEY_BITS Union ....................................................................... 106
972Table 124 — Definition of TPMU_SYM_MODE Union ............................................................................. 106
973Table 125 — xDefinition of TPMU_SYM_DETAILS Union ....................................................................... 107
974Table 126 — Definition of TPMT_SYM_DEF Structure ............................................................................ 107
975Table 127 — Definition of TPMT_SYM_DEF_OBJECT Structure ............................................................ 107
976Table 128 — Definition of TPM2B_SYM_KEY Structure .......................................................................... 108
977Table 129 — Definition of TPMS_SYMCIPHER_PARMS Structure ........................................................ 108
978Table 130 — Definition of TPM2B_SENSITIVE_DATA Structure ............................................................ 108
979Table 131 — Definition of TPMS_SENSITIVE_CREATE Structure <IN> ................................................ 109
980Table 132 — Definition of TPM2B_SENSITIVE_CREATE Structure <IN, S> .......................................... 110
981Table 133 — Definition of TPMS_SCHEME_SIGHASH Structure ........................................................... 110
982Table 134 — Definition of (TPM_ALG_ID) TPMI_ALG_KEYEDHASH_SCHEME Type .......................... 110
983Table 135 — Definition of Types for HMAC_SIG_SCHEME .................................................................... 110
984Table 136 — Definition of TPMS_SCHEME_XOR Structure ................................................................... 111
985Table 137 — Definition of TPMU_SCHEME_KEYEDHASH Union <IN/OUT, S> .................................... 111
986Table 138 — Definition of TPMT_KEYEDHASH_SCHEME Structure ..................................................... 111
987Table 139 — Definition of {RSA} Types for RSA_SIG_SCHEMES .......................................................... 112
988Table 140 — Definition of {ECC} Types for ECC_SIG_SCHEMES.......................................................... 112
989Table 141 — Definition of {ECC} TPMS_SCHEME_ECDAA Structure .................................................... 112
990Table 142 — Definition of TPMU_SIG_SCHEME Union <IN/OUT, S> .................................................... 113
991Table 143 — Definition of TPMT_SIG_SCHEME Structure ..................................................................... 113
992Table 144 — Definition of {RSA} TPMS_SCHEME_OAEP Structure ...................................................... 114
993Table 145 — Definition of {ECC} TPMS_SCHEME_ECDH Structure ...................................................... 114
994Table 146 — Definition of TPMS_SCHEME_MGF1 Structure ................................................................. 114
995Table 147 — Definition of {ECC} TPMS_SCHEME_KDF1_SP800_56a Structure .................................. 114
996Table 148 — Definition of TPMS_SCHEME_KDF2 Structure .................................................................. 115
997Table 149 — Definition of TPMS_SCHEME_KDF1_SP800_108 Structure ............................................. 115
998Table 150 — Definition of TPMU_KDF_SCHEME Union <IN/OUT, S> ................................................... 115
999Table 151 — Definition of TPMT_KDF_SCHEME Structure .................................................................... 115
1000Table 152 — Definition of (TPM_ALG_ID) TPMI_ALG_ASYM_SCHEME Type <> ................................. 116
1001
1002Family “2.0”
1003Level 00 Revision 00.99
1004
1005Published
1006Copyright © TCG 2006-2013
1007
1008Page xiii
1009October 31, 2013
1010
1011Part 2: Structures
1012
1013Trusted Platform Module Library
1014
1015Table 153 — Definition of TPMU_ASYM_SCHEME Union ...................................................................... 116
1016Table 154 — Definition of TPMT_ASYM_SCHEME Structure <> ............................................................ 117
1017Table 155 — Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_SCHEME Type .............................. 117
1018Table 156 — Definition of {RSA} TPMT_RSA_SCHEME Structure ......................................................... 117
1019Table 157 — Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_DECRYPT Type ............................ 118
1020Table 158 — Definition of {RSA} TPMT_RSA_DECRYPT Structure ....................................................... 118
1021Table 159 — Definition of {RSA} TPM2B_PUBLIC_KEY_RSA Structure ................................................ 118
1022Table 160 — Definition of {RSA} (TPM_KEY_BITS) TPMI_RSA_KEY_BITS Type ................................. 119
1023Table 161 — Definition of {RSA} TPM2B_PRIVATE_KEY_RSA Structure .............................................. 119
1024Table 162 — Definition of {ECC} TPM2B_ECC_PARAMETER Structure ............................................... 120
1025Table 163 — Definition of {ECC} TPMS_ECC_POINT Structure ............................................................. 120
1026Table 164 — Definition of {ECC} TPM2B_ECC_POINT Structure ........................................................... 120
1027Table 165 — Definition of (TPM_ALG_ID) {ECC} TPMI_ALG_ECC_SCHEME Type ............................. 121
1028Table 166 — Definition of {ECC} (TPM_ECC_CURVE) TPMI_ECC_CURVE Type ................................ 121
1029Table 167 — Definition of (TPMT_SIG_SCHEME) {ECC} TPMT_ECC_SCHEME Structure .................. 121
1030Table 168 — Definition of {ECC} TPMS_ALGORITHM_DETAIL_ECC Structure <OUT> ....................... 122
1031Table 169 — Definition of {RSA} TPMS_SIGNATURE_RSASSA Structure ............................................ 122
1032Table 170 — Definition of {RSA} TPMS_SIGNATURE_RSAPSS Structure ............................................ 123
1033Table 171 — Definition of {ECC} TPMS_SIGNATURE_ECDSA Structure .............................................. 123
1034Table 172 — Definition of TPMU_SIGNATURE Union <IN/OUT, S> ....................................................... 123
1035Table 173 — Definition of TPMT_SIGNATURE Structure ........................................................................ 124
1036Table 174 — Definition of TPMU_ENCRYPTED_SECRET Union <S> ................................................... 124
1037Table 175 — Definition of TPM2B_ENCRYPTED_SECRET Structure .................................................... 125
1038Table 176 — Definition of (TPM_ALG_ID) TPMI_ALG_PUBLIC Type .................................................... 126
1039Table 177 — Definition of TPMU_PUBLIC_ID Union <IN/OUT, S> ......................................................... 127
1040Table 178 — Definition of TPMS_KEYEDHASH_PARMS Structure........................................................ 127
1041Table 179 — Definition of TPMS_ASYM_PARMS Structure <> .............................................................. 128
1042Table 180 — Definition of {RSA} TPMS_RSA_PARMS Structure ............................................................ 128
1043Table 181 — Definition of {ECC} TPMS_ECC_PARMS Structure ........................................................... 129
1044Table 182 — Definition of TPMU_PUBLIC_PARMS Union <IN/OUT, S> ................................................ 129
1045Table 183 — Definition of TPMT_PUBLIC_PARMS Structure ................................................................. 130
1046Table 184 — Definition of TPMT_PUBLIC Structure ................................................................................ 130
1047Table 185 — Definition of TPM2B_PUBLIC Structure .............................................................................. 131
1048Table 186 — Definition of {RSA} TPM2B_PRIVATE_VENDOR_SPECIFIC Structure<> ........................ 131
1049Table 187 — Definition of TPMU_SENSITIVE_COMPOSITE Union <IN/OUT, S> ................................. 132
1050Table 188 — Definition of TPMT_SENSITIVE Structure .......................................................................... 132
1051Table 189 — Definition of TPM2B_SENSITIVE Structure <IN/OUT> ...................................................... 132
1052Table 190 — Definition of _PRIVATE Structure <> .................................................................................. 133
1053Table 191 — Definition of TPM2B_PRIVATE Structure <IN/OUT, S> ..................................................... 133
1054Page xiv
1055October 31, 2013
1056
1057Published
1058Copyright © TCG 2006-2013
1059
1060Family “2.0”
1061Level 00 Revision 00.99
1062
1063Trusted Platform Module Library
1064
1065Part 2: Structures
1066
1067Table 192 — Definition of _ID_OBJECT Structure <> .............................................................................. 134
1068Table 193 — Definition of TPM2B_ID_OBJECT Structure <IN/OUT> ..................................................... 134
1069Table 194 — Definition of (UINT32) TPM_NV_INDEX Bits <> ................................................................. 135
1070Table 195 — Options for space Field of TPM_NV_INDEX ....................................................................... 136
1071Table 196 — Definition of (UINT32) TPMA_NV Bits ................................................................................ 137
1072Table 197 — Definition of TPMS_NV_PUBLIC Structure ......................................................................... 139
1073Table 198 — Definition of TPM2B_NV_PUBLIC Structure ....................................................................... 139
1074Table 199 — Definition of TPM2B_CONTEXT_SENSITIVE Structure <IN/OUT> ................................... 140
1075Table 200 — Definition of TPMS_CONTEXT_DATA Structure <IN/OUT, S> .......................................... 140
1076Table 201 — Definition of TPM2B_CONTEXT_DATA Structure <IN/OUT> ............................................ 140
1077Table 202 — Definition of TPMS_CONTEXT Structure ........................................................................... 141
1078Table 203 — Context Handle Values ........................................................................................................ 142
1079Table 204 — Definition of TPMS_CREATION_DATA Structure <OUT> ................................................. 144
1080Table 205 — Definition of TPM2B_CREATION_DATA Structure <OUT> ............................................... 144
1081Table 206 — Defines for SHA1 Hash Values ........................................................................................... 145
1082Table 207 — Defines for SHA256 Hash Values ....................................................................................... 145
1083Table 208 — Defines for SHA384 Hash Values ....................................................................................... 145
1084Table 209 — Defines for SHA512 Hash Values ....................................................................................... 146
1085Table 210 — Defines for SM3_256 Hash Values ..................................................................................... 146
1086Table 211 — Defines for Architectural Limits Values ............................................................................... 146
1087Table 212 — Defines for Logic Values ..................................................................................................... 147
1088Table 213 — Defines for Processor Values .............................................................................................. 147
1089Table 214 — Defines for Implemented Algorithms ................................................................................... 148
1090Table 215 — Defines for Implemented Commands .................................................................................. 149
1091Table 216 — Defines for RSA Algorithm Constants ................................................................................. 152
1092Table 217 — Defines for ECC Algorithm Constants ................................................................................. 152
1093Table 218 — Defines for AES Algorithm Constants ................................................................................. 152
1094Table 219 — Defines for SM4 Algorithm Constants ................................................................................. 152
1095Table 220 — Defines for Symmetric Algorithm Constants ....................................................................... 153
1096Table 221 — Defines for Implementation Values ..................................................................................... 154
1097
1098Family “2.0”
1099Level 00 Revision 00.99
1100
1101Published
1102Copyright © TCG 2006-2013
1103
1104Page xv
1105October 31, 2013
1106
1107Part 2: Structures
1108
1109Trusted Platform Module Library
1110
1111Figures
1112Figure 1 — Command Format .................................................................................................................... 22
1113Figure 2 — Format-Zero Response Codes ................................................................................................. 29
1114Figure 3 — Format-One Response Codes ................................................................................................. 30
1115Figure 4 — TPM 1.2 TPM_NV_INDEX ..................................................................................................... 135
1116Figure 5 — TPM 2.0 TPM_NV_INDEX ..................................................................................................... 135
1117
1118Page xvi
1119October 31, 2013
1120
1121Published
1122Copyright © TCG 2006-2013
1123
1124Family “2.0”
1125Level 00 Revision 00.99
1126
1127Trusted Platform Module Library
1128
1129Part 2: Structures
1130
1131Trusted Platform Module Library
1132Part 2: Structures
11331
1134
1135Scope
1136
1137This part of the Trusted Platform Module Library specification contains the definitions of the constants,
1138flags, structure, and union definitions used to communicate with the TPM. Values defined in this
1139document are used by the TPM commands defined in part 3: Commands and by the functions in part 4:
1140Supporting Routines.
1141NOTE
1142
11432
1144
1145The structures in this document are the canonical form of the structures on the interface. All structures
1146are "packed" with no octets of padding between structure elements. The TPM-internal form of the
1147structures is dependent on the processor and compiler for the TPM implementation.
1148
1149Terms and definitions
1150
1151For the purposes of this document, the terms and definitions given in part 1 of this specification apply.
11523
1153
1154Symbols and abbreviated terms
1155
1156For the purposes of this document, the symbols and abbreviated terms given in part 1 apply.
11574
11584.1
1159
1160Notation
1161Introduction
1162
1163The information in this document is formatted so that it may be converted to standard computer-language
1164formats by an automated process. The purpose of this automated process is to minimize the transcription
1165errors that often occur during the conversion process.
1166For the purposes of this document, the conventions given in Part 1 apply.
1167In addition, the conventions and notations in this clause describe the representation of various data so
1168that it is both human readable and amenable to automated processing.
1169When a table row contains the keyword “reserved” (all lower case) in columns 1 or 2, the tools will not
1170produce any values for the row in the table.
1171NOTE 1
1172
1173In the examples in this clause 4, the unmarshaling routines are shown as returning bool. In the code of
1174the reference implementation, the return value is a TPM_RC. A bool is used in the examples, because
1175the meaning of a TPM_RC is not yet defined.
1176
1177NOTE 2
1178
1179The unmarshaling code examples are the actual code that would be produced by the automatic code
1180generator used in the construction of the reference code. The actual code contains additional parameter
1181checking that is omitted for clarity of the principle being illustrated. Actual examples of the code are found
1182in Part 4.
1183
1184Family “2.0”
1185Level 00 Revision 00.99
1186
1187Published
1188Copyright © TCG 2006-2013
1189
1190Page 1
1191October 31, 2013
1192
1193Part 2: Structures
11944.2
1195
1196Trusted Platform Module Library
1197
1198Named Constants
1199
1200A named constant is a numeric value to which a name has been assigned. In the C language, this is done
1201with a #define statement. In this specification, a named constant is defined in a table that has a title that
1202starts with “Definition” and ends with “Constants.”
1203The table title will indicate the name of the class of constants that are being defined in the table. The title
1204will include the data type of the constants in parentheses.
1205The table in Example 1 names a collection of 16-bit constants and Example 2 shows the C code that
1206might be produced from that table by an automated process.
1207NOTE
1208
1209A named constant (#define) has no data type in C and an enumeration would be a better choice for
1210many of the defined constants. However, the C language does not allow an enumerated type to have a
1211storage type other than int so the method of using a combination of typedef and #define is used.
1212
1213EXAMPLE 1
1214
1215Table xx — Definition of (UINT16) COUNTING Constants
1216Parameter
1217
1218Value
1219
1220Description
1221
1222first
1223
12241
1225
1226decimal value is implicitly the size of the
1227
1228second
1229
12300x0002
1231
1232hex value will match the number of bits in the constant
1233
1234third
1235
12363
1237
1238fourth
1239
12400x0004
1241
1242EXAMPLE 2
1243/* The C language equivalent of the constants from the table above */
1244typedef
1245UINT16
1246COUNTING;
1247#define
1248first
12491
1250#define
1251second
12520x0002
1253#define
1254third
12553
1256#define
1257fourth
12580x0004
1259
1260Page 2
1261October 31, 2013
1262
1263Published
1264Copyright © TCG 2006-2013
1265
1266Family “2.0”
1267Level 00 Revision 00.99
1268
1269Trusted Platform Module Library
12704.3
1271
1272Part 2: Structures
1273
1274Data Type Aliases (typedefs)
1275
1276When a group of named items is assigned a type, it is placed in a table that has a title starting with
1277“Definition of Types.” In this specification, defined types have names that use all upper-case characters.
1278The table in Example 1 shows how typedefs would be defined in this specification and Example 2 shows
1279the C-compatible code that might be produced from that table by an automated process.
1280EXAMPLE 1
1281
1282Table xx — Definition of Types for Some Purpose
1283Type
1284
1285Name
1286
1287Description
1288
1289unsigned short
1290
1291UINT16
1292
1293UINT16
1294
1295SOME_TYPE
1296
1297unsigned long
1298
1299UINT32
1300
1301UINT32
1302
1303LAST_TYPE
1304
1305EXAMPLE 2
1306/* C language equivalent of the typedefs from the table above */
1307typedef unsigned short
1308UINT16;
1309typedef UINT16
1310SOME_TYPE;
1311typedef unsigned long
1312UINT32;
1313typedef UINT32
1314LAST_TYPE;
1315
13164.4
1317
1318Enumerations
1319
1320A table that defines an enumerated data type will start with the word “Definition” and end with “Values.”
1321A value in parenthesis will denote the intrinsic data size of the value and may have the values "INT8",
1322"UINT8", "INT16", “UINT16”, "INT32", and “UINT32.” If this value is not present, “UINT16” is assumed.
1323Most C compilers set the type of an enumerated value to be an integer on the machine – often 16 bits –
1324but this is not always consistent. To ensure interoperability, the enumeration values may not exceed
132532,384.
1326The table in Example 1 shows how an enumeration would be defined in this specification. Example 2
1327shows the C code that might be produced from that table by an automated process.
1328EXAMPLE 1
1329
1330Table xx — Definition of (UINT16) CARD_SUIT Values
1331Suit Names
1332
1333Value
1334
1335CLUBS
1336
13370x0000
1338
1339DIAMONDS
1340
13410x000D
1342
1343HEARTS
1344
13450x001A
1346
1347SPADES
1348
1349Description
1350
13510x0027
1352
1353EXAMPLE 2
1354/* C language equivalent of the structure defined in the table above */
1355typedef enum {
1356CLUBS
1357=
13580x0000,
1359DIAMONDS
1360=
13610x000D,
1362HEARTS
1363=
13640x001A,
1365SPADES
1366=
13670x0027
1368} CARD_SUIT;
1369
1370Family “2.0”
1371Level 00 Revision 00.99
1372
1373Published
1374Copyright © TCG 2006-2013
1375
1376Page 3
1377October 31, 2013
1378
1379Part 2: Structures
13804.5
1381
1382Trusted Platform Module Library
1383
1384Interface Type
1385
1386An interface type is used for an enumeration that is checked by the unmarshaling code. This type is
1387defined for purposes of automatic generation of the code that will validate the type. The title will start with
1388the keyword “Definition” and end with the keyword “Type.” A value in parenthesis indicates the base type
1389of the interface. The table may contain an entry that is prefixed with the “#” character to indicate the
1390response code if the validation code determines that the input parameter is the wrong type.
1391EXAMPLE 1
1392
1393Table xx — Definition of (CARD_SUIT) RED_SUIT Type
1394Values
1395
1396Comments
1397
1398HEARTS
1399DIAMONDS
1400#TPM_RC_SUIT
1401
1402response code returned when the unmarshaling of this type fails
1403NOTE
1404
1405TPM_RC_SUIT is an example and no such response
1406code is actually defined in this specification.
1407
1408EXAMPLE 2
1409/* Validation code that might be automatically generated from table above */
1410if((*target != HEARTS) && (*target != DIAMONDS))
1411return TPM_RC_SUIT;
1412
1413In some cases, the allowed values are numeric values with no associated mnemonic. In such a case, the
1414list of numeric values may be given a name. Then, when used in an interface definition, the name would
1415have a "$" prefix to indicate that a named list of values should be substituted.
1416To illustrate, assume that the implementation only supports two sizes (1024 and 2048 bits) for keys
1417associated with some algorithm (MY algorithm). In the implementation section (Annex B a named list
1418would be created.
1419EXAMPLE 3
1420
1421Table xx — Defines for MY Algorithm Constants
1422Name
1423
1424Value
1425
1426Comments
1427
1428MY_KEY_SIZES_BITS
1429
1430{1024, 2048}
1431
1432braces because this is a list value
1433
1434Page 4
1435October 31, 2013
1436
1437Published
1438Copyright © TCG 2006-2013
1439
1440Family “2.0”
1441Level 00 Revision 00.99
1442
1443Trusted Platform Module Library
1444
1445Part 2: Structures
1446
1447Then, whenever an input value would need to be a valid MY key size for the implementation, the value
1448$MY_KEY_SIZES_BITS could be used. Given the definition for MY_KEY_SIZES_BITS in example 3
1449above, the tables in example 4 and 5 below, are equivalent.
1450EXAMPLE 4
1451
1452Table xx — Definition of (UINT16) MY_KEY_BITS Type
1453Parameter
1454
1455Description
1456
1457{1024, 2048}
1458
1459the number of bits in the supported key
1460
1461EXAMPLE 5
1462
1463Table xx — Definition of (UINT16) MY_KEY_BITS Type
1464Parameter
1465$MY_KEY_SIZES_BITS
1466
14674.6
1468
1469Description
1470the number of bits in the supported key
1471
1472Arrays
1473
1474Arrays are denoted by a value in square brackets (“[ ]”) following a parameter name. The value in the
1475brackets may be either an integer value such as “[20]” or the name of a component of the same structure
1476that contains the array.
1477The table in Example 1 shows how a structure containing fixed and variable-length arrays would be
1478defined in this specification. Example 2 shows the C code that might be produced from that table by an
1479automated process.
1480EXAMPLE 1
1481
1482Table xx — Definition of A_STRUCT Structure
1483Parameter
1484
1485Type
1486
1487Description
1488
1489array1[20]
1490
1491UINT16
1492
1493an array of 20 UINT16s
1494
1495a_size
1496
1497UINT16
1498
1499array2[a_size]
1500
1501UINT32
1502
1503an array of UINT32 values that has a
1504number of elements determined by a_size
1505above
1506
1507EXAMPLE 2
1508/* C language equivalent of the typedefs from the table above */
1509typedef struct {
1510UINT16
1511array1[20];
1512UINT16
1513a_size;
1514UINT32
1515array2[];
1516} A_STRUCT;
1517
1518Family “2.0”
1519Level 00 Revision 00.99
1520
1521Published
1522Copyright © TCG 2006-2013
1523
1524Page 5
1525October 31, 2013
1526
1527Part 2: Structures
1528
15294.7
1530
1531Trusted Platform Module Library
1532
1533Structure Definitions
1534
1535The tables used to define structures have a title that starts with the word “Definition” and ends with
1536“Structure.” The first column of the table will denote the reference names for the structure members; the
1537second column the data type of the member; and the third column a synopsis of the use of the element.
1538The table in Example 1 shows an example of how a structure would be defined in this specification and
1539Example 2 shows the C code that might be produced from the table by an automated process. Example 3
1540illustrates the type of unmarshaling code that could be generated using the information available in the
1541table.
1542EXAMPLE 1
1543
1544Table xx — Definition of SIMPLE_STRUCTURE Structure
1545Parameter
1546
1547Type
1548
1549Description
1550
1551tag
1552
1553TPM_ST
1554
1555value1
1556
1557INT32
1558
1559value2
1560
1561INT32
1562
1563EXAMPLE 2
1564/* C language equivalent of the structure defined in the table above */
1565typedef struct {
1566TPM_ST
1567tag;
1568INT32
1569value1
1570INT32
1571value2;
1572} SIMPLE_STRUCTURE;
1573EXAMPLE 3
1574bool SIMPLE_STRUCTURE_Unmarshal(SIMPLE_STRUCTURE *target, BYTE **buffer, INT32 *size)
1575{
1576// If unmarshal of tag succeeds
1577if(TPM_ST_Unmarshal((TPM_ST *)&(target->tag), buffer, size))
1578// then umarshal value1, and if that succeeds...
1579if(INT32_Unmarshal((INT32 *)&(target->value1, buffer, size))
1580// then return the results of unmarshaling values
1581return(INT32_Unmarshal((INT32 *)&(target->value2, buffer, size))
1582// if unmarshal of tag or value failed, return failure
1583return FALSE;
1584}
1585
1586Page 6
1587October 31, 2013
1588
1589Published
1590Copyright © TCG 2006-2013
1591
1592Family “2.0”
1593Level 00 Revision 00.99
1594
1595Trusted Platform Module Library
15964.8
1597
1598Part 2: Structures
1599
1600Conditional Types
1601
1602An enumeration may contain an extended value indicated by “+” preceding the name in the "Value"
1603column. This “+” indicates that this is a conditional value that may be allowed in certain situations.
1604NOTE
1605
1606In many cases, the input values are algorithm IDs. When two collections of algorithm IDs differ only
1607because one collection allows TPM_ALG_NULL and the other does not, it is preferred that the re not be
1608two completely different enumerations because this leads to many casts. To avoid this, the “+” can be
1609added to a TPM_ALG_NULL value in the table defining the type. When the use of that type allows
1610TPM_ALG_NULL to be in the set, the use would append a “+” to the instance.
1611
1612EXAMPLE
1613
1614Table xx — Definition of (CARD_SUIT) TPMI_CARD_SUIT Type
1615Values
1616
1617Comments
1618
1619SPADES
1620HEARTS
1621DIAMONDS
1622CLUBS
1623+JOKER
1624
1625an optional value that may be allowed
1626
1627#TPM_RC_SUIT
1628
1629response code returned when the input value is not one of the
1630values above
1631
1632When an interface type is used, a “+” will be appended to the type specification for the parameter when
1633the conditional value is allowed. If no “+” is present, then the conditional value is not allowed.
1634EXAMPLE 1
1635
1636Table xx — Definition of POKER_CARD Structure
1637Parameter
1638
1639Type
1640
1641Description
1642
1643suit
1644
1645TPMI_CARD_SUIT+
1646
1647allows joker
1648
1649number
1650
1651UINT8
1652
1653the card value
1654
1655EXAMPLE 2
1656
1657Table xx — Definition of BRIDGE_CARD Structure
1658Parameter
1659
1660Type
1661
1662Description
1663
1664suit
1665
1666TPMI_CARD_SUIT
1667
1668does not allow joker
1669
1670number
1671
1672UINT8
1673
1674the card value
1675
1676Family “2.0”
1677Level 00 Revision 00.99
1678
1679Published
1680Copyright © TCG 2006-2013
1681
1682Page 7
1683October 31, 2013
1684
1685Part 2: Structures
16864.9
1687
1688Trusted Platform Module Library
1689
1690Unions
1691
16924.9.1
1693
1694Introduction
1695
1696A union allows a structure to contain a variety of structures or types. The union has members, only one of
1697which is present at a time. Three different tables are required to fully characterize a union so that it may
1698be communicated on the TPM interface and used by the TPM:
16991) union definition;
17002) union instance; and
17013) union selector definition.
17024.9.2
1703
1704Union Definition
1705
1706The table in Example 1 illustrates a union definition. The title of a union definition table starts with
1707“Definition” and ends with “Union.” The “Parameter” column of a union definition lists the different names
1708that are used when referring a specific type. The “Type” column identifies the data type of the member.
1709The “Selector” column identifies the value that is used by the marshaling and unmarshaling code to
1710determine which case of the union is present.
1711If a parameter is the keyword “null,” then this denotes a selector with no contents. The table in Example 1
1712illustrates a union in which a conditional null selector is allowed to indicate an empty union member.
1713Example 2 shows how the table would be converted into C-compatible code.
1714The expectation is that the unmarshaling code for the union will validate that the selector for the union is
1715one of values in the selector list.
1716EXAMPLE 1
1717
1718Table xx — Definition of NUMBER_UNION Union
1719Parameter
1720
1721Type
1722
1723Selector
1724
1725a_byte
1726
1727BYTE
1728
1729BYTE_SELECT
1730
1731an_int
1732
1733int
1734
1735INT_SELECT
1736
1737a_float
1738
1739float
1740
1741FLOAT_SELECT
1742
1743+null
1744
1745NULL_SELECT
1746
1747Description
1748
1749the empty branch
1750
1751EXAMPLE 2
1752// C-compatible version of the union defined in the table above
1753typedef union {
1754BYTE
1755a_byte;
1756int
1757an_int;
1758float
1759a_float;
1760} NUMBER_UNION;
1761EXAMPLE 3
1762
1763Page 8
1764October 31, 2013
1765
1766Published
1767Copyright © TCG 2006-2013
1768
1769Family “2.0”
1770Level 00 Revision 00.99
1771
1772Trusted Platform Module Library
1773
1774Part 2: Structures
1775
1776// Possible auto-generated code to unmarshal a union in Example 2 based on the
1777// input value of selector
1778bool NUMBER_UNION_Unmarshal(NUMBER_UNION *target, BYTE **buffer,
1779INT32 *size, UINT32 selector)
1780{
1781switch (selector) {
1782case BYTE_SELECT:
1783return BYTE_Unmarshal((BYTE *)&(target->a_byte), buffer, size);
1784case INT_SELECT:
1785return INT_Unmarshal((int *)&(target->an_int), buffer, size);
1786case FLOAT_SELECT:
1787return FLOAT_Unmarshal((float *)&(target->a_float), buffer, size);
1788case NULL_SELECT:
1789return;
1790}
1791
1792A table may have a type with no selector. This is used when the first part of the structure for all union
1793members is identical. This type is a programming convenience, allowing code to reference the common
1794members without requiring a case statement to determine the specific structure. In object oriented
1795programming terms, this type is a superclass and the types with selectors are subclasses.
17964.9.3
1797
1798Union Instance
1799
1800When a union is used in a structure that is sent on the interface, the structure will minimally contain a
1801selector and a union. The selector value indicates which of the possible union members is present so that
1802the unmarshaling code can unmarshal the correct type. The selector may be any of the parameters that
1803occur in the structure before the union instance. To denote the structure parameter that is used as the
1804selector, its name is in brackets (“[ ]”) placed before the parameter name associated with the union.
1805The table in Example 1 shows the definition of a structure that contains a union and a selector. Example 2
1806shows how the table would be converted into C-compatible code and Example 3 shows how the
1807unmarshaling code would handle the selector.
1808EXAMPLE 1
1809
1810Table xx — Definition of STRUCTURE_WITH_UNION Structure
1811Parameter
1812
1813Type
1814
1815Description
1816
1817select
1818
1819NUMBER_SELECT
1820
1821a value indicating the type in number
1822
1823[select] number
1824
1825NUMBER_UNION
1826
1827a union as shown in 4.9.2
1828
1829EXAMPLE 2
1830// C-compatible version of the union structure in the table above
1831typedef struct {
1832NUMBER_SELECT
1833select;
1834NUMBER_UNION
1835number;
1836} STRUCT_WITH_UNION;
1837EXAMPLE 3
1838
1839Family “2.0”
1840Level 00 Revision 00.99
1841
1842Published
1843Copyright © TCG 2006-2013
1844
1845Page 9
1846October 31, 2013
1847
1848Part 2: Structures
1849
1850Trusted Platform Module Library
1851
1852// Possible unmarshaling code for the structure above
1853bool STRUCT_WITH_UNION_Unmarshal(STRUCT_WITH_UNION *target, BYTE **buffer, INT32 *size)
1854{
1855// Unmarshal the selector value
1856if(!NUMBER_SELECT_Unmarshal((NUMBER_SELECT *)&target->select, buffer, size))
1857return FALSE;
1858// Use the unmarshaled selector value to indicate to the union unmarshal
1859// function which unmarshaling branch to follow.
1860return(NUMBER_UNION_Unmarshal((NUMBER_UNION *)&(target->number),
1861buffer, size, (UINT32)target->select);
1862}
1863
18644.9.4
1865
1866Union Selector Definition
1867
1868The selector definition limits the values that are used in unmarshaling a union. Two different selector sets
1869applied to the same union define different types.
1870For the union in 4.9.2, a selector definition should be limited to no more than four values, one for each of
1871the union members. The selector definition could have fewer than four values.
1872In Example 1, the table defines a value for each of the union members.
1873EXAMPLE 1
1874
1875Table xx — Definition of (INT8) NUMBER_SELECT Values <IN>
1876Name
1877
1878Value
1879
1880BYTE_SELECT
1881
18823
1883
1884INT_SELECT
1885
18862
1887
1888FLOAT_SELECT
1889
18901
1891
1892NULL_SELECT
1893
1894Comments
1895
18960
1897
1898The unmarshaling code would limit the input values to the defined values. When the NUMBER_SELECT
1899is used in the union instance of 4.9.3, any of the allowed union members of NUMBER_UNION could be
1900present.
1901A different selection could be used to limit the values in a specific instance. To get the different selection,
1902a new structure is defined with a different selector. The table in example 2 illustrates a way to subset the
1903union. The base type of the selection is NUMBER_SELECT so a NUMBER_SELECT will be unmarshaled
1904before the checks are made to see if the value is in the correct range for JUST_INTEGERS types. If the
1905base type had been UINT8, then no checking would occur prior to checking that the value is in the
1906allowed list. In this particular case, the effect is the same in either case since the only values that will be
1907accepted by the unmarshaling code for JUST_INTEGER are BYTE_SELECT and INT_SELECT.
1908EXAMPLE 2
1909
1910Table xx — Definition of (NUMBER_SELECT) AN_INTEGER Type <IN>
1911Values
1912{BYTE_SELECT, INT_SELECT}
1913NOTE
1914
1915Comments
1916list of allowed values
1917
1918Since NULL_SELECT is not in the list of values accepted as a JUST_INTEGER, the “+” modifier will have
1919no effect if used for a JUST_INTEGERS type shown in Example 3.
1920
1921Page 10
1922October 31, 2013
1923
1924Published
1925Copyright © TCG 2006-2013
1926
1927Family “2.0”
1928Level 00 Revision 00.99
1929
1930Trusted Platform Module Library
1931
1932Part 2: Structures
1933
1934The selector in Example 2 can then be used in a subset union as shown in Example 3.
1935EXAMPLE 3
1936
1937Table xx — Definition of JUST_INTEGERS Structure
1938Parameter
1939
1940Type
1941
1942Description
1943
1944select
1945
1946AN_INTEGER
1947
1948a value indicating the type in number
1949
1950[select] number
1951
1952NUMBER_UNION
1953
1954a union as shown in 4.9.2
1955
19564.10 Bit Field Definitions
1957A table that defines a structure containing bit fields has a title that starts with “Definition” and ends with
1958“Bits.” A type identifier in parentheses in the title indicates the size of the datum that contains the bit
1959fields.
1960When the bit fields do not occupy consecutive locations, a spacer field is defined with a name of
1961“Reserved.” Bits in these spaces are reserved and shall be zero.
1962The table in Example 1 shows how a structure containing bit fields would be defined in this specification.
1963Example 2 shows the C code that might be produced from that table by an automated process.
1964When a field has more than one bit, the range is indicated by a pair of numbers separated by a colon (“:”).
1965The numbers will be in high:low order.
1966EXAMPLE1
1967
1968Table xx — Definition of (UINT32) SOME_ATTRIBUTE Bits
1969Bit
19700
1971
1972Name
1973
1974Action
1975
1976zeroth_bit
1977
1978SET (1): what to do if bit is 1
1979CLEAR (0): what to do if bit is 0
1980
19811
1982
1983first_bit
1984
1985SET (1): what to do if bit is 1
1986CLEAR (0): what to do if bit is 0
1987
19886:2
19897
1990
1991Reserved
1992
1993A placeholder that spans 5 bits
1994
1995third_bit
1996
1997SET (1): what to do if bit is 1
1998CLEAR (0): what to do if bit is 0
1999
200031:8
2001
2002Reserved
2003
2004Placeholder to fill 32 bits
2005
2006EXAMPLE 2
2007/* C language equivalent of the attributes structure defined in the table above */
2008typedef struct {
2009int zeroth_bit : 1;
2010int first_bit : 1;
2011int Reserved3 : 5;
2012int third_bit : 1;
2013int Reserved7 : 24;
2014} SOME_ATTRIBUTE;
2015
20164.11 Parameter Limits
2017A parameter used in a structure may be given a set of values that can be checked by the unmarshaling
2018code. The allowed values for a parameter may be included in the definition of the parameter by
2019appending the values and delimiting them with braces (“{ }”). The values are comma-separated
2020expressions. A range of numbers may be indicated by separating two expressions with a colon (“:”). The
2021Family “2.0”
2022Level 00 Revision 00.99
2023
2024Published
2025Copyright © TCG 2006-2013
2026
2027Page 11
2028October 31, 2013
2029
2030Part 2: Structures
2031
2032Trusted Platform Module Library
2033
2034first number is an expression that represents the minimum allowed value and the second number
2035indicates the maximum. If the minimum or maximum value expression is omitted, then the range is openended.
2036Parameter limits expressed using braces apply only to inputs to the TPM. Any value returned by the
2037TPM is assumed to be valid.
2038The maximum size of an array may be indicated by putting a “{}” delimited expression following the
2039square brackets (“[ ]”) that indicate that the value is an array.
2040EXAMPLE
2041
2042Table xx — Definition of B_STRUCT Structure
2043Parameter
2044
2045Type
2046
2047Description
2048
2049value1 {20:25}
2050
2051UINT16
2052
2053a parameter that must have a value between 20
2054and 25
2055
2056value2 {20}
2057
2058UINT16
2059
2060a parameter that must have a value of 20
2061
2062value3 {:25}
2063
2064INT16
2065
2066a parameter that may be no larger than 25
2067Since the parameter is signed, the minimum value
2068is the largest negative integer that may be
2069expressed in 16 bits.
2070
2071value4 {20:}
2072
2073a parameter that must be at least 20
2074
2075value5 {1,2,3,5}
2076
2077UINT16
2078
2079a parameter that may only have one of the four
2080listed values
2081
2082value6 {1, 2, 10:(10+10)}
2083
2084UINT32
2085
2086a parameter that may have a value of 1, 2, or be
2087between 10 and 20
2088
2089array1[value1]
2090
2091BYTE
2092
2093Because the index refers to value1, which is a
2094value limited to be between 20 and 25 inclusive,
2095array1 is an array that may have between 20 and
209625 octets. This is not the preferred way to indicate
2097the upper limit for an array as it does not indicate
2098the upper bound of the size.
2099NOTE
2100
2101array2[value4]{:25}
2102
2103BYTE
2104
2105This is a limitation of the current
2106parser. A different parser could
2107associate the range of value1 with this
2108value and compute the maximum size
2109of the array.
2110
2111an array that may have between 20 and 25 octets
2112This arrangement is used to allow the automatic
2113code generation to allocate 25 octets to store the
2114largest array2 that can be unmarshaled. The code
2115generation can determine from this expression that
2116value4 shall have a value of 25 or less. From the
2117definition of value4 above, it can determine that
2118value4 must have a value of at least 20.
2119
2120Page 12
2121October 31, 2013
2122
2123Published
2124Copyright © TCG 2006-2013
2125
2126Family “2.0”
2127Level 00 Revision 00.99
2128
2129Trusted Platform Module Library
2130
2131Part 2: Structures
2132
21334.12 Enumeration Macro
2134An enumeration can be a list of allowed numeric values. For example, the allowed sizes for an RSA key
2135might be expressed as:
2136
21374.13 Size Checking
2138In some structures, a size field is present to indicate the number of octets in some subsequent part of the
2139structure. In the B_STRUCT table in 4.11, value4 indicates how many octets to unmarshal for array2. This
2140semantic applies when the size field determines the number of octets to unmarshal. However, in some
2141cases, the subsequent structure is self-defining. If the size precedes a parameter that is not an octet
2142array, then the unmarshaled size of that parameter is determined by its data type. The table in Example 1
2143shows a structure where the size parameter would nominally indicate the number of octets in the
2144remainder of the structure.
2145EXAMPLE 1
2146
2147Table xx — Definition of C_STRUCT Structure
2148Parameter
2149
2150Type
2151
2152Comments
2153
2154size
2155
2156UINT16
2157
2158the expected size of the remainder of the structure
2159
2160anInteger
2161
2162UINT32
2163
2164a 4-octet value
2165
2166In this particular case, the value of size would be incorrect if it had any value other than 4. So that the
2167table parser is able to know that the purpose of the size parameter is to define the number of octets
2168expected in the remainder of the structure, an equal sign (“=”) is appended to the parameter name.
2169In the example below, the size= causes the parser to generate validation code that will check that the
2170unmarshaled size of someStructure and someData adds to the value unmarshaled for size. When the “=”
2171decoration is present, a value of zero is not allowed for the size.
2172EXAMPLE 2
2173
2174Table xx — Definition of D_STRUCT Structure
2175Parameter
2176
2177Type
2178
2179Comments
2180
2181size=
2182
2183UINT16
2184
2185the size of a structure
2186The “=” indicates that the TPM is required to
2187validate that the remainder of the D_STRUCT
2188structure is exactly the value in size. That is, the
2189number of bytes in the input buffer used to
2190successfully unmarshal someStructure must be the
2191same as size.
2192
2193someStructure
2194
2195A_STRUCT
2196
2197a structure to be unmarshaled
2198The size of the structure is computed when it is
2199unmarshaled. Because an “=” is present on the
2200definition of size, the TPM is required to validate
2201that the unmarshaled size exactly matches size.
2202
2203someData
2204
2205Family “2.0”
2206Level 00 Revision 00.99
2207
2208UINT32
2209
2210a value
2211
2212Published
2213Copyright © TCG 2006-2013
2214
2215Page 13
2216October 31, 2013
2217
2218Part 2: Structures
2219
2220Trusted Platform Module Library
2221
22224.14 Data Direction
2223A structure or union may be input (IN), output (OUT), or internal. An input structure is sent to the TPM and
2224is unmarshaled by the TPM. An output structure is sent from the TPM and is marshaled by the TPM. An
2225internal structure is not used outside of the TPM except that it may be included in a saved context.
2226By default, structures are assumed to be both IN and OUT and the code generation tool will generate
2227both marshaling and unmarshaling code for the structure. This default may be changed by using values
2228enclosed in angle brackets (“<>”) as part of the table title. If the angle brackets are empty, then the
2229structure is internal and neither marshaling nor unmarshaling code is generated. If the angle brackets
2230contain the letter “I” (such as in “IN” or “in” or “i”), then the structure is input and unmarshaling code will be
2231generated. If the angle brackets contain the letter “O” (such as in “OUT” or “out” or “o”), then the structure
2232is output and marshaling code will be generated.
2233EXAMPLE 1
2234
2235Both of the following table titles would indicate a structure that is used in both input and output
2236Table xx — Definition of TPMS_A Structure
2237Table xx — Definition of TPMS_A Structure <IN/OUT>
2238
2239EXAMPLE 2
2240
2241The following table title would indicate a structure that is used only for input
2242Table xx — Definition of TPMS_A Structure <IN>
2243
2244EXAMPLE 3
2245
2246The following table title would indicate a structure that is used only for output
2247Table xx — Definition of TPMS_A Structure <OUT>
2248
22494.15 Structure Validations
2250By default, when a structure is used for input to the TPM, the code generation tool will generate the
2251unmarshaling code for that structure. Auto-generation may be suppressed by adding an “S” within the
2252angle brackets.
2253EXAMPLE
2254
2255The following table titles indicate a structure for which the auto -generation of the validation code is to be
2256suppressed.
2257Table xx — Definition of TPMT_A Structure <S>
2258Table xx — Definition of TPMT_A Structure <IN, S>
2259Table xx — Definition of TPMT_A Structure <IN/OUT, S>
2260
22614.16 Name Prefix Convention
2262Parameters are constants, variables, structures, unions, and structure members. Structure members are
2263given a name that is indicative of its use, with no special prefix. The other parameter types are named
2264according to their type with their name starting with “TPMx_”, where “x” is an optional character to indicate
2265the data type.
2266In some cases, additional qualifying characters will follow the underscore. These are generally used when
2267dealing with an enumerated data type.
2268TPMA_ This is an attribute structure, where bits are associated with particular attributes
2269
2270Page 14
2271October 31, 2013
2272
2273Published
2274Copyright © TCG 2006-2013
2275
2276Family “2.0”
2277Level 00 Revision 00.99
2278
2279Trusted Platform Module Library
2280
2281Part 2: Structures
2282
2283Table 1 — Name Prefix Convention
2284Prefix
2285
2286Description
2287
2288_TPM_
2289
2290an indication/signal from the TPM’s system interface
2291
2292TPM_
2293
2294a constant or an enumerated type
2295
2296TPM2_
2297
2298a command defined by this specification
2299
2300TPM2B_
2301
2302a structure that is a sized buffer where the size of the buffer is contained in a 16-bit, unsigned
2303value
2304The first parameter is the size in octets of the second parameter. The second parameter may be
2305any type.
2306
2307TPMA_
2308
2309a structure where each of the fields defines an attribute and each field is usually a single bit
2310All the attributes in an attribute structure are packed with the overall size of the structure
2311indicated in the heading of the attribute description (UINT8, UINT16, or UINT32).
2312
2313TPM_ALG_
2314
2315an enumerated type that indicates an algorithm
2316A TPM_ALG_ is often used as a selector for a union.
2317
2318TPMI_
2319
2320an interface type
2321The value is specified for purposes of dynamic type checking when unmarshaled.
2322
2323TPML_
2324
2325a list length followed by the indicated number of entries of the indicated type
2326This is an array with a length field.
2327
2328TPMS_
2329
2330a structure that is not a size buffer or a tagged buffer or a list
2331
2332TPMT_
2333
2334a structure with the first parameter being a structure tag, indicating the type of the structure that
2335follows
2336A structure tag may be either a TPMT_ST_ or TPM_ALG_ depending on context.
2337
2338TPMU_
2339
2340a union of structures, lists, or unions
2341If a union exists, there will normally be a companion TPMT_ that is the expression of the union
2342in a tagged structure, where the tag is the selector indicating which member of the union is
2343present.
2344
2345TPM_xx_
2346
2347an enumeration value of a particular type
2348The value of “xx” will be indicative of the use of the enumerated type. A table of “TPM_xx”
2349constant definitions will exist to define each of the TPM_xx_ values.
2350EXAMPLE 1
2351
2352TPM_CC_ indicates that the type is used for a commandCode. The allowed enumeration
2353values will be found in the table defining the TPM_CC constants (Table 11).
2354
2355EXAMPLE 2
2356
2357TPM_RC_ indicates that the type is used for a responseCode. The allowed enumeration
2358values are in Table 15.
2359
23604.17 Data Alignment
2361The data structures in this Part 2 use octet alignment for all structures. When used in a table to indicate a
2362maximum size, the sizeof() function returns the octet-aligned size of the structure, with no padding.
23634.18
2364
2365Parameter Unmarshaling Errors
2366
2367The TPM commands are defined in Part 3. The command definition included C code that details the
2368actions performed by that command. The code is written assuming that the parameters of the command
2369have been unmarshaled.
2370NOTE 1
2371
2372An implementation is not required to process parameters in this manner or to separate the parameter
2373parsing from the command actions. This method was chosen for the specification so that the normative
2374behavior described by the detailed actions would be clear and unencumbered.
2375
2376Family “2.0”
2377Level 00 Revision 00.99
2378
2379Published
2380Copyright © TCG 2006-2013
2381
2382Page 15
2383October 31, 2013
2384
2385Part 2: Structures
2386
2387Trusted Platform Module Library
2388
2389Unmarshaling is the process of processing the parameters in the input buffer and preparing the
2390parameters for use by the command-specific action code. No data movement need take place but it is
2391required that the TPM validate that the parameters meet the requirements of the expected data type as
2392defined in this Part 2.
2393When an error is encountered while unmarshaling a command parameter, an error response code is
2394returned and no command processing occurs. A table defining a data type may have response codes
2395embedded in the table to indicate the error returned when the input value does not match the parameters
2396of the table.
2397EXAMPLE 1
2398
2399Table 11 has a listing of TPM command code values. The last row in the table contains
2400"#TPM_RC_COMMAND_CODE" indicating the response code that is returned if the TPM is unmarshaling
2401a value that it expects to be a TPM_CC and the input value is not in the table.
2402
2403NOTE 2
2404
2405In the reference implementation, a parameter number is added to the response code so that the offending
2406parameter can be isolated.
2407
2408In many cases, the table contains no specific response code value and the return code will be determined
2409as defined in Table 2.
2410Table 2 — Unmarshaling Errors
2411Response code
2412
2413Usage
2414
2415TPM_RC_INSUFFICIENT
2416
2417the input buffer did not contain enough octets to allow unmarshaling of the
2418expected data type;
2419
2420TPM_RC_RESERVED
2421
2422a non-zero value was found in a reserved field of an attribute structure (TPMA_)
2423
2424TPM_RC_SIZE
2425
2426the value of a size parameter is larger or smaller than allowed
2427
2428TPM_RC_VALUE
2429
2430A parameter does not have one of its allowed values
2431
2432TPM_RC_TAG
2433
2434A parameter that should be a structure tag has a value that is not supported by
2435the TPM
2436
2437In some commands, a parameter may not be used because of various options of that command.
2438However, the unmarshaling code is required to validate that all parameters have values that are allowed
2439by the Part 2 definition of the parameter type even if that parameter is not used in the command actions.
2440
2441Page 16
2442October 31, 2013
2443
2444Published
2445Copyright © TCG 2006-2013
2446
2447Family “2.0”
2448Level 00 Revision 00.99
2449
2450Trusted Platform Module Library
2451
24525
2453
2454Part 2: Structures
2455
2456Base Types
2457
24585.1
2459
2460Primitive Types
2461
2462The types listed in Table 3 are the primitive types on which all of the other types and structures are
2463based. The values in the “Type” column should be edited for the compiler and computer on which the
2464TPM is implemented. The values in the “Name” column should remain the same because these values
2465are used in the remainder of the specification.
2466NOTE
2467
2468The types are compatible with the C99 standard and should be defined in stdint.h that is provided with a
2469C99-compliant compiler;
2470
2471The parameters in the Name column should remain in the order shown.
2472Table 3 — Definition of Base Types
2473Type
2474
2475Name
2476
2477Description
2478
2479uint8_t
2480
2481UINT8
2482
2483unsigned, 8-bit integer
2484
2485uint8_t
2486
2487BYTE
2488
2489unsigned 8-bit integer
2490
2491int8_t
2492
2493INT8
2494
2495signed, 8-bit integer
2496
2497int
2498
2499BOOL
2500
2501a bit in an int
2502This is not used across the interface but is used in many places in the code. If
2503the type were sent on the interface, it would have to have a type with a specific
2504number of bytes.
2505
2506uint16_t
2507
2508UINT16
2509
2510unsigned, 16-bit integer
2511
2512int16_t
2513
2514INT16
2515
2516signed, 16-bit integer
2517
2518uint32_t
2519
2520UINT32
2521
2522unsigned, 32-bit integer
2523
2524int32_t
2525
2526INT32
2527
2528signed, 32-bit integer
2529
2530uint64_t
2531
2532UINT64
2533
2534unsigned, 64-bit integer
2535
2536int64_t
2537
2538INT64
2539
2540signed, 64-bit integer
2541
25425.2
2543
2544Miscellaneous Types
2545
2546These types are defined either for compatibility with previous versions of this specification or for clarity of
2547this specification.
2548Table 4 — Definition of Types for Documentation Clarity
2549Type
2550
2551Name
2552
2553Description
2554
2555UINT32
2556
2557TPM_ALGORITHM_ID
2558
2559this is the 1.2 compatible form of the TPM_ALG_ID
2560
2561UINT32
2562
2563TPM_MODIFIER_INDICATOR
2564
2565UINT32
2566
2567TPM_AUTHORIZATION_SIZE
2568
2569the authorizationSize parameter in a command
2570
2571UINT32
2572
2573TPM_PARAMETER_SIZE
2574
2575the parameterSizeset parameter in a command
2576
2577UINT16
2578
2579TPM_KEY_SIZE
2580
2581a key size in octets
2582
2583UINT16
2584
2585TPM_KEY_BITS
2586
2587a key size in bits
2588
2589Family “2.0”
2590Level 00 Revision 00.99
2591
2592Published
2593Copyright © TCG 2006-2013
2594
2595Page 17
2596October 31, 2013
2597
2598Part 2: Structures
2599
26006
2601
2602Trusted Platform Module Library
2603
2604Constants
2605
26066.1
2607
2608TPM_SPEC (Specification Version Values)
2609
2610These values are readable with TPM2_GetCapability().
2611NOTE
2612
2613This table will require editing when the specification is updated.
2614
2615Table 5 — Definition of (UINT32) TPM_SPEC Constants <>
2616Name
2617
2618Value
2619
2620Comments
2621ASCII “2.0” with null terminator
2622
2623TPM_SPEC_FAMILY
2624
26250x322E3000
2626
2627TPM_SPEC_LEVEL
2628
262900
2630
2631the level number for the specification
2632
2633TPM_SPEC_VERSION
2634
263599
2636
2637the version number of the spec (00.99 * 100)
2638
2639TPM_SPEC_YEAR
2640
26412013
2642
2643the year of the version
2644
2645TPM_SPEC_DAY_OF_YEAR
2646
2647304
2648
2649the day of the year (October 31, 2013)
2650
26516.2
2652
2653TPM_GENERATED
2654
2655This constant value differentiates TPM-generated structures from non-TPM structures.
2656Table 6 — Definition of (UINT32) TPM_GENERATED Constants <O>
2657Name
2658
2659Value
2660
2661Comments
2662
2663TPM_GENERATED_VALUE
2664
26650xff544347
2666
26670xFF ‘TCG’ (FF 54 43 4716)
2668
2669Page 18
2670October 31, 2013
2671
2672Published
2673Copyright © TCG 2006-2013
2674
2675Family “2.0”
2676Level 00 Revision 00.99
2677
2678Trusted Platform Module Library
26796.3
2680
2681Part 2: Structures
2682
2683TPM_ALG_ID
2684
2685The TCG maintains a registry of all algorithms that have an assigned algorithm ID. That registry is the
2686definitive list of algorithms that may be supported by a TPM.
2687NOTE
2688
2689Inclusion of an algorithm does NOT indicate that the necessary claims of the algorithm are av ailable
2690under RAND terms from a TCG member.
2691
2692Table 7 is a copy of the TPM_ALG_ID constants table in the TCG registry as of the date of publication of
2693this specification. Table 7 is provided for illustrative purposes only.
2694{{Note for TCG Admin: Table 7 and the text in the paragraph above should be updated to reflect the final
2695decisions by the TCG Board of Directors about inclusion of the table and the contents of the table. The
2696desired approach is to leave the text as is and, immediately before publication of this specification for
2697TCG admin to verify that Table 7 is the same as the algorithm registry table published by the TCG.}}
2698An algorithm ID is often used like a tag to determine the type of a structure in a context-sensitive way.
2699The values for TPM_ALG_ID shall be in the range of 00 0016 – 7F FF16. Other structure tags will be in the
2700range 80 0016 – FF FF16.
2701NOTE
2702
2703In TPM 1.2, these were defined as 32-bit constants. This specification limits the future size of the
2704algorithm ID to 16 bits. The TPM_ALGORITHM_ID data type will continue to be a 32-bit number.
2705
2706An algorithm shall not be assigned a value in the range 00 C116 – 00 C616 in order to prevent any overlap
2707with the command structure tags used in TPM 1.2.
2708The implementation of some algorithms is dependent on the presence of other algorithms. When there is
2709a dependency, the algorithm that is required is listed in column labeled "D" (dependent) in Table 7.
2710EXAMPLE
2711
2712Implementation of TPM_ALG_RSASSA requires that the RSA algorithm be implemented.
2713
2714TPM_ALG_KEYEDHASH and TPM_ALG_NULL are required of all TPM implementations.
2715Table 7 — Definition of (UINT16) TPM_ALG_ID Constants <IN/OUT, S>
2716Algorithm Name
2717
2718Value
2719
2720Type
2721
2722a
2723
2724D
2725
2726Comments
2727
2728TPM_ALG_ERROR
2729
27300x0000
2731
2732should not occur
2733
2734TPM_ALG_FIRST
2735
27360x0001
2737
2738TPM_ALG_RSA
2739
27400x0001
2741
2742AO
2743
2744the RSA algorithm
2745
2746TPM_ALG_SHA
2747
27480x0004
2749
2750H
2751
2752the SHA1 algorithm
2753
2754TPM_ALG_SHA1
2755
27560x0004
2757
2758H
2759
2760redefinition for documentation consistency
2761OID 30 21 30 09 06 05 2B 0E 03 02 1A 05 00 04 14 16
2762
2763TPM_ALG_HMAC
2764
27650x0005
2766
2767HX
2768
2769the RFC 2104 Hash Message Authentication Code
2770(HMAC) algorithm
2771
2772TPM_ALG_AES
2773
27740x0006
2775
2776S
2777
2778the AES algorithm with a key size of 128 bits for TPM
27791.2
2780the AES algorithm with multiple sizes of key for TPM
27812.0
2782
2783TPM_ALG_MGF1
2784
27850x0007
2786
2787HM
2788
2789the mask-generation function defined in IEEE Std
27901363-2000
2791
2792TPM_ALG_KEYEDHASH
2793
27940x0008
2795
2796HEXO
2797
2798an encryption or signing algorithm using a keyed hash,
2799defined by TCG in the TPM 2.0 specification
2800may also refer to a data object that is neither signing
2801nor encrypting
2802
2803TPM_ALG_XOR
2804
28050x000A
2806
2807HS
2808
2809marker value
2810
2811the XOR obfuscation algorithm
2812NOTE
2813
2814Family “2.0”
2815Level 00 Revision 00.99
2816
2817The implementation of XOR obfuscation in TPM
28182.0 is not the same as the XOR encryption
2819method in TPM 1.2.
2820
2821Published
2822Copyright © TCG 2006-2013
2823
2824Page 19
2825October 31, 2013
2826
2827Part 2: Structures
2828Algorithm Name
2829
2830Trusted Platform Module Library
2831a
2832
2833Value
2834
2835Type
2836
2837TPM_ALG_SHA256
2838
28390x000B
2840
2841H
2842
2843D
2844
2845Comments
2846the SHA 256 algorithm
2847OID 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05
284800 04 2016
2849
2850TPM_ALG_SHA384
2851
28520x000C
2853
2854H
2855
2856the SHA 384 algorithm
2857OID 30 41 30 0d 06 09 60 86 48 01 65 03 04 02 02 05
285800 04 3016
2859
2860TPM_ALG_SHA512
2861
28620x000D
2863
2864H
2865
2866the SHA 512 algorithm
2867OID 30 51 30 0d 06 09 60 86 48 01 65 03 04 02 03 05
286800 04 4016
2869
2870TPM_ALG_NULL
2871
28720x0010
2873
2874TPM_ALG_SM3_256
2875
28760x0012
2877
2878H
2879
2880hash algorithm standardized by OSCCA
2881Block size is 512 bits.
2882Output size is 256 bits.
2883
2884TPM_ALG_SM4
2885
28860x0013
2887
2888S
2889
2890symmetric algorithm standardized by OSCCA
2891Key and block size are 128 bits.
2892
2893TPM_ALG_RSASSA
2894
28950x0014
2896
2897AX
2898
2899RSA a signature algorithm according to PKCS#1v2.1, 8.2
2900
2901TPM_ALG_RSAES
2902
29030x0015
2904
2905AE
2906
2907RSA a padding algorithm according to PKCS#1v2.1, 7.2
2908
2909TPM_ALG_RSAPSS
2910
29110x0016
2912
2913AX
2914
2915RSA signature algorithm (RSSASSA-PSS) according to
2916PKCS#1v2.1, 8.1
2917
2918TPM_ALG_OAEP
2919
29200x0017
2921
2922AE
2923
2924RSA padding algorithm
2925PKCS#1v2.1, 7.1
2926
2927TPM_ALG_ECDSA
2928
29290x0018
2930
2931AX
2932
2933ECC signature algorithm using elliptic curve cryptography
2934(ECC)
2935
2936TPM_ALG_ECDH
2937
29380x0019
2939
2940AM
2941
2942ECC secret sharing using ECC from SP800-56A
2943Based on context, this can be either One-Pass DiffieHellman, C(1, 1, ECC CDH) defined in 6.2.2.2 or Full
2944Unified Model C(2, 2, ECC CDH) defined in 6.1.1.2
2945
2946TPM_ALG_ECDAA
2947
29480x001A
2949
2950AX
2951
2952ECC elliptic-curve based, anonymous signing scheme
2953
2954TPM_ALG_SM2
2955
29560x001B
2957
2958AXE
2959
2960Null algorithm
2961
2962(RSAES_OAEP)
2963
2964according
2965
2966to
2967
2968ECC depending on context, either an elliptic-curve based,
2969signature algorithm or a key exchange protocol
2970NOTE
2971
2972This would be one of the algorithms specified in
2973CM/T 0002 – 2012.
2974
2975TPM_ALG_ECSCHNORR
2976
29770x001C
2978
2979AX
2980
2981ECC elliptic-curve-based Schnorr signature
2982
2983TPM_ALG_ECMQV
2984
29850x001D
2986
2987AE
2988
2989ECC two-phase elliptic-curve key exchange -- C(2, 2, ECC
2990MQV) from SP800-56A
2991
2992TPM_ALG_KDF1_SP800_56a
2993
29940x0020
2995
2996HM
2997
2998ECC key derivation alternative #1 from SP800-56A
2999
3000TPM_ALG_KDF2
3001
30020x0021
3003
3004HM
3005
3006key derivation function from IEEE Std 1363a-2004
3007
3008TPM_ALG_KDF1_SP800_108
3009
30100x0022
3011
3012HM
3013
3014a key derivation method according to SP 800-108, "5.1
3015KDF in Counter Mode”
3016
3017TPM_ALG_ECC
3018
30190x0023
3020
3021AO
3022
3023prime field ECC
3024
3025TPM_ALG_SYMCIPHER
3026
30270x0025
3028
3029O
3030
3031TPM_ALG_CTR
3032
30330x0040
3034
3035SE
3036
3037Counter mode – if implemented, all symmetric block
3038ciphers (S type) implemented shall be capable of using
3039this mode.
3040
3041TPM_ALG_OFB
3042
30430x0041
3044
3045SE
3046
3047Output Feedback mode – if implemented, all
3048symmetric block ciphers (S type) implemented shall be
3049capable of using this mode.
3050
3051TPM_ALG_CBC
3052
30530x0042
3054
3055SE
3056
3057Cipher Block Chaining mode – if implemented, all
3058symmetric block ciphers (S type) implemented shall be
3059capable of using this mode.
3060
3061Page 20
3062October 31, 2013
3063
3064the object type for a symmetric block cipher
3065
3066Published
3067Copyright © TCG 2006-2013
3068
3069Family “2.0”
3070Level 00 Revision 00.99
3071
3072Trusted Platform Module Library
3073
3074Part 2: Structures
3075a
3076
3077Algorithm Name
3078
3079Value
3080
3081Type
3082
3083TPM_ALG_CFB
3084
30850x0043
3086
3087SE
3088
3089D
3090
3091Comments
3092Cipher Feedback mode – if implemented, all
3093symmetric block ciphers (S type) implemented shall be
3094capable of using this mode.
3095
3096TPM_ALG_ECB
3097
30980x0044
3099
3100SE
3101
3102Electronic Codebook mode – if implemented, all
3103symmetric block ciphers (S type) implemented shall be
3104capable of using this mode.
3105NOTE
3106
3107This mode is not recommended for uses unless
3108the key is frequently rotated such as in video
3109codecs.
3110
3111TPM_ALG_LAST
3112
31130x0044
3114
3115marker value
3116
3117reserved
3118
31190x00C1
3120
31210x00C1 – 0x00C6 are reserved
3122
3123reserved
3124
31250x00C2
3126
3127reserved
3128
31290x00C3
3130
3131reserved
3132
31330x00C4
3134
3135reserved
3136
31370x00C5
3138
3139reserved
3140
31410x00C6
3142
3143NOTE a Column Indicates the algorithm type and use of the algorithm inside of the TPM. The values are:
3144A – asymmetric algorithm with a public and private key
3145S – symmetric algorithm with only a private key
3146H – hash algorithm that compresses input data to a digest value
3147X – signing algorithm
3148E – an encryption algorithm
3149M – a method such as a mask generation function
3150O – an object type
3151
3152Family “2.0”
3153Level 00 Revision 00.99
3154
3155Published
3156Copyright © TCG 2006-2013
3157
3158Page 21
3159October 31, 2013
3160
3161Part 2: Structures
31626.4
3163
3164Trusted Platform Module Library
3165
3166TPM_ECC_CURVE
3167
3168The TCG maintains a registry of all curves that have an assigned curve identifier. That registry is the
3169definitive list of curves that may be supported by a TPM.
3170Table 8 is a copy of the TPM_ECC_CURVE constants table in the TCG registry as of the date of
3171publication of this specification. Table 8 is provided for illustrative purposes only.
3172{{Note for TCG Admin: Table 8 and the text in the paragraph above should be updated to reflect the final
3173decisions by the TCG Board of Directors about inclusion of the table and the contents of the table. The
3174desired approach is to leave the text as is and, immediately before publication of this specification for
3175TCG admin to verify that Table 8 is the same as the curve registry table published by the TCG.}}
3176Table 8 — Definition of (UINT16) {ECC} TPM_ECC_CURVE Constants <IN/OUT, S>
3177Name
3178
3179Value
3180
3181Comments
3182
3183TPM_ECC_NONE
3184
31850x0000
3186
3187TPM_ECC_NIST_P192
3188
31890x0001
3190
3191TPM_ECC_NIST_P224
3192
31930x0002
3194
3195TPM_ECC_NIST_P256
3196
31970x0003
3198
3199TPM_ECC_NIST_P384
3200
32010x0004
3202
3203TPM_ECC_NIST_P521
3204
32050x0005
3206
3207TPM_ECC_BN_P256
3208
32090x0010
3210
3211curve to support ECDAA
3212
3213TPM_ECC_BN_P638
3214
32150x0011
3216
3217curve to support ECDAA
3218
3219TPM_ECC_SM2_P256
3220
32210x0020
3222
3223#TPM_RC_CURVE
3224
32256.5
32266.5.1
3227
3228TPM_CC (Command Codes)
3229Format
3230
3231A command is a 32-bit structure with fields assigned as shown in Figure 1.
32323 3 2 2
32331 0 9 8
3234
3235Res V
3236
32371 1
32386 5
3239
3240Reserved
3241
32420
32430
3244
3245Command Index
3246
3247Figure 1 — Command Format
3248Table 9 — TPM Command Format Fields Description
3249Bit
325015:0
3251
3252Name
3253
3254Definition
3255
3256Command Index
3257
3258the index of the command
3259
326028:16 Reserved
326129
3262
3263V
3264
326531:30 Res
3266
3267Page 22
3268October 31, 2013
3269
3270shall be zero
3271SET(1): the command is vendor specific
3272CLEAR(0): the command is not vendor specific
3273shall be zero
3274
3275Published
3276Copyright © TCG 2006-2013
3277
3278Family “2.0”
3279Level 00 Revision 00.99
3280
3281Trusted Platform Module Library
32826.5.2
3283
3284Part 2: Structures
3285
3286Description
3287
3288Table 10 provides the legend for the interpretation of the column data in Table 11.
3289Table 10 — Legend for Command Code Tables
3290Column
3291
3292Allowed
3293Values
3294
3295Comments
3296
3297Name
3298
3299Command
3300Code Name
3301
3302Name of the command
3303
3304Command Code
3305
3306Numeric value
3307
3308the numeric value for the commandCode
3309
3310NV Write
3311
3312blank, Y, O
3313
3314indicates whether the command may cause an NV write operation
3315If this column contains a “Y,” then successful completion of the
3316command is expected to cause modification of the NV memory
3317because of the command actions.
3318If the column contains an “O,” then the command may cause a
3319modification to NV associated with an orderly shutdown. That is, the
3320command may modify the orderly save state of NV, in which case, an
3321NV write will be necessary.
3322NOTE 1
3323
3324Any command may be delayed in order for the TPM to complete
3325NV actions due to a previous command or because of an
3326asynchronous update of Clock.
3327
3328NOTE 2
3329
3330Any command with an authorization value may cause an NV write
3331on an authorization failure but the command does not complete
3332successfully.
3333
3334If the entry is blank, then writing to NV is not allowed in the command
3335actions.
3336Physical Presence
3337
3338blank, Y
3339
3340indicates whether the platformAuth for this command may require
3341confirmation through a physical presence indication
3342
3343Encrypted
3344
3345blank, 2, 4
3346
3347A numeric value that indicates the number of octets in the size field of
3348the first parameter of a command
3349Blank indicates that no size field is present and no parameter
3350encryption is allowed.
3351
3352Encrypt
3353
3354blank, 2, 4
3355
3356A numeric value that indicates the number of octets in the size field of
3357the first parameter of a response
3358Blank indicates that no size field is present and no parameter
3359encryption is allowed.
3360
3361Family “2.0”
3362Level 00 Revision 00.99
3363
3364Published
3365Copyright © TCG 2006-2013
3366
3367Page 23
3368October 31, 2013
3369
3370Part 2: Structures
33716.5.3
3372
3373Trusted Platform Module Library
3374
3375TPM_CC Listing
3376
3377Table 11 lists the command codes and their attributes. The only normative column in this table is the
3378column indicating the command code assigned to a specific command (the "Command Code" column).
3379For all other columns, the command and response tables in Part 3 are definitive.
3380
3381Encrypt
3382
3383Encrypted
3384
3385Physical Presence
3386
3387NV Write
3388
3389Table 11 — Definition of (UINT32) TPM_CC Constants (Numeric Order) <IN/OUT, S>
3390
3391Name
3392
3393Command
3394Code
3395
3396TPM_CC_FIRST
3397
33980x0000011F
3399
3400Compile variable. May decrease
3401based on implementation.
3402
3403TPM_CC_PP_FIRST
3404
34050x0000011F
3406
3407Compile variable. Would decrease
3408if new PP commands are added
3409
3410TPM_CC_NV_UndefineSpaceSpecial
3411
34120x0000011F
3413
3414Y
3415
3416Y
3417
3418TPM_CC_EvictControl
3419
34200x00000120
3421
3422Y
3423
3424Y
3425
3426TPM_CC_HierarchyControl
3427
34280x00000121
3429
3430Y
3431
3432Y
3433
3434TPM_CC_NV_UndefineSpace
3435
34360x00000122
3437
3438Y
3439
3440Y
3441
3442TPM_CC_ChangeEPS
3443
34440x00000124
3445
3446Y
3447
3448Y
3449
3450TPM_CC_ChangePPS
3451
34520x00000125
3453
3454Y
3455
3456Y
3457
3458TPM_CC_Clear
3459
34600x00000126
3461
3462Y
3463
3464Y
3465
3466TPM_CC_ClearControl
3467
34680x00000127
3469
3470Y
3471
3472Y
3473
3474TPM_CC_ClockSet
3475
34760x00000128
3477
3478Y
3479
3480Y
3481
3482TPM_CC_HierarchyChangeAuth
3483
34840x00000129
3485
3486Y
3487
3488Y
3489
34902
3491
3492TPM_CC_NV_DefineSpace
3493
34940x0000012A
3495
3496Y
3497
3498Y
3499
35002
3501
3502TPM_CC_PCR_Allocate
3503
35040x0000012B
3505
3506Y
3507
3508Y
3509
3510TPM_CC_PCR_SetAuthPolicy
3511
35120x0000012C
3513
3514Y
3515
3516Y
3517
3518TPM_CC_PP_Commands
3519
35200x0000012D
3521
3522Y
3523
3524Y
3525
3526TPM_CC_SetPrimaryPolicy
3527
35280x0000012E
3529
3530Y
3531
3532Y
3533
35342
3535
3536TPM_CC_FieldUpgradeStart
3537
35380x0000012F
3539
3540O
3541
3542Y
3543
35442
3545
3546TPM_CC_ClockRateAdjust
3547
35480x00000130
3549
3550O
3551
3552Y
3553
3554TPM_CC_CreatePrimary
3555
35560x00000131
3557
3558TPM_CC_NV_GlobalWriteLock
3559
35600x00000132
3561
3562TPM_CC_PP_LAST
3563
35640x00000132
3565
3566TPM_CC_GetCommandAuditDigest
3567
35680x00000133
3569
3570Y
3571
3572TPM_CC_NV_Increment
3573
35740x00000134
3575
3576Y
3577
3578Page 24
3579October 31, 2013
3580
3581Y
3582O
3583
3584Comments
3585
35862
3587
35882
3589
35902
3591
3592Y
3593Compile variable
35942
3595
3596Published
3597Copyright © TCG 2006-2013
3598
3599Family “2.0”
3600Level 00 Revision 00.99
3601
3602Command
3603Code
3604
3605TPM_CC_NV_SetBits
3606
36070x00000135
3608
3609Y
3610
3611TPM_CC_NV_Extend
3612
36130x00000136
3614
3615Y
3616
3617TPM_CC_NV_Write
3618
36190x00000137
3620
3621Y
3622
3623TPM_CC_NV_WriteLock
3624
36250x00000138
3626
3627Y
3628
3629TPM_CC_DictionaryAttackLockReset
3630
36310x00000139
3632
3633O
3634
3635TPM_CC_DictionaryAttackParameters
3636
36370x0000013A
3638
3639Y
3640
3641TPM_CC_NV_ChangeAuth
3642
36430x0000013B
3644
3645Y
3646
36472
3648
3649TPM_CC_PCR_Event
3650
36510x0000013C
3652
3653O
3654
36552
3656
3657TPM_CC_PCR_Reset
3658
36590x0000013D
3660
3661O
3662
3663TPM_CC_SequenceComplete
3664
36650x0000013E
3666
3667O
3668
3669TPM_CC_SetAlgorithmSet
3670
36710x0000013F
3672
3673Y
3674
3675TPM_CC_SetCommandCodeAuditStatus
3676
36770x00000140
3678
3679Y
3680
3681TPM_CC_FieldUpgradeData
3682
36830x00000141
3684
3685O
3686
3687TPM_CC_IncrementalSelfTest
3688
36890x00000142
3690
3691O
3692
3693TPM_CC_SelfTest
3694
36950x00000143
3696
3697O
3698
3699TPM_CC_Startup
3700
37010x00000144
3702
3703Y
3704
3705TPM_CC_Shutdown
3706
37070x00000145
3708
3709Y
3710
3711TPM_CC_StirRandom
3712
37130x00000146
3714
3715Y
3716
3717TPM_CC_ActivateCredential
3718
37190x00000147
3720
3721TPM_CC_Certify
3722
37230x00000148
3724
3725TPM_CC_PolicyNV
3726
37270x00000149
3728
3729TPM_CC_CertifyCreation
3730
37310x0000014A
3732
3733TPM_CC_Duplicate
3734
37350x0000014B
3736
3737TPM_CC_GetTime
3738
37390x0000014C
3740
3741O
3742
37432
3744
3745TPM_CC_GetSessionAuditDigest
3746
37470x0000014D
3748
3749O
3750
37512
3752
3753TPM_CC_NV_Read
3754
37550x0000014E
3756
3757TPM_CC_NV_ReadLock
3758
37590x0000014F
3760
3761TPM_CC_ObjectChangeAuth
3762
37630x00000150
3764
37652
3766
3767TPM_CC_PolicySecret
3768
37690x00000151
3770
37712
3772
3773TPM_CC_Rewrap
3774
37750x00000152
3776
37772
3778
3779Family “2.0”
3780Level 00 Revision 00.99
3781
3782Encrypt
3783
3784Name
3785
3786NV Write
3787
3788Encrypted
3789
3790Part 2: Structures
3791
3792Physical Presence
3793
3794Trusted Platform Module Library
3795
37962
3797
3798PCR
3799PCR
3800
38012
3802
38032
3804
38052
3806
38072
38082
3809
3810O
3811
38122
3813
38142
3815
38162
3817
38182
3819O
3820
3821Comments
3822
3823Policy
3824
38252
3826
38272
3828
38292
3830
38312
3832
38332
3834O
3835
3836Published
3837Copyright © TCG 2006-2013
3838
38392
3840Policy
38412
3842
3843Page 25
3844October 31, 2013
3845
3846Trusted Platform Module Library
3847
3848Command
3849Code
3850
3851Encrypt
3852
3853TPM_CC_Create
3854
38550x00000153
3856
38572
3858
38592
3860
3861TPM_CC_ECDH_ZGen
3862
38630x00000154
3864
38652
3866
38672
3868
3869TPM_CC_HMAC
3870
38710x00000155
3872
38732
3874
38752
3876
3877TPM_CC_Import
3878
38790x00000156
3880
38812
3882
38832
3884
3885TPM_CC_Load
3886
38870x00000157
3888
38892
3890
38912
3892
3893TPM_CC_Quote
3894
38950x00000158
3896
38972
3898
38992
3900
3901TPM_CC_RSA_Decrypt
3902
39030x00000159
3904
3905TPM_CC_HMAC_Start
3906
39070x0000015B
3908
39092
3910
3911TPM_CC_SequenceUpdate
3912
39130x0000015C
3914
39152
3916
3917TPM_CC_Sign
3918
39190x0000015D
3920
39212
3922
3923TPM_CC_Unseal
3924
39250x0000015E
3926
3927TPM_CC_PolicySigned
3928
39290x00000160
3930
3931TPM_CC_ContextLoad
3932
39330x00000161
3934
3935O
3936
3937Context
3938
3939TPM_CC_ContextSave
3940
39410x00000162
3942
3943O
3944
3945Context
3946
3947TPM_CC_ECDH_KeyGen
3948
39490x00000163
3950
39512
3952
3953TPM_CC_EncryptDecrypt
3954
39550x00000164
3956
39572
3958
3959TPM_CC_FlushContext
3960
39610x00000165
3962
3963TPM_CC_LoadExternal
3964
39650x00000167
3966
39672
3968
39692
3970
3971TPM_CC_MakeCredential
3972
39730x00000168
3974
39752
3976
39772
3978
3979TPM_CC_NV_ReadPublic
3980
39810x00000169
3982
3983TPM_CC_PolicyAuthorize
3984
39850x0000016A
3986
3987TPM_CC_PolicyAuthValue
3988
39890x0000016B
3990
3991Policy
3992
3993TPM_CC_PolicyCommandCode
3994
39950x0000016C
3996
3997Policy
3998
3999TPM_CC_PolicyCounterTimer
4000
40010x0000016D
4002
40032
4004
4005Policy
4006
4007TPM_CC_PolicyCpHash
4008
40090x0000016E
4010
40112
4012
4013Policy
4014
4015TPM_CC_PolicyLocality
4016
40170x0000016F
4018
4019TPM_CC_PolicyNameHash
4020
40210x00000170
4022
4023TPM_CC_PolicyOR
4024
40250x00000171
4026
4027TPM_CC_PolicyTicket
4028
40290x00000172
4030
4031TPM_CC_ReadPublic
4032
40330x00000173
4034
4035Page 26
4036October 31, 2013
4037
4038NV Write
4039
4040Name
4041
4042Encrypted
4043
4044Physical Presence
4045
4046Part 2: Structures
4047
4048O
4049
4050Comments
4051
40522
40532
4054
40552
40562
4057
4058Policy
4059
4060O
4061
4062Context
4063
4064NV
40652
4066
4067Policy
4068
4069Policy
40702
4071
4072Policy
4073Policy
4074
40752
4076
4077Published
4078Copyright © TCG 2006-2013
4079
4080Policy
40812
4082
4083Family “2.0”
4084Level 00 Revision 00.99
4085
4086Encrypt
4087
40882
4089
4090NV Write
4091
4092Encrypted
4093
4094Part 2: Structures
4095
4096Physical Presence
4097
4098Trusted Platform Module Library
4099
41002
4101
41022
4103
41042
4105
4106Name
4107
4108Command
4109Code
4110
4111TPM_CC_RSA_Encrypt
4112
41130x00000174
4114
4115TPM_CC_StartAuthSession
4116
41170x00000176
4118
4119TPM_CC_VerifySignature
4120
41210x00000177
4122
4123TPM_CC_ECC_Parameters
4124
41250x00000178
4126
4127TPM_CC_FirmwareRead
4128
41290x00000179
4130
4131TPM_CC_GetCapability
4132
41330x0000017A
4134
4135TPM_CC_GetRandom
4136
41370x0000017B
4138
4139TPM_CC_GetTestResult
4140
41410x0000017C
4142
4143TPM_CC_Hash
4144
41450x0000017D
4146
4147TPM_CC_PCR_Read
4148
41490x0000017E
4150
4151PCR
4152
4153TPM_CC_PolicyPCR
4154
41550x0000017F
4156
4157Policy
4158
4159TPM_CC_PolicyRestart
4160
41610x00000180
4162
4163TPM_CC_ReadClock
4164
41650x00000181
4166
4167TPM_CC_PCR_Extend
4168
41690x00000182
4170
4171O
4172
41732
4174
4175TPM_CC_PCR_SetAuthValue
4176
41770x00000183
4178
4179N
4180
41812
4182
4183TPM_CC_NV_Certify
4184
41850x00000184
4186
4187O
4188
4189TPM_CC_EventSequenceComplete
4190
41910x00000185
4192
4193O
4194
4195TPM_CC_HashSequenceStart
4196
41970x00000186
4198
4199TPM_CC_PolicyPhysicalPresence
4200
42010x00000187
4202
4203Policy
4204
4205TPM_CC_PolicyDuplicationSelect
4206
42070x00000188
4208
4209Policy
4210
4211TPM_CC_PolicyGetDigest
4212
42130x00000189
4214
4215Policy
4216
4217TPM_CC_TestParms
4218
42190x0000018A
4220
4221TPM_CC_Commit
4222
42230x0000018B
4224
4225TPM_CC_PolicyPassword
4226
42270x0000018C
4228
4229TPM_CC_ZGen_2Phase
4230
42310x0000018D
4232
4233TPM_CC_EC_Ephemeral
4234
42350x0000018E
4236
4237TPM_CC_PolicyNvWritten
4238
42390x0000018F
4240
4241Policy
4242
4243TPM_CC_LAST
4244
42450x0000018F
4246
4247Compile variable. May increase
4248based on implementation.
4249
4250O
4251
4252Comments
4253
42542
4255
42562
4257
42582
4259
4260O
4261
42622
4263
42642
4265
42662
4267Policy
4268
42692
4270
42712
4272
4273NOTE
4274
4275#TPM_RC_COMMAND_CODE
4276
4277Family “2.0”
4278Level 00 Revision 00.99
4279
4280Published
4281Copyright © TCG 2006-2013
4282
4283This is not a FMT1 code
4284and a parameter indicator
4285value may not be added to
4286
4287Page 27
4288October 31, 2013
4289
4290Encrypt
4291
4292Encrypted
4293
4294Command
4295Code
4296
4297Name
4298
4299Physical Presence
4300
4301Trusted Platform Module Library
4302
4303NV Write
4304
4305Part 2: Structures
4306
4307Comments
4308this value.
4309
43106.6
4311
4312TPM_RC (Response Codes)
4313
43146.6.1
4315
4316Description
4317
4318Each return from the TPM has a 32-bit response code. The TPM will always set the upper 20 bits (31:12)
4319of the response code to 0 00 0016 and the low-order 12 bits (11:00) will contain the response code.
4320When a command succeeds, the TPM shall return TPM_RC_SUCCESS (0 0016) and will update any
4321authorization-session nonce associated with the command.
4322When a command fails to complete for any reason, the TPM shall return
43234324
4325a TPM_ST (UINT16) with a value of TPM_TAG_RSP_COMMAND or TPM_ST_NO_SESSIONS,
4326followed by
4327
43284329
4330a UINT32 (responseSize) with a value of 10, followed by
4331
43324333
4334a UINT32 containing a response code with a value other than TPM_RC_SUCCESS.
4335
4336Commands defined in this specification will use a tag of either TPM_ST_NO_SESSIONS or
4337TPM_ST_SESSIONS. Error responses will use a tag value of TPM_ST_NO_SESSIONS and the
4338response code will be as defined in this specification. Commands that use tags defined in the TPM 1.2
4339specification will use TPM_TAG_RSP_COMMAND in an error and a response code defined in TPM 1.2.
4340If the tag of the command is not a recognized command tag, the TPM error response will differ depending
4341on TPM 1.2 compatibility. If the TPM supports 1.2 compatibility, the TPM shall return a tag of
4342TPM_TAG_RSP_COMMAND and an appropriate TPM 1.2 response code (TPM_BADTAG =
434300 00 00 1E16). If the TPM does not have compatibility with TPM 1.2, the TPM shall return
4344TPM_ST_NO_SESSION and a response code of TPM_RC_TAG.
4345When a command fails, the TPM shall not update the authorization-session nonces associated with the
4346command and will not close the authorization sessions used by the command. Audit digests will not be
4347updated on an error. Unless noted in the command actions, a command that returns an error shall leave
4348the state of the TPM as if the command had not been attempted. The exception to this principle is that a
4349failure due to an authorization failure may update the dictionary-attack protection values.
4350
4351Page 28
4352October 31, 2013
4353
4354Published
4355Copyright © TCG 2006-2013
4356
4357Family “2.0”
4358Level 00 Revision 00.99
4359
4360Trusted Platform Module Library
43616.6.2
4362
4363Part 2: Structures
4364
4365Response Code Formats
4366
4367The response codes for this specification are defined such that there is no overlap between the response
4368codes used for this specification and those assigned in previous TPM specifications.
4369The formats defined in this clause only apply when the tag for the response is TPM_ST_NO_SESSIONS.
4370The response codes use two different format groups. One group contains the TPM 1.2 compatible
4371response codes and the response codes for this specification that are not related to command
4372parameters. The second group contains the errors that may be associated with a command parameter,
4373handle, or session.
4374Figure 2 shows the format for the response codes when bit 7 is zero.
43751
43761
4377
43781
43790
4380
43810
43829
4383
43840
43858
4386
43870
43887
4389
4390S
4391
4392bit
4393
4394T
4395
4396r
4397
4398V
4399
44000
44016
4402
44030
44045
4405
4406F
4407
44080
44094
4410
44110
44123
4413
44140
44152
4416
44170
44181
4419
44200
44210
4422
4423E
4424
4425Figure 2 — Format-Zero Response Codes
4426
4427Family “2.0”
4428Level 00 Revision 00.99
4429
4430Published
4431Copyright © TCG 2006-2013
4432
4433Page 29
4434October 31, 2013
4435
4436Part 2: Structures
4437
4438Trusted Platform Module Library
4439
4440The field definitions are:
4441Table 12 — Format-Zero Response Codes
4442Bit
4443
4444Name
4445
4446Definition
4447
444806:00
4449
4450E
4451
4452the error number
4453The interpretation of this field is dependent on the setting of the G and S fields.
4454
445507
4456
4457F
4458
4459format selector
4460CLEAR when the format is as defined in this Table 12 or when the response code is
4461TPM_RC_BAD_TAG.
4462
446308
4464
4465V
4466
4467version
4468SET (1): The error number is defined in this specification and is returned when the response tag
4469is TPM_ST_NO_SESSIONS.
4470CLEAR (0): The error number is defined by a previous TPM specification. The error number is
4471returned when the response tag is TPM_TAG_RSP_COMMAND.
4472NOTE
4473
447409
4475
4476In any error number returned by a TPM, the F (bit 7) and V (bit 8) attributes shall be CLEAR
4477when the response tag is TPM_TAG_RSP_COMMAND value used in TPM 1.2.
4478
4479Reserved shall be zero.
4480
448110
4482
4483T
4484
4485TCG/Vendor indicator
4486SET (1): The response code is defined by the TPM vendor.
4487CLEAR (0): The response code is defined by the TCG (a value in this specification).
4488NOTE
4489
449011
4491
4492S
4493
4494This attribute does not indicate a vendor-specific code unless the F attribute (bit[07]) is CLEAR.
4495
4496severity
4497SET (1): The response code is a warning and the command was not necessarily in error. This
4498command indicates that the TPM is busy or that the resources of the TPM have to be adjusted in
4499order to allow the command to execute.
4500CLEAR (0): The response code indicates that the command had an error that would prevent it
4501from running.
4502
4503When the format bit (bit 7) is SET, then the error occurred during the unmarshaling or validation of an
4504input parameter to the TPM. Figure 3 shows the format for the response codes when bit 7 is one.
4505bit
4506
45071
45081
4509
45101
45110
4512
45130
45149
4515
4516N
4517
45180
45198
4520
45210
45227
4523
45240
45256
4526
45271
4528
45290
45305
4531
4532P
4533
45340
45354
4536
45370
45383
4539
45400
45412
4542
45430
45441
4545
45460
45470
4548
4549E
4550
4551Figure 3 — Format-One Response Codes
4552There are 64 errors with this format. The errors can be associated with a parameter, handle, or session.
4553The error number for this format is in bits[05:00]. When an error is associated with a parameter, 0 40 16 is
4554added and N is set to the parameter number.
4555For an error associated with a handle, a parameter number (1 to 7) is added to the N field. For an error
4556associated with a session, a value of 8 plus the session number (1 to 7) is added to the N field. In other
4557words, if P is clear, then a value of 0 to 7 in the N field will indicate a handle error, and a value of 8 – 15
4558will indicate a session error.
4559NOTE
4560
4561If an implementation is not able to designate the handle, session, or parameter in error, then P and N will
4562be zero.
4563
4564Page 30
4565October 31, 2013
4566
4567Published
4568Copyright © TCG 2006-2013
4569
4570Family “2.0”
4571Level 00 Revision 00.99
4572
4573Trusted Platform Module Library
4574
4575Part 2: Structures
4576
4577The field definitions are:
4578Table 13 — Format-One Response Codes
4579Bit
4580
4581Name Definition
4582
458305:00
4584
4585E
4586
4587the error number
4588The error number is independent of the other settings.
4589
459006
4591
4592P
4593
4594SET (1): The error is associated with a parameter.
4595CLEAR (0): The error is associated with a handle or a session.
4596
459707
4598
4599F
4600
4601the response code format selector
4602This field shall be SET for the format in this table.
4603
460411:08
4605
4606N
4607
4608the number of the handle, session, or parameter in error
4609If P is SET, then this field is the parameter in error. If P is CLEAR, then this field indicates the
4610handle or session in error. Handles use values of N between 0000 2 and 01112. Sessions use
4611values between 10002 and 11112.
4612
4613The groupings of response codes are determined by bits 08, 07, and 06 of the response code as
4614summarized in Table 14.
4615Table 14 — Response Code Groupings
4616Bit
46170
46188
4619
46200
46217
4622
46230
46246
4625
4626Definition
4627
46280
4629
46300
4631
4632x
4633
4634a response code defined by TPM 1.2
4635NOTE
4636
4637An “x” in a column indicates that this may be either 0 or 1 and not affect the grouping of the response
4638code.
4639
46401
4641
46420
4643
4644x
4645
4646a response code defined by this specification with no handle, session, or parameter number modifier
4647
4648x
4649
46501
4651
46520
4653
4654a response code defined by this specification with either a handle or session number modifier
4655
4656x
4657
46581
4659
46601
4661
4662a response code defined by this specification with a parameter number modifier
4663
4664Family “2.0”
4665Level 00 Revision 00.99
4666
4667Published
4668Copyright © TCG 2006-2013
4669
4670Page 31
4671October 31, 2013
4672
4673Part 2: Structures
46746.6.3
4675
4676Trusted Platform Module Library
4677
4678TPM_RC Values
4679
4680In general, response codes defined in Part 2 will be unmarshaling errors and will have the F (format) bit
4681SET. Codes that are unique to Part 3 will have the F bit CLEAR but the V (version) attribute will be SET to
4682indicate that it is a TPM 2.0 response code.
4683NOTE
4684
4685The constant RC_VER1 is used to indicate that the V attribute is SET and the constant RC_ FMT1 is used
4686to indicate that the F attribute is SET and that the return code is variable based on handle, session, and
4687parameter modifiers.
4688
4689Table 15 — Definition of (UINT32) TPM_RC Constants (Actions) <OUT>
4690Name
4691
4692Value
4693
4694Description
4695
4696TPM_RC_SUCCESS
4697
46980x000
4699
4700TPM_RC_BAD_TAG
4701
47020x01E
4703
4704defined for compatibility with TPM 1.2
4705
4706RC_VER1
4707
47080x100
4709
4710set for all format 0 response codes
4711
4712TPM_RC_INITIALIZE
4713
4714RC_VER1 + 0x000
4715
4716TPM not initialized
4717commands not being accepted because of a TPM
4718failure
4719
4720TPM_RC_FAILURE
4721
4722RC_VER1 + 0x001
4723
4724NOTE
4725
4726TPM_RC_SEQUENCE
4727
4728RC_VER1 + 0x003
4729
4730improper use of a sequence handle
4731
4732TPM_RC_PRIVATE
4733
4734RC_VER1 + 0x00B
4735
4736TPM_RC_HMAC
4737
4738RC_VER1 + 0x019
4739
4740TPM_RC_DISABLED
4741
4742RC_VER1 + 0x020
4743
4744TPM_RC_EXCLUSIVE
4745
4746RC_VER1 + 0x021
4747
4748command failed because audit sequence required
4749exclusivity
4750
4751TPM_RC_AUTH_TYPE
4752
4753RC_VER1 + 0x024
4754
4755authorization handle is not correct for command
4756
4757TPM_RC_AUTH_MISSING
4758
4759RC_VER1 + 0x025
4760
4761command requires an authorization session for
4762handle and it is not present.
4763
4764TPM_RC_POLICY
4765
4766RC_VER1 + 0x026
4767
4768policy Failure In Math Operation or an invalid
4769authPolicy value
4770
4771TPM_RC_PCR
4772
4773RC_VER1 + 0x027
4774
4775PCR check fail
4776
4777TPM_RC_PCR_CHANGED
4778
4779RC_VER1 + 0x028
4780
4781PCR have changed since checked.
4782
4783TPM_RC_UPGRADE
4784
4785RC_VER1 + 0x02D
4786
4787for
4788all
4789commands
4790other
4791than
4792TPM2_FieldUpgradeData(), this code indicates
4793that the TPM is in field upgrade mode; for
4794TPM2_FieldUpgradeData(), this code indicates
4795that the TPM is not in field upgrade mode
4796
4797TPM_RC_TOO_MANY_CONTEXTS
4798
4799RC_VER1 + 0x02E
4800
4801context ID counter is at maximum.
4802
4803TPM_RC_AUTH_UNAVAILABLE
4804
4805RC_VER1 + 0x02F
4806
4807authValue or authPolicy is not available for
4808selected entity.
4809
4810TPM_RC_REBOOT
4811
4812RC_VER1 + 0x030
4813
4814a _TPM_Init and Startup(CLEAR) is required
4815before the TPM can resume operation.
4816
4817RC_VER1 + 0x031
4818
4819the protection algorithms (hash and symmetric) are
4820not reasonably balanced. The digest size of the
4821hash must be larger than the key size of the
4822symmetric algorithm.
4823
4824TPM_RC_UNBALANCED
4825
4826Page 32
4827October 31, 2013
4828
4829This
4830may
4831be
4832returned
4833by
4834TPM2_GetTestResult() as the testResult
4835parameter.
4836
4837Published
4838Copyright © TCG 2006-2013
4839
4840Family “2.0”
4841Level 00 Revision 00.99
4842
4843Trusted Platform Module Library
4844Name
4845
4846Part 2: Structures
4847Value
4848
4849Description
4850
4851TPM_RC_COMMAND_SIZE
4852
4853RC_VER1 + 0x042
4854
4855command commandSize value is inconsistent with
4856contents of the command buffer; either the size is
4857not the same as the octets loaded by the hardware
4858interface layer or the value is not large enough to
4859hold a command header
4860
4861TPM_RC_COMMAND_CODE
4862
4863RC_VER1 + 0x043
4864
4865command code not supported
4866
4867TPM_RC_AUTHSIZE
4868
4869RC_VER1 + 0x044
4870
4871the value of authorizationSize is out of range or the
4872number of octets in the Authorization Area is
4873greater than required
4874
4875TPM_RC_AUTH_CONTEXT
4876
4877RC_VER1 + 0x045
4878
4879use of an authorization session with a context
4880command
4881
4882TPM_RC_NV_RANGE
4883
4884RC_VER1 + 0x046
4885
4886NV offset+size is out of range.
4887
4888TPM_RC_NV_SIZE
4889
4890RC_VER1 + 0x047
4891
4892Requested allocation size is larger than allowed.
4893
4894TPM_RC_NV_LOCKED
4895
4896RC_VER1 + 0x048
4897
4898NV access locked.
4899
4900TPM_RC_NV_AUTHORIZATION
4901
4902RC_VER1 + 0x049
4903
4904NV access authorization fails in command actions
4905(this failure does not affect lockout.action)
4906
4907TPM_RC_NV_UNINITIALIZED
4908
4909RC_VER1 + 0x04A
4910
4911an NV Index is used before being initialized or the
4912state saved by TPM2_Shutdown(STATE) could not
4913be restored
4914
4915TPM_RC_NV_SPACE
4916
4917RC_VER1 + 0x04B
4918
4919insufficient space for NV allocation
4920
4921TPM_RC_NV_DEFINED
4922
4923RC_VER1 + 0x04C
4924
4925NV Index or persistend object already defined
4926
4927TPM_RC_BAD_CONTEXT
4928
4929RC_VER1 + 0x050
4930
4931context in TPM2_ContextLoad() is not valid
4932
4933TPM_RC_CPHASH
4934
4935RC_VER1 + 0x051
4936
4937cpHash value already set or not correct for use
4938
4939TPM_RC_PARENT
4940
4941RC_VER1 + 0x052
4942
4943handle for parent is not a valid parent
4944
4945TPM_RC_NEEDS_TEST
4946
4947RC_VER1 + 0x053
4948
4949some function needs testing.
4950
4951RC_VER1 + 0x054
4952
4953returned when an internal function cannot process
4954a request due to an unspecified problem. This
4955code is usually related to invalid parameters that
4956are not properly filtered by the input unmarshaling
4957code.
4958
4959TPM_RC_SENSITIVE
4960
4961RC_VER1 + 0x055
4962
4963the sensitive area did not unmarshal correctly after
4964decryption – this code is used in lieu of the other
4965unmarshaling errors so that an attacker cannot
4966determine where the unmarshaling error occurred
4967
4968RC_MAX_FM0
4969
4970RC_VER1 + 0x07F
4971
4972largest version 1 code that is not a warning
4973
4974TPM_RC_NO_RESULT
4975
4976New Subsection
4977
4978RC_FMT1
4979
49800x080
4981
4982This bit is SET in all format 1 response codes
4983The codes in this group may have a value added to
4984them to indicate the handle, session, or parameter
4985to which they apply.
4986
4987TPM_RC_ASYMMETRIC
4988
4989RC_FMT1 + 0x001
4990
4991asymmetric algorithm not supported or not correct
4992
4993TPM_RC_ATTRIBUTES
4994
4995RC_FMT1 + 0x002
4996
4997inconsistent attributes
4998
4999TPM_RC_HASH
5000
5001RC_FMT1 + 0x003
5002
5003hash algrithm not supported or not appropriate
5004
5005TPM_RC_VALUE
5006
5007RC_FMT1 + 0x004
5008
5009value is out of range or is not correct for the
5010context
5011
5012TPM_RC_HIERARCHY
5013
5014RC_FMT1 + 0x005
5015
5016hierarchy is not enabled or is not correct for the
5017use
5018
5019Family “2.0”
5020Level 00 Revision 00.99
5021
5022Published
5023Copyright © TCG 2006-2013
5024
5025Page 33
5026October 31, 2013
5027
5028Part 2: Structures
5029
5030Trusted Platform Module Library
5031
5032Name
5033
5034Value
5035
5036Description
5037
5038TPM_RC_KEY_SIZE
5039
5040RC_FMT1 + 0x007
5041
5042key size is not supported
5043
5044TPM_RC_MGF
5045
5046RC_FMT1 + 0x008
5047
5048mask generation function not supported
5049
5050TPM_RC_MODE
5051
5052RC_FMT1 + 0x009
5053
5054mode of operation not supported
5055
5056TPM_RC_TYPE
5057
5058RC_FMT1 + 0x00A
5059
5060the type of the value is not appropriate for the use
5061
5062TPM_RC_HANDLE
5063
5064RC_FMT1 + 0x00B
5065
5066the handle is not correct for the use
5067
5068TPM_RC_KDF
5069
5070RC_FMT1 + 0x00C
5071
5072unsupported key derivation function or function not
5073appropriate for use
5074
5075TPM_RC_RANGE
5076
5077RC_FMT1 + 0x00D
5078
5079value was out of allowed range.
5080
5081TPM_RC_AUTH_FAIL
5082
5083RC_FMT1 + 0x00E
5084
5085the authorization HMAC check failed and DA
5086counter incremented
5087
5088TPM_RC_NONCE
5089
5090RC_FMT1 + 0x00F
5091
5092invalid nonce size
5093
5094TPM_RC_PP
5095
5096RC_FMT1 + 0x010
5097
5098authorization requires assertion of PP
5099
5100TPM_RC_SCHEME
5101
5102RC_FMT1 + 0x012
5103
5104unsupported or incompatible scheme
5105
5106TPM_RC_SIZE
5107
5108RC_FMT1 + 0x015
5109
5110structure is the wrong size
5111
5112TPM_RC_SYMMETRIC
5113
5114RC_FMT1 + 0x016
5115
5116unsupported symmetric algorithm or key size, or
5117not appropriate for instance
5118
5119TPM_RC_TAG
5120
5121RC_FMT1 + 0x017
5122
5123incorrect structure tag
5124
5125TPM_RC_SELECTOR
5126
5127RC_FMT1 + 0x018
5128
5129union selector is incorrect
5130
5131TPM_RC_INSUFFICIENT
5132
5133RC_FMT1 + 0x01A
5134
5135the TPM was unable to unmarshal a value
5136because there were not enough octets in the input
5137buffer
5138
5139TPM_RC_SIGNATURE
5140
5141RC_FMT1 + 0x01B
5142
5143the signature is not valid
5144
5145TPM_RC_KEY
5146
5147RC_FMT1 + 0x01C
5148
5149key fields are not compatible with the selected use
5150
5151TPM_RC_POLICY_FAIL
5152
5153RC_FMT1 + 0x01D
5154
5155a policy check failed
5156
5157TPM_RC_INTEGRITY
5158
5159RC_FMT1 + 0x01F
5160
5161integrity check failed
5162
5163TPM_RC_TICKET
5164
5165RC_FMT1 + 0x020
5166
5167invalid ticket
5168
5169TPM_RC_RESERVED_BITS
5170
5171RC_FMT1 + 0x021
5172
5173reserved bits not set to zero as required
5174
5175TPM_RC_BAD_AUTH
5176
5177RC_FMT1 + 0x022
5178
5179authroization failure without DA implications
5180
5181TPM_RC_EXPIRED
5182
5183RC_FMT1 + 0x023
5184
5185the policy has expired
5186
5187TPM_RC_POLICY_CC
5188
5189RC_FMT1 + 0x024
5190
5191the commandCode in the policy is not the
5192commandCode of the command or the command
5193code in a policy command references a command
5194that is not implemented
5195
5196TPM_RC_BINDING
5197
5198RC_FMT1 + 0x025
5199
5200public and sensitive portions of an object are not
5201cryptographically bound
5202
5203TPM_RC_CURVE
5204
5205RC_FMT1 + 0x026
5206
5207curve not supported
5208
5209TPM_RC_ECC_POINT
5210
5211RC_FMT1 + 0x027
5212
5213point is not on the required curve.
5214
5215New Subsection
5216RC_WARN
5217
52180x900
5219
5220set for warning response codes
5221
5222TPM_RC_CONTEXT_GAP
5223
5224RC_WARN + 0x001
5225
5226gap for context ID is too large
5227
5228TPM_RC_OBJECT_MEMORY
5229
5230RC_WARN + 0x002
5231
5232out of memory for object contexts
5233
5234Page 34
5235October 31, 2013
5236
5237Published
5238Copyright © TCG 2006-2013
5239
5240Family “2.0”
5241Level 00 Revision 00.99
5242
5243Trusted Platform Module Library
5244
5245Part 2: Structures
5246
5247Name
5248
5249Value
5250
5251Description
5252
5253TPM_RC_SESSION_MEMORY
5254
5255RC_WARN + 0x003
5256
5257out of memory for session contexts
5258
5259TPM_RC_MEMORY
5260
5261RC_WARN + 0x004
5262
5263out of shared object/session memory or need
5264space for internal operations
5265
5266TPM_RC_SESSION_HANDLES
5267
5268RC_WARN + 0x005
5269
5270out of session handles – a session must be flushed
5271before a new session may be created
5272out of object handles – the handle space for
5273objects is depleted and a reboot is required
5274NOTE
5275
5276TPM_RC_LOCALITY
5277
5278TPM_RC_YIELDED
5279
5280This cannot occur
5281implementation.
5282
5283NOTE
5284
5285TPM_RC_OBJECT_HANDLES
5286
5287There is no reason why an implementation
5288would implement a design that would deplete
5289handle space. Platform specifications are
5290encouraged to forbid it.
5291
5292RC_WARN + 0x006
5293
5294RC_WARN + 0x007
5295
5296RC_WARN + 0x008
5297
5298on
5299
5300the
5301
5302reference
5303
5304bad locality
5305the TPM has suspended operation on the
5306command; forward progress was made and the
5307command may be retried.
5308See Part 1, “Multi-tasking.”
5309NOTE
5310
5311This cannot occur
5312implementation.
5313
5314on
5315
5316the
5317
5318reference
5319
5320TPM_RC_CANCELED
5321
5322RC_WARN + 0x009
5323
5324the command was canceled
5325
5326TPM_RC_TESTING
5327
5328RC_WARN + 0x00A
5329
5330TPM is performing self-tests
5331
5332TPM_RC_REFERENCE_H0
5333
5334RC_WARN + 0x010
5335
5336the 1 handle in the handle area references a
5337transient object or session that is not loaded
5338
5339TPM_RC_REFERENCE_H1
5340
5341RC_WARN + 0x011
5342
5343the 2 handle in the handle area references a
5344transient object or session that is not loaded
5345
5346TPM_RC_REFERENCE_H2
5347
5348RC_WARN + 0x012
5349
5350the 3 handle in the handle area references a
5351transient object or session that is not loaded
5352
5353TPM_RC_REFERENCE_H3
5354
5355RC_WARN + 0x013
5356
5357the 4 handle in the handle area references a
5358transient object or session that is not loaded
5359
5360TPM_RC_REFERENCE_H4
5361
5362RC_WARN + 0x014
5363
5364the 5 handle in the handle area references a
5365transient object or session that is not loaded
5366
5367TPM_RC_REFERENCE_H5
5368
5369RC_WARN + 0x015
5370
5371the 6 handle in the handle area references a
5372transient object or session that is not loaded
5373
5374TPM_RC_REFERENCE_H6
5375
5376RC_WARN + 0x016
5377
5378the 7 handle in the handle area references a
5379transient object or session that is not loaded
5380
5381TPM_RC_REFERENCE_S0
5382
5383RC_WARN + 0x018
5384
5385the 1 authorization session handle references a
5386session that is not loaded
5387
5388TPM_RC_REFERENCE_S1
5389
5390RC_WARN + 0x019
5391
5392the 2 authorization session handle references a
5393session that is not loaded
5394
5395TPM_RC_REFERENCE_S2
5396
5397RC_WARN + 0x01A
5398
5399the 3 authorization session handle references a
5400session that is not loaded
5401
5402TPM_RC_REFERENCE_S3
5403
5404RC_WARN + 0x01B
5405
5406the 4th authorization session handle references a
5407session that is not loaded
5408
5409TPM_RC_REFERENCE_S4
5410
5411RC_WARN + 0x01C
5412
5413the 5 session handle references a session that is
5414not loaded
5415
5416TPM_RC_REFERENCE_S5
5417
5418RC_WARN + 0x01D
5419
5420the 6 session handle references a session that is
5421not loaded
5422
5423st
5424
5425nd
5426
5427rd
5428
5429th
5430
5431th
5432
5433th
5434
5435th
5436
5437st
5438
5439nd
5440
5441rd
5442
5443th
5444
5445th
5446
5447Family “2.0”
5448Level 00 Revision 00.99
5449
5450Published
5451Copyright © TCG 2006-2013
5452
5453Page 35
5454October 31, 2013
5455
5456Part 2: Structures
5457
5458Trusted Platform Module Library
5459
5460Name
5461
5462Value
5463
5464Description
5465
5466TPM_RC_REFERENCE_S6
5467
5468RC_WARN + 0x01E
5469
5470the 7 authorization session handle references a
5471session that is not loaded
5472
5473TPM_RC_NV_RATE
5474
5475RC_WARN + 0x020
5476
5477the TPM is rate-limiting accesses to prevent
5478wearout of NV
5479
5480TPM_RC_LOCKOUT
5481
5482RC_WARN + 0x021
5483
5484authorizations for objects subject to DA protection
5485are not allowed at this time because the TPM is in
5486DA lockout mode
5487
5488TPM_RC_RETRY
5489
5490RC_WARN + 0x022
5491
5492the TPM was not able to start the command
5493
5494TPM_RC_NV_UNAVAILABLE
5495
5496RC_WARN + 0x023
5497
5498the command may require writing of NV and NV is
5499not current accessible
5500
5501TPM_RC_NOT_USED
5502
5503RC_WARN + 0x7F
5504
5505this value is reserved and shall not be returned by
5506the TPM
5507
5508th
5509
5510Additional Defines
5511TPM_RC_H
5512
55130x000
5514
5515add to a handle-related error
5516
5517TPM_RC_P
5518
55190x040
5520
5521add to a parameter-related error
5522
5523TPM_RC_S
5524
55250x800
5526
5527add to a session-related error
5528
5529TPM_RC_1
5530
55310x100
5532
5533add to a parameter-, handle-, or session-related
5534error
5535
5536TPM_RC_2
5537
55380x200
5539
5540add to a parameter-, handle-, or session-related
5541error
5542
5543TPM_RC_3
5544
55450x300
5546
5547add to a parameter-, handle-, or session-related
5548error
5549
5550TPM_RC_4
5551
55520x400
5553
5554add to a parameter-, handle-, or session-related
5555error
5556
5557TPM_RC_5
5558
55590x500
5560
5561add to a parameter-, handle-, or session-related
5562error
5563
5564TPM_RC_6
5565
55660x600
5567
5568add to a parameter-, handle-, or session-related
5569error
5570
5571TPM_RC_7
5572
55730x700
5574
5575add to a parameter-, handle-, or session-related
5576error
5577
5578TPM_RC_8
5579
55800x800
5581
5582add to a parameter-related error
5583
5584TPM_RC_9
5585
55860x900
5587
5588add to a parameter-related error
5589
5590TPM_RC_A
5591
55920xA00
5593
5594add to a parameter-related error
5595
5596TPM_RC_B
5597
55980xB00
5599
5600add to a parameter-related error
5601
5602TPM_RC_C
5603
56040xC00
5605
5606add to a parameter-related error
5607
5608TPM_RC_D
5609
56100xD00
5611
5612add to a parameter-related error
5613
5614TPM_RC_E
5615
56160xE00
5617
5618add to a parameter-related error
5619
5620TPM_RC_F
5621
56220xF00
5623
5624add to a parameter-related error
5625
5626TPM_RC_N_MASK
5627
56280xF00
5629
5630number mask
5631
5632Page 36
5633October 31, 2013
5634
5635Published
5636Copyright © TCG 2006-2013
5637
5638Family “2.0”
5639Level 00 Revision 00.99
5640
5641Trusted Platform Module Library
56426.7
5643
5644Part 2: Structures
5645
5646TPM_CLOCK_ADJUST
5647
5648A TPM_CLOCK_ADJUST value is used to change the rate at which the TPM internal oscillator is divided.
5649A change to the divider will change the rate at which Clock and Time change.
5650NOTE
5651
5652The recommended adjustments are approximately 1% for a course adjustment, 0.1% for a medium
5653adjustment, and the minimum possible on the implementation for the fine adjustment (e.g., one count of
5654the pre-scalar if possible).
5655
5656Table 16 — Definition of (INT8) TPM_CLOCK_ADJUST Constants <IN>
5657Name
5658
5659Value
5660
5661Comments
5662
5663TPM_CLOCK_COARSE_SLOWER
5664
5665-3
5666
5667Slow the Clock update rate by one coarse adjustment step.
5668
5669TPM_CLOCK_MEDIUM_SLOWER
5670
5671-2
5672
5673Slow the Clock update rate by one medium adjustment step.
5674
5675TPM_CLOCK_FINE_SLOWER
5676
5677-1
5678
5679Slow the Clock update rate by one fine adjustment step.
5680
5681TPM_CLOCK_NO_CHANGE
5682
56830
5684
5685No change to the Clock update rate.
5686
5687TPM_CLOCK_FINE_FASTER
5688
56891
5690
5691Speed the Clock update rate by one fine adjustment step.
5692
5693TPM_CLOCK_MEDIUM_FASTER
5694
56952
5696
5697Speed the Clock update rate by one medium adjustment step.
5698
5699TPM_CLOCK_COARSE_FASTER
5700
57013
5702
5703Speed the Clock update rate by one coarse adjustment step.
5704
5705#TPM_RC_VALUE
5706
57076.8
5708
5709TPM_EO (EA Arithmetic Operands)
5710Table 17 — Definition of (UINT16) TPM_EO Constants <IN/OUT>
5711
5712Operation Name
5713
5714Value
5715
5716Comments
5717
5718TPM_EO_EQ
5719
57200x0000
5721
5722A=B
5723
5724TPM_EO_NEQ
5725
57260x0001
5727
5728A≠B
5729
5730TPM_EO_SIGNED_GT
5731
57320x0002
5733
5734A > B signed
5735
5736TPM_EO_UNSIGNED_GT
5737
57380x0003
5739
5740A > B unsigned
5741
5742TPM_EO_SIGNED_LT
5743
57440x0004
5745
5746A < B signed
5747
5748TPM_EO_UNSIGNED_LT
5749
57500x0005
5751
5752A < B unsigned
5753
5754TPM_EO_SIGNED_GE
5755
57560x0006
5757
5758A ≥ B signed
5759
5760TPM_EO_UNSIGNED_GE
5761
57620x0007
5763
5764A ≥ B unsigned
5765
5766TPM_EO_SIGNED_LE
5767
57680x0008
5769
5770A ≤ B signed
5771
5772TPM_EO_UNSIGNED_LE
5773
57740x0009
5775
5776A ≤ B unsigned
5777
5778TPM_EO_BITSET
5779
57800x000A
5781
5782All bits SET in B are SET in A. ((A&B)=B)
5783
5784TPM_EO_BITCLEAR
5785
57860x000B
5787
5788All bits SET in B are CLEAR in A. ((A&B)=0)
5789
5790#TPM_RC_VALUE
5791
5792Family “2.0”
5793Level 00 Revision 00.99
5794
5795Response code returned when unmarshaling of this type fails
5796
5797Published
5798Copyright © TCG 2006-2013
5799
5800Page 37
5801October 31, 2013
5802
5803Part 2: Structures
5804
58056.9
5806
5807Trusted Platform Module Library
5808
5809TPM_ST (Structure Tags)
5810
5811Structure tags are used to disambiguate structures. They are 16-bit values with the most significant bit
5812SET so that they do not overlap TPM_ALG_ID values. A single exception is made for the value
5813associated with TPM_ST_RSP_COMMAND (0x00C4), which has the same value as the
5814TPM_TAG_RSP_COMMAND tag from earlier versions of this specification. This value is used when the
5815TPM is compatible with a previous TPM specification and the TPM cannot determine which family of
5816response code to return because the command tag is not valid.
5817Many of the structures defined in this document have parameters that are unions of other structures. That
5818is, a parameter may be one of several structures. The parameter will have a selector value that indicates
5819which of the options is actually present.
5820In order to allow the marshaling and unmarshaling code to determine which of the possible structures is
5821allowed, each selector will have a unique interface type and will constrain the number of possible tag
5822values.
5823Table 18 defines the structure tags values. The definition of many structures is context-sensitive using an
5824algorithm ID. In cases where an algorithm ID is not a meaningful way to designate the structure, the
5825values in this table are used.
5826Table 18 — Definition of (UINT16) TPM_ST Constants <IN/OUT, S>
5827Name
5828TPM_ST_RSP_COMMAND
5829
5830Value
5831
5832Comments
5833
58340x00C4
5835
5836tag value for a response; used when there is an error
5837in the tag. This is also the value returned from a TPM
58381.2 when an error occurs. This value is used in this
5839specification because an error in the command tag
5840may prevent determination of the family. When this tag
5841is used in the response, the response code will be
5842TPM_RC_BAD_TAG (0 1E16), which has the same
5843numeric value as the TPM 1.2 response code for
5844TPM_BADTAG.
5845NOTE
5846
5847In a previously published version of this
5848specification,
5849TPM_RC_BAD_TAG
5850was
5851incorrectly assigned a value of 0x030 instead of
585230 (0x01e). Some implementations my return the
5853old value instead of the new value.
5854
5855TPM_ST_NULL
5856
58570X8000
5858
5859no structure type specified
5860
5861TPM_ST_NO_SESSIONS
5862
58630x8001
5864
5865tag value for a command/response for a command
5866defined in this specification; indicating that the
5867command/response has no attached sessions and no
5868authorizationSize/parameterSize value is present
5869If the responseCode from the TPM is not
5870TPM_RC_SUCCESS, then the response tag shall
5871have this value.
5872
5873TPM_ST_SESSIONS
5874
58750x8002
5876
5877tag value for a command/response for a command
5878defined in this specification; indicating that the
5879command/response has one or more attached
5880sessions and the authorizationSize/parameterSize
5881field is present
5882
5883Page 38
5884October 31, 2013
5885
5886Published
5887Copyright © TCG 2006-2013
5888
5889Family “2.0”
5890Level 00 Revision 00.99
5891
5892Trusted Platform Module Library
5893Name
5894reserved
5895
5896Part 2: Structures
5897Value
5898
5899Comments
5900
59010x8003
5902
5903When used between application software and the TPM
5904resource manager, this tag indicates that the
5905command has no sessions and the handles are using
5906the Name format rather than the 32-bit handle format.
5907NOTE 1
5908
5909The response to application software will have a
5910tag of TPM_ST_NO_SESSIONS.
5911
5912Between the TRM and TPM, this tag would occur in a
5913response from a TPM that overlaps the tag parameter
5914of a request with the tag parameter of a response,
5915when the response has no associated sessions.
5916NOTE 2
5917
5918reserved
5919
59200x8004
5921
5922This tag is not used by all TPM or TRM
5923implementations.
5924
5925When used between application software and the TPM
5926resource manager, this tag indicates that the
5927command has sessions and the handles are using the
5928Name format rather than the 32-bit handle format.
5929NOTE 1
5930
5931If the command completes successfully, the
5932response to application software will have a tag
5933of TPM_ST_SESSIONS.
5934
5935Between the TRM and TPM, would occur in a
5936response from a TPM that overlaps the tag parameter
5937of a request with the tag parameter of a response,
5938when the response has authorization sessions.
5939NOTE 2
5940
5941This tag is not used by all TPM or TRM
5942implementations.
5943
5944TPM_ST_ATTEST_NV
5945
59460x8014
5947
5948tag for an attestation structure
5949
5950TPM_ST_ATTEST_COMMAND_AUDIT
5951
59520x8015
5953
5954tag for an attestation structure
5955
5956TPM_ST_ATTEST_SESSION_AUDIT
5957
59580x8016
5959
5960tag for an attestation structure
5961
5962TPM_ST_ATTEST_CERTIFY
5963
59640x8017
5965
5966tag for an attestation structure
5967
5968TPM_ST_ATTEST_QUOTE
5969
59700x8018
5971
5972tag for an attestation structure
5973
5974TPM_ST_ATTEST_TIME
5975
59760x8019
5977
5978tag for an attestation structure
5979
5980TPM_ST_ATTEST_CREATION
5981
59820x801A
5983
5984tag for an attestation structure
5985
5986reserved
5987
59880x801B
5989
5990do not use
5991NOTE
5992
5993This
5994was
5995previously
5996assigned
5997to
5998TPM_ST_ATTEST_NV. The tag is changed
5999because the structure has changed
6000
6001TPM_ST_CREATION
6002
60030x8021
6004
6005tag for a ticket type
6006
6007TPM_ST_VERIFIED
6008
60090x8022
6010
6011tag for a ticket type
6012
6013TPM_ST_AUTH_SECRET
6014
60150x8023
6016
6017tag for a ticket type
6018
6019TPM_ST_HASHCHECK
6020
60210x8024
6022
6023tag for a ticket type
6024
6025TPM_ST_AUTH_SIGNED
6026
60270x8025
6028
6029tag for a ticket type
6030
6031TPM_ST_FU_MANIFEST
6032
60330x8029
6034
6035tag for a structure describing a Field Upgrade Policy
6036
6037Family “2.0”
6038Level 00 Revision 00.99
6039
6040Published
6041Copyright © TCG 2006-2013
6042
6043Page 39
6044October 31, 2013
6045
6046Part 2: Structures
6047
6048Trusted Platform Module Library
6049
60506.10 TPM_SU (Startup Type)
6051These values are used in TPM2_Startup() to indicate the shutdown and startup mode. The defined
6052startup sequences are:
6053a) TPM Reset – Two cases:
60541) Shutdown(CLEAR) followed by Startup(CLEAR)
60552) Startup(CLEAR) with no Shutdown()
6056b) TPM Restart – Shutdown(STATE) followed by Startup(CLEAR)
6057c) TPM Resume – Shutdown(STATE) followed by Startup(STATE)
6058TPM_SU values of 80 0016 and above are reserved for internal use of the TPM and may not be assigned
6059values.
6060NOTE
6061
6062In the reference code, a value of FF FF 16 indicates that the startup state has not been set. If this was
6063defined in this table to be, say, TPM_SU_NONE, then TPM_SU_NONE would be a valid input value but
6064the caller is not allowed to indicate the that the startup type is TPM_SU_NONE so the reserved value is
6065defined in the implementation as required for internal TPM uses.
6066
6067Table 19 — Definition of (UINT16) TPM_SU Constants <IN>
6068Name
6069
6070Value
6071
6072Description
6073
6074TPM_SU_CLEAR
6075
60760x0000
6077
6078on TPM2_Shutdown(), indicates that the TPM should prepare
6079for loss of power and save state required for an orderly startup
6080(TPM Reset).
6081on TPM2_Startup(), indicates that the TPM should start from
6082perform TPM Reset or TPM Restart
6083
6084TPM_SU_STATE
6085
60860x0001
6087
6088on TPM2_Shutdown(), indicates that the TPM should prepare
6089for loss of power and save state required for an orderly startup
6090(TPM Restart or TPM Resume)
6091on TPM2_Startup(), indicates that the TPM should restore the
6092state saved by TPM2_Shutdown(TPM_SU_STATE)
6093
6094#TPM_RC_VALUE
6095
6096response code when incorrect value is used
6097
60986.11 TPM_SE (Session Type)
6099This type is used in TPM2_StartAuthSession() to indicate the type of the session to be created.
6100Table 20 — Definition of (UINT8) TPM_SE Constants <IN>
6101Name
6102
6103Value
6104
6105TPM_SE_HMAC
6106
61070x00
6108
6109TPM_SE_POLICY
6110
61110x01
6112
6113TPM_SE_TRIAL
6114
61150x03
6116
6117#TPM_RC_VALUE
6118
6119Page 40
6120October 31, 2013
6121
6122Description
6123
6124The policy session is being used to compute the policyHash and
6125not for command authorization.
6126This setting modifies some policy commands and prevents
6127session from being used to authorize a command.
6128response code when incorrect value is used
6129
6130Published
6131Copyright © TCG 2006-2013
6132
6133Family “2.0”
6134Level 00 Revision 00.99
6135
6136Trusted Platform Module Library
6137
6138Part 2: Structures
6139
61406.12 TPM_CAP (Capabilities)
6141The TPM_CAP values are used in TPM2_GetCapability() to select the type of the value to be returned.
6142The format of the response varies according to the type of the value.
6143Table 21 — Definition of (UINT32) TPM_CAP Constants
6144Capability Name
6145
6146Value
6147
6148Property Type
6149
6150Return Type
6151
6152TPM_CAP_FIRST
6153
61540x00000000
6155
6156TPM_CAP_ALGS
6157
61580x00000000 TPM_ALG_ID
6159
6160TPM_CAP_HANDLES
6161
61620x00000001 TPM_HANDLE
6163
6164TPML_HANDLE
6165
6166TPM_CAP_COMMANDS
6167
61680x00000002 TPM_CC
6169
6170TPML_CCA
6171
6172TPM_CAP_PP_COMMANDS
6173
61740x00000003 TPM_CC
6175
6176TPML_CC
6177
6178TPM_CAP_AUDIT_COMMANDS
6179
61800x00000004 TPM_CC
6181
6182TPML_CC
6183
6184TPM_CAP_PCRS
6185
61860x00000005 reserved
6187
6188TPML_PCR_SELECTION
6189
6190TPM_CAP_TPM_PROPERTIES
6191
61920x00000006 TPM_PT
6193
6194TPML_TAGGED_TPM_PROPERTY
6195
6196TPM_CAP_PCR_PROPERTIES
6197
61980x00000007 TPM_PT_PCR
6199
6200(1)
6201
6202TPM_CAP_ECC_CURVES
6203
62040x00000008 TPM_ECC_CURVE
6205
6206TPM_CAP_LAST
6207
6208TPML_ALG_PROPERTY
6209
6210TPML_TAGGED_PCR_PROPERTY
6211(1)
6212
62130x00000008
6214
6215TPM_CAP_VENDOR_PROPERTY 0x00000100 manufacturer specific
6216
6217TPML_ECC_CURVE
6218
6219manufacturer-specific values
6220
6221#TPM_RC_VALUE
6222NOTES:
6223(1) The TPM_ALG_ID or TPM_ECC_CURVE is cast to a UINT32
6224
62256.13 TPM_PT (Property Tag)
6226The TPM_PT constants are used in TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES) to
6227indicate the property being selected or returned.
6228The values in the fixed group (PT_FIXED) are not changeable through programmatic means other than a
6229firmware update. The values in the variable group (PT_VAR) may be changed with TPM commands but
6230should be persistent over power cycles and only changed when indicated by the detailed actions code.
6231Table 22 — Definition of (UINT32) TPM_PT Constants <IN/OUT, S>
6232Capability Name
6233
6234Value
6235
6236Comments
6237
6238TPM_PT_NONE
6239
62400x00000000
6241
6242indicates no property type
6243
6244PT_GROUP
6245
62460x00000100
6247
6248The number of properties in each group.
6249NOTE The first group with any properties is group 1
6250(PT_GROUP * 1). Group 0 is reserved.
6251
6252PT_FIXED
6253
6254PT_GROUP * 1 the
6255group
6256of
6257fixed
6258properties
6259returned
6260as
6261TPMS_TAGGED_PROPERTY
6262The values in this group are only changed due to a
6263firmware change in the TPM.
6264
6265TPM_PT_FAMILY_INDICATOR
6266
6267PT_FIXED + 0 a 4-octet character string containing the TPM Family value
6268(TPM_SPEC_FAMILY)
6269
6270Family “2.0”
6271Level 00 Revision 00.99
6272
6273Published
6274Copyright © TCG 2006-2013
6275
6276Page 41
6277October 31, 2013
6278
6279Part 2: Structures
6280
6281Capability Name
6282TPM_PT_LEVEL
6283
6284Trusted Platform Module Library
6285
6286Value
6287
6288Comments
6289
6290PT_FIXED + 1 the level of the specification
6291NOTE 1
6292
6293TPM_PT_REVISION
6294
6295For this specification, the level is zero.
6296
6297NOTE 2
6298
6299The level is on the title page of the specification.
6300
6301PT_FIXED + 2 the specification Revision times 100
6302EXAMPLE Revision 01.01 would have a value of 101.
6303NOTE
6304
6305TPM_PT_DAY_OF_YEAR
6306
6307The Revision value is on the title page of the
6308specification.
6309
6310PT_FIXED + 3 the specification day of year using TCG calendar
6311EXAMPLE November 15, 2010, has a day of year value of 319
6312(00 00 01 3F16).
6313NOTE
6314
6315TPM_PT_YEAR
6316
6317The specification date is on the title page of the
6318specification.
6319
6320PT_FIXED + 4 the specification year using the CE
6321EXAMPLE The year 2010 has a value of 00 00 07 DA16.
6322NOTE
6323
6324The specification date is on the title page of the
6325specification.
6326
6327TPM_PT_MANUFACTURER
6328
6329PT_FIXED + 5 the vendor ID unique to each TPM manufacturer
6330
6331TPM_PT_VENDOR_STRING_1
6332
6333PT_FIXED + 6 the first four characters of the vendor ID string
6334NOTE
6335
6336When the vendor string is fewer than 16 octets, the
6337additional property values do not have to be present.
6338A vendor string of 4 octets can be represented in one
633932-bit value and no null terminating character is
6340required.
6341
6342TPM_PT_VENDOR_STRING_2
6343
6344PT_FIXED + 7 the second four characters of the vendor ID string
6345
6346TPM_PT_VENDOR_STRING_3
6347
6348PT_FIXED + 8 the third four characters of the vendor ID string
6349
6350TPM_PT_VENDOR_STRING_4
6351
6352PT_FIXED + 9 the fourth four characters of the vendor ID sting
6353
6354TPM_PT_VENDOR_TPM_TYPE
6355
6356PT_FIXED + 10 vendor-defined value indicating the TPM model
6357
6358TPM_PT_FIRMWARE_VERSION_1
6359
6360PT_FIXED + 11 the most-significant 32 bits of a vendor-specific value
6361indicating the version of the firmware
6362
6363TPM_PT_FIRMWARE_VERSION_2
6364
6365PT_FIXED + 12 the least-significant 32 bits of a vendor-specific value
6366indicating the version of the firmware
6367
6368TPM_PT_INPUT_BUFFER
6369
6370PT_FIXED + 13 the maximum size of
6371TPM2B_MAX_BUFFER)
6372
6373TPM_PT_HR_TRANSIENT_MIN
6374
6375PT_FIXED + 14 the minimum number of transient objects that can be held
6376in TPM RAM
6377NOTE
6378
6379TPM_PT_HR_PERSISTENT_MIN
6380
6381parameter
6382
6383(typically,
6384
6385a
6386
6387This minimum shall be no less than the minimum
6388value required by the platform-specific specification
6389to which the TPM is built.
6390
6391PT_FIXED + 15 the minimum number of persistent objects that can be
6392held in TPM NV memory
6393NOTE
6394
6395TPM_PT_HR_LOADED_MIN
6396
6397a
6398
6399This minimum shall be no less than the minimum
6400value required by the platform-specific specification
6401to which the TPM is built.
6402
6403PT_FIXED + 16 the minimum number of authorization sessions that can
6404be held in TPM RAM
6405NOTE
6406
6407Page 42
6408October 31, 2013
6409
6410This minimum shall be no less than the minimum
6411value required by the platform-specific specification
6412to which the TPM is built.
6413
6414Published
6415
6416Family “2.0”
6417
6418Copyright © TCG 2006-2013
6419
6420Level 00 Revision 00.99
6421
6422Trusted Platform Module Library
6423Capability Name
6424TPM_PT_ACTIVE_SESSIONS_MAX
6425
6426Part 2: Structures
6427Value
6428
6429Comments
6430
6431PT_FIXED + 17 the number of authorization sessions that may be active at
6432a time
6433A session is active when it has a context associated with
6434its handle. The context may either be in TPM RAM or be
6435context saved.
6436NOTE
6437
6438This value shall be no less than the minimum value
6439required by the platform-specific specification to
6440which the TPM is built.
6441
6442TPM_PT_PCR_COUNT
6443
6444PT_FIXED + 18 the number of PCR implemented
6445NOTE This number is determined by the defined
6446attributes, not the number of PCR that are populated.
6447
6448TPM_PT_PCR_SELECT_MIN
6449
6450PT_FIXED + 19 the
6451minimum
6452number
6453of
6454TPMS_PCR_SELECT.sizeOfSelect
6455NOTE
6456
6457TPM_PT_CONTEXT_GAP_MAX
6458
6459octets
6460
6461in
6462
6463a
6464
6465This value is not determined by the number of PCR
6466implemented but by the number of PCR required by
6467the platform-specific specification with which the TPM
6468is compliant.
6469
6470PT_FIXED + 20 the maximum allowed difference (unsigned) between the
6471contextID values of two saved session contexts
647216
6473
6474This value shall be at least 2 -1 (65535).
6475PT_FIXED + 21 skipped
6476TPM_PT_NV_COUNTERS_MAX
6477
6478PT_FIXED + 22 the maximum number of NV Indexes that are allowed to
6479have the TPMA_NV_COUNTER attribute SET
6480NOTE
6481
6482It is allowed for this value to be larger than the
6483number of NV Indexes that can be defined. This
6484would be indicative of a TPM implementation that did
6485not use different implementation technology for
6486different NV Index types.
6487
6488TPM_PT_NV_INDEX_MAX
6489
6490PT_FIXED + 23 the maximum size of an NV Index data area
6491
6492TPM_PT_MEMORY
6493
6494PT_FIXED + 24 a TPMA_MEMORY indicating the memory management
6495method for the TPM
6496
6497TPM_PT_CLOCK_UPDATE
6498
6499PT_FIXED + 25 interval, in milliseconds, between updates to the copy of
6500TPMS_CLOCK_INFO.clock in NV
6501
6502TPM_PT_CONTEXT_HASH
6503
6504PT_FIXED + 26 the algorithm used for the integrity HMAC on saved
6505contexts
6506and
6507for
6508hashing
6509the
6510fuData
6511of
6512TPM2_FirmwareRead()
6513
6514TPM_PT_CONTEXT_SYM
6515
6516PT_FIXED + 27 the algorithm used for encryption of saved contexts
6517
6518TPM_PT_CONTEXT_SYM_SIZE
6519
6520PT_FIXED + 28 the size of the key used for encryption of saved contexts
6521
6522TPM_PT_ORDERLY_COUNT
6523
6524PT_FIXED + 29 the modulus - 1 of the count for NV update of an orderly
6525counter
6526The returned value is MAX_ORDERLY_COUNT.
6527N
6528This will have a value of 2 – 1 where 1 ≤ N ≤ 32
6529NOTE
6530
6531An “orderly counter” is an NV Index with
6532TPMA_NV_COUNTER and TPMA_NV_ORDERLY
6533both SET.
6534
6535TPM_PT_MAX_COMMAND_SIZE
6536
6537PT_FIXED + 30 the maximum value for commandSize in a command
6538
6539TPM_PT_MAX_RESPONSE_SIZE
6540
6541PT_FIXED + 31 the maximum value for responseSize in a response
6542
6543TPM_PT_MAX_DIGEST
6544
6545PT_FIXED + 32 the maximum size of a digest that can be produced by the
6546TPM
6547
6548TPM_PT_MAX_OBJECT_CONTEXT
6549
6550PT_FIXED + 33 the maximum size of an object context that will be
6551returned by TPM2_ContextSave
6552
6553Family “2.0”
6554Level 00 Revision 00.99
6555
6556Published
6557Copyright © TCG 2006-2013
6558
6559Page 43
6560October 31, 2013
6561
6562Part 2: Structures
6563
6564Capability Name
6565
6566Trusted Platform Module Library
6567
6568Value
6569
6570Comments
6571
6572TPM_PT_MAX_SESSION_CONTEXT PT_FIXED + 34 the maximum size of a session context that will be
6573returned by TPM2_ContextSave
6574TPM_PT_PS_FAMILY_INDICATOR
6575
6576PT_FIXED + 35 platform-specific family (a TPM_PS value)(see Table 24)
6577NOTE
6578
6579The platform-specific values for the TPM_PT_PS
6580parameters are in the relevant platform-specific
6581specification. In the reference implementation, all of
6582these values are 0.
6583
6584TPM_PT_PS_LEVEL
6585
6586PT_FIXED + 36 the level of the platform-specific specification
6587
6588TPM_PT_PS_REVISION
6589
6590PT_FIXED + 37 the specification Revision times 100 for the platformspecific specification
6591
6592TPM_PT_PS_DAY_OF_YEAR
6593
6594PT_FIXED + 38 the platform-specific specification day of year using TCG
6595calendar
6596
6597TPM_PT_PS_YEAR
6598
6599PT_FIXED + 39 the platform-specific specification year using the CE
6600
6601TPM_PT_SPLIT_MAX
6602
6603PT_FIXED + 40 the number of split signing operations supported by the
6604TPM
6605
6606TPM_PT_TOTAL_COMMANDS
6607
6608PT_FIXED + 41 total number of commands implemented in the TPM
6609
6610TPM_PT_LIBRARY_COMMANDS
6611
6612PT_FIXED + 42 number of commands from the TPM library that are
6613implemented
6614
6615TPM_PT_VENDOR_COMMANDS
6616
6617PT_FIXED + 43 number of vendor commands that are implemented
6618
6619TPM_PT_NV_BUFFER_MAX
6620
6621PT_FIXED + 44 the maximum data size in one NV write command
6622
6623PT_VAR
6624
6625PT_GROUP * 2 the group of variable properties returned as
6626TPMS_TAGGED_PROPERTY
6627The properties in this group change because of a
6628Protected Capability other than a firmware update. The
6629values are not necessarily persistent across all power
6630transitions.
6631
6632TPM_PT_PERMANENT
6633
6634PT_VAR + 0
6635
6636TPMA_PERMANENT
6637
6638TPM_PT_STARTUP_CLEAR
6639
6640PT_VAR + 1
6641
6642TPMA_STARTUP_CLEAR
6643
6644TPM_PT_HR_NV_INDEX
6645
6646PT_VAR + 2
6647
6648the number of NV Indexes currently defined
6649
6650TPM_PT_HR_LOADED
6651
6652PT_VAR + 3
6653
6654the number of authorization sessions currently loaded into
6655TPM RAM
6656
6657TPM_PT_HR_LOADED_AVAIL
6658
6659PT_VAR + 4
6660
6661the number of additional authorization sessions, of any
6662type, that could be loaded into TPM RAM
6663This value is an estimate. If this value is at least 1, then at
6664least one authorization session of any type may be
6665loaded. Any command that changes the RAM memory
6666allocation can make this estimate invalid.
6667NOTE
6668
6669TPM_PT_HR_ACTIVE
6670
6671Page 44
6672October 31, 2013
6673
6674PT_VAR + 5
6675
6676A valid implementation may return 1 even if more
6677than one authorization session would fit into RAM.
6678
6679the number of active authorization sessions currently
6680being tracked by the TPM
6681This is the sum of the loaded and saved sessions.
6682
6683Published
6684Copyright © TCG 2006-2013
6685
6686Family “2.0”
6687Level 00 Revision 00.99
6688
6689Trusted Platform Module Library
6690Capability Name
6691TPM_PT_HR_ACTIVE_AVAIL
6692
6693Part 2: Structures
6694Value
6695
6696Comments
6697
6698PT_VAR + 6
6699
6700the number of additional authorization sessions, of any
6701type, that could be created
6702This value is an estimate. If this value is at least 1, then at
6703least one authorization session of any type may be
6704created. Any command that changes the RAM memory
6705allocation can make this estimate invalid.
6706NOTE
6707
6708TPM_PT_HR_TRANSIENT_AVAIL
6709
6710PT_VAR + 7
6711
6712A valid implementation may return 1 even if more
6713than one authorization session could be created.
6714
6715estimate of the number of additional transient objects that
6716could be loaded into TPM RAM
6717This value is an estimate. If this value is at least 1, then at
6718least one object of any type may be loaded. Any
6719command that changes the memory allocation can make
6720this estimate invalid.
6721NOTE
6722
6723A valid implementation may return 1 even if more
6724than one transient object would fit into RAM.
6725
6726TPM_PT_HR_PERSISTENT
6727
6728PT_VAR + 8
6729
6730the number of persistent objects currently loaded into
6731TPM NV memory
6732
6733TPM_PT_HR_PERSISTENT_AVAIL
6734
6735PT_VAR + 9
6736
6737the number of additional persistent objects that could be
6738loaded into NV memory
6739This value is an estimate. If this value is at least 1, then at
6740least one object of any type may be made persistent. Any
6741command that changes the NV memory allocation can
6742make this estimate invalid.
6743NOTE
6744
6745A valid implementation may return 1 even if more
6746than one persistent object would fit into NV memory.
6747
6748TPM_PT_NV_COUNTERS
6749
6750PT_VAR + 10
6751
6752the number of defined NV Indexes that have NV
6753TPMA_NV_COUNTER attribute SET
6754
6755TPM_PT_NV_COUNTERS_AVAIL
6756
6757PT_VAR + 11
6758
6759the number of additional NV Indexes that can be defined
6760with
6761their
6762TPMA_NV_COUNTER
6763and
6764TPMA_NV_ORDERLY attribute SET
6765This value is an estimate. If this value is at least 1, then at
6766least one NV Index may be created with the
6767TPMA_NV_COUNTER
6768and
6769TPMA_NV_ORDERLY
6770attributes SET. Any command that changes the NV
6771memory allocation can make this estimate invalid.
6772NOTE A valid implementation may return 1 even if more
6773than one NV counter could be defined.
6774
6775TPM_PT_ALGORITHM_SET
6776
6777PT_VAR + 12
6778
6779code that limits the algorithms that may be used with the
6780TPM
6781
6782TPM_PT_LOADED_CURVES
6783
6784PT_VAR + 13
6785
6786the number of loaded ECC curves
6787
6788TPM_PT_LOCKOUT_COUNTER
6789
6790PT_VAR + 14
6791
6792the current value of the lockout counter (failedTries)
6793
6794TPM_PT_MAX_AUTH_FAIL
6795
6796PT_VAR + 15
6797
6798the number of authorization failures before DA lockout is
6799invoked
6800
6801TPM_PT_LOCKOUT_INTERVAL
6802
6803PT_VAR + 16
6804
6805the number of seconds before the value reported by
6806TPM_PT_LOCKOUT_COUNTER is decremented
6807
6808TPM_PT_LOCKOUT_RECOVERY
6809
6810PT_VAR + 17
6811
6812the number of seconds after a lockoutAuth failure before
6813use of lockoutAuth may be attempted again
6814
6815TPM_PT_NV_WRITE_RECOVERY
6816
6817PT_VAR + 18
6818
6819number of milliseconds before the TPM will accept
6820another command that will modify NV
6821This value is an approximation and may go up or down
6822over time.
6823
6824Family “2.0”
6825Level 00 Revision 00.99
6826
6827Published
6828Copyright © TCG 2006-2013
6829
6830Page 45
6831October 31, 2013
6832
6833Part 2: Structures
6834
6835Capability Name
6836
6837Trusted Platform Module Library
6838
6839Value
6840
6841Comments
6842
6843TPM_PT_AUDIT_COUNTER_0
6844
6845PT_VAR + 19
6846
6847the high-order 32 bits of the command audit counter
6848
6849TPM_PT_AUDIT_COUNTER_1
6850
6851PT_VAR + 20
6852
6853the low-order 32 bits of the command audit counter
6854
6855Page 46
6856October 31, 2013
6857
6858Published
6859Copyright © TCG 2006-2013
6860
6861Family “2.0”
6862Level 00 Revision 00.99
6863
6864Trusted Platform Module Library
6865
6866Part 2: Structures
6867
68686.14 TPM_PT_PCR (PCR Property Tag)
6869The TPM_PT_PCR constants are used in TPM2_GetCapability() to indicate the property being selected
6870or returned. The PCR properties can be read when capability == TPM_CAP_PCR_PROPERTIES.
6871Table 23 — Definition of (UINT32) TPM_PT_PCR Constants <IN/OUT, S>
6872Capability Name
6873
6874Value
6875
6876Comments
6877
6878TPM_PT_PCR_FIRST
6879
68800x00000000
6881
6882bottom of the range of TPM_PT_PCR properties
6883
6884TPM_PT_PCR_SAVE
6885
68860x00000000
6887
6888a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
6889saved and restored by TPM_SU_STATE
6890
6891TPM_PT_PCR_EXTEND_L0
6892
68930x00000001
6894
6895a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6896may be extended from locality 0
6897This property is only present if a locality other than 0 is
6898implemented.
6899
6900TPM_PT_PCR_RESET_L0
6901
69020x00000002
6903
6904a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6905may be reset by TPM2_PCR_Reset() from locality 0
6906
6907TPM_PT_PCR_EXTEND_L1
6908
69090x00000003
6910
6911a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6912may be extended from locality 1
6913This property is only present if locality 1 is implemented.
6914
6915TPM_PT_PCR_RESET_L1
6916
69170x00000004
6918
6919a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6920may be reset by TPM2_PCR_Reset() from locality 1
6921This property is only present if locality 1 is implemented.
6922
6923TPM_PT_PCR_EXTEND_L2
6924
69250x00000005
6926
6927a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6928may be extended from locality 2
6929This property is only present if localities 1 and 2 are
6930implemented.
6931
6932TPM_PT_PCR_RESET_L2
6933
69340x00000006
6935
6936a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6937may be reset by TPM2_PCR_Reset() from locality 2
6938This property is only present if localities 1 and 2 are
6939implemented.
6940
6941TPM_PT_PCR_EXTEND_L3
6942
69430x00000007
6944
6945a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6946may be extended from locality 3
6947This property is only present if localities 1, 2, and 3 are
6948implemented.
6949
6950TPM_PT_PCR_RESET_L3
6951
69520x00000008
6953
6954a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6955may be reset by TPM2_PCR_Reset() from locality 3
6956This property is only present if localities 1, 2, and 3 are
6957implemented.
6958
6959TPM_PT_PCR_EXTEND_L4
6960
69610x00000009
6962
6963a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6964may be extended from locality 4
6965This property is only present if localities 1, 2, 3, and 4 are
6966implemented.
6967
6968TPM_PT_PCR_RESET_L4
6969
69700x0000000A
6971
6972a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6973may be reset by TPM2_PCR_Reset() from locality 4
6974This property is only present if localities 1, 2, 3, and 4 are
6975implemented.
6976
6977Family “2.0”
6978Level 00 Revision 00.99
6979
6980Published
6981Copyright © TCG 2006-2013
6982
6983Page 47
6984October 31, 2013
6985
6986Part 2: Structures
6987
6988Capability Name
6989reserved
6990
6991Trusted Platform Module Library
6992
6993Value
6994
6995Comments
6996
69970x0000000B – the values in this range are reserved
69980x00000010 They correspond to values that may be used to describe
6999attributes associated with the extended localities (32255).synthesize additional software localities. The meaning of
7000these properties need not be the same as the meaning for the
7001Extend and Reset properties above.
7002
7003TPM_PT_PCR_NO_INCREMENT
7004
70050x00000011
7006
7007a SET bit in the TPMS_PCR_SELECT indicates that
7008modifications to this PCR (reset or Extend) will not increment
7009the pcrUpdateCounter
7010
7011TPM_PT_PCR_DRTM_RESET
7012
70130x00000012
7014
7015a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
7016reset by a DRTM event
7017These PCR are reset to -1 on TPM2_Startup() and reset to 0 on
7018a _TPM_Hash_End event following a _TPM_Hash_Start event.
7019
7020TPM_PT_PCR_POLICY
7021
70220x00000013
7023
7024a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
7025controlled by policy
7026This property is only present if the TPM supports policy control
7027of a PCR.
7028
7029TPM_PT_PCR_AUTH
7030
70310x00000014
7032
7033a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
7034controlled by an authorization value
7035This property is only present if the TPM supports authorization
7036control of a PCR.
7037
7038reserved
7039
70400x00000015
7041
7042reserved for the next (2 ) TPM_PT_PCR_POLICY set
7043
7044reserved
7045
70460x00000016
7047
7048reserved for the next (2 ) TPM_PT_PCR_AUTH set
7049
7050reserved
7051
7052nd
7053nd
7054
7055nd
7056
7057th
7058
70590x00000017 – reserved for the 2 through 255 TPM_PT_PCR_POLICY and
70600x00000210 TPM_PT_PCR_AUTH values
7061th
7062
7063and
7064
7065highest
7066
7067allowed,
7068
7069th
7070
7071and
7072
7073highest
7074
7075allowed,
7076
7077reserved
7078
70790x00000211
7080
7081reserved
7082to
7083the
7084256 ,
7085TPM_PT_PCR_POLICY set
7086
7087reserved
7088
70890x00000212
7090
7091reserved
7092to
7093the
7094256 ,
7095TPM_PT_PCR_AUTH set
7096
7097reserved
7098
70990x00000213
7100
7101new PCR property values may be assigned starting with this
7102value
7103
7104TPM_PT_PCR_LAST
7105
71060x00000014
7107
7108top of the range of TPM_PT_PCR properties of the
7109implementation
7110If the TPM receives a request for a PCR property with a value
7111larger than this, the TPM will return a zero length list and set the
7112moreData parameter to NO.
7113NOTE
7114
7115Page 48
7116October 31, 2013
7117
7118This is an implementation-specific value. The value shown
7119reflects the reference code implementation.
7120
7121Published
7122Copyright © TCG 2006-2013
7123
7124Family “2.0”
7125Level 00 Revision 00.99
7126
7127Trusted Platform Module Library
7128
7129Part 2: Structures
7130
71316.15 TPM_PS (Platform Specific)
7132The platform values in Table 24 are used for the TPM_PT_PS_FAMILY_INDICATOR.
7133NOTE
7134
7135Values below six (6) have the same values as the purview assignments in TPM 1.2.
7136
7137Table 24 — Definition of (UINT32) TPM_PS Constants <OUT>
7138Capability Name
7139
7140Value
7141
7142Comments
7143
7144TPM_PS_MAIN
7145
71460x00000000
7147
7148not platform specific
7149
7150TPM_PS_PC
7151
71520x00000001
7153
7154PC Client
7155
7156TPM_PS_PDA
7157
71580x00000002
7159
7160PDA (includes all mobile devices that are not specifically cell
7161phones)
7162
7163TPM_PS_CELL_PHONE
7164
71650x00000003
7166
7167Cell Phone
7168
7169TPM_PS_SERVER
7170
71710x00000004
7172
7173Server WG
7174
7175TPM_PS_PERIPHERAL
7176
71770x00000005
7178
7179Peripheral WG
7180
7181TPM_PS_TSS
7182
71830x00000006
7184
7185TSS WG
7186
7187TPM_PS_STORAGE
7188
71890x00000007
7190
7191Storage WG
7192
7193TPM_PS_AUTHENTICATION
7194
71950x00000008
7196
7197Authentication WG
7198
7199TPM_PS_EMBEDDED
7200
72010x00000009
7202
7203Embedded WG
7204
7205TPM_PS_HARDCOPY
7206
72070x0000000A
7208
7209Hardcopy WG
7210
7211TPM_PS_INFRASTRUCTURE
7212
72130x0000000B
7214
7215Infrastructure WG
7216
7217TPM_PS_VIRTUALIZATION
7218
72190x0000000C Virtualization WG
7220
7221TPM_PS_TNC
7222
72230x0000000D Trusted Network Connect WG
7224
7225TPM_PS_MULTI_TENANT
7226
72270x0000000E
7228
7229Multi-tenant WG
7230
7231TPM_PS_TC
7232
72330x0000000F
7234
7235Technical Committee
7236
7237Family “2.0”
7238Level 00 Revision 00.99
7239
7240Published
7241Copyright © TCG 2006-2013
7242
7243Page 49
7244October 31, 2013
7245
7246Part 2: Structures
7247
72487
7249
7250Trusted Platform Module Library
7251
7252Handles
7253
72547.1
7255
7256Introduction
7257
7258Handles are 32-bit values used to reference shielded locations of various types within the TPM.
7259Table 25 — Definition of Types for Handles
7260Type
7261
7262Name
7263
7264Description
7265
7266UINT32
7267
7268TPM_HANDLE
7269
7270Handles may refer to objects (keys or data blobs), authorization sessions (HMAC and policy), NV
7271Indexes, permanent TPM locations, and PCR.
72727.2
7273
7274TPM_HT (Handle Types)
7275
7276The 32-bit handle space is divided into 256 regions of equal size with 2
7277ranges represents a handle type.
7278
727924
7280
7281values in each. Each of these
7282
7283The type of the entity is indicated by the MSO of its handle. The values for the MSO and the entity
7284referenced are shown in Table 26.
7285Table 26 — Definition of (UINT8) TPM_HT Constants <S>
7286Name
7287
7288Value
7289
7290Comments
7291
7292TPM_HT_PCR
7293
72940x00
7295
7296PCR – consecutive numbers, starting at 0, that reference the PCR
7297registers
7298A platform-specific specification will set the minimum number of PCR
7299and an implementation may have more.
7300
7301TPM_HT_NV_INDEX
7302
73030x01
7304
7305NV Index – assigned by the caller
7306
7307TPM_HT_HMAC_SESSION
7308
73090x02
7310
7311HMAC Authorization Session – assigned by the TPM when the
7312session is created
7313
7314TPM_HT_LOADED_SESSION
7315
73160x02
7317
7318Loaded Authorization Session – used only in the context of
7319TPM2_GetCapability
7320This type references both loaded HMAC and loaded policy
7321authorization sessions.
7322
7323TPM_HT_POLICY_SESSION
7324
73250x03
7326
7327Policy Authorization Session – assigned by the TPM when the
7328session is created
7329
7330TPM_HT_ACTIVE_SESSION
7331
73320x03
7333
7334Active Authorization Session – used only in the context of
7335TPM2_GetCapability
7336This type references saved authorization session contexts for which
7337the TPM is maintaining tracking information.
7338
7339TPM_HT_PERMANENT
7340
73410x40
7342
7343Permanent Values – assigned by this specification in Table 27
7344
7345TPM_HT_TRANSIENT
7346
73470x80
7348
7349Transient Objects – assigned by the TPM when an object is loaded
7350into transient-object memory or when a persistent object is converted
7351to a transient object
7352
7353TPM_HT_PERSISTENT
7354
73550x81
7356
7357Persistent Objects – assigned by the TPM when a loaded transient
7358object is made persistent
7359
7360Page 50
7361October 31, 2013
7362
7363Published
7364Copyright © TCG 2006-2013
7365
7366Family “2.0”
7367Level 00 Revision 00.99
7368
7369Trusted Platform Module Library
7370
7371Part 2: Structures
7372
7373When a transient object is loaded, the TPM shall assign a handle with an MSO of TPM_HT_TRANSIENT.
7374The object may be assigned a different handle each time it is loaded. The TPM shall ensure that handles
7375assigned to transient objects are unique and assigned to only one transient object at a time.
7376EXAMPLE
7377
7378If a TPM is only able to hold 4 transient objects in internal memory, it might choose to assign handles to
7379those objects with the values 80 00 00 0016 – 80 00 00 0316.
7380
7381When a transient object is converted to a persistent object (TPM2_EvictControl()), the TPM shall validate
7382that the handle provided by the caller has an MSO of TPM_HT_PERSISTENT and that the handle is not
7383already assigned to a persistent object.
7384A handle is assigned to a session when the session is started. The handle shall have an MSO equal to
7385TPM_HT_SESSION and remain associated with that session until the session is closed or flushed. The
7386TPM shall ensure that a session handle is only associated with one session at a time. When the session
7387is loaded into the TPM using TPM2_LoadContext(), it will have the same handle each time it is loaded.
7388EXAMPLE
7389
73907.3
7391
7392If a TPM is only able to track 64 active sessions at a time, it could number those sessions using the
7393values xx 00 01 0016 – xx 00 01 3F 16 where xx is either 02 16 or 03 16 depending on the session type.
7394
7395Persistent Handle Sub-ranges
7396
7397Persistent handles are assigned by the caller of TPM2_EvictControl(). ownerAuth or platformAuth is
7398required to authorize allocation of space for a persistent object. These entities are given separate ranges
7399of persistent handles so that they do not have to allocate from a common range of handles.
7400NOTE
7401
7402While this “namespace” allocation of the handle ranges could have been handled by convention, TPM
7403enforcement is used to prevent errors by the OS or malicious software from affecting the platform’s use of
7404the NV memory.
7405
7406The Owner is allocated persistent handles in the range of 81 00 00 0016 to 81 7F FF FF16 inclusive and
7407the TPM will return an error if ownerAuth is used to attempt to assign a persistent handle outside of this
7408range.
7409
7410Family “2.0”
7411Level 00 Revision 00.99
7412
7413Published
7414Copyright © TCG 2006-2013
7415
7416Page 51
7417October 31, 2013
7418
7419Part 2: Structures
74207.4
7421
7422Trusted Platform Module Library
7423
7424TPM_RH (Permanent Handles)
7425
7426Table 27 lists the architecturally defined handles that cannot be changed. The handles include
7427authorization handles, and special handles.
7428Table 27 — Definition of (UINT32) TPM_RH Constants <IN, S>
7429Name
7430
7431Value
7432
7433Type
7434
7435TPM_RH_FIRST
7436
74370x40000000
7438
7439R
7440
7441TPM_RH_SRK
7442
74430x40000000
7444
7445R
7446
7447TPM_RH_OWNER
7448
74490x40000001
7450
7451K, A, P
7452
7453TPM_RH_REVOKE
7454
74550x40000002
7456
7457R
7458
7459not used
7460
74611
7462
7463TPM_RH_TRANSPORT
7464
74650x40000003
7466
7467R
7468
7469not used
7470
74711
7472
7473TPM_RH_OPERATOR
7474
74750x40000004
7476
7477R
7478
7479not used
7480
74811
7482
7483TPM_RH_ADMIN
7484
74850x40000005
7486
7487R
7488
7489not used
7490
74911
7492
7493TPM_RH_EK
7494
74950x40000006
7496
7497R
7498
7499not used
7500
75011
7502
7503TPM_RH_NULL
7504
75050x40000007
7506
7507K, A, P
7508
7509a handle associated with the null hierarchy, an EmptyAuth
7510authValue, and an Empty Policy authPolicy.
7511
7512TPM_RH_UNASSIGNED
7513
75140x40000008
7515
7516R
7517
7518value reserved to the TPM to indicate a handle location that
7519has not been initialized or assigned
7520
7521TPM_RS_PW
7522
75230x40000009
7524
7525S
7526
7527authorization value
7528authorization session
7529
7530TPM_RH_LOCKOUT
7531
75320x4000000A
7533
7534A
7535
7536references the authorization associated with the dictionary
7537attack lockout reset
7538
7539TPM_RH_ENDORSEMENT
7540
75410x4000000B
7542
7543K, A, P
7544
7545references the Endorsement Primary
7546endorsementAuth, and endorsementPolicy
7547
7548TPM_RH_PLATFORM
7549
75500x4000000C
7551
7552K, A, P
7553
7554references the Platform Primary Seed (PPS), platformAuth,
7555and platformPolicy
7556
7557TPM_RH_PLATFORM_NV
7558
75590x4000000D
7560
7561C
7562
7563for phEnableNV
7564
7565R
7566
7567the top of the reserved handle area
7568This is set to allow TPM2_GetCapability() to know where to
7569stop. It may vary as implementations add to the permanent
7570handle area.
7571
7572TPM_RH_LAST
7573
75740x4000000D
7575
7576Comments
7577
7578not used
7579
75801
7581
7582handle references the Storage Primary Seed (SPS), the
7583ownerAuth, and the ownerPolicy
7584
7585used
7586
7587to
7588
7589indicate
7590
7591a
7592
7593password
7594
7595Seed
7596
7597(EPS),
7598
7599Type definitions:
7600R – a reserved value
7601K – a Primary Seed
7602A – an authorization value
7603P – a policy value
7604S – a session handle
7605C - a controlNote 1 The handle is only used in a TPM that is compatible with a previous version of this specification. It is not used
7606in any command defined in this version of the specification.
7607
7608Page 52
7609October 31, 2013
7610
7611Published
7612Copyright © TCG 2006-2013
7613
7614Family “2.0”
7615Level 00 Revision 00.99
7616
7617Trusted Platform Module Library
76187.5
7619
7620Part 2: Structures
7621
7622TPM_HC (Handle Value Constants)
7623
7624The definitions in Table 28 are used to define many of the interface data types. However, the values of
7625these constants, other than PCR_FIRST, are informative and may be changed by an implementation as
7626long as the values stay within the prescribed ranges for the handle type.
7627NOTE
7628
7629PCR0 is architecturally defined to have a handle value of 0.
7630
7631For the reference implementation, the handle range for sessions starts at the lowest allowed value for a
7632session handle. The highest value for a session handle is determined by how many active sessions are
7633allowed by the implementation. The MSO of the session handle will be set according to the session type.
7634A similar approach is used for transient objects with the first assigned handle at the bottom of the range
7635defined by TPM_HT_TRANSIENT and the top of the range determined by the implementation-dependent
7636value of MAX_LOADED_OBJECTS.
7637The first assigned handle for evict objects is also at the bottom of the allowed range defined by
7638TPM_HT_PERSISTENT and the top of the range determined by the implementation-dependent value of
7639MAX_EVICT_OBJECTS.
7640NOTE
7641
7642The values in Table 28 are intended to facilitate the process of making the handle larger than 32 bits in
7643the future. It is intended that HR_MASK and HR_SHIFT are the only values that need change to resize
7644the handle space.
7645
7646Family “2.0”
7647Level 00 Revision 00.99
7648
7649Published
7650Copyright © TCG 2006-2013
7651
7652Page 53
7653October 31, 2013
7654
7655Part 2: Structures
7656
7657Trusted Platform Module Library
7658
7659Table 28 — Definition of (TPM_HANDLE) TPM_HC Constants <IN, S>
7660Name
7661
7662Value
7663
7664Comments
7665
7666HR_HANDLE_MASK
7667
76680x00FFFFFF
7669
7670to mask off the HR
7671
7672HR_RANGE_MASK
7673
76740xFF000000
7675
7676to mask off the variable
7677part
7678
7679HR_SHIFT
7680
768124
7682
7683HR_PCR
7684
7685(TPM_HT_PCR << HR_SHIFT)
7686
7687HR_HMAC_SESSION
7688
7689(TPM_HT_HMAC_SESSION << HR_SHIFT)
7690
7691HR_POLICY_SESSION
7692
7693(TPM_HT_POLICY_SESSION << HR_SHIFT)
7694
7695HR_TRANSIENT
7696
7697(TPM_HT_TRANSIENT << HR_SHIFT)
7698
7699HR_PERSISTENT
7700
7701(TPM_HT_PERSISTENT << HR_SHIFT)
7702
7703HR_NV_INDEX
7704
7705(TPM_HT_NV_INDEX << HR_SHIFT)
7706
7707HR_PERMANENT
7708
7709(TPM_HT_PERMANENT << HR_SHIFT)
7710
7711PCR_FIRST
7712
7713(HR_PCR + 0)
7714
7715first PCR
7716
7717PCR_LAST
7718
7719(PCR_FIRST + IMPLEMENTATION_PCR-1)
7720
7721last PCR
7722
7723HMAC_SESSION_FIRST
7724
7725(HR_HMAC_SESSION + 0)
7726
7727first HMAC session
7728
7729HMAC_SESSION_LAST
7730
7731(HMAC_SESSION_FIRST+MAX_ACTIVE_SESSIONS-1)
7732
7733last HMAC session
7734
7735LOADED_SESSION_FIRST HMAC_SESSION_FIRST
7736
7737used in GetCapability
7738
7739LOADED_SESSION_LAST
7740
7741HMAC_SESSION_LAST
7742
7743used in GetCapability
7744
7745POLICY_SESSION_FIRST
7746
7747(HR_POLICY_SESSION + 0)
7748
7749first policy session
7750
7751POLICY_SESSION_LAST
7752
7753(POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS-1) last policy session
7754
7755TRANSIENT_FIRST
7756
7757(HR_TRANSIENT + 0)
7758
7759first transient object
7760
7761ACTIVE_SESSION_FIRST
7762
7763POLICY_SESSION_FIRST
7764
7765used in GetCapability
7766
7767ACTIVE_SESSION_LAST
7768
7769POLICY_SESSION_LAST
7770
7771used in GetCapability
7772
7773TRANSIENT_LAST
7774
7775(TRANSIENT_FIRST+MAX_LOADED_OBJECTS-1)
7776
7777last transient object
7778
7779PERSISTENT_FIRST
7780
7781(HR_PERSISTENT + 0)
7782
7783first persistent object
7784
7785PERSISTENT_LAST
7786
7787(PERSISTENT_FIRST + 0x00FFFFFF)
7788
7789last persistent object
7790
7791PLATFORM_PERSISTENT
7792
7793(PERSISTENT_FIRST + 0x00800000)
7794
7795first platform persistent
7796object
7797
7798NV_INDEX_FIRST
7799
7800(HR_NV_INDEX + 0)
7801
7802first allowed NV Index
7803
7804NV_INDEX_LAST
7805
7806(NV_INDEX_FIRST + 0x00FFFFFF)
7807
7808last allowed NV Index
7809
7810PERMANENT_FIRST
7811
7812TPM_RH_FIRST
7813
7814PERMANENT_LAST
7815
7816TPM_RH_LAST
7817
7818Page 54
7819October 31, 2013
7820
7821Published
7822Copyright © TCG 2006-2013
7823
7824Family “2.0”
7825Level 00 Revision 00.99
7826
7827Trusted Platform Module Library
7828
7829Part 2: Structures
7830
7831Attribute Structures
7832
78338
78348.1
7835
7836Description
7837
7838Attributes are expressed as bit fields of varying size. An attribute field structure may be 1, 2, or 4 octets in
7839length.
7840The bit numbers for an attribute structure are assigned with the number 0 assigned to the least-significant
7841bit of the structure and the highest number assigned to the most-significant bit of the structure.
7842The least significant bit is determined by treating the attribute structure as an integer. The least-significant
7843bit would be the bit that is set when the value of the integer is 1.
7844When any reserved bit in an attribute is SET, the TPM shall return TPM_RC_RESERVED_BITS. This
7845response code is not shown in the tables for attributes.
78468.2
7847
7848TPMA_ALGORITHM
7849
7850This structure defines the attributes of an algorithm.
7851Each algorithm has a fundamental attribute: asymmetric, symmetric, or hash. In some cases (e.g.,
7852TPM_ALG_RSA or TPM_ALG_AES), this is the only attribute.
7853A mode, method, or scheme may have an associated asymmetric, symmetric, or hash algorithm.
7854Table 29 — Definition of (UINT32) TPMA_ALGORITHM Bits
7855Bit
7856
7857Name
7858
7859Definition
7860
78610
7862
7863asymmetric
7864
7865SET (1): an asymmetric algorithm with public and private portions
7866CLEAR (0): not an asymmetric algorithm
7867
78681
7869
7870symmetric
7871
7872SET (1): a symmetric block cipher
7873CLEAR (0): not a symmetric block cipher
7874
78752
7876
7877hash
7878
7879SET (1): a hash algorithm
7880CLEAR (0): not a hash algorithm
7881
78823
7883
7884object
7885
7886SET (1): an algorithm that may be used as an object type
7887CLEAR (0): an algorithm that is not used as an object type
7888
78897:4
7890
7891Reserved
7892
78938
7894
7895signing
7896
7897SET (1): a signing algorithm. The setting of asymmetric, symmetric, and hash
7898will indicate the type of signing algorithm.
7899CLEAR (0): not a signing algorithm
7900
79019
7902
7903encrypting
7904
7905SET (1): an encryption/decryption algorithm. The setting of asymmetric,
7906symmetric, and hash will indicate the type of encryption/decryption algorithm.
7907CLEAR (0): not an encryption/decryption algorithm
7908
790910
7910
7911method
7912
7913SET (1): a method such as a key derivative function (KDF)
7914CLEAR (0): not a method
7915
791631:11 Reserved
7917
79188.3
79198.3.1
7920
7921TPMA_OBJECT (Object Attributes)
7922Introduction
7923
7924Family “2.0”
7925Level 00 Revision 00.99
7926
7927Published
7928Copyright © TCG 2006-2013
7929
7930Page 55
7931October 31, 2013
7932
7933Part 2: Structures
7934
7935Trusted Platform Module Library
7936
7937This attribute structure indicates an object’s use, its authorization types, and it relationship to other
7938objects.
7939The state of the attributes is determined when the object is created and they are never changed by the
7940TPM. Additionally, the setting of these structures is reflected in the integrity value of the private area of an
7941object in order to allow the TPM to detect modifications of the Protected Object when stored off the TPM.
79428.3.2
7943
7944Structure Definition
7945Table 30 — Definition of (UINT32) TPMA_OBJECT Bits
7946
7947Bit
7948
7949Name
7950
7951Definition
7952
79530
7954
7955Reserved
7956
7957shall be zero
7958
79591
7960
7961fixedTPM
7962
7963SET (1): The hierarchy of the object, as indicated by its Qualified Name, may
7964not change.
7965CLEAR (0): The hierarchy of the object may change as a result of this object or
7966an ancestor key being duplicated for use in another hierarchy.
7967
79682
7969
7970stClear
7971
7972SET (1): Previously saved contexts of this object may not be loaded after
7973Startup(CLEAR).
7974CLEAR (0): Saved contexts of this object may be used after a
7975Shutdown(STATE) and subsequent Startup().
7976
79773
7978
7979Reserved
7980
7981shall be zero
7982
79834
7984
7985fixedParent
7986
7987SET (1): The parent of the object may not change.
7988CLEAR (0): The parent of the object may change as the result of a
7989TPM2_Duplicate() of the object.
7990
79915
7992
7993sensitiveDataOrigin
7994
7995SET (1): Indicates that, when the object was created with TPM2_Create() or
7996TPM2_CreatePrimary(), the TPM generated all of the sensitive data other than
7997the authValue.
7998CLEAR (0): A portion of the sensitive data, other than the authValue, was
7999provided by the caller.
8000
80016
8002
8003userWithAuth
8004
8005SET (1): Approval of USER role actions with this object may be with an HMAC
8006session or with a password using the authValue of the object or a policy
8007session.
8008CLEAR (0): Approval of USER role actions with this object may only be done
8009with a policy session.
8010
80117
8012
8013adminWithPolicy
8014
8015SET (1): Approval of ADMIN role actions with this object may only be done with
8016a policy session.
8017CLEAR (0): Approval of ADMIN role actions with this object may be with an
8018HMAC session or with a password using the authValue of the object or a policy
8019session.
8020
80219:8
8022
8023Reserved
8024
8025shall be zero
8026
802710
8028
8029noDA
8030
8031SET (1): The object is not subject to dictionary attack protections.
8032CLEAR (0): The object is subject to dictionary attack protections.
8033
803411
8035
8036encryptedDuplication
8037
8038SET (1): If the object is duplicated, then symmetricAlg shall not be
8039TPM_ALG_NULL and newParentHandle shall not be TPM_RH_NULL.
8040CLEAR (0): The object may be duplicated without an inner wrapper on the
8041private portion of the object and the new parent may be TPM_RH_NULL.
8042
804315:12 Reserved
804416
8045
8046restricted
8047
8048Page 56
8049October 31, 2013
8050
8051shall be zero
8052SET (1): Key usage is restricted to manipulate structures of known format; the
8053parent of this key shall have restricted SET.
8054CLEAR (0): Key usage is not restricted to use on special formats.
8055
8056Published
8057Copyright © TCG 2006-2013
8058
8059Family “2.0”
8060Level 00 Revision 00.99
8061
8062Trusted Platform Module Library
8063
8064Part 2: Structures
8065
8066Bit
8067
8068Name
8069
8070Definition
8071
807217
8073
8074decrypt
8075
8076SET (1): The private portion of the key may be used to decrypt.
8077CLEAR (0): The private portion of the key may not be used to decrypt.
8078
807918
8080
8081sign
8082
8083SET (1): The private portion of the key may be used to sign.
8084CLEAR (0): The private portion of the key may not be used to sign.
8085
808631:19 Reserved
8087
80888.3.3
80898.3.3.1
8090
8091shall be zero
8092
8093Attribute Descriptions
8094Introduction
8095
8096The following remaining paragraphs in this clause describe the use and settings for each of the
8097TPMA_OBJECT attributes. The description includes checks that are performed on the objectAttributes
8098when an object is created, when it is loaded, and when it is imported. In these descriptions:
8099Creation –
8100
8101indicates
8102settings
8103for
8104TPM2_CreatePrimary()
8105
8106the
8107
8108template
8109
8110parameter
8111
8112in
8113
8114TPM2_Create()
8115
8116or
8117
8118Load
8119
81208121
8122indicates settings for the inPublic parameter in TPM2_Load()
8123
8124Import
8125
81268127
8128indicates settings for the objectPublic parameter in TPM2_Import()
8129
8130External
8131
81328133
8134indicates settings that apply to the inPublic parameter in TPM2_LoadExternal() if both the
8135public and sensitive portions of the object are loaded
8136
8137NOTE
8138
8139For TPM2_LoadExternal() when only the public portion of the object is loaded, the only attribute checks
8140are the checks in the validation code following Table 30 and the reserved attributes check.
8141
8142For any consistency error of attributes in TPMA_OBJECT, the TPM shall return TPM_RC_ATTRIBUTES.
81438.3.3.2
8144
8145Bit[1] – fixedTPM
8146
8147When SET, the object cannot be duplicated for use on a different TPM, either directly or indirectly and the
8148Qualified Name of the object cannot change. When CLEAR, the object’s Qualified Name may change if
8149the object or an ancestor is duplicated.
8150NOTE
8151
8152This attribute is the logical inverse of the migratable attribute in 1.2. That is, when this attribute is C LEAR,
8153it is the equivalent to a 1.2 object with migratable SET.
8154
8155Creation –
8156
8157If fixedTPM is SET in the object's parent, then fixedTPM and fixedParent shall both be
8158set to the same value in template. If fixedTPM is CLEAR in the parent, this attribute shall
8159also be CLEAR in template.
8160NOTE
8161
8162For a Primary Object, the parent is considered to have fixedTPM SET.
8163
8164Load
8165
81668167
8168If fixedTPM is SET in the object's parent, then fixedTPM and fixedParent shall both be
8169set to the same value. If fixedTPM is CLEAR in the parent, this attribute shall also be
8170CLEAR.
8171
8172Import
8173
81748175
8176shall be CLEAR
8177
8178External
8179
81808181
8182shall be CLEAR if both the public and sensitive portions are loaded or if fixedParent is
8183CLEAR, otherwise may be SET or CLEAR
8184
8185Family “2.0”
8186Level 00 Revision 00.99
8187
8188Published
8189Copyright © TCG 2006-2013
8190
8191Page 57
8192October 31, 2013
8193
8194Part 2: Structures
81958.3.3.3
8196
8197Trusted Platform Module Library
8198
8199Bit[2] – stClear
8200
8201If this attribute is SET, then saved contexts of this object will be invalidated on
8202TPM2_Startup(TPM_SU_CLEAR). If the attribute is CLEAR, then the TPM shall not invalidate the saved
8203context if the TPM received TPM2_Shutdown(TPM_SU_STATE). If the saved state is valid when checked
8204at the next TPM2_Startup(), then the TPM shall continue to be able to use the saved contexts.
8205Creation –
8206
8207may be SET or CLEAR in template
8208
8209Load
8210
82118212
8213may be SET or CLEAR
8214
8215Import
8216
82178218
8219may be SET or CLEAR
8220
8221External
8222
82238224
8225may be SET or CLEAR
8226
82278.3.3.4
8228
8229Bit[4] – fixedParent
8230
8231If this attribute is SET, the object’s parent may not be changed. That is, this object may not be the object
8232of a TPM2_Duplicate(). If this attribute is CLEAR, then this object may be the object of a
8233TPM2_Duplicate().
8234Creation –
8235
8236may be SET or CLEAR in template
8237
8238Load
8239
82408241
8242may be SET or CLEAR
8243
8244Import
8245
82468247
8248shall be CLEAR
8249
8250External
8251
82528253
8254shall be CLEAR if both the public and sensitive portions are loaded; otherwise it may be
8255SET or CLEAR
8256
82578.3.3.5
8258
8259Bit[5] – sensitiveDataOrigin
8260
8261This attribute is SET for any key that was generated by TPM in TPM2_Create() or
8262TPM2_CreatePrimary(). If CLEAR, it indicates that the sensitive part of the object (other than the
8263obfuscation value) was provided by the caller.
8264NOTE 1
8265
8266If the fixedTPM attribute is SET, then this attribute is authoritative and accurately reflects the source of
8267the sensitive area data. If the fixedTPM attribute is CLEAR, then validation of this attribute requires
8268evaluation of the properties of the ancestor keys.
8269
8270Creation –
8271
8272If inSensitive.sensitive.data.size is zero, then this attribute shall be SET in the template;
8273otherwise, it shall be CLEAR in the template.
8274
8275NOTE 2
8276
8277The inSensitive.sensitive.data.size parameter is required to be zero for an asymmetric key so
8278sensitiveDataOrigin is required to be SET.
8279
8280NOTE 3
8281
8282The inSensitive.sensitive.data.size parameter may not be zero for a data object so sensitiveDataOrigin is
8283required to be CLEAR. A data object has type = TPM_ALG_KEYEDHASH and its sign and decrypt
8284attributes are CLEAR.
8285
8286Load
8287
82888289
8290may be SET or CLEAR
8291
8292Import
8293
82948295
8296may be SET or CLEAR
8297
8298External
8299
83008301
8302may be SET or CLEAR
8303
8304Page 58
8305October 31, 2013
8306
8307Published
8308Copyright © TCG 2006-2013
8309
8310Family “2.0”
8311Level 00 Revision 00.99
8312
8313Trusted Platform Module Library
83148.3.3.6
8315
8316Part 2: Structures
8317
8318Bit[6] – userWithAuth
8319
8320If SET, authorization for operations that require USER role authorization may be given if the caller
8321provides proof of knowledge of the authValue of the object with an HMAC authorization session or a
8322password.
8323If this attribute is CLEAR, then then HMAC or password authorizations may not be used for USER role
8324authorizations.
8325NOTE 1
8326
8327Regardless of the setting of this attribute, authorizations for operations th at require USER role
8328authorizations may be provided with a policy session that satisfies the object's authPolicy.
8329
8330NOTE 2
8331
8332Regardless of the setting of this attribute, the authValue may be referenced in a policy session or used to
8333provide the bind value in TPM2_StartAuthSession(). However, if userWithAuth is CLEAR, then the object
8334may be used as the bind object in TPM2_StartAuthSession() but the session cannot be used to authorize
8335actions on the object. If this were allowed, then the userWithAuth control could be circumvented simply by
8336using the object as the bind object.
8337
8338Creation –
8339
8340may be SET or CLEAR in template
8341
8342Load
8343
83448345
8346may be SET or CLEAR
8347
8348Import
8349
83508351
8352may be SET or CLEAR
8353
8354External
8355
83568357
8358may be SET or CLEAR
8359
83608.3.3.7
8361
8362Bit[7] – adminWithPolicy
8363
8364If CLEAR, authorization for operations that require ADMIN role may be given if the caller provides proof of
8365knowledge of the authValue of the object with an HMAC authorization session or a password.
8366If this attribute is SET, then then HMAC or password authorizations may not be used for ADMIN role
8367authorizations.
8368NOTE 1
8369
8370Regardless of the setting of this attribute, operations that require ADMIN role authorization may be
8371provided by a policy session that satisfies the object's authPolicy.
8372
8373NOTE 2
8374
8375This attribute is similar to userWithAuth but the logic is a bit different. When userWithAuth is CLEAR, the
8376authValue may not be used for USER mode authorizations. When adminWithPolicy is CLEAR, it means
8377that the authValue may be used for ADMIN role. Policy may always be used regardless of t he setting of
8378userWithAuth or adminWithPolicy.
8379
8380Actions that always require policy (TPM2_Duplicate()) are not affected by the setting of this attribute.
8381Creation –
8382
8383may be SET or CLEAR in template
8384
8385Load
8386
83878388
8389may be SET or CLEAR
8390
8391Import
8392
83938394
8395may be SET or CLEAR
8396
8397External
8398
83998400
8401may be SET or CLEAR
8402
84038.3.3.8
8404
8405Bit[10] – noDA
8406
8407If SET, then authorization failures for the object do not affect the dictionary attack protection logic and
8408authorization of the object is not blocked if the TPM is in lockout.
8409Creation –
8410
8411may be SET or CLEAR in template
8412
8413Load
8414
84158416
8417may be SET or CLEAR
8418
8419Import
8420
84218422
8423may be SET or CLEAR
8424
8425External
8426
84278428
8429may be SET or CLEAR
8430
8431Family “2.0”
8432Level 00 Revision 00.99
8433
8434Published
8435Copyright © TCG 2006-2013
8436
8437Page 59
8438October 31, 2013
8439
8440Part 2: Structures
84418.3.3.9
8442
8443Trusted Platform Module Library
8444
8445Bit[11] – encryptedDuplication
8446
8447If SET, then when the object is duplicated, the sensitive portion of the object is required to be encrypted
8448with an inner wrapper and the new parent shall be an asymmetric key and not TPM_RH_NULL
8449NOTE 1
8450
8451Enforcement of these requirements in TPM2_Duplicate() is by not allowing symmetricAlg to be
8452TPM_ALG_NULL and newParentHandle may not be TPM_RH_NULL.
8453
8454This attribute shall not be SET in any object that has fixedTPM SET.
8455NOTE 2
8456
8457This requirement means that encryptedDuplication may not be SET if the object cannot be directly or
8458indirectly duplicated.
8459
8460If an object's parent has fixedTPM SET, and the object is duplicable (fixedParent == CLEAR), then
8461encryptedDuplication may be SET or CLEAR in the object.
8462NOTE 3
8463
8464This allows the object at the boundary between duplicable and non -duplicable objects to have either
8465setting.
8466
8467If an object's parent has fixedTPM CLEAR, then the object is required to have the same setting of
8468encryptedDuplication as its parent.
8469NOTE 4
8470
8471This requirement forces all
8472encryptedDuplication setting.
8473
8474duplicable
8475
8476objects
8477
8478in
8479
8480a
8481
8482duplication
8483
8484group
8485
8486to
8487
8488have
8489
8490the
8491
8492same
8493
8494Creation –
8495
8496shall be CLEAR if fixedTPM is SET. If fixedTPM is CLEAR, then this attribute shall have
8497the same value as its parent unless fixedTPM is SET in the object's parent, in which
8498case, it may be SET or CLEAR.
8499
8500Load
8501
85028503
8504shall be CLEAR if fixedTPM is SET. If fixedTPM is CLEAR, then this attribute shall have
8505the same value as its parent, unless fixedTPM is SET the parent, in which case, it may
8506be SET or CLEAR.
8507
8508Import
8509
85108511
8512if fixedTPM is SET in the object's new parent, then this attribute may be SET or CLEAR,
8513otherwise, it shall have the same setting as the new parent.
8514
8515External
8516
85178518
8519may be SET or CLEAR.
8520
85218.3.3.10
8522
8523Bit[16] – restricted
8524
8525This this attribute modifies the decrypt and sign attributes of an object.
8526NOTE
8527
8528A key with this object CLEAR may not be a parent for another object.
8529
8530Creation –
8531
8532shall be CLEAR in template if neither sign nor decrypt is SET in template.
8533
8534Load
8535
85368537
8538shall be CLEAR if neither sign nor decrypt is SET in the object
8539
8540Import
8541
85428543
8544may be SET or CLEAR
8545
8546External
8547
85488549
8550shall be CLEAR
8551
8552Page 60
8553October 31, 2013
8554
8555Published
8556Copyright © TCG 2006-2013
8557
8558Family “2.0”
8559Level 00 Revision 00.99
8560
8561Trusted Platform Module Library
85628.3.3.11
8563
8564Part 2: Structures
8565
8566Bit[17] – decrypt
8567
8568When SET, the private portion of this key can be used to decrypt an external blob. If restricted is SET,
8569then the TPM will return an error if the external decrypted blob is not formatted as appropriate for the
8570command.
8571NOTE 1
8572
8573Since TPM-generated keys and sealed data will contain a hash and a structure tag, the TPM can ensure
8574that it is not being used to improperly decrypt and return sensitive data that should not be returned. The
8575only type of data that may be returned after decryption is a Sealed Data Object (a keyedHash object with
8576decrypt and sign CLEAR).
8577
8578When restricted is CLEAR, there are no restrictions on the use of the private portion of the key for
8579decryption and the key may be used to decrypt and return any structure encrypted by the public portion of
8580the key.
8581NOTE 2
8582
8583A key with this attribute SET may be a parent for another object if restricted is SET and sign is CLEAR.
8584
8585If decrypt is SET on an object with type set to TPM_ALG_KEYEDHASH, it indicates that the object is an
8586XOR encryption key.
8587Creation –
8588
8589may be SET or CLEAR in template
8590
8591Load
8592
85938594
8595may be SET or CLEAR
8596
8597Import
8598
85998600
8601may be SET or CLEAR
8602
8603External
8604
86058606
8607may be SET or CLEAR
8608
86098.3.3.12
8610
8611Bit[18] – sign
8612
8613When this attribute is SET, the private portion of this key may be used to sign a digest. If restricted is
8614SET, then the key may only be used to sign a digest that was computed by the TPM. A restricted signing
8615key may be used to sign a TPM-generated digest. If a structure is generated by the TPM, it will begin with
8616TPM_GENERATED_VALUE and the TPM may sign the digest of that structure. If the data is externally
8617supplied and has TPM_GENERATED_VALUE as its first octets, then the TPM will not sign a digest of
8618that data with a restricted signing key.
8619If restricted is CLEAR, then the key may be used to sign any digest, whether generated by the TPM or
8620externally provided.
8621NOTE 1
8622
8623Some asymmetric algorithms may not support both sign and decrypt being SET in the same key.
8624
8625If sign is SET on an object with type set to TPM_ALG_KEYEDHASH, it indicates that the object is an
8626HMAC key.
8627NOTE 2
8628
8629A key with this attribute SET may not be a parent for another object.
8630
8631Creation –
8632
8633shall not be SET if decrypt and restricted are both SET
8634
8635Load
8636
86378638
8639shall not be SET if decrypt and restricted are both SET
8640
8641Import
8642
86438644
8645shall not be SET if decrypt and restricted are both SET
8646
8647External
8648
86498650
8651shall not be SET if decrypt and restricted are both SET
8652
8653Family “2.0”
8654Level 00 Revision 00.99
8655
8656Published
8657Copyright © TCG 2006-2013
8658
8659Page 61
8660October 31, 2013
8661
8662Part 2: Structures
86638.4
8664
8665Trusted Platform Module Library
8666
8667TPMA_SESSION (Session Attributes)
8668
8669This octet in each session is used to identify the session type, indicate its relationship to any handles in
8670the command, and indicate its use in parameter encryption.
8671Table 31 — Definition of (UINT8) TPMA_SESSION Bits <IN/OUT>
8672Bit
8673
8674Name
8675
8676Meaning
8677
86780
8679
8680continueSession
8681
8682SET (1): In a command, this setting indicates that the session is to remain active
8683after successful completion of the command. In a response, it indicates that the
8684session is still active. If SET in the command, this attribute shall be SET in the
8685response.
8686CLEAR (0): In a command, this setting indicates that the TPM should close the
8687session and flush any related context when the command completes successfully. In
8688a response, it indicates that the session is closed and the context is no longer active.
8689This attribute has no meaning for a password authorization and the TPM will allow
8690any setting of the attribute in the command and SET the attribute in the response.
8691This attribute will only be CLEAR in one response for a logical session. If the attribute
8692is CLEAR, the context associated with the session is no longer in use and the space
8693is available. A session created after another session is ended may have the same
8694handle but logically is not the same session.
8695This attribute has no effect if the command does not complete successfully.
8696
86971
8698
8699auditExclusive
8700
8701SET (1): In a command, this setting indicates that the command should only be
8702executed if the session is exclusive at the start of the command. In a response, it
8703indicates that the session is exclusive. This setting is only allowed if the audit
8704attribute is SET.
8705CLEAR (0): If audit is CLEAR, then this field is reserved but the error is
8706TPM_RC_ATTRIBUTES rather than TPM_RC_RESERVED_BITS.
8707See "Exclusive Audit Session" clause in Part 1.
8708
87092
8710
8711auditReset
8712
8713SET (1): In a command, this setting indicates that the audit digest of the session
8714should be initialized and the exclusive status of the session SET.
8715CLEAR (0): If audit is CLEAR, then this field is reserved but the error is
8716TPM_RC_ATTRIBUTES rather than TPM_RC_RESERVED_BITS. This setting is
8717always used for a response.
8718
87194:3
8720
8721Reserved
8722
8723shall be CLEAR
8724
8725decrypt
8726
8727SET (1): In a command, this setting indicates that the first parameter in the command
8728is symmetrically encrypted using the parameter encryption scheme described in Part
87291. The TPM will decrypt the parameter after performing any HMAC computations and
8730before unmarshaling the parameter. In a response, the attribute is copied from the
8731request but has no effect on the response.
8732CLEAR (0): Session not used for encryption.
8733
87345
8735
8736For a password authorization, this attribute will be CLEAR in both the command and
8737response.
8738This attribute may only be SET in one session per command.
8739This attribute may be SET in a session that is not associated with a command
8740handle. Such a session is provided for purposes of encrypting a parameter and not
8741for authorization.
8742This attribute may be SET in combination with any other session attributes.
8743This attribute may only be SET if the first parameter of the command is a sized buffer
8744(TPM2B_).
8745
8746Page 62
8747October 31, 2013
8748
8749Published
8750Copyright © TCG 2006-2013
8751
8752Family “2.0”
8753Level 00 Revision 00.99
8754
8755Trusted Platform Module Library
8756
8757Part 2: Structures
8758
8759Bit
8760
8761Name
8762
8763Meaning
8764
87656
8766
8767encrypt
8768
8769SET (1): In a command, this setting indicates that the TPM should use this session to
8770encrypt the first parameter in the response. In a response, it indicates that the
8771attribute was set in the command and that the TPM used the session to encrypt the
8772first parameter in the response using the parameter encryption scheme described in
8773Part 1 of this specification.
8774CLEAR (0): Session not used for encryption.
8775For a password authorization, this attribute will be CLEAR in both the command and
8776response.
8777This attribute may only be SET in one session per command.
8778This attribute may be SET in a session that is not associated with a command
8779handle. Such a session is provided for purposes of encrypting a parameter and not
8780for authorization.
8781This attribute may only be SET if the first parameter of a response is a sized buffer
8782(TPM2B_).
8783
87847
8785
8786SET (1): In a command or response, this setting indicates that the session is for audit
8787and that auditExclusive and auditReset have meaning. This session may also be
8788used for authorization, encryption, or decryption. The encrypted and encrypt fields
8789may be SET or CLEAR.
8790CLEAR (0): Session is not used for audit.
8791
8792audit
8793
8794This attribute may only be SET in one session per command or response. If SET in
8795the command, then this attribute will be SET in the response.
8796
87978.5
8798
8799TPMA_LOCALITY (Locality Attribute)
8800
8801In a TPMS_CREATION_DATA structure, this structure is used to indicate the locality of the command that
8802created the object. No more than one of the locality attributes shall be set in the creation data.
8803When used in TPM2_PolicyLocality(), this structure indicates which localities are approved by the policy.
8804When a policy is started, all localities are allowed. If TPM2_PolicyLocality() is executed, it indicates that
8805the command may only be executed at specific localities. More than one locality may be selected.
8806EXAMPLE 1
8807
8808TPM_LOC_TWO would indicate that only locality 2 is authorized.
8809
8810EXAMPLE 2
8811
8812TPM_LOC_ONE + TPM_LOC_TWO would indicate that locality 1 or 2 is authorized.
8813
8814EXAMPLE 3
8815
8816TPM_LOC_FOUR + TPM_LOC_THREE would indicate that localities 3 or 4 are authorized.
8817
8818EXAMPLE 4
8819
8820A value of 21 16 would represent a locality of 33.
8821
8822NOTE
8823
8824Locality values of 5 through 31 are not selectable.
8825
8826Family “2.0”
8827Level 00 Revision 00.99
8828
8829Published
8830Copyright © TCG 2006-2013
8831
8832Page 63
8833October 31, 2013
8834
8835Part 2: Structures
8836
8837Trusted Platform Module Library
8838
8839If Extended is non-zero, then an extended locality is indicated and the TPMA_LOCALITY contains an
8840integer value.
8841Table 32 — Definition of (UINT8) TPMA_LOCALITY Bits <IN/OUT>
8842Bit
8843
8844Name
8845
8846Definition
8847
88480
8849
8850TPM_LOC_ZERO
8851
88521
8853
8854TPM_LOC_ONE
8855
88562
8857
8858TPM_LOC_TWO
8859
88603
8861
8862TPM_LOC_THREE
8863
88644
8865
8866TPM_LOC_FOUR
8867
88687:5
8869
88708.6
8871
8872Extended
8873
8874If any of these bits is set, an extended locality is indicated
8875
8876TPMA_PERMANENT
8877
8878The attributes in this structure are persistent and are not changed as a result of _TPM_Init or any
8879TPM2_Startup(). Some of the attributes in this structure may change as the result of specific Protected
8880Capabilities.
8881This
8882structure
8883may
8884be
8885read
8886using
8887TPM2_GetCapability(capability
8888=
8889TPM_CAP_TPM_PROPERTIES, property = TPM_PT_PERMANENT).
8890Table 33 — Definition of (UINT32) TPMA_PERMANENT Bits <OUT>
8891Bit
8892
8893Parameter
8894
8895Description
8896
88970
8898
8899ownerAuthSet
8900
8901SET (1): TPM2_HierarchyChangeAuth() with ownerAuth has been executed since
8902the last TPM2_Clear().
8903CLEAR (0): ownerAuth has not been changed since TPM2_Clear().
8904
89051
8906
8907endorsementAuthSet
8908
8909SET (1): TPM2_HierarchyChangeAuth() with endorsementAuth has been executed
8910since the last TPM2_Clear().
8911CLEAR (0): endorsementAuth has not been changed since TPM2_Clear().
8912
89132
8914
8915lockoutAuthSet
8916
8917SET (1): TPM2_HierarchyChangeAuth() with lockoutAuth has been executed since
8918the last TPM2_Clear().
8919CLEAR (0): lockoutAuth has not been changed since TPM2_Clear().
8920
89217:3
89228
8923
8924Reserved
8925disableClear
8926
8927SET (1): TPM2_Clear() is disabled.
8928CLEAR (0): TPM2_Clear() is enabled.
8929NOTE
8930
8931See “TPM2_ClearControl” in Part 3 of this specification for details on changing
8932this attribute.
8933
89349
8935
8936inLockout
8937
8938SET (1): The TPM is in lockout and commands that require authorization with other
8939than platformAuth will not succeed.
8940
894110
8942
8943tpmGeneratedEPS
8944
8945SET (1): The EPS was created by the TPM.
8946CLEAR (0): The EPS was created outside of the TPM using a manufacturerspecific process.
8947
894831:11 Reserved
8949
8950Page 64
8951October 31, 2013
8952
8953Published
8954Copyright © TCG 2006-2013
8955
8956Family “2.0”
8957Level 00 Revision 00.99
8958
8959Trusted Platform Module Library
89608.7
8961
8962Part 2: Structures
8963
8964TPMA_STARTUP_CLEAR
8965
8966These attributes are set to their default state on reset on each TPM Reset or TPM Restart. The attributes
8967are preserved on TPM Resume.
8968On each TPM2_Startup(TPM_SU_CLEAR), the TPM will set these attributes to their indicated defaults.
8969This structure may be read using TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES,
8970property = TPM_PT_STARTUP_CLEAR).
8971Some of attributes may be changed as the result of specific Protected Capabilities.
8972Table 34 — Definition of (UINT32) TPMA_STARTUP_CLEAR Bits <OUT>
8973Bit
89740
8975
8976Parameter
8977
8978Description
8979
8980phEnable
8981
8982SET (1): (default) The platform hierarchy is enabled and platformAuth or
8983platformPolicy may be used for authorization.
8984CLEAR (0): platformAuth and platformPolicy may not be used for authorizations,
8985and objects in the platform hierarchy, including NV Indexes and persistent objects,
8986cannot be used.
8987NOTE
8988
89891
8990
8991shEnable
8992
8993SET (1): (default) The Storage hierarchy is enabled and ownerAuth or ownerPolicy
8994may be used for authorization.
8995CLEAR (0): ownerAuth and ownerPolicy may not be used for authorizations, and
8996objects in the Storage hierarchy, including NV Indexes and persistent objects,
8997cannot be used.
8998NOTE
8999
90002
9001
9002ehEnable
9003
9004phEnableNV
9005
9006See “TPM2_HierarchyControl” in Part 3 of this specification for details on
9007changing this attribute.
9008
9009SET (1): (default) The EPS hierarchy is enabled and endorsementAuth may be
9010used to authorize commands.
9011CLEAR (0): endorsementAuth and endorsementPolicy may not be used for
9012authorizations, and objects in the endorsement hierarchy, including persistent
9013objects, cannot be used.
9014NOTE
9015
90163
9017
9018See “TPM2_HierarchyControl” in Part 3 of this specification for details on
9019changing this attribute.
9020
9021See “TPM2_HierarchyControl” in Part 3 of this specification for details on
9022changing this attribute.
9023
9024SET (1): (default) NV indices that have TPMA_PLATFORM_CREATE SET may be
9025read or written. The platform can create define and undefine indices.
9026CLEAR (0): NV indices that have TPMA_PLATFORM_CREATE SET may not be
9027read or written (TPM_RC_HANDLE). The platform cannot
9028define
9029(TPM_RC_HIERARCHY) or undefined (TPM_RC_HANDLE) indices.
9030NOTE
9031See “TPM2_HierarchyControl” in Part 3 of this specification for details on changing
9032this attribute.
9033NOTE
9034read refers to these commands: TPM2_NV_Read, TPM2_NV_ReadPublic, TPM_NV_Certify,
9035TPM2_PolicyNV
9036write refers to thse commands: TPM2_NV_Write, TPM2_NV_Increment, TPM2_NV_Extend,
9037TPM2_NV_SetBits
9038NOTE The TPM must query the index TPMA_PLATFORM_CREATE attribute to determine
9039whether phEnableNV is applicable. Since the TPM will return TPM_RC_HANDLE if the index
9040does not exist, it also returns this error code if the index is disabled. Otherwise, the TPM
9041would leak the existence of an index even when disabled.
9042
904330:4 Reserved
9044
9045Family “2.0”
9046Level 00 Revision 00.99
9047
9048shall be zero
9049
9050Published
9051Copyright © TCG 2006-2013
9052
9053Page 65
9054October 31, 2013
9055
9056Part 2: Structures
9057
9058Trusted Platform Module Library
9059
9060Bit
9061
9062Parameter
9063
9064Description
9065
906631
9067
9068orderly
9069
9070SET (1): The TPM received a TPM2_Shutdown() and a matching TPM2_Startup().
9071CLEAR (0): TPM2_Startup(TPM_SU_CLEAR) was not preceded by a
9072TPM2_Shutdown() of any type.
9073NOTE
9074
90758.8
9076
9077A shutdown is orderly if the TPM receives a TPM2_Shutdown() of any type
9078followed by a TPM2_Startup() of any type. However, the TPM will return an error if
9079TPM2_Startup(TPM_SU_STATE)
9080was
9081not
9082preceded
9083by
9084TPM2_State_Save(TPM_SU_STATE).
9085
9086TPMA_MEMORY
9087
9088This structure of this attribute is used to report the memory management method used by the TPM for
9089transient
9090objects
9091and
9092authorization
9093sessions.
9094This
9095structure
9096may be
9097read
9098using
9099TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES, property = TPM_PT_MEMORY).
9100If the RAM memory is shared, then context save of a session may make it possible to load an additional
9101transient object.
9102Table 35 — Definition of (UINT32) TPMA_MEMORY Bits <Out>
9103Bit
9104
9105Name
9106
9107Definition
9108
91090
9110
9111sharedRAM
9112
9113SET (1): indicates that the RAM memory used for authorization session
9114contexts is shared with the memory used for transient objects
9115CLEAR (0): indicates that the memory used for authorization sessions is not
9116shared with memory used for transient objects
9117
91181
9119
9120sharedNV
9121
9122SET (1): indicates that the NV memory used for persistent objects is shared
9123with the NV memory used for NV Index values
9124CLEAR (0): indicates that the persistent objects and NV Index values are
9125allocated from separate sections of NV
9126
91272
9128
9129objectCopiedToRam
9130
9131SET (1): indicates that the TPM copies persistent objects to a transient-object
9132slot in RAM when the persistent object is referenced in a command. The TRM
9133is required to make sure that an object slot is available.
9134CLEAR (0): indicates that the TPM does not use transient-object slots when
9135persistent objects are referenced
9136
913731:3
9138
9139Reserved
9140
9141shall be zero
9142
9143Page 66
9144October 31, 2013
9145
9146Published
9147Copyright © TCG 2006-2013
9148
9149Family “2.0”
9150Level 00 Revision 00.99
9151
9152Trusted Platform Module Library
91538.9
9154
9155Part 2: Structures
9156
9157TPMA_CC (Command Code Attributes)
9158
91598.9.1
9160
9161Introduction
9162
9163This structure defines the attributes of a command from a context management perspective. The fields of
9164the structure indicate to the TPM Resource Manager (TRM) the number of resources required by a
9165command and how the command affects the TPM’s resources.
9166This structure is only used in a list returned by the TPM in response to TPM2_GetCapability(capability =
9167TPM_CAP_COMMANDS).
9168For a command to the TPM, only the commandIndex field and V attribute are allowed to be non-zero.
91698.9.2
9170
9171Structure Definition
9172Table 36 — Definition of (TPM_CC) TPMA_CC Bits <OUT>
9173
9174Bit
917515:0
9176
9177Name
9178
9179Definition
9180
9181commandIndex
9182
9183indicates the command being selected
9184
918521:16 Reserved
9186
9187shall be zero
9188
918922
9190
9191nv
9192
9193SET (1): indicates that the command may write to NV
9194CLEAR (0): indicates that the command does not write to NV
9195
919623
9197
9198extensive
9199
9200SET (1): This command could flush any number of loaded contexts.
9201CLEAR (0): no additional changes other than indicated by the flushed attribute
9202
920324
9204
9205flushed
9206
9207SET (1): The context associated with any transient handle in the command will
9208be flushed when this command completes.
9209CLEAR (0): No context is flushed as a side effect of this command.
9210
921127:25 cHandles
9212
9213indicates the number of the handles in the handle area for this command
9214
921528
9216
9217rHandle
9218
9219SET (1): indicates the presence of the handle area in the input
9220
922129
9222
9223V
9224
9225SET (1): indicates that the command is vendor-specific
9226CLEAR (0): indicates that the command is defined in a version of this
9227specification
9228
922931:30 Res
9230
92318.9.3
92328.9.3.1
9233
9234allocated for software; shall be zero
9235
9236Field Descriptions
9237Bits[15:0] – commandIndex
9238
9239This is the command index of the command in the set of commands. The two sets are defined by the V
9240attribute. If V is zero, then the commandIndex shall be in the set of commands defined in a version of this
9241specification. If V is one, then the meaning of commandIndex is as determined by the TPM vendor.
92428.9.3.2
9243
9244Bit[22] – nv
9245
9246If this attribute is SET, then the TPM may perform an NV write as part of the command actions. This write
9247is independent of any write that may occur as a result of dictionary attack protection. If this attribute is
9248CLEAR, then the TPM shall not perform an NV write as part of the command actions.
92498.9.3.3
9250
9251Bit[23] – extensive
9252
9253Family “2.0”
9254Level 00 Revision 00.99
9255
9256Published
9257Copyright © TCG 2006-2013
9258
9259Page 67
9260October 31, 2013
9261
9262Part 2: Structures
9263
9264Trusted Platform Module Library
9265
9266If this attribute is SET, then the TPM may flush many transient objects as a side effect of this command.
9267In Part 3, a command that has this attribute is indicated by using a “{E}” decoration in the “Description”
9268column of the commandCode parameter.
9269EXAMPLE
9270
9271See “TPM2_Clear” in Part 3.
9272
9273NOTE
9274
9275The “{E}” decoration may be combined with other decorations such as “{NV}” in which case the decoration
9276would be “{NV E}.”
9277
92788.9.3.4
9279
9280Bit[24] – flushed
9281
9282If this attribute is SET, then the TPM will flush transient objects as a side effect of this command. Any
9283transient objects listed in the handle area of the command will be flushed from TPM memory. Handles
9284associated with persistent objects, sessions, PCR, or other fixed TPM resources are not flushed.
9285NOTE
9286
9287The TRM is expected to use this value to determine how many objects are loaded into transient TPM
9288memory.
9289
9290NOTE
9291
9292The “{F}” decoration may be combined with other decorations such as “{NV}” in which case the decoration
9293would be “{NV F}.”
9294
9295If this attribute is SET for a command, and the handle of the command is associated with a hierarchy
9296(TPM_RH_PLATFORM, TPM_RH_OWNER, or TPM_RH_ENDORSEMENT), all loaded objects in the
9297indicated hierarchy are flushed.
9298The TRM is expected to know the behaviour of TPM2_ContextSave(), and sessions are flushed when
9299context saved, but objects are not. The flushed attribute for that command shall be CLEAR.
9300In Part 3, a command that has this attribute is indicated by using a “{F}” decoration in the “Description”
9301column of the commandCode parameter.
9302EXAMPLE
9303
93048.9.3.5
9305
9306See “TPM2_SequenceComplete” in Part 3.”
9307
9308Bits[27:25] – cHandles
9309
9310This field indicates the number of handles in the handle area of the command. This number allows the
9311TRM to enumerate the handles in the handle area and find the position of the authorizations (if any).
93128.9.3.6
9313
9314Bit[28] – rHandle
9315
9316If this attribute is SET, then the response to this command has a handle area. This area will contain no
9317more than one handle. This field is necessary to allow the TRM to locate the parameterSize field in the
9318response, which is then used to locate the authorizations.
9319NOTE
9320
9321The TRM is expected to “virtualize” the handle value for any returned handle.
9322
9323Page 68
9324October 31, 2013
9325
9326Published
9327Copyright © TCG 2006-2013
9328
9329Family “2.0”
9330Level 00 Revision 00.99
9331
9332Trusted Platform Module Library
9333
9334Part 2: Structures
9335
9336A TPM command is only allowed to have one handle in the session area.
93378.9.3.7
9338
9339Bit[29] – V
9340
9341When this attribute is SET, it indicates that the command operation is defined by the TPM vendor. When
9342CLEAR, it indicates that the command is defined by a version of this specification.
93438.9.3.8
9344
9345Bits[31:30] – Res
9346
9347This field is reserved for system software. This field is required to be zero for a command to the TPM.
9348
9349Family “2.0”
9350Level 00 Revision 00.99
9351
9352Published
9353Copyright © TCG 2006-2013
9354
9355Page 69
9356October 31, 2013
9357
9358Part 2: Structures
9359
93609
9361
9362Trusted Platform Module Library
9363
9364Interface Types
9365
93669.1
9367
9368Introduction
9369
9370This clause contains definitions for interface types. An interface type is type checked when it is
9371unmarshaled. These types are based on an underlying type that is indicated in the table title by the value
9372in parentheses. When an interface type is used, the base type is unmarshaled and then checked to see if
9373it has one of the allowed values.
93749.2
9375
9376TPMI_YES_NO
9377
9378This interface type is used in place of a Boolean type in order to eliminate ambiguity in the handling of a
9379octet that conveys a single bit of information. This type only has two allowed values, YES (1) and NO (0).
9380NOTE
9381
9382This list is not used as input to the TPM.
9383
9384Table 37 — Definition of (BYTE) TPMI_YES_NO Type
9385Value
9386
9387Description
9388
9389NO
9390
9391a value of 0
9392
9393YES
9394
9395a value of 1
9396
9397#TPM_RC_VALUE
9398
93999.3
9400
9401TPMI_DH_OBJECT
9402
9403The TPMI_DH_OBJECT interface type is a handle that references a loaded object. The handles in this
9404set are used to refer to either transient or persistent object. The range of these values would change
9405according to the TPM implementation.
9406NOTE
9407
9408These interface types should not be used by system software to qualify the keys produced by the TPM.
9409The value returned by the TPM shall be used to reference the object.
9410
9411Table 38 — Definition of (TPM_HANDLE) TPMI_DH_OBJECT Type
9412Values
9413
9414Comments
9415
9416{TRANSIENT_FIRST:TRANSIENT_LAST}
9417
9418allowed range for transient objects
9419
9420{PERSISTENT_FIRST:PERSISTENT_LAST}
9421
9422allowed range for persistent objects
9423
9424+TPM_RH_NULL
9425
9426the conditional value
9427
9428#TPM_RC_VALUE
9429
9430Page 70
9431October 31, 2013
9432
9433Published
9434Copyright © TCG 2006-2013
9435
9436Family “2.0”
9437Level 00 Revision 00.99
9438
9439Trusted Platform Module Library
94409.4
9441
9442Part 2: Structures
9443
9444TPMI_DH_PERSISTENT
9445
9446The TPMI_DH_PERSISTENT interface type is a handle that references a location for a transient object.
9447This type is used in TPM2_EvictControl() to indicate the handle to be assigned to the persistent object.
9448Table 39 — Definition of (TPM_HANDLE) TPMI_DH_PERSISTENT Type
9449Values
9450
9451Comments
9452
9453{PERSISTENT_FIRST:PERSISTENT_LAST}
9454
9455allowed range for persistent objects
9456
9457#TPM_RC_VALUE
9458
94599.5
9460
9461TPMI_DH_ENTITY
9462
9463The TPMI_DH_ENTITY interface type is TPM-defined values that are used to indicate that the handle
9464refers to an authValue. The range of these values would change according to the TPM implementation.
9465Table 40 — Definition of (TPM_HANDLE) TPMI_DH_ENTITY Type <IN>
9466Values
9467
9468Comments
9469
9470TPM_RH_OWNER
9471TPM_RH_ENDORSEMENT
9472TPM_RH_PLATFORM
9473TPM_RH_LOCKOUT
9474{TRANSIENT_FIRST : TRANSIENT_LAST}
9475
9476range of object handles
9477
9478{PERSISTENT_FIRST : PERSISTENT_LAST}
9479{NV_INDEX_FIRST : NV_INDEX_LAST}
9480{PCR_FIRST : PCR_LAST}
9481+TPM_RH_NULL
9482
9483conditional value
9484
9485#TPM_RC_VALUE
9486
9487Family “2.0”
9488Level 00 Revision 00.99
9489
9490Published
9491Copyright © TCG 2006-2013
9492
9493Page 71
9494October 31, 2013
9495
9496Part 2: Structures
94979.6
9498
9499Trusted Platform Module Library
9500
9501TPMI_DH_PCR
9502
9503This interface type consists of the handles that may be used as PCR references. The upper end of this
9504range of values would change according to the TPM implementation.
9505NOTE 1
9506
9507Typically, the 0 th PCR will have a handle value of zero.
9508
9509NOTE 2
9510
9511The handle range for PCR is defined to be the same as the handle range for PCR in previous versions of
9512TPM specifications.
9513
9514Table 41 — Definition of (TPM_HANDLE) TPMI_DH_PCR Type <IN>
9515Values
9516
9517Comments
9518
9519{PCR_FIRST:PCR_LAST}
9520+TPM_RH_NULL
9521
9522conditional value
9523
9524#TPM_RC_VALUE
9525
95269.7
9527
9528TPMI_SH_AUTH_SESSION
9529
9530The TPMI_SH_AUTH_SESSION interface type is TPM-defined values that are used to indicate that the
9531handle refers to an authorization session.
9532Table 42 — Definition of (TPM_HANDLE) TPMI_SH_AUTH_SESSION Type <IN/OUT>
9533Values
9534
9535Comments
9536
9537{HMAC_SESSION_FIRST : HMAC_SESSION_LAST}
9538
9539range of HMAC authorization session handles
9540
9541{POLICY_SESSION_FIRST: POLICY_SESSION_LAST}
9542
9543range of policy authorization session handles
9544
9545+TPM_RS_PW
9546
9547a password authorization
9548
9549#TPM_RC_VALUE
9550
9551error returned if the handle is out of range
9552
95539.8
9554
9555TPMI_SH_HMAC
9556
9557This interface type is used for an authorization handle when the authorization session uses an HMAC.
9558Table 43 — Definition of (TPM_HANDLE) TPMI_SH_HMAC Type <IN/OUT>
9559Values
9560
9561Comments
9562
9563{HMAC_SESSION_FIRST: HMAC_SESSION_LAST}
9564
9565range of HMAC authorization session handles
9566
9567#TPM_RC_VALUE
9568
9569error returned if the handle is out of range
9570
95719.9
9572
9573TPMI_SH_POLICY
9574
9575This interface type is used for a policy handle when it appears in a policy command.
9576Table 44 — Definition of (TPM_HANDLE) TPMI_SH_POLICY Type <IN/OUT>
9577Values
9578
9579Comments
9580
9581{POLICY_SESSION_FIRST: POLICY_SESSION_LAST}
9582
9583range of policy authorization session handles
9584
9585#TPM_RC_VALUE
9586
9587error returned if the handle is out of range
9588
9589Page 72
9590October 31, 2013
9591
9592Published
9593Copyright © TCG 2006-2013
9594
9595Family “2.0”
9596Level 00 Revision 00.99
9597
9598Trusted Platform Module Library
9599
9600Part 2: Structures
9601
96029.10 TPMI_DH_CONTEXT
9603This type defines the handle values that may be used in TPM2_ContextSave() or TPM2_Flush().
9604Table 45 — Definition of (TPM_HANDLE) TPMI_DH_CONTEXT Type
9605Values
9606
9607Comments
9608
9609{HMAC_SESSION_FIRST : HMAC_SESSION_LAST}
9610{POLICY_SESSION_FIRST:POLICY_SESSION_LAST}
9611{TRANSIENT_FIRST:TRANSIENT_LAST}
9612#TPM_RC_VALUE
9613
96149.11 TPMI_RH_HIERARCHY
9615The TPMI_RH_HIERARCHY interface type is used as the type of a handle in a command when the
9616handle is required to be one of the hierarchy selectors.
9617Table 46 — Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY Type
9618Values
9619
9620Comments
9621
9622TPM_RH_OWNER
9623
9624Storage hierarchy
9625
9626TPM_RH_PLATFORM
9627
9628Platform hierarchy
9629
9630TPM_RH_ENDORSEMENT
9631
9632Endorsement hierarchy
9633
9634+TPM_RH_NULL
9635
9636no hierarchy
9637
9638#TPM_RC_VALUE
9639
9640response code returned when the unmarshaling of this type fails
9641
96429.12 TPMI_RH_ENABLES
9643The TPMI_RH_ENABLES interface type is used as the type of a handle in a command when the handle
9644is required to be one of the hierarchy or NV enables.
9645Table 47 — Definition of (TPM_HANDLE) TPMI_RH_ENABLES Type
9646Values
9647
9648Comments
9649
9650TPM_RH_OWNER
9651
9652Storage hierarchy
9653
9654TPM_RH_PLATFORM
9655
9656Platform hierarchy
9657
9658TPM_RH_ENDORSEMENT
9659
9660Endorsement hierarchy
9661
9662TPM_RH_PLATFORM_NV
9663
9664Platform NV
9665
9666+TPM_RH_NULL
9667
9668no hierarchy
9669
9670#TPM_RC_VALUE
9671
9672response code returned when the unmarshaling of this type fails
9673
9674Family “2.0”
9675Level 00 Revision 00.99
9676
9677Published
9678Copyright © TCG 2006-2013
9679
9680Page 73
9681October 31, 2013
9682
9683Part 2: Structures
9684
9685Trusted Platform Module Library
9686
96879.13 TPMI_RH_HIERARCHY_AUTH
9688This interface type is used as the type of a handle in a command when the handle is required to be one of
9689the hierarchy selectors or the Lockout Authorization.
9690Table 48 — Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY_AUTH Type <IN>
9691Values
9692
9693Comments
9694
9695TPM_RH_OWNER
9696
9697Storage hierarchy
9698
9699TPM_RH_PLATFORM
9700
9701Platform hierarchy
9702
9703TPM_RH_ENDORSEMENT
9704
9705Endorsement hierarchy
9706
9707TPM_RH_LOCKOUT
9708
9709Lockout Authorization
9710
9711#TPM_RC_VALUE
9712
9713response code returned when the unmarshaling of this type fails
9714
97159.14 TPMI_RH_PLATFORM
9716The TPMI_RH_PLATFORM interface type is used as the type of a handle in a command when the only
9717allowed handle is TPM_RH_PLATFORM indicating that platformAuth is required.
9718Table 49 — Definition of (TPM_HANDLE) TPMI_RH_PLATFORM Type <IN>
9719Values
9720
9721Comments
9722
9723TPM_RH_PLATFORM
9724
9725Platform hierarchy
9726
9727#TPM_RC_VALUE
9728
9729response code returned when the unmarshaling of this type fails
9730
97319.15 TPMI_RH_OWNER
9732This interface type is used as the type of a handle in a command when the only allowed handle is
9733TPM_RH_OWNER indicating that ownerAuth is required.
9734Table 50 — Definition of (TPM_HANDLE) TPMI_RH_OWNER Type <IN>
9735Values
9736
9737Comments
9738
9739TPM_RH_OWNER
9740
9741Owner hierarchy
9742
9743+TPM_RH_NULL
9744
9745may allow the null handle
9746
9747#TPM_RC_VALUE
9748
9749response code returned when the unmarshaling of this type fails
9750
9751Page 74
9752October 31, 2013
9753
9754Published
9755Copyright © TCG 2006-2013
9756
9757Family “2.0”
9758Level 00 Revision 00.99
9759
9760Trusted Platform Module Library
9761
9762Part 2: Structures
9763
97649.16 TPMI_RH_ENDORSEMENT
9765This interface type is used as the type of a handle in a command when the only allowed handle is
9766TPM_RH_ENDORSEMENT indicating that endorsementAuth is required.
9767Table 51 — Definition of (TPM_HANDLE) TPMI_RH_ENDORSEMENT Type <IN>
9768Values
9769
9770Comments
9771
9772TPM_RH_ENDORSEMENT
9773
9774Endorsement hierarchy
9775
9776+TPM_RH_NULL
9777
9778may allow the null handle
9779
9780#TPM_RC_VALUE
9781
9782response code returned when the unmarshaling of this type fails
9783
97849.17 TPMI_RH_PROVISION
9785The TPMI_RH_PROVISION interface type is used as the type of the handle in a command when the only
9786allowed handles are either TPM_RH_OWNER or TPM_RH_PLATFORM indicating that either
9787platformAuth or ownerAuth are allowed.
9788In most cases, either platformAuth or ownerAuth may be used to authorize the commands used for
9789management of the resources of the TPM and this interface type will be used.
9790Table 52 — Definition of (TPM_HANDLE) TPMI_RH_PROVISION Type <IN>
9791Value
9792
9793Comments
9794
9795TPM_RH_OWNER
9796
9797handle for ownerAuth
9798
9799TPM_RH_PLATFORM
9800
9801handle for platformAuth
9802
9803#TPM_RC_VALUE
9804
9805response code returned when the unmarshaling of this type fails
9806
98079.18 TPMI_RH_CLEAR
9808The TPMI_RH_CLEAR interface type is used as the type of the handle in a command when the only
9809allowed handles are either TPM_RH_LOCKOUT or TPM_RH_PLATFORM indicating that either
9810platformAuth or lockoutAuth are allowed.
9811This interface type is normally used for performing or controlling TPM2_Clear().
9812Table 53 — Definition of (TPM_HANDLE) TPMI_RH_CLEAR Type <IN>
9813Value
9814
9815Comments
9816
9817TPM_RH_LOCKOUT
9818
9819handle for lockoutAuth
9820
9821TPM_RH_PLATFORM
9822
9823handle for platformAuth
9824
9825#TPM_RC_VALUE
9826
9827response code returned when the unmarshaling of this type fails
9828
9829Family “2.0”
9830Level 00 Revision 00.99
9831
9832Published
9833Copyright © TCG 2006-2013
9834
9835Page 75
9836October 31, 2013
9837
9838Part 2: Structures
9839
9840Trusted Platform Module Library
9841
98429.19 TPMI_RH_NV_AUTH
9843This interface type is used to identify the source of the authorization for access to an NV location. The
9844handle value of a TPMI_RH_NV_AUTH shall indicate that the authorization value is either platformAuth,
9845ownerAuth, or the authValue. This type is used in the commands that access an NV Index (commands of
9846the form TPM2_NV_xxx) other than TPM2_NV_DefineSpace() and TPM2_NV_UndefineSpace().
9847Table 54 — Definition of (TPM_HANDLE) TPMI_RH_NV_AUTH Type <IN>
9848Value
9849
9850Comments
9851
9852TPM_RH_PLATFORM
9853
9854platformAuth is allowed
9855
9856TPM_RH_OWNER
9857
9858ownerAuth is allowed
9859
9860{NV_INDEX_FIRST:NV_INDEX_LAST}
9861
9862range for NV locations
9863
9864#TPM_RC_VALUE
9865
9866response code returned when unmarshaling of this type fails
9867
98689.20 TPMI_RH_LOCKOUT
9869The TPMI_RH_LOCKOUT interface type is used as the type of a handle in a command when the only
9870allowed handle is TPM_RH_LOCKOUT indicating that lockoutAuth is required.
9871Table 55 — Definition of (TPM_HANDLE) TPMI_RH_LOCKOUT Type <IN>
9872Value
9873
9874Comments
9875
9876TPM_RH_LOCKOUT
9877#TPM_RC_VALUE
9878
9879response code returned when the unmarshaling of this type fails
9880
98819.21 TPMI_RH_NV_INDEX
9882This interface type is used to identify an NV location. This type is used in the NV commands.
9883Table 56 — Definition of (TPM_HANDLE) TPMI_RH_NV_INDEX Type <IN/OUT>
9884Value
9885
9886Comments
9887
9888{NV_INDEX_FIRST:NV_INDEX_LAST}
9889
9890Range of NV Indexes
9891
9892#TPM_RC_VALUE
9893
9894error returned if the handle is out of range
9895
9896Page 76
9897October 31, 2013
9898
9899Published
9900Copyright © TCG 2006-2013
9901
9902Family “2.0”
9903Level 00 Revision 00.99
9904
9905Trusted Platform Module Library
9906
9907Part 2: Structures
9908
99099.22 TPMI_ALG_HASH
9910A TPMI_ALG_HASH is an interface type of all the hash algorithms implemented on a specific TPM. Table
991157 is a list of the hash algorithms that have an algorithm ID assigned by the TCG and does not indicate
9912the algorithms that will be accepted by a TPM.
9913NOTE
9914
9915An implementation would modify this table according to the implemented algorithms, changing the values
9916that are accepted as hash algorithms.
9917
9918Table 57 — Definition of (TPM_ALG_ID) TPMI_ALG_HASH Type
9919Values
9920
9921Comments
9922
9923TPM_ALG_SHA1
9924
9925example
9926
9927TPM_ALG_SHA256
9928
9929example
9930
9931TPM_ALG_SM3_256
9932
9933example
9934
9935TPM_ALG_SHA384
9936
9937example
9938
9939TPM_ALG_SHA512
9940
9941example
9942
9943+TPM_ALG_NULL
9944#TPM_RC_HASH
9945
99469.23 TPMI_ALG_ASYM (Asymmetric Algorithms)
9947A TPMI_ALG_ASYM is an interface type of all the asymmetric algorithms implemented on a specific TPM.
9948Table 58 lists each of the asymmetric algorithms that have an algorithm ID assigned by the TCG.
9949Table 58 — Definition of (TPM_ALG_ID) TPMI_ALG_ASYM Type
9950Values
9951
9952Comments
9953
9954TPM_ALG_RSA
9955TPM_ALG_ECC
9956+TPM_ALG_NULL
9957#TPM_RC_ASYMMETRIC
9958
9959Family “2.0”
9960Level 00 Revision 00.99
9961
9962Published
9963Copyright © TCG 2006-2013
9964
9965Page 77
9966October 31, 2013
9967
9968Part 2: Structures
9969
9970Trusted Platform Module Library
9971
99729.24 TPMI_ALG_SYM (Symmetric Algorithms)
9973A TPMI_ALG_SYM is an interface type of all the symmetric algorithms that have an algorithm ID assigned
9974by the TCG and are implemented on the TPM.
9975The list in the table below is illustrative and will change according to the implementation. The validation
9976code will only accept the subset of algorithms implemented on a TPM.
9977NOTE
9978
9979The validation code produced by an example script will produce a CASE statement with a case for each of
9980the values in the “Values” column. The case for a value is delimited by a #ifdef/#endif pair so that if the
9981algorithm is not implemented on the TPM, then the case for the algorithm is not generated, and use of the
9982algorithm will cause a TPM error (TPM_RC_SYMMETRIC).
9983
9984Table 59 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM Type
9985Values
9986
9987Comments
9988
9989TPM_ALG_AES
9990
9991example
9992
9993TPM_ALG_SM4
9994
9995example
9996
9997TPM_ALG_XOR
9998
9999example
10000
10001+TPM_ALG_NULL
10002
10003required to be present in all versions of this table
10004
10005#TPM_RC_SYMMETRIC
10006
100079.25 TPMI_ALG_SYM_OBJECT
10008A TPMI_ALG_SYM_OBJECT is an interface type of all the TCG-defined symmetric algorithms that may
10009be used as companion symmetric encryption algorithm for an asymmetric object. All algorithms in this list
10010shall be block ciphers usable in Cipher Feedback (CFB).
10011Table 60 is illustrative. It would be modified to indicate the algorithms of the TPM.
10012NOTE
10013
10014TPM_ALG_XOR is not allowed in this list.
10015
10016Table 60 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM_OBJECT Type
10017Values
10018
10019Comments
10020
10021TPM_ALG_AES
10022
10023example
10024
10025TPM_ALG_SM4
10026
10027example
10028
10029+TPM_ALG_NULL
10030
10031required to be present in all versions of this table
10032
10033#TPM_RC_SYMMETRIC
10034
10035Page 78
10036October 31, 2013
10037
10038Published
10039Copyright © TCG 2006-2013
10040
10041Family “2.0”
10042Level 00 Revision 00.99
10043
10044Trusted Platform Module Library
10045
10046Part 2: Structures
10047
100489.26 TPMI_ALG_SYM_MODE
10049A TPMI_ALG_SYM_MODE is an interface type of all the TCG-defined block-cipher modes of operation.
10050This version of the table is not expected to be the table checked by the validation code. Rather, the table
10051would be replaced by one containing the algorithms implemented on the TPM and that the values in that
10052table would be checked by the input validation code.
10053Table 61 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM_MODE Type
10054Values
10055
10056Comments
10057
10058TPM_ALG_CTR
10059
10060IV will be determined by use.
10061If the outside provides the nonce and initial counter, then the caller can
10062know what IV to provide for chaining.
10063
10064TPM_ALG_OFB
10065
10066XOR last cipher text block with last plaintext to create IV for next block
10067
10068TPM_ALG_CBC
10069
10070IV will be determined by use.
10071indefinite chaining using previous output block as IV for next block
10072
10073TPM_ALG_CFB
10074
10075shall be implemented in all TPM compliant with this specification
10076IV will be determined by use.
10077indefinite chaining using previous cipher text as IV
10078
10079TPM_ALG_ECB
10080
10081no IV or chaining value required
10082
10083+TPM_ALG_NULL
10084#TPM_RC_MODE
10085
100869.27 TPMI_ALG_KDF (Key and Mask Generation Functions)
10087A TPMI_ALG_KDF is an interface type of all the key derivation functions implemented on a specific TPM.
10088Table 62 is exemplary and would change based on the algorithms implemented in a TPM.
10089Table 62 — Definition of (TPM_ALG_ID) TPMI_ALG_KDF Type
10090Values
10091
10092Comments
10093
10094TPM_ALG_MGF1
10095TPM_ALG_KDF1_SP800_108
10096TPM_ALG_KDF1_SP800_56a
10097TPM_ALG_KDF2
10098+TPM_ALG_NULL
10099#TPM_RC_KDF
10100
10101Family “2.0”
10102Level 00 Revision 00.99
10103
10104Published
10105Copyright © TCG 2006-2013
10106
10107Page 79
10108October 31, 2013
10109
10110Part 2: Structures
10111
10112Trusted Platform Module Library
10113
101149.28 TPMI_ALG_SIG_SCHEME
10115This is the definition of the interface type for a signature scheme. This table would change according to
10116the algorithms implemented on the TPM.
10117Table 63 — Definition of (TPM_ALG_ID) TPMI_ALG_SIG_SCHEME Type
10118Values
10119
10120Comments
10121
10122TPM_ALG_RSASSA
10123
10124requires that RSA be implemented
10125
10126TPM_ALG_RSAPSS
10127
10128requires that RSA be implemented
10129
10130TPM_ALG_ECDSA
10131
10132requires that ECC be implemented
10133
10134TPM_ALG_ECDAA
10135
10136requires that ECC and ECDAA be implemented
10137
10138TPM_ALG_ECSCHNORR
10139TPM_ALG_SM2
10140
10141requires that ECC be implemented
10142
10143TPM_ALG_HMAC
10144
10145present on all TPM
10146
10147+TPM_ALG_NULL
10148#TPM_RC_SCHEME
10149
10150response code when a signature scheme is not correct
10151
101529.29 TPMI_ECC_KEY_EXCHANGE
10153This is the definition of the interface type for an ECC key exchange scheme. This table would change
10154according to the algorithms implemented on the TPM.
10155Table 64 — Definition of (TPM_ALG_ID) TPMI_ECC_KEY_EXCHANGE Type
10156Values
10157
10158Comments
10159
10160TPM_ALG_ECDH
10161
10162used for single and two phase key exchange
10163
10164TPM_ALG_ECMQV
10165TPM_ALG_SM2
10166
10167requires that ECC be implemented
10168
10169+TPM_ALG_NULL
10170#TPM_RC_SCHEME
10171
10172response code when a key exchange scheme is not correct
10173
101749.30 TPMI_ST_COMMAND_TAG
10175This interface type is used for the command tags.
10176The response code for a bad command tag has the same value as the TPM 1.2 response code
10177(TPM_BAD_TAG). This value is used in case the software is not compatible with this specification and an
10178unexpected response code might have unexpected side effects.
10179Table 65 — Definition of (TPM_ST) TPMI_ST_COMMAND_TAG Type
10180Values
10181
10182Comments
10183
10184TPM_ST_NO_SESSIONS
10185TPM_ST_SESSIONS
10186#TPM_RC_BAD_TAG
10187
10188Page 80
10189October 31, 2013
10190
10191Published
10192Copyright © TCG 2006-2013
10193
10194Family “2.0”
10195Level 00 Revision 00.99
10196
10197Trusted Platform Module Library
10198
10199Part 2: Structures
10200
1020110 Structure Definitions
1020210.1 TPMS_ALGORITHM_DESCRIPTION
10203This structure is a return value for a TPM2_GetCapability() that reads the installed algorithms.
10204Table 66 — Definition of TPMS_ALGORITHM_DESCRIPTION Structure <OUT>
10205Parameter
10206
10207Type
10208
10209Description
10210
10211alg
10212
10213TPM_ALG_ID
10214
10215an algorithm
10216
10217attributes
10218
10219TPMA_ALGORITHM
10220
10221the attributes of the algorithm
10222
1022310.2 Hash/Digest Structures
1022410.2.1 TPMU_HA (Hash)
10225A TPMU_HA is a union of all the hash algorithms implemented on a TPM. Table 67 is exemplary and
10226would change based on the algorithms implemented in a TPM.
10227NOTE
10228
10229If processed by an automated tool, each entry of the table should be qualified (with #ifdef/#endif) so that if
10230the hash algorithm is not implemented on the TPM, the parameter associated with that hash is not
10231present. This will keep the union from being larger than the largest digest of a hash implemented on that
10232TPM.
10233
10234Table 67 — Definition of TPMU_HA Union <IN/OUT, S>
10235Parameter
10236
10237Type
10238
10239Selector
10240
10241sha1 [SHA1_DIGEST_SIZE]
10242
10243BYTE
10244
10245TPM_ALG_SHA1
10246
10247sha256 [SHA256_DIGEST_SIZE]
10248
10249BYTE
10250
10251TPM_ALG_SHA256
10252
10253sm3_256 [SM3_256_DIGEST_SIZE]
10254
10255BYTE
10256
10257TPM_ALG_SM3_256
10258
10259sha384 [SHA384_DIGEST_SIZE]
10260
10261BYTE
10262
10263TPM_ALG_SHA384
10264
10265sha512 [SHA512_DIGEST_SIZE]
10266
10267BYTE
10268
10269TPM_ALG_SHA512
10270
10271null
10272
10273Family “2.0”
10274Level 00 Revision 00.99
10275
10276Description
10277
10278TPM_ALG_NULL
10279
10280Published
10281Copyright © TCG 2006-2013
10282
10283Page 81
10284October 31, 2013
10285
10286Part 2: Structures
10287
10288Trusted Platform Module Library
10289
1029010.2.2 TPMT_HA
10291Table 68 shows the basic hash-agile structure used in this specification. To handle hash agility, this
10292structure uses the hashAlg parameter to indicate the algorithm used to compute the digest and, by
10293implication, the size of the digest.
10294When transmitted, only the number of octets indicated by hashAlg is sent.
10295NOTE
10296
10297In the exemplary code, when a TPMT_HA is allocated, the digest field is large enough to support the
10298largest hash algorithm in the TPMU_HA union.
10299
10300Table 68 — Definition of TPMT_HA Structure <IN/OUT>
10301Parameter
10302
10303Type
10304
10305Description
10306
10307hashAlg
10308
10309+TPMI_ALG_HASH
10310
10311selector of the hash contained in the digest that implies the
10312size of the digest
10313NOTE
10314
10315[hashAlg] digest
10316
10317TPMU_HA
10318
10319The leading “+” on the type indicates that this structure
10320should pass an indication to the unmarshaling function for
10321TPMI_ALG_HASH so that TPM_ALG_NULL will be
10322allowed if a use of a TPMT_HA allows TPM_ALG_NULL.
10323
10324the digest data
10325
1032610.3 Sized Buffers
1032710.3.1 Introduction
10328The “TPM2B_” prefix is used for a structure that has a size field followed by a data buffer with the
10329indicated number of octets. The size field is 16 bits.
10330When the type of the second parameter in a TPM2B_ structure is BYTE, the TPM shall unmarshal the
10331indicated number of octets, which may be zero.
10332When the type of the second parameter in the TPM2B_ structure is not BYTE, the value of the size field
10333shall either be zero indicating that no structure is to be unmarshaled; or it shall be identical to the number
10334of octets unmarshaled for the second parameter.
10335NOTE 1
10336
10337If the TPM2B_ defines a structure and not an array of octets, then the structure is self-describing and the
10338TPM will be able to determine how many octets are in the structure when it is unmarshaled. If that number
10339of octets is not equal to the size parameter, then it is an error.
10340
10341NOTE 2
10342
10343The reason that a structure may be put into a TPM2B_ is that the parts of the structure may be handled
10344as separate opaque blocks by the application/system software. Rather than require that all of the
10345structures in a command or response be marshaled or unmarshaled sequentially, the size field allows the
10346structure to be manipulated as an opaque block. Placing a structure in a TPM2B_ also makes it possible
10347to use parameter encryption on the structure.
10348
10349If a TPM2B_ is encrypted, the TPM will encrypt/decrypt the data field of the TPM2B_ but not the size
10350parameter. The TPM will encrypt/decrypt the number of octets indicated by the size field.
10351NOTE 3
10352
10353In the reference implementation, a TPM2B type is defined that is a 16-bit size field followed by a single
10354byte of data. The TPM2B_ is then defined as a union that contains a TPM2B (union member ‘b’) and the
10355structure in the definition table (union member ‘t’). This union is used for internally generated structures
10356so that there is a way to define a structure of the correct size (forced by the ‘t’ member) while giving a way
10357to pass the structure generically as a ‘b’. Most function calls use the 't' member so that the compiler will
10358generate a warning if there is a type error (a TPM2B_ of the wrong type). Having the type checked helps
10359avoid many issues with buffer overflow caused by a too small buffer being passed to a function.
10360
10361Page 82
10362October 31, 2013
10363
10364Published
10365Copyright © TCG 2006-2013
10366
10367Family “2.0”
10368Level 00 Revision 00.99
10369
10370Trusted Platform Module Library
10371
10372Part 2: Structures
10373
1037410.3.2 TPM2B_DIGEST
10375This structure is used for a sized buffer that cannot be larger than the largest digest produced by any
10376hash algorithm implemented on the TPM.
10377As with all sized buffers, the size is checked to see if it is within the prescribed range. If not, the response
10378code is TPM_RC_SIZE.
10379NOTE
10380
10381For any structure, like the one below, that contains an implied size check, it is implied that TPM_RC_SIZE
10382is a possible response code and the response code will not be listed in the table.
10383
10384Table 69 — Definition of TPM2B_DIGEST Structure
10385Parameter
10386
10387Type
10388
10389Description
10390
10391size
10392
10393UINT16
10394
10395size in octets of the buffer field; may be 0
10396
10397buffer[size]{:sizeof(TPMU_HA)}
10398
10399BYTE
10400
10401the buffer area that can be no larger than a digest
10402
1040310.3.3 TPM2B_DATA
10404This structure is used for a data buffer that is required to be no larger than the size of the Name of an
10405object. This size limit includes the algorithm ID of the hash and the hash data.
10406Table 70 — Definition of TPM2B_DATA Structure
10407Parameter
10408
10409Type
10410
10411Description
10412
10413size
10414
10415UINT16
10416
10417size in octets of the buffer field; may be 0
10418
10419buffer[size]{:sizeof(TPMT_HA)}
10420
10421BYTE
10422
10423the buffer area that contains the algorithm ID and the
10424digest
10425
1042610.3.4 TPM2B_NONCE
10427Table 71 — Definition of Types for TPM2B_NONCE
10428Type
10429
10430Name
10431
10432Description
10433
10434TPM2B_DIGEST
10435
10436TPM2B_NONCE
10437
10438size limited to the same as the digest structure
10439
1044010.3.5 TPM2B_AUTH
10441This structure is used for an authorization value and limits an authValue to being no larger than the
10442largest digest produced by a TPM. In order to ensure consistency within an object, the authValue may be
10443no larger than the size of the digest produced by the object’s nameAlg. This ensures that any TPM that
10444can load the object will be able to handle the authValue of the object.
10445Table 72 — Definition of Types for TPM2B_AUTH
10446Type
10447
10448Name
10449
10450Description
10451
10452TPM2B_DIGEST
10453
10454TPM2B_AUTH
10455
10456size limited to the same as the digest structure
10457
10458Family “2.0”
10459Level 00 Revision 00.99
10460
10461Published
10462Copyright © TCG 2006-2013
10463
10464Page 83
10465October 31, 2013
10466
10467Part 2: Structures
10468
10469Trusted Platform Module Library
10470
1047110.3.6 TPM2B_OPERAND
10472This type is a sized buffer that can hold an operand for a comparison with an NV Index location. The
10473maximum size of the operand is implementation dependent but a TPM is required to support an operand
10474size that is at least as big as the digest produced by any of the hash algorithms implemented on the TPM.
10475Table 73 — Definition of Types for TPM2B_OPERAND
10476Type
10477
10478Name
10479
10480Description
10481
10482TPM2B_DIGEST
10483
10484TPM2B_OPERAND
10485
10486size limited to the same as the digest structure
10487
1048810.3.7 TPM2B_EVENT
10489This type is a sized buffer that can hold event data.
10490Table 74 — Definition of TPM2B_EVENT Structure
10491Parameter
10492
10493Type
10494
10495Description
10496
10497size
10498
10499UINT16
10500
10501size of the operand buffer
10502
10503buffer [size] {:1024}
10504
10505BYTE
10506
10507the operand
10508
1050910.3.8 TPM2B_MAX_BUFFER
10510This type is a sized buffer that can hold a maximally sized buffer for commands that use a large data
10511buffer
10512such
10513as
10514TPM2_PCR_Event(),
10515TPM2_Hash(),
10516TPM2_SequenceUpdate(),
10517or
10518TPM2_FieldUpgradeData().
10519NOTE
10520
10521The above list is not comprehensive and other commands may use this buffer type.
10522
10523Table 75 — Definition of TPM2B_MAX_BUFFER Structure
10524Parameter
10525
10526Type
10527
10528Description
10529
10530size
10531
10532UINT16
10533
10534size of the buffer
10535
10536buffer [size] {:MAX_DIGEST_BUFFER}
10537
10538BYTE
10539
10540the operand
10541NOTE
10542MAX_DIGEST_BUFFER
10543is
10544TPMdependent but is required to be at least 1,024.
10545
1054610.3.9 TPM2B_MAX_NV_BUFFER
10547This type is a sized buffer that can hold a maximally sized buffer for NV data commands such as
10548TPM2_NV_Read(), TPM2_NV_Write(), and TPM2_NV_Certify().
10549Table 76 — Definition of TPM2B_MAX_NV_BUFFER Structure
10550Parameter
10551
10552Type
10553
10554Description
10555
10556size
10557
10558UINT16
10559
10560size of the buffer
10561
10562buffer [size] {:MAX_NV_BUFFER_SIZE}
10563
10564BYTE
10565
10566the operand
10567NOTE
10568MAX_NV_BUFFER_SIZE
10569dependent
10570
10571Page 84
10572October 31, 2013
10573
10574Published
10575Copyright © TCG 2006-2013
10576
10577is
10578
10579TPM-
10580
10581Family “2.0”
10582Level 00 Revision 00.99
10583
10584Trusted Platform Module Library
10585
10586Part 2: Structures
10587
1058810.3.10 TPM2B_TIMEOUT
10589This TPM-dependent structure is used to provide the timeout value for an authorization.
10590Table 77 — Definition of TPM2B_TIMEOUT Structure <IN/OUT>
10591Parameter
10592
10593Type
10594
10595Description
10596
10597size
10598
10599UINT16
10600
10601size of the timeout value
10602This value is fixed for a TPM implementation.
10603
10604buffer [size] {:sizeof(UINT64)}
10605
10606BYTE
10607
10608the timeout value
10609
1061010.3.11 TPM2B_IV
10611This structure is used for passing an initial value for a symmetric block cipher to or from the TPM. The
10612size is set to be the largest block size of any implemented symmetric cipher implemented on the TPM.
10613Table 78 — Definition of TPM2B_IV Structure <IN/OUT>
10614Parameter
10615
10616Type
10617
10618Description
10619
10620size
10621
10622UINT16
10623
10624size of the timeout value
10625This value is fixed for a TPM implementation.
10626
10627buffer [size] {:MAX_SYM_BLOCK_SIZE}
10628
10629BYTE
10630
10631the timeout value
10632
1063310.4 Names
1063410.4.1 Introduction
10635The Name of an entity is used in place of the handle in authorization computations. The substitution
10636occurs in cpHash and policyHash computations.
10637For an entity that is defined by a public area (objects and NV Indexes), the Name is the hash of the public
10638structure that defines the entity. The hash is done using the nameAlg of the entity.
10639NOTE
10640
10641For an object, a TPMT_PUBLIC defines the entity. For an NV Index, a TPMS_NV_PUBLIC defines the
10642entity.
10643
10644For entities not defined by a public area, the Name is the handle that is used to refer to the entity.
1064510.4.2 TPMU_NAME
10646Table 79 — Definition of TPMU_NAME Union <>
10647Parameter
10648
10649Type
10650
10651digest
10652
10653TPMT_HA
10654
10655when the Name is a digest
10656
10657handle
10658
10659TPM_HANDLE
10660
10661when the Name is a handle
10662
10663Family “2.0”
10664Level 00 Revision 00.99
10665
10666Selector
10667
10668Description
10669
10670Published
10671Copyright © TCG 2006-2013
10672
10673Page 85
10674October 31, 2013
10675
10676Part 2: Structures
10677
10678Trusted Platform Module Library
10679
1068010.4.3 TPM2B_NAME
10681This buffer holds a Name for any entity type.
10682The type of Name in the structure is determined by context and the size parameter. If size is four, then
10683the Name is a handle. If size is zero, then no Name is present. Otherwise, the size shall be the size of a
10684TPM_ALG_ID plus the size of the digest produced by the indicated hash algorithm.
10685Table 80 — Definition of TPM2B_NAME Structure
10686Parameter
10687
10688Type
10689
10690Description
10691
10692size
10693
10694UINT16
10695
10696size of the Name structure
10697
10698name[size]{:sizeof(TPMU_NAME)}
10699
10700BYTE
10701
10702the Name structure
10703
1070410.5 PCR Structures
1070510.5.1 TPMS_PCR_SELECT
10706This structure provides a standard method of specifying a list of PCR.
10707PCR numbering starts at zero.
10708PcrSelect is an array of octets. The octet containing the bit corresponding to a specific PCR is found by
10709dividing the PCR number by 8.
10710EXAMPLE 1
10711
10712The bit in pcrSelect corresponding to PCR 19 is in pcrSelect [2] (19/8 = 2).
10713
10714The least significant bit in a octet is bit number 0. The bit in the octet associated with a PCR is the
10715remainder after division by 8.
10716EXAMPLE 2
10717
10718The bit in pcrSelect [2] corresponding to PCR 19 is bit 3 (19 mod 8). If sizeofSelect is 3, then the
10719pcrSelect array that would specify PCR 19 and no other PCR is 00 00 08 16.
10720
10721Each bit in pcrSelect indicates whether the corresponding PCR is selected (1) or not (0). If the pcrSelect
10722is all zero bits, then no PCR is selected.
10723SizeofSelect indicates the number of octets in pcrSelect. The allowable values for sizeofSelect is
10724determined by the number of PCR required by the applicable platform-specific specification and the
10725number of PCR implemented in the TPM. The minimum value for sizeofSelect is:
10726PCR_SELECT_MIN ≔ (PLATFORM_PCR + 7) / 8
10727
10728(1)
10729
10730where
10731PLATFORM_PCR
10732
10733the number of PCR required by the platform-specific specification
10734
10735The maximum value for sizeofSelect is:
10736PCR_SELECT_MAX ≔ (IMPLEMENTATION_PCR + 7) / 8
10737
10738(2)
10739
10740where
10741IMPLEMENTATION_PCR
10742
10743Page 86
10744October 31, 2013
10745
10746the number of PCR implemented on the TPM
10747
10748Published
10749Copyright © TCG 2006-2013
10750
10751Family “2.0”
10752Level 00 Revision 00.99
10753
10754Trusted Platform Module Library
10755
10756Part 2: Structures
10757
10758If the TPM implements more PCR than there are bits in pcrSelect, the additional PCR are not selected.
10759EXAMPLE 3
10760
10761If the applicable platform-specific specification requires that the TPM have a minimum of 24 PCR but the
10762TPM implements 32, then a PCR select of 3 octets would imply that PCR 24-31 are not selected.
10763
10764Table 81 — Definition of TPMS_PCR_SELECT Structure
10765Parameter
10766
10767Type
10768
10769Description
10770
10771sizeofSelect {PCR_SELECT_MIN:}
10772
10773UINT8
10774
10775the size in octets of the pcrSelect array
10776
10777pcrSelect [sizeofSelect] {:PCR_SELECT_MAX}
10778
10779BYTE
10780
10781the bit map of selected PCR
10782
10783#TPM_RC_VALUE
10784
1078510.5.2 TPMS_PCR_SELECTION
10786Table 82 — Definition of TPMS_PCR_SELECTION Structure
10787Parameter
10788
10789Type
10790
10791Description
10792
10793hash
10794
10795TPMI_ALG_HASH
10796
10797the hash algorithm associated with the
10798selection
10799
10800sizeofSelect {PCR_SELECT_MIN:}
10801
10802UINT8
10803
10804the size in octets of the pcrSelect array
10805
10806pcrSelect [sizeofSelect] {:PCR_SELECT_MAX}
10807
10808BYTE
10809
10810the bit map of selected PCR
10811
10812#TPM_RC_VALUE
10813
1081410.6 Tickets
1081510.6.1 Introduction
10816Tickets are evidence that the TPM has previously processed some information. A ticket is an HMAC over
10817the data using a secret key known only to the TPM. A ticket is a way to expand the state memory of the
10818TPM. A ticket is only usable by the TPM that produced it.
10819The formulations for tickets shown in this clause are to be used by a TPM that is compliant with this
10820specification.
10821The method of creating the ticket data is:
10822
10823HMACcontexAlg(proof, (ticketType || param { || param {…}))
10824
10825(3)
10826
10827where
10828
10829HMACcontexAlg()
10830
10831an HMAC using the hash used for context integrity
10832
10833proof
10834
10835a TPM secret value (depends on hierarchy)
10836
10837ticketType
10838
10839a value to differentiate the tickets
10840
10841param
10842
10843one or more values that were checked by the TPM
10844
10845Family “2.0”
10846Level 00 Revision 00.99
10847
10848Published
10849Copyright © TCG 2006-2013
10850
10851Page 87
10852October 31, 2013
10853
10854Part 2: Structures
10855
10856Trusted Platform Module Library
10857
10858The proof value used for each hierarchy is shown in Table 83.
10859Table 83 — Values for proof Used in Tickets
10860Hierarchy
10861
10862proof
10863
10864Description
10865
10866None
10867
10868Empty Buffer
10869
10870Platform
10871
10872phProof
10873
10874a value that changes with each change of the PPS
10875
10876Owner
10877
10878shProof
10879
10880a value that changes with each change of the SPS
10881
10882Endorsement
10883
10884ehProof
10885
10886a value that changes with each change of either the EPS or SPS
10887
10888The format for a ticket is shown in Table 84. This is a template for the tickets shown in the remainder of
10889this clause.
10890Table 84 — General Format of a Ticket
10891Parameter
10892
10893Type
10894
10895Description
10896
10897tag
10898
10899TPM_ST
10900
10901structure tag indicating the type of the ticket
10902
10903hierarchy
10904
10905TPMI_RH_HIERARCHY+
10906
10907the hierarchy of the proof value
10908
10909digest
10910
10911TPM2B_DIGEST
10912
10913the HMAC over the ticket-specific data
10914
1091510.6.2 A NULL Ticket
10916When a command requires a ticket and no ticket is available, the caller is required to provide a structure
10917with a ticket tag that is correct for the context. The hierarchy shall be set to TPM_RH_NULL, and digest
10918shall be the Empty Buffer (a buffer with a size field of zero). This construct is the NULL Ticket. When a
10919response indicates that a ticket is returned, the TPM may return a NULL Ticket.
10920NOTE
10921
10922Because each use of a ticket requires that the structure tag for the ticket be appropriate for the use, t here
10923is no single representation of a NULL Ticket that will work in all circumstances. Minimally, a NULL ticket
10924will have a structure type that is appropriate for the context.
10925
10926Page 88
10927October 31, 2013
10928
10929Published
10930Copyright © TCG 2006-2013
10931
10932Family “2.0”
10933Level 00 Revision 00.99
10934
10935Trusted Platform Module Library
10936
10937Part 2: Structures
10938
1093910.6.3 TPMT_TK_CREATION
10940This ticket is produced by TPM2_Create() or TPM2_CreatePrimary(). It is used to bind the creation data
10941to the object to which it applies. The ticket is computed by
10942
10943HMACcontextAlg(proof, (TPM_ST_CREATION || name || HnameAlg(TPMS_CREATION_DATA)))
10944
10945(4)
10946
10947where
10948
10949HMACcontextAlg()
10950
10951an HMAC using the context integrity hash algorithm
10952
10953proof
10954
10955a TPM secret value associated with the hierarchy associated with name
10956
10957TPM_ST_CREATION
10958
10959a value used to ensure that the ticket is properly used
10960
10961name
10962
10963the Name of the object to which the creation data is to be associated
10964
10965HnameAlg()
10966
10967hash using the nameAlg of the created object
10968
10969TPMS_CREATION_DATA the creation data structure associated with name
10970Table 85 — Definition of TPMT_TK_CREATION Structure
10971Parameter
10972
10973Type
10974
10975Description
10976
10977tag {TPM_ST_CREATION}
10978
10979TPM_ST
10980
10981ticket structure tag
10982error returned when tag is not TPM_ST_CREATION
10983
10984#TPM_RC_TAG
10985hierarchy
10986
10987TPMI_RH_HIERARCHY+
10988
10989the hierarchy containing name
10990
10991digest
10992
10993TPM2B_DIGEST
10994
10995This shall be the HMAC produced using a proof value
10996of hierarchy.
10997
10998EXAMPLE
10999
11000A NULL Creation Ticket is the tuple <TPM_ST_CREATION, TPM_RH_NULL, 0x0000>.
11001
11002Family “2.0”
11003Level 00 Revision 00.99
11004
11005Published
11006Copyright © TCG 2006-2013
11007
11008Page 89
11009October 31, 2013
11010
11011Part 2: Structures
11012
11013Trusted Platform Module Library
11014
1101510.6.4 TPMT_TK_VERIFIED
11016This ticket is produced by TPM2_VerifySignature(). This formulation is used for multiple ticket uses. The
11017ticket provides evidence that the TPM has validated that a digest was signed by a key with the Name of
11018keyName. The ticket is computed by
11019
11020HMACcontextAlg(proof, (TPM_ST_VERIFIED || digest || keyName))
11021
11022(5)
11023
11024where
11025
11026HMACcontextAlg()
11027
11028an HMAC using the context integrity hash
11029
11030proof
11031
11032a TPM secret value associated with the hierarchy associated with
11033
11034TPM_ST_VERIFIED
11035
11036a value used to ensure that the ticket is properly used
11037
11038digest
11039
11040the signed digest
11041
11042keyName
11043
11044Name of the key that signed digest
11045
11046keyName
11047
11048Table 86 — Definition of TPMT_TK_VERIFIED Structure
11049Parameter
11050
11051Type
11052
11053Description
11054
11055tag {TPM_ST_VERIFIED}
11056
11057TPM_ST
11058
11059ticket structure tag
11060error returned when tag is not TPM_ST_VERIFIED
11061
11062#TPM_RC_TAG
11063hierarchy
11064
11065TPMI_RH_HIERARCHY+
11066
11067the hierarchy containing keyName
11068
11069digest
11070
11071TPM2B_DIGEST
11072
11073This shall be the HMAC produced using a proof value
11074of hierarchy.
11075
11076EXAMPLE
11077
11078A NULL Verified Ticket is the tuple <TPM_ST_VERIFIED, TPM_RH_NULL, 0x0000>.
11079
11080Page 90
11081October 31, 2013
11082
11083Published
11084Copyright © TCG 2006-2013
11085
11086Family “2.0”
11087Level 00 Revision 00.99
11088
11089Trusted Platform Module Library
11090
11091Part 2: Structures
11092
1109310.6.5 TPMT_TK_AUTH
11094This ticket is produced by TPM2_PolicySigned() and TPM2_PolicySecret() when the authorization has an
11095expiration time. The ticket is computed by
11096
11097HMACcontextAlg(proof, (TPM_ST_AUTH_xxx || timeout || cpHash || policyRef || keyName))
11098
11099(6)
11100
11101where
11102
11103HMACcontextAlg()
11104
11105an HMAC using the context integrity hash
11106
11107proof
11108
11109a TPM secret value associated with the hierarchy of the key associated
11110with keyName
11111
11112TPM_ST_AUTH_xxx
11113
11114either TPM_ST_AUTH_SIGNED or TPM_ST_AUTH_SECRET; used to
11115ensure that the ticket is properly used
11116
11117timeout
11118
11119implementation-specific value indicating when the authorization expires
11120
11121cpHash
11122
11123optional hash of the authorized command
11124
11125policyRef
11126
11127optional reference to a policy value
11128
11129keyName
11130
11131Name of the key that signed the authorization
11132Table 87 — Definition of TPMT_TK_AUTH Structure
11133
11134Parameter
11135
11136Type
11137
11138Description
11139
11140tag {TPM_ST_AUTH_SIGNED, TPM_ST_AUTH_SECRET} TPM_ST
11141
11142ticket structure tag
11143
11144#TPM_RC_TAG
11145
11146error returned when tag is
11147not TPM_ST_AUTH
11148
11149hierarchy
11150
11151TPMI_RH_HIERARCHY+
11152
11153the hierarchy of the object
11154used to produce the ticket
11155
11156digest
11157
11158TPM2B_DIGEST
11159
11160This shall be the HMAC
11161produced using a proof
11162value of hierarchy.
11163
11164EXAMPLE
11165
11166A NULL Auth Ticket is the tuple <TPM_ST_AUTH_SIGNED, TPM_RH_NULL, 0x0000> or the tuple
11167<TPM_ST_AUTH_SIGNED, TPM_RH_NULL, 0x0000>
11168
11169Family “2.0”
11170Level 00 Revision 00.99
11171
11172Published
11173Copyright © TCG 2006-2013
11174
11175Page 91
11176October 31, 2013
11177
11178Part 2: Structures
11179
11180Trusted Platform Module Library
11181
1118210.6.6 TPMT_TK_HASHCHECK
11183This ticket is produced by TPM2_SequenceComplete() when the message that was digested did not start
11184with TPM_GENERATED_VALUE. The ticket is computed by
11185
11186HMACcontexAlg(proof, (TPM_ST_HASHCHECK || digest))
11187
11188(7)
11189
11190where
11191
11192HMACcontexAlg ()
11193
11194an HMAC using the context integrity hash
11195
11196proof
11197
11198a TPM secret value associated with the hierarchy indicated by the
11199command
11200
11201TPM_ST_HASHCHECK
11202
11203a value used to ensure that the ticket is properly used
11204
11205digest
11206
11207the digest of the data
11208Table 88 — Definition of TPMT_TK_HASHCHECK Structure
11209
11210Parameter
11211
11212Type
11213
11214Description
11215
11216tag {TPM_ST_HASHCHECK}
11217
11218TPM_ST
11219
11220ticket structure tag
11221
11222#TPM_RC_TAG
11223
11224error returned when is not TPM_ST_HASHCHECK
11225
11226hierarchy
11227
11228TPMI_RH_HIERARCHY+
11229
11230the hierarchy
11231
11232digest
11233
11234TPM2B_DIGEST
11235
11236This shall be the HMAC produced using a proof value
11237of hierarchy.
11238
1123910.7 Property Structures
1124010.7.1 TPMS_ALG_PROPERTY
11241This structure is used to report the properties of an algorithm identifier. It is returned in response to a
11242TPM2_GetCapability() with capability = TPM_CAP_ALG.
11243Table 89 — Definition of TPMS_ALG_PROPERTY Structure <OUT>
11244Parameter
11245
11246Type
11247
11248Description
11249
11250alg
11251
11252TPM_ALG_ID
11253
11254an algorithm identifier
11255
11256algProperties
11257
11258TPMA_ALGORITHM
11259
11260the attributes of the algorithm
11261
1126210.7.2 TPMS_TAGGED_PROPERTY
11263This structure is used to report the properties that are UINT32 values. It is returned in response to a
11264TPM2_GetCapability().
11265Table 90 — Definition of TPMS_TAGGED_PROPERTY Structure <OUT>
11266Parameter
11267
11268Type
11269
11270Description
11271
11272property
11273
11274TPM_PT
11275
11276a property identifier
11277
11278value
11279
11280UINT32
11281
11282the value of the property
11283
11284Page 92
11285October 31, 2013
11286
11287Published
11288Copyright © TCG 2006-2013
11289
11290Family “2.0”
11291Level 00 Revision 00.99
11292
11293Trusted Platform Module Library
11294
11295Part 2: Structures
11296
1129710.7.3 TPMS_TAGGED_PCR_SELECT
11298This structure is used in TPM2_GetCapability() to return the attributes of the PCR.
11299Table 91 — Definition of TPMS_TAGGED_PCR_SELECT Structure <OUT>
11300Parameter
11301
11302Type
11303
11304Description
11305
11306tag
11307
11308TPM_PT
11309
11310the property identifier
11311
11312sizeofSelect {PCR_SELECT_MIN:}
11313
11314UINT8
11315
11316the size in octets of the pcrSelect array
11317
11318pcrSelect [sizeofSelect] {:PCR_SELECT_MAX}
11319
11320BYTE
11321
11322the bit map of PCR with the identified property
11323
1132410.8 Lists
1132510.8.1 TPML_CC
11326A list of command codes may be input to the TPM or returned by the TPM depending on the command.
11327Table 92 — Definition of TPML_CC Structure
11328Parameter
11329
11330Type
11331
11332Description
11333
11334count
11335
11336UINT32
11337
11338number of commands in the commandCode list;
11339may be 0
11340
11341commandCodes[count]{:MAX_CAP_CC}
11342
11343TPM_CC
11344
11345a list of command codes
11346The maximum only applies to a command code
11347list in a command. The response size is limited
11348only by the size of the parameter buffer.
11349
11350#TPM_RC_SIZE
11351
11352Family “2.0”
11353Level 00 Revision 00.99
11354
11355response code when count is greater than the
11356maximum allowed list size
11357
11358Published
11359Copyright © TCG 2006-2013
11360
11361Page 93
11362October 31, 2013
11363
11364Part 2: Structures
11365
11366Trusted Platform Module Library
11367
1136810.8.2 TPML_CCA
11369This list is only used in TPM2_GetCapability(capability = TPM_CAP_COMMANDS).
11370The values in the list are returned in commandIndex order with vendor-specific commands returned after
11371other commands. Because of the other attributes, the commands may not be returned in strict numerical
11372order. They will be in commandIndex order.
11373Table 93 — Definition of TPML_CCA Structure <OUT>
11374Parameter
11375
11376Type
11377
11378Description
11379
11380count
11381
11382UINT32
11383
11384number of values in the commandAttributes list;
11385may be 0
11386
11387commandAttributes[count]{:MAX_CAP_CC}
11388
11389TPMA_CC
11390
11391a list of command codes attributes
11392
1139310.8.3 TPML_ALG
11394This list is returned by TPM2_IncrementalSelfTest().
11395Table 94 — Definition of TPML_ALG Structure
11396Parameter
11397
11398Type
11399
11400Description
11401
11402count
11403
11404UINT32
11405
11406number of algorithms in the algorithms list; may be 0
11407
11408algorithms[count]{:MAX_ALG_LIST_SIZE}
11409
11410TPM_ALG_ID a list of algorithm IDs
11411The maximum only applies to an algorithm list in a
11412command. The response size is limited only by the
11413size of the parameter buffer.
11414response code when count is greater than the
11415maximum allowed list size
11416
11417#TPM_RC_SIZE
11418
1141910.8.4 TPML_HANDLE
11420This structure is used when the TPM returns a list of loaded handles when the capability in
11421TPM2_GetCapability() is TPM_CAP_HANDLE.
11422NOTE
11423
11424This list is not used as input to the TPM.
11425
11426Table 95 — Definition of TPML_HANDLE Structure <OUT>
11427Name
11428
11429Type
11430
11431Description
11432
11433count
11434
11435UINT32
11436
11437the number of handles in the list
11438may have a value of 0
11439
11440handle[count]{: MAX_CAP_HANDLES}
11441
11442TPM_HANDLE
11443
11444an array of handles
11445
11446#TPM_RC_SIZE
11447
11448Page 94
11449October 31, 2013
11450
11451response code when count is greater than the
11452maximum allowed list size
11453
11454Published
11455Copyright © TCG 2006-2013
11456
11457Family “2.0”
11458Level 00 Revision 00.99
11459
11460Trusted Platform Module Library
11461
11462Part 2: Structures
11463
1146410.8.5 TPML_DIGEST
11465This list is used to convey a list of digest values. This type is used in TPM2_PolicyOR() and in
11466TPM2_PCR_Read().
11467Table 96 — Definition of TPML_DIGEST Structure
11468Parameter
11469
11470Type
11471
11472Description
11473
11474count {2:}
11475
11476UINT32
11477
11478number of digests in the list, minimum is two for
11479TPM2_PolicyOR().
11480
11481digests[count]{:8}
11482
11483TPM2B_DIGEST a list of digests
11484For TPM2_PolicyOR(), all digests will have been
11485computed using the digest of the policy session. For
11486TPM2_PCR_Read(), each digest will be the size of the
11487digest for the bank containing the PCR.
11488
11489#TPM_RC_SIZE
11490
11491response code when count is not at least two or is
11492greater than eight
11493
1149410.8.6 TPML_DIGEST_VALUES
11495This list is used to convey a list of digest values. This type is returned by TPM2_Event() and
11496TPM2_SequenceComplete() and is an input for TPM2_PCR_Extend().
11497NOTE 1
11498
11499This construct limits the number of hashes in the list to the number of digests implemented in the TPM
11500rather than the number of PCR banks. This allows extra values to appear in a call t o
11501TPM2_PCR_Extend().
11502
11503NOTE 2
11504
11505The digest for an unimplemented hash algorithm may not be in a list because the TPM may not recognize
11506the algorithm as being a hash and it may not know the digest size.
11507
11508Table 97 — Definition of TPML_DIGEST_VALUES Structure
11509Parameter
11510
11511Type
11512
11513Description
11514
11515count
11516
11517UINT32
11518
11519number of digests in the list
11520
11521digests[count]{:HASH_COUNT}
11522
11523TPMT_HA
11524
11525a list of tagged digests
11526response code when count is greater than the possible
11527number of banks
11528
11529#TPM_RC_SIZE
11530
1153110.8.7 TPM2B_DIGEST_VALUES
11532Digest list in a sized buffer. This list is returned by TPM2_PCR_SequenceComplete().
11533Table 98 — Definition of TPM2B_DIGEST_VALUES Structure
11534Parameter
11535
11536Type
11537
11538Description
11539
11540size
11541
11542UINT16
11543
11544size of the operand buffer
11545
11546buffer [size] {:sizeof(TPML_DIGEST_VALUES)}
11547
11548BYTE
11549
11550the operand
11551
11552Family “2.0”
11553Level 00 Revision 00.99
11554
11555Published
11556Copyright © TCG 2006-2013
11557
11558Page 95
11559October 31, 2013
11560
11561Part 2: Structures
11562
11563Trusted Platform Module Library
11564
1156510.8.8 TPML_PCR_SELECTION
11566This list is used to indicate the PCR that are included in a selection when more than one PCR value may
11567be selected.
11568This structure is an input parameter to TPM2_PolicyPCR() to indicate the PCR that will be included in the
11569digest of PCR for the authorization. The structure is used in TPM2_PCR_Read() command to indicate the
11570PCR values to be returned and in the response to indicate which PCR are included in the list of returned
11571digests. The structure is an output parameter from TPM2_Create() and indicates the PCR used in the
11572digest of the PCR state when the object was created. The structure is also contained in the attestation
11573structure of TPM2_Quote().
11574When this structure is used to select PCR to be included in a digest, the selected PCR are concatenated
11575to create a “message” containing all of the PCR, and then the message is hashed using the contextspecific hash algorithm.
11576Table 99 — Definition of TPML_PCR_SELECTION Structure
11577Parameter
11578
11579Type
11580
11581Description
11582
11583count
11584
11585UINT32
11586
11587number of selection structures
11588A value of zero is allowed.
11589
11590pcrSelections[count]{:HASH_COUNT}
11591
11592TPMS_PCR_SELECTION
11593
11594list of selections
11595response code when count is greater
11596than the possible number of banks
11597
11598#TPM_RC_SIZE
11599
1160010.8.9 TPML_ALG_PROPERTY
11601This list is used to report on a list of algorithm attributes. It is returned in a TPM2_GetCapability().
11602Table 100 — Definition of TPML_ALG_PROPERTY Structure <OUT>
11603Parameter
11604
11605Type
11606
11607Description
11608
11609count
11610
11611UINT32
11612
11613number of algorithm properties structures
11614A value of zero is allowed.
11615
11616algProperties[count]{:MAX_CAP_ALGS}
11617
11618TPMS_ALG_PROPERTY
11619
11620list of properties
11621
1162210.8.10 TPML_TAGGED_TPM_PROPERTY
11623This list is used to report on a list of properties that are TPMS_TAGGED_PROPERTY values. It is
11624returned by a TPM2_GetCapability().
11625Table 101 — Definition of TPML_TAGGED_TPM_PROPERTY Structure <OUT>
11626Parameter
11627
11628Type
11629
11630Description
11631
11632count
11633
11634UINT32
11635
11636number of properties
11637A value of zero is allowed.
11638
11639tpmProperty[count]{:MAX_TPM_PROPERTIES} TPMS_TAGGED_PROPERTY
11640
11641Page 96
11642October 31, 2013
11643
11644Published
11645Copyright © TCG 2006-2013
11646
11647an array of tagged properties
11648
11649Family “2.0”
11650Level 00 Revision 00.99
11651
11652Trusted Platform Module Library
11653
11654Part 2: Structures
11655
1165610.8.11 TPML_TAGGED_PCR_PROPERTY
11657This list is used to report on a list of properties that are TPMS_PCR_SELECT values. It is returned by a
11658TPM2_GetCapability().
11659Table 102 — Definition of TPML_TAGGED_PCR_PROPERTY Structure <OUT>
11660Parameter
11661
11662Type
11663
11664Description
11665
11666count
11667
11668UINT32
11669
11670number of properties
11671A value of zero is allowed.
11672
11673pcrProperty[count]{:MAX_PCR_PROPERTIES}
11674
11675TPMS_TAGGED_PCR_SELECT a tagged PCR selection
11676
1167710.8.12 TPML_ECC_CURVE
11678This list is used to report the ECC curve ID values supported by the TPM. It is returned by a
11679TPM2_GetCapability().
11680Table 103 — Definition of {ECC} TPML_ECC_CURVE Structure <OUT>
11681Parameter
11682
11683Type
11684
11685Description
11686
11687count
11688
11689UINT32
11690
11691number of curves
11692A value of zero is allowed.
11693
11694eccCurves[count]{:MAX_ECC_CURVES}
11695
11696TPM_ECC_CURVE
11697
11698array of ECC curve identifiers
11699
1170010.9 Capabilities Structures
1170110.9.1 TPMU_CAPABILITIES
11702Table 104 — Definition of TPMU_CAPABILITIES Union <OUT>
11703Parameter
11704
11705Type
11706
11707Selector
11708
11709algorithms
11710
11711TPML_ALG_PROPERTY
11712
11713TPM_CAP_ALGS
11714
11715handles
11716
11717TPML_HANDLE
11718
11719TPM_CAP_HANDLES
11720
11721command
11722
11723TPML_CCA
11724
11725TPM_CAP_COMMANDS
11726
11727ppCommands
11728
11729TPML_CC
11730
11731TPM_CAP_PP_COMMANDS
11732
11733auditCommands
11734
11735TPML_CC
11736
11737TPM_CAP_AUDIT_COMMANDS
11738
11739assignedPCR
11740
11741TPML_PCR_SELECTION
11742
11743TPM_CAP_PCRS
11744
11745tpmProperties
11746
11747TPML_TAGGED_TPM_PROPERTY
11748
11749TPM_CAP_TPM_PROPERTIES
11750
11751pcrProperties
11752
11753TPML_TAGGED_PCR_PROPERTY
11754
11755TPM_CAP_PCR_PROPERTIES
11756
11757eccCurves
11758
11759TPML_ECC_CURVE
11760
11761TPM_CAP_ECC_CURVES
11762
11763Family “2.0”
11764Level 00 Revision 00.99
11765
11766Published
11767Copyright © TCG 2006-2013
11768
11769Description
11770
11771TPM_ALG_ECC
11772
11773Page 97
11774October 31, 2013
11775
11776Part 2: Structures
11777
11778Trusted Platform Module Library
11779
1178010.9.2 TPMS_CAPABILITY_DATA
11781This data area is returned in response to a TPM2_GetCapability().
11782Table 105 — Definition of TPMS_CAPABILITY_DATA Structure <OUT>
11783Parameter
11784
11785Type
11786
11787Description
11788
11789capability
11790
11791TPM_CAP
11792
11793the capability
11794
11795[capability]data
11796
11797TPMU_CAPABILITIES
11798
11799the capability data
11800
1180110.10 Clock/Counter Structures
1180210.10.1 TPMS_CLOCK_INFO
11803This structure is used in each of the attestation commands.
11804Table 106 — Definition of TPMS_CLOCK_INFO Structure
11805Parameter
11806
11807Type
11808
11809Description
11810
11811clock
11812
11813UINT64
11814
11815time in milliseconds during which the TPM has been powered
11816This structure element is used to report on the TPM's Clock value.
11817The value of Clock shall be recorded in non-volatile memory no
1181822
11819less often than once per 2 milliseconds (~69.9 minutes) of TPM
11820operation. The reference for the millisecond timer is the TPM
11821oscillator.
11822This value is reset to zero when the Storage Primary Seed is
11823changed (TPM2_Clear()).
11824This value may be advanced by TPM2_AdvanceClock().
11825
11826resetCount
11827
11828UINT32
11829
11830number of occurrences of TPM Reset since the last TPM2_Clear()
11831
11832restartCount
11833
11834UINT32
11835
11836number of times that TPM2_Shutdown() or _TPM_Hash_Start have
11837occurred since the last TPM Reset or TPM2_Clear().
11838
11839safe
11840
11841TPMI_YES_NO
11842
11843no value of Clock greater than the current value of Clock has been
11844previously reported by the TPM. Set to YES on TPM2_Clear().
11845
1184610.10.2 Clock
11847Clock is a monotonically increasing counter that advances whenever power is applied to the TPM. The
11848value of Clock may be set forward with TPM2_ClockSet() if ownerAuth or platformAuth is provided. The
11849value of Clock is incremented each millisecond.
11850TPM2_Clear() will set Clock to zero.
11851Clock will be non-volatile but may have a volatile component that is updated every millisecond with the
11852non-volatile component updated at a lower rate. If the implementation uses a volatile component, the non22
11853volatile component shall be updated no less frequently than every 2 milliseconds (~69.9 minutes). The
11854update rate of the non-volatile portion of Clock shall be reported by a TPM2_GetCapability() with
11855capability = TPM_CAP_TPM_PROPERTIES and property = TPM_PT_CLOCK_UPDATE.
1185610.10.3 ResetCount
11857This counter shall increment on each TPM Reset. This counter shall be reset to zero by TPM2_Clear().
11858
11859Page 98
11860October 31, 2013
11861
11862Published
11863Copyright © TCG 2006-2013
11864
11865Family “2.0”
11866Level 00 Revision 00.99
11867
11868Trusted Platform Module Library
11869
11870Part 2: Structures
11871
1187210.10.4 RestartCount
11873This counter shall increment by one for each TPM Restart or TPM Resume. The restartCount shall be
11874reset to zero on a TPM Reset or TPM2_Clear().
1187510.10.5 Safe
11876This parameter is set to YES when the value reported in Clock is guaranteed to be unique for the current
11877Owner. It is set to NO when the value of Clock may have been reported in a previous attestation or
11878access.
11879This parameter will be YES if a TPM2_Startup() was preceded by TPM2_Shutdown() with no intervening
11880commands. It will also be YES after an update of the non-volatile bits of Clock have been updated at the
11881end of an update interval.
11882If a TPM implementation does not implement
11883TPMS_CLOCK_INFO.clock shall always be zero.
11884
11885Clock,
11886
11887Safe
11888
11889shall
11890
11891always
11892
11893be
11894
11895NO
11896
11897and
11898
11899This parameter will be set to YES by TPM2_Clear().
1190010.10.6 TPMS_TIME_INFO
11901This structure is used in the TPM2_TICK attestation.
11902The Time value reported in this structure is reset whenever the TPM is reset. An implementation may
11903reset the value of Time any time after _TPM_Init and before the TPM returns after TPM2_Start(). The
11904value of Time shall increment continuously while power is applied to the TPM.
11905Table 107 — Definition of TPMS_TIME_INFO Structure
11906Parameter
11907
11908Type
11909
11910Description
11911
11912time
11913
11914UINT64
11915
11916time in milliseconds since the last _TPM_Init() or TPM2_Startup()
11917This structure element is used to report on the TPM's Time value.
11918
11919clockInfo
11920
11921TPMS_CLOCK_INFO
11922
11923a structure containing the clock information
11924
11925Family “2.0”
11926Level 00 Revision 00.99
11927
11928Published
11929Copyright © TCG 2006-2013
11930
11931Page 99
11932October 31, 2013
11933
11934Part 2: Structures
11935
11936Trusted Platform Module Library
11937
1193810.11 TPM Attestation Structures
1193910.11.1 Introduction
11940This clause describes the structures that are used when a TPM creates a structure to be signed. The
11941signing structures follow a standard format TPM2B_ATTEST with case-specific information embedded.
1194210.11.2 TPMS_TIME_ATTEST_INFO
11943This structure is used when the TPM performs TPM2_GetClock.
11944Table 108 — Definition of TPMS_TIME_ATTEST_INFO Structure <OUT>
11945Parameter
11946
11947Type
11948
11949Description
11950
11951time
11952
11953TPMS_TIME_INFO
11954
11955the Time, clock, resetCount, restartCount, and Safe indicator
11956
11957firmwareVersion
11958
11959UINT64
11960
11961a vendor-specific value indicating the version number of the
11962firmware
11963
1196410.11.3 TPMS_CERTIFY_INFO
11965This is the attested data for TPM2_Certify().
11966Table 109 — Definition of TPMS_CERTIFY_INFO Structure <OUT>
11967Parameter
11968
11969Type
11970
11971Description
11972
11973name
11974
11975TPM2B_NAME
11976
11977Name of the certified object
11978
11979qualifiedName
11980
11981TPM2B_NAME
11982
11983Qualified Name of the certified object
11984
1198510.11.1 TPMS_QUOTE_INFO
11986This is the attested data for TPM2_Quote().
11987Table 110 — Definition of TPMS_QUOTE_INFO Structure <OUT>
11988Parameter
11989
11990Type
11991
11992Description
11993
11994pcrSelect
11995
11996TPML_PCR_SELECTION
11997
11998information on algID, PCR selected and digest
11999
12000pcrDigest
12001
12002TPM2B_DIGEST
12003
12004digest of the selected PCR using the hash of the signing key
12005
12006Page 100
12007October 31, 2013
12008
12009Published
12010Copyright © TCG 2006-2013
12011
12012Family “2.0”
12013Level 00 Revision 00.99
12014
12015Trusted Platform Module Library
12016
12017Part 2: Structures
12018
1201910.11.2 TPMS_COMMAND_AUDIT_INFO
12020This is the attested data for TPM2_GetCommandAuditDigest().
12021Table 111 — Definition of TPMS_COMMAND_AUDIT_INFO Structure <OUT>
12022Parameter
12023
12024Type
12025
12026Description
12027
12028auditCounter
12029
12030UINT64
12031
12032the monotonic audit counter
12033
12034digestAlg
12035
12036TPM_ALG_ID
12037
12038hash algorithm used for the command audit
12039
12040auditDigest
12041
12042TPM2B_DIGEST
12043
12044the current value of the audit digest
12045
12046commandDigest
12047
12048TPM2B_DIGEST
12049
12050digest of the command codes being audited using digestAlg
12051
1205210.11.3 TPMS_SESSION_AUDIT_INFO
12053This is the attested data for TPM2_GetSessionAuditDigest().
12054Table 112 — Definition of TPMS_SESSION_AUDIT_INFO Structure <OUT>
12055Parameter
12056
12057Type
12058
12059Description
12060
12061exclusiveSession
12062
12063TPMI_YES_NO
12064
12065current exclusive status of the session
12066TRUE if all of the commands recorded in the sessionDigest were
12067executed without any intervening TPM command that did not use
12068this transport session
12069
12070sessionDigest
12071
12072TPM2B_DIGEST
12073
12074the current value of the session audit digest
12075
1207610.11.4 TPMS_CREATION_INFO
12077This is the attested data for TPM2_CertifyCreation().
12078Table 113 — Definition of TPMS_CREATION_INFO Structure <OUT>
12079Parameter
12080
12081Type
12082
12083Description
12084
12085objectName
12086
12087TPM2B_NAME
12088
12089Name of the object
12090
12091creationHash
12092
12093TPM2B_DIGEST
12094
12095creationHash
12096
1209710.11.5 TPMS_NV_CERTIFY_INFO
12098This structure contains the Name and contents of the selected NV Index that is certified by
12099TPM2_NV_Certify().
12100Table 114 — Definition of TPMS_NV_CERTIFY_INFO Structure <OUT>
12101Parameter
12102
12103Type
12104
12105Description
12106
12107indexName
12108
12109TPM2B_NAME
12110
12111Name of the NV Index
12112
12113offset
12114
12115UINT16
12116
12117the offset parameter of TPM2_NV_Certify()
12118
12119nvContents
12120
12121TPM2B_MAX_NV_BUFFER
12122
12123contents of the NV Index
12124
12125Family “2.0”
12126Level 00 Revision 00.99
12127
12128Published
12129Copyright © TCG 2006-2013
12130
12131Page 101
12132October 31, 2013
12133
12134Part 2: Structures
12135
12136Trusted Platform Module Library
12137
1213810.11.6 TPMI_ST_ATTEST
12139Table 115 — Definition of (TPM_ST) TPMI_ST_ATTEST Type <OUT>
12140Value
12141
12142Description
12143
12144TPM_ST_ATTEST_CERTIFY
12145
12146generated by TPM2_Certify()
12147
12148TPM_ST_ATTEST_QUOTE
12149
12150generated by TPM2_Quote()
12151
12152TPM_ST_ATTEST_SESSION_AUDIT
12153
12154generated by TPM2_GetSessionAuditDigest()
12155
12156TPM_ST_ATTEST_COMMAND_AUDIT
12157
12158generated by TPM2_GetCommandAuditDigest()
12159
12160TPM_ST_ATTEST_TIME
12161
12162generated by TPM2_GetTime()
12163
12164TPM_ST_ATTEST_CREATION
12165
12166generated by TPM2_CertifyCreation()
12167
12168TPM_ST_ATTEST_NV
12169
12170generated by TPM2_NV_Certify()
12171
1217210.11.7 TPMU_ATTEST
12173Table 116 — Definition of TPMU_ATTEST Union <OUT>
12174Parameter
12175
12176Type
12177
12178Selector
12179
12180certify
12181
12182TPMS_CERTIFY_INFO
12183
12184TPM_ST_ATTEST_CERTIFY
12185
12186creation
12187
12188TPMS_CREATION_INFO
12189
12190TPM_ST_ATTEST_CREATION
12191
12192quote
12193
12194TPMS_QUOTE_INFO
12195
12196TPM_ST_ATTEST_QUOTE
12197
12198commandAudit
12199
12200TPMS_COMMAND_AUDIT_INFO TPM_ST_ATTEST_COMMAND_AUDIT
12201
12202sessionAudit
12203
12204TPMS_SESSION_AUDIT_INFO
12205
12206TPM_ST_ATTEST_SESSION_AUDIT
12207
12208time
12209
12210TPMS_TIME_ATTEST_INFO
12211
12212TPM_ST_ATTEST_TIME
12213
12214nv
12215
12216TPMS_NV_CERTIFY_INFO
12217
12218TPM_ST_ATTEST_NV
12219
12220Page 102
12221October 31, 2013
12222
12223Published
12224Copyright © TCG 2006-2013
12225
12226Family “2.0”
12227Level 00 Revision 00.99
12228
12229Trusted Platform Module Library
12230
12231Part 2: Structures
12232
1223310.11.8 TPMS_ATTEST
12234This structure is used on each TPM-generated signed structure. The signature is over this structure.
12235When the structure is signed by a key in the Storage hierarchy, the values of clockInfo.resetCount,
12236clockInfo.restartCount, and firmwareVersion are obfuscated with a per-key obfuscation value.
12237Table 117 — Definition of TPMS_ATTEST Structure <OUT>
12238Parameter
12239
12240Type
12241
12242Description
12243
12244magic
12245
12246TPM_GENERATED
12247
12248the indication that this structure was created by a TPM (always
12249TPM_GENERATED_VALUE)
12250
12251type
12252
12253TPMI_ST_ATTEST
12254
12255type of the attestation structure
12256
12257qualifiedSigner
12258
12259TPM2B_NAME
12260
12261Qualified Name of the signing key
12262
12263extraData
12264
12265TPM2B_DATA
12266
12267external information supplied by caller
12268NOTE
12269
12270A TPM2B_DATA structure provides room for a digest and a
12271method indicator to indicate the components of the digest.
12272The definition of this method indicator is outside the scope
12273of this specification.
12274
12275clockInfo
12276
12277TPMS_CLOCK_INFO
12278
12279Clock, resetCount, restartCount, and Safe
12280
12281firmwareVersion
12282
12283UINT64
12284
12285TPM-vendor-specific field identifying the firmware on the TPM
12286
12287[type]attested
12288
12289TPMU_ATTEST
12290
12291the type-specific attestation information
12292
1229310.11.9 TPM2B_ATTEST
12294This sized buffer to contain the signed structure. The attestationData is the signed portion of the structure.
12295The size parameter is not signed.
12296Table 118 — Definition of TPM2B_ATTEST Structure <OUT>
12297Parameter
12298
12299Type
12300
12301Description
12302
12303size
12304
12305UINT16
12306
12307size of the attestationData structure
12308
12309attestationData[size]{:sizeof(TPMS_ATTEST)}
12310
12311BYTE
12312
12313the signed structure
12314
12315Family “2.0”
12316Level 00 Revision 00.99
12317
12318Published
12319Copyright © TCG 2006-2013
12320
12321Page 103
12322October 31, 2013
12323
12324Part 2: Structures
12325
12326Trusted Platform Module Library
12327
1232810.12 Authorization Structures
12329The structures in this clause are used for all authorizations. One or more of these structures will be
12330present in a command or response that has a tag of TPM_ST_SESSIONS.
1233110.12.1 TPMS_AUTH_COMMAND
12332This is the format used for each of the authorizations in the session area of a command.
12333Table 119 — Definition of TPMS_AUTH_COMMAND Structure <IN>
12334Parameter
12335
12336Type
12337
12338Description
12339
12340sessionHandle
12341
12342TPMI_SH_AUTH_SESSION+
12343
12344the session handle
12345
12346nonce
12347
12348TPM2B_NONCE
12349
12350the session nonce, may be the Empty Buffer
12351
12352sessionAttributes
12353
12354TPMA_SESSION
12355
12356the session attributes
12357
12358hmac
12359
12360TPM2B_AUTH
12361
12362either an HMAC, a password, or an EmptyAuth
12363
1236410.12.2 TPMS_AUTH_RESPONSE
12365This is the format for each of the authorizations in the session area of the response. If the TPM returns
12366TPM_RC_SUCCESS, then the session area of the response contains the same number of authorizations
12367as the command and the authorizations are in the same order.
12368Table 120 — Definition of TPMS_AUTH_RESPONSE Structure <OUT>
12369Parameter
12370
12371Type
12372
12373Description
12374
12375nonce
12376
12377TPM2B_NONCE
12378
12379the session nonce, may be the Empty Buffer
12380
12381sessionAttributes
12382
12383TPMA_SESSION
12384
12385the session attributes
12386
12387hmac
12388
12389TPM2B_AUTH
12390
12391either an HMAC, a password, or an EmptyAuth
12392
12393Page 104
12394October 31, 2013
12395
12396Published
12397Copyright © TCG 2006-2013
12398
12399Family “2.0”
12400Level 00 Revision 00.99
12401
12402Trusted Platform Module Library
12403
12404Part 2: Structures
12405
1240611 Algorithm Parameters and Structures
1240711.1 Symmetric
1240811.1.1 Introduction
12409This clause defines the parameters and structures for describing symmetric algorithms.
1241011.1.2 TPMI_AES_KEY_BITS
12411This interface type defines the supported sizes for an AES key. This type is used to allow the
12412unmarshaling routine to generate the proper validation code for the supported key sizes. An
12413implementation that supports different key sizes would have a different set of selections.
12414When used in TPM2_StartAuthSession(), the mode parameter shall be TPM_ALG_CFB.
12415NOTE 1
12416
12417Key size is expressed in bits.
12418
12419NOTE 2
12420
12421The definition for AES_KEY_SIZES_BITS used in the reference implementation is found in Annex B
12422
12423Table 121 — Definition of {AES} (TPM_KEY_BITS) TPMI_AES_KEY_BITS Type
12424Parameter
12425
12426Description
12427
12428$AES_KEY_SIZES_BITS
12429
12430number of bits in the key
12431
12432#TPM_RC_VALUE
12433
12434error when key size is not supported
12435
1243611.1.3 TPMI_SM4_KEY_BITS
12437This interface type defines the supported sizes for an SM4 key. This type is used to allow the
12438unmarshaling routine to generate the proper validation code for the supported key sizes. An
12439implementation that supports different key sizes would have a different set of selections.
12440NOTE
12441
12442SM4 only supports a key size of 128 bits.
12443
12444Table 122 — Definition of {SM4} (TPM_KEY_BITS) TPMI_SM4_KEY_BITS Type
12445Parameter
12446
12447Description
12448
12449$SM4_KEY_SIZES_BITS
12450
12451number of bits in the key
12452
12453#TPM_RC_VALUE
12454
12455Family “2.0”
12456Level 00 Revision 00.99
12457
12458Published
12459Copyright © TCG 2006-2013
12460
12461Page 105
12462October 31, 2013
12463
12464Part 2: Structures
12465
12466Trusted Platform Module Library
12467
1246811.1.4 TPMU_SYM_KEY_BITS
12469This union is used to collect the symmetric encryption key sizes.
12470The xor entry is a hash algorithms selector and not a key size in bits. This overload is used in order to
12471avoid an additional level of indirection with another union and another set of selectors.
12472The xor entry is only selected in a TPMT_SYM_DEF, which is used to select the parameter encryption
12473value.
12474Table 123 — Definition of TPMU_SYM_KEY_BITS Union
12475Parameter
12476
12477Type
12478
12479Selector
12480
12481aes
12482
12483TPMI_AES_KEY_BITS
12484
12485TPM_ALG_AES
12486
12487SM4
12488
12489TPMI_SM4_KEY_BITS
12490
12491TPM_ALG_SM4
12492
12493sym
12494
12495TPM_KEY_BITS
12496
12497xor
12498
12499TPMI_ALG_HASH
12500
12501Description
12502
12503when selector may be any of the
12504symmetric block ciphers
12505TPM_ALG_XOR
12506
12507overload for using xor
12508NOTE
12509
12510null
12511
12512TPM_ALG_NULL
12513allowed
12514
12515is
12516
12517not
12518
12519TPM_ALG_NULL
12520
1252111.1.5 TPMU_SYM_MODE
12522This union allows the mode value in a TPMT_SYM_DEF or TPMT_SYM_DEF_OBJECT to be empty.
12523Table 124 — Definition of TPMU_SYM_MODE Union
12524Parameter
12525
12526Type
12527
12528Selector
12529
12530Description
12531
12532aes
12533
12534TPMI_ALG_SYM_MODE
12535
12536TPM_ALG_AES
12537
12538NOTE
12539
12540TPM_ALG_NULL
12541allowed
12542
12543is
12544
12545not
12546
12547SM4
12548
12549TPMI_ALG_SYM_MODE
12550
12551TPM_ALG_SM4
12552
12553NOTE
12554
12555TPM_ALG_NULL
12556allowed
12557
12558is
12559
12560not
12561
12562sym
12563
12564TPMI_ALG_SYM_MODE
12565
12566when selector may be any of the
12567symmetric block ciphers
12568
12569xor
12570
12571TPM_ALG_XOR
12572
12573no mode selector
12574
12575null
12576
12577TPM_ALG_NULL
12578
12579no mode selector
12580
12581Page 106
12582October 31, 2013
12583
12584Published
12585Copyright © TCG 2006-2013
12586
12587Family “2.0”
12588Level 00 Revision 00.99
12589
12590Trusted Platform Module Library
12591
12592Part 2: Structures
12593
1259411.1.6 TPMU_SYM_DETAILS
12595This union allows additional parameters to be added for a symmetric cipher. Currently, no additional
12596parameters are required for any of the symmetric algorithms.
12597NOTE
12598
12599The “x” character in the table title will suppress generation of this type as the parser is not, at this time,
12600able to generate the proper values (a union of all empty data types). When an algorithm is added that
12601requires additional parameterization, the Type column will contain a value and the “x” may be removed.
12602
12603Table 125 — xDefinition of TPMU_SYM_DETAILS Union
12604Parameter
12605
12606Type
12607
12608Selector
12609
12610aes
12611
12612TPM_ALG_AES
12613
12614SM4
12615
12616Description
12617
12618TPM_ALG_SM4
12619
12620sym
12621
12622when selector may be any of the
12623symmetric block ciphers
12624
12625xor
12626
12627TPM_ALG_XOR
12628
12629null
12630
12631TPM_ALG_NULL
12632
1263311.1.7 TPMT_SYM_DEF
12634The TPMT_SYM_DEF structure is used to select an algorithm to be used for parameter encryption in
12635those cases when different symmetric algorithms may be selected.
12636Table 126 — Definition of TPMT_SYM_DEF Structure
12637Parameter
12638
12639Type
12640
12641Description
12642
12643algorithm
12644
12645+TPMI_ALG_SYM
12646
12647indicates a symmetric algorithm
12648
12649[algorithm]keyBits
12650
12651TPMU_SYM_KEY_BITS
12652
12653a supported key size
12654
12655[algorithm]mode
12656
12657TPMU_SYM_MODE
12658
12659the mode for the key
12660
12661//[algorithm]details
12662
12663TPMU_SYM_DETAILS
12664
12665contains additional algorithm details
12666NOTE
12667
12668This is commented out at this time as the parser
12669may not produce the proper code for a union if
12670none of the selectors produces any data.
12671
1267211.1.8 TPMT_SYM_DEF_OBJECT
12673This structure is used when different symmetric block cipher (not XOR) algorithms may be selected.
12674Table 127 — Definition of TPMT_SYM_DEF_OBJECT Structure
12675Parameter
12676
12677Type
12678
12679Description
12680
12681algorithm
12682
12683+TPMI_ALG_SYM_OBJECT
12684
12685selects a symmetric block cipher
12686
12687[algorithm]keyBits
12688
12689TPMU_SYM_KEY_BITS
12690
12691the key size
12692
12693[algorithm]mode
12694
12695TPMU_SYM_MODE
12696
12697default mode
12698
12699//[algorithm]details
12700
12701TPMU_SYM_DETAILS
12702
12703contains the additional algorithm details, if any
12704NOTE
12705
12706Family “2.0”
12707Level 00 Revision 00.99
12708
12709This is commented out at this time as the parser
12710may not produce the proper code for a union if
12711none of the selectors produces any data.
12712
12713Published
12714Copyright © TCG 2006-2013
12715
12716Page 107
12717October 31, 2013
12718
12719Part 2: Structures
12720
12721Trusted Platform Module Library
12722
1272311.1.9 TPM2B_SYM_KEY
12724This structure is used to hold a symmetric key in the sensitive area of an asymmetric object.
12725The number of bits in the key is in keyBits in the public area. When keyBits is not an even multiple of 8
12726bits, the unused bits of buffer will be the most significant bits of buffer[0] and size will be rounded up to
12727the number of octets required to hold all bits of the key.
12728Table 128 — Definition of TPM2B_SYM_KEY Structure
12729Parameter
12730
12731Type
12732
12733Description
12734
12735size
12736
12737UINT16
12738
12739size, in octets, of the buffer containing the key; may be
12740zero
12741
12742buffer [size] {:MAX_SYM_KEY_BYTES}
12743
12744BYTE
12745
12746the key
12747
1274811.1.10 TPMS_SYMCIPHER_PARMS
12749This structure contains the parameters for a symmetric block cipher object.
12750Table 129 — Definition of TPMS_SYMCIPHER_PARMS Structure
12751Parameter
12752
12753Type
12754
12755Description
12756
12757sym
12758
12759TPMT_SYM_DEF_OBJECT
12760
12761a symmetric block cipher
12762
1276311.1.11 TPM2B_SENSITIVE_DATA
12764This buffer holds the secret data of a data object. It can hold as much as 128 octets of data.
12765MAX_SYM_DATA shall be 128.
12766NOTE
12767
12768A named value rather than a numeric is used to make coding clearer. A numeric value does not indicate
12769the reason that it has the specific value that is has.
12770
12771Table 130 — Definition of TPM2B_SENSITIVE_DATA Structure
12772Parameter
12773
12774Type
12775
12776size
12777
12778UINT16
12779
12780buffer[size]{: MAX_SYM_DATA}
12781
12782BYTE
12783
12784Page 108
12785October 31, 2013
12786
12787Description
12788
12789the keyed hash private data structure
12790
12791Published
12792Copyright © TCG 2006-2013
12793
12794Family “2.0”
12795Level 00 Revision 00.99
12796
12797Trusted Platform Module Library
12798
12799Part 2: Structures
12800
1280111.1.12 TPMS_SENSITIVE_CREATE
12802This structure defines the values to be placed in the sensitive area of a created object. This structure is
12803only used within a TPM2B_SENSITIVE_CREATE structure.
12804NOTE
12805
12806When sent to the TPM or unsealed, data is usually encrypted using parameter encryption.
12807
12808If data.size is not zero, and the object is not a keyedHash, data.size must match the size indicated in the
12809keySize of public.parameters. If the object is a keyedHash, data.size may be any value up to the
12810maximum allowed in a TPM2B_SENSITIVE_DATA.
12811For an asymmetric object, data shall be an Empty Buffer and sensitiveDataOrigin shall be SET.
12812Table 131 — Definition of TPMS_SENSITIVE_CREATE Structure <IN>
12813Parameter
12814
12815Type
12816
12817Description
12818
12819userAuth
12820
12821TPM2B_AUTH
12822
12823the USER auth secret value
12824
12825data
12826
12827TPM2B_SENSITIVE_DATA
12828
12829data to be sealed
12830
12831Family “2.0”
12832Level 00 Revision 00.99
12833
12834Published
12835Copyright © TCG 2006-2013
12836
12837Page 109
12838October 31, 2013
12839
12840Part 2: Structures
12841
12842Trusted Platform Module Library
12843
1284411.1.13 TPM2B_SENSITIVE_CREATE
12845This structure contains the sensitive creation data in a sized buffer. This structure is defined so that both
12846the userAuth and data values of the TPMS_SENSITIVE_CREATE may be passed as a single parameter
12847for parameter encryption purposes.
12848Table 132 — Definition of TPM2B_SENSITIVE_CREATE Structure <IN, S>
12849Parameter
12850
12851Type
12852
12853Description
12854
12855size=
12856
12857UINT16
12858
12859size of sensitive in octets (may not be zero)
12860NOTE
12861
12862sensitive
12863
12864TPMS_SENSITIVE_CREATE
12865
12866The userAuth and data parameters in this buffer
12867may both be zero length but the minimum size of
12868this parameter will be the sum of the size fields of
12869the
12870two
12871parameters
12872of
12873the
12874TPMS_SENSITIVE_CREATE.
12875
12876data to be sealed or a symmetric key value.
12877
1287811.1.14 TPMS_SCHEME_SIGHASH
12879This structure is the scheme data for schemes that only require a hash to complete the scheme definition.
12880Table 133 — Definition of TPMS_SCHEME_SIGHASH Structure
12881Parameter
12882
12883Type
12884
12885Description
12886
12887hashAlg
12888
12889TPMI_ALG_HASH
12890
12891the hash algorithm used to digest the message
12892
1289311.1.15 TPMI_ALG_HASH_SCHEME
12894This is the list of values that may appear in a keyedHash as the scheme parameter.
12895Table 134 — Definition of (TPM_ALG_ID) TPMI_ALG_KEYEDHASH_SCHEME Type
12896Values
12897
12898Comments
12899
12900TPM_ALG_HMAC
12901
12902the "signing" scheme
12903
12904TPM_ALG_XOR
12905
12906the "obfuscation" scheme
12907
12908+TPM_ALG_NULL
12909#TPM_RC_VALUE
12910
1291111.1.16 HMAC_SIG_SCHEME
12912Table 135 — Definition of Types for HMAC_SIG_SCHEME
12913Type
12914
12915Name
12916
12917TPMS_SCHEME_SIGHASH
12918
12919TPMS_SCHEME_HMAC
12920
12921Page 110
12922October 31, 2013
12923
12924Description
12925
12926Published
12927Copyright © TCG 2006-2013
12928
12929Family “2.0”
12930Level 00 Revision 00.99
12931
12932Trusted Platform Module Library
12933
12934Part 2: Structures
12935
1293611.1.17 TPMS_SCHEME_XOR
12937This structure is for the XOR encryption scheme.
12938Table 136 — Definition of TPMS_SCHEME_XOR Structure
12939Parameter
12940
12941Type
12942
12943Description
12944
12945hashAlg
12946
12947+TPMI_ALG_HASH
12948
12949the hash algorithm used to digest the message
12950
12951kdf
12952
12953TPMI_ALG_KDF
12954
12955the key derivation function
12956
1295711.1.18 TPMU_SCHEME_HMAC
12958Table 137 — Definition of TPMU_SCHEME_KEYEDHASH Union <IN/OUT, S>
12959Parameter
12960
12961Type
12962
12963Selector
12964
12965Description
12966
12967hmac
12968
12969TPMS_SCHEME_HMAC
12970
12971TPM_ALG_HMAC
12972
12973the "signing" scheme
12974
12975xor
12976
12977TPMS_SCHEME_XOR
12978
12979TPM_ALG_XOR
12980
12981the "obfuscation" scheme
12982
12983null
12984
12985TPM_ALG_NULL
12986
1298711.1.19 TPMT_KEYEDHASH_SCHEME
12988This structure is used for a hash signing object.
12989Table 138 — Definition of TPMT_KEYEDHASH_SCHEME Structure
12990Parameter
12991
12992Type
12993
12994Description
12995
12996scheme
12997
12998+TPMI_ALG_KEYEDHASH_SCHEME
12999
13000selects the scheme
13001
13002[scheme]details
13003
13004TPMU_SCHEME_KEYEDHASH
13005
13006the scheme parameters
13007
13008Family “2.0”
13009Level 00 Revision 00.99
13010
13011Published
13012Copyright © TCG 2006-2013
13013
13014Page 111
13015October 31, 2013
13016
13017Part 2: Structures
13018
13019Trusted Platform Module Library
13020
1302111.2 Asymmetric
1302211.2.1 Signing Schemes
1302311.2.1.1
13024
13025Introduction
13026
13027These structures are used to define the method in which the signature is to be created. These schemes
13028would appear in an object’s public area and in commands where the signing scheme is variable.
13029Every scheme is required to indicate a hash that is used in digesting the message.
1303011.2.1.2
13031
13032RSA_SIG_SCHEMES
13033
13034These are the RSA schemes that only need a hash algorithm as a scheme parameter.
13035For the TPM_ALG_RSAPSS signing scheme, the same hash algorithm is used for digesting TPMgenerated data (an attestation structure) and in the KDF used for the masking operation. The salt size is
13036always the largest salt value that will fit into the available space.
13037Table 139 — Definition of {RSA} Types for RSA_SIG_SCHEMES
13038Type
13039
13040Name
13041
13042Description
13043
13044TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSASSA
13045TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSAPSS
13046
1304711.2.1.3
13048
13049ECC_SIG_SCHEMES
13050
13051These are the ECC schemes that only need a hash algorithm as a controlling parameter.
13052Table 140 — Definition of {ECC} Types for ECC_SIG_SCHEMES
13053Type
13054
13055Name
13056
13057Description
13058
13059TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECDSA
13060TPMS_SCHEME_SIGHASH TPMS_SCHEME_SM2
13061TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECSCHNORR
13062
1306311.2.1.4 TPMS_SCHEME_ECDAA
13064Table 141 — Definition of {ECC} TPMS_SCHEME_ECDAA Structure
13065Parameter
13066
13067Type
13068
13069Description
13070
13071hashAlg
13072
13073TPMI_ALG_HASH
13074
13075the hash algorithm used to digest the message
13076
13077count
13078
13079UINT16
13080
13081the counter value that is used between TPM2_Commit() and the sign
13082operation
13083
13084Page 112
13085October 31, 2013
13086
13087Published
13088Copyright © TCG 2006-2013
13089
13090Family “2.0”
13091Level 00 Revision 00.99
13092
13093Trusted Platform Module Library
1309411.2.1.5
13095
13096Part 2: Structures
13097
13098TPMU_SIG_SCHEME
13099Table 142 — Definition of TPMU_SIG_SCHEME Union <IN/OUT, S>
13100
13101Parameter
13102
13103Type
13104
13105Selector
13106
13107Description
13108
13109rsassa
13110
13111TPMS_SCHEME_RSASSA
13112
13113TPM_ALG_RSASSA
13114
13115the PKCS#1v1.5 scheme
13116
13117rsapss
13118
13119TPMS_SCHEME_RSAPSS
13120
13121TPM_ALG_RSAPSS
13122
13123the PKCS#1v2.1 PSS scheme
13124
13125ecdsa
13126
13127TPMS_SCHEME_ECDSA
13128
13129TPM_ALG_ECDSA
13130
13131the ECDSA scheme
13132
13133sm2
13134
13135TPMS_SCHEME_SM2
13136
13137TPM_ALG_SM2
13138
13139ECDSA from SM2
13140
13141ecdaa
13142
13143TPMS_SCHEME_ECDAA
13144
13145TPM_ALG_ECDAA
13146
13147the ECDAA scheme
13148
13149ecSchnorr
13150
13151TPMS_SCHEME_ECSCHNORR
13152
13153TPM_ALG_ECSCHNORR
13154
13155the EC Schnorr
13156
13157hmac
13158
13159TPMS_SCHEME_HMAC
13160
13161TPM_ALG_HMAC
13162
13163the HMAC scheme
13164
13165any
13166
13167TPMS_SCHEME_SIGHASH
13168
13169null
13170
1317111.2.1.6
13172
13173selector that allows access to
13174digest for any signing scheme
13175TPM_ALG_NULL
13176
13177no scheme or default
13178
13179TPMT_SIG_SCHEME
13180Table 143 — Definition of TPMT_SIG_SCHEME Structure
13181
13182Parameter
13183
13184Type
13185
13186Description
13187
13188scheme
13189
13190+TPMI_ALG_SIG_SCHEME
13191
13192scheme selector
13193
13194[scheme]details
13195
13196TPMU_SIG_SCHEME
13197
13198scheme parameters
13199
13200Family “2.0”
13201Level 00 Revision 00.99
13202
13203Published
13204Copyright © TCG 2006-2013
13205
13206Page 113
13207October 31, 2013
13208
13209Part 2: Structures
13210
13211Trusted Platform Module Library
13212
1321311.2.2 Encryption Schemes
1321411.2.2.1
13215
13216Introduction
13217
13218These structures are used to indicate the hash algorithm used for the encrypting process. These
13219schemes would appear in an object’s public area.
1322011.2.2.2
13221
13222TPMS_SCHEME_OAEP
13223Table 144 — Definition of {RSA} TPMS_SCHEME_OAEP Structure
13224
13225Parameter
13226
13227Type
13228
13229Description
13230
13231hashAlg
13232
13233+TPMI_ALG_HASH
13234
13235the hash algorithm used to digest the message
13236
1323711.2.2.3
13238
13239TPMS_SCHEME_ECDH
13240
13241For ECDH, KDFe is used for the key derivation function that only a hash algorithm is needed to complete
13242the definition.
13243Table 145 — Definition of {ECC} TPMS_SCHEME_ECDH Structure
13244Parameter
13245
13246Type
13247
13248Description
13249
13250hashAlg
13251
13252+TPMI_ALG_HASH
13253
13254the hash algorithm used in the KDF
13255
1325611.2.3 Key Derivation Schemes
1325711.2.3.1
13258
13259Introduction
13260
13261These structures are used to define the key derivation for symmetric secret sharing using asymmetric
13262methods. A secret shareing scheme is required in any asymmetric key with the decrypt attribute SET.
13263These schemes would appear in an object’s public area and in commands where the secret sharing
13264scheme is variable.
13265Each scheme includes a symmetric algorithm and a KDF selection.
1326611.2.3.2
13267
13268TPMS_SCHEME_MGF1
13269Table 146 — Definition of TPMS_SCHEME_MGF1 Structure
13270
13271Parameter
13272
13273Type
13274
13275Description
13276
13277hashAlg
13278
13279TPMI_ALG_HASH
13280
13281the hash algorithm used in the KDF
13282
1328311.2.3.3
13284
13285TPMS_SCHEME_KDF1_SP800_56a
13286Table 147 — Definition of {ECC} TPMS_SCHEME_KDF1_SP800_56a Structure
13287
13288Parameter
13289
13290Type
13291
13292Description
13293
13294hashAlg
13295
13296TPMI_ALG_HASH
13297
13298the hash algorithm used in the KDF
13299
13300Page 114
13301October 31, 2013
13302
13303Published
13304Copyright © TCG 2006-2013
13305
13306Family “2.0”
13307Level 00 Revision 00.99
13308
13309Trusted Platform Module Library
1331011.2.3.4
13311
13312Part 2: Structures
13313
13314TPMS_SCHEME_KDF2
13315Table 148 — Definition of TPMS_SCHEME_KDF2 Structure
13316
13317Parameter
13318
13319Type
13320
13321Description
13322
13323hashAlg
13324
13325TPMI_ALG_HASH
13326
13327the hash algorithm used in the KDF
13328
1332911.2.3.5
13330
13331TPMS_SCHEME_KDF1_SP800_108
13332Table 149 — Definition of TPMS_SCHEME_KDF1_SP800_108 Structure
13333
13334Parameter
13335
13336Type
13337
13338Description
13339
13340hashAlg
13341
13342TPMI_ALG_HASH
13343
13344the hash algorithm used in the KDF
13345
1334611.2.3.6
13347
13348TPMU_KDF_SCHEME
13349Table 150 — Definition of TPMU_KDF_SCHEME Union <IN/OUT, S>
13350
13351Parameter
13352
13353Type
13354
13355Selector
13356
13357mgf1
13358
13359TPMS_SCHEME_MGF1
13360
13361TPM_ALG_MGF1
13362
13363kdf1_SP800_56a TPMS_SCHEME_KDF1_SP800_56a
13364
13365TPM_ALG_KDF1_SP800_56a
13366
13367kdf2
13368
13369TPMS_SCHEME_KDF2
13370
13371TPM_ALG_KDF2
13372
13373kdf1_sp800_108
13374
13375TPMS_SCHEME_KDF1_SP800_108
13376
13377Description
13378
13379TPM_ALG_KDF1_SP800_108
13380
13381null
13382
1338311.2.3.7
13384
13385TPM_ALG_NULL
13386
13387TPMT_KDF_SCHEME
13388Table 151 — Definition of TPMT_KDF_SCHEME Structure
13389
13390Parameter
13391
13392Type
13393
13394Description
13395
13396scheme
13397
13398+TPMI_ALG_KDF
13399
13400scheme selector
13401
13402[scheme]details
13403
13404TPMU_KDF_SCHEME
13405
13406scheme parameters
13407
13408Family “2.0”
13409Level 00 Revision 00.99
13410
13411Published
13412Copyright © TCG 2006-2013
13413
13414Page 115
13415October 31, 2013
13416
13417Part 2: Structures
1341811.2.3.8
13419
13420Trusted Platform Module Library
13421
13422TPMI_ALG_ASYM_SCHEME
13423
13424List of all of the scheme types for any asymmetric algorithm. This is used to define the
13425TPMT_ASYM_SCHEME.
13426Table 152 — Definition of (TPM_ALG_ID) TPMI_ALG_ASYM_SCHEME Type <>
13427Values
13428
13429Comments
13430
13431TPM_ALG_RSASSA
13432
13433list of the allowed values
13434
13435TPM_ALG_RSAPSS
13436TPM_ALG_RSAES
13437TPM_ALG_OAEP
13438TPM_ALG_ECDSA
13439TPM_ALG_SM2
13440TPM_ALG_ECDAA
13441TPM_ALG_ECDH
13442+TPM_ALG_NULL
13443#TPM_RC_VALUE
13444
1344511.2.3.9
13446
13447TPMU_ASYM_SCHEME
13448
13449This union of all asymmetric schemes is used in each of the asymmetric scheme structures. The actual
13450scheme structure is defined by the interface type used for the selector.
13451EXAMPLE
13452
13453The TPMT_RSA_SCHEME structure uses the TPMU_ASYM_SCHEME union but the selector type is
13454TPMI_ALG_RSA_SCHEME. This means that the only elements of the union that can be selected for th e
13455TPMT_RSA_SCHEME are those that are in TPMI_RSA_SCHEME.
13456
13457Table 153 — Definition of TPMU_ASYM_SCHEME Union
13458Parameter
13459
13460Type
13461
13462Selector
13463
13464Description
13465
13466rsassa
13467
13468TPMS_SCHEME_RSASSA
13469
13470TPM_ALG_RSASSA
13471
13472the PKCS#1v1.5 scheme
13473
13474rsapss
13475
13476TPMS_SCHEME_RSAPSS
13477
13478TPM_ALG_RSAPSS
13479
13480the PKCS#1v2.1 PSS scheme
13481
13482TPM_ALG_RSAES
13483
13484the PKCS#1v2.1 RSAES scheme
13485
13486rsaes
13487oaep
13488
13489TPMS_SCHEME_OAEP
13490
13491TPM_ALG_OAEP
13492
13493the PKSC#1v2.1 OAEP scheme
13494
13495ecdsa
13496
13497TPMS_SCHEME_ECDSA
13498
13499TPM_ALG_ECDSA
13500
13501an ECDSA scheme
13502
13503sm2
13504
13505TPMS_SCHEME_SM2
13506
13507TPM_ALG_SM2
13508
13509sign or key exchange from SM2
13510
13511ecdaa
13512
13513TPMS_SCHEME_ECDAA
13514
13515TPM_ALG_ECDAA
13516
13517an ECDAA scheme
13518
13519ecSchnorr
13520
13521TPMS_SCHEME_ECSCHNORR
13522
13523TPM_ALG_ECSCHNORR elliptic curve Schnorr signature
13524
13525ecdh
13526anySig
13527
13528TPM_ALG_ECDH
13529TPMS_SCHEME_SIGHASH
13530
13531null
13532
13533Page 116
13534October 31, 2013
13535
13536TPM_ALG_NULL
13537
13538Published
13539Copyright © TCG 2006-2013
13540
13541no scheme or default
13542This selects the NULL Signature.
13543
13544Family “2.0”
13545Level 00 Revision 00.99
13546
13547Trusted Platform Module Library
13548
13549Part 2: Structures
13550
1355111.2.3.10 TPMT_ASYM_SCHEME
13552This structure is defined to allow overlay of all of the schemes for any asymmetric object. This structure is
13553not sent on the interface.
13554Table 154 — Definition of TPMT_ASYM_SCHEME Structure <>
13555Parameter
13556
13557Type
13558
13559Description
13560
13561scheme
13562
13563+TPMI_ALG_ASYM_SCHEME
13564
13565scheme selector
13566
13567[scheme]details
13568
13569TPMU_ASYM_SCHEME
13570
13571scheme parameters
13572
1357311.2.4 RSA
1357411.2.4.1
13575
13576TPMI_ALG_RSA_SCHEME
13577
13578The list of values that may appear in the scheme parameter of a TPMS_RSA_PARMS structure.
13579Table 155 — Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_SCHEME Type
13580Values
13581
13582Comments
13583
13584TPM_ALG_RSASSA
13585
13586list of the allowed values
13587
13588TPM_ALG_RSAPSS
13589TPM_ALG_RSAES
13590TPM_ALG_OAEP
13591+TPM_ALG_NULL
13592#TPM_RC_VALUE
13593
1359411.2.4.2
13595
13596TPMT_RSA_SCHEME
13597Table 156 — Definition of {RSA} TPMT_RSA_SCHEME Structure
13598
13599Parameter
13600
13601Type
13602
13603Description
13604
13605scheme
13606
13607+TPMI_ALG_RSA_SCHEME
13608
13609scheme selector
13610
13611[scheme]details
13612
13613TPMU_ASYM_SCHEME
13614
13615scheme parameters
13616
13617Family “2.0”
13618Level 00 Revision 00.99
13619
13620Published
13621Copyright © TCG 2006-2013
13622
13623Page 117
13624October 31, 2013
13625
13626Part 2: Structures
1362711.2.4.3
13628
13629Trusted Platform Module Library
13630
13631TPMI_ALG_RSA_DECRYPT
13632
13633The list of values that are allowed in a decryption scheme selection as used in TPM2_RSA_Encrypt() and
13634TPM2_RSA_Decrypt().
13635Table 157 — Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_DECRYPT Type
13636Values
13637
13638Comments
13639
13640TPM_ALG_RSAES
13641TPM_ALG_OAEP
13642+TPM_ALG_NULL
13643#TPM_RC_VALUE
13644
1364511.2.4.4
13646
13647TPMT_RSA_DECRYPT
13648Table 158 — Definition of {RSA} TPMT_RSA_DECRYPT Structure
13649
13650Parameter
13651
13652Type
13653
13654Description
13655
13656scheme
13657
13658+TPMI_ALG_RSA_DECRYPT
13659
13660scheme selector
13661
13662[scheme]details
13663
13664TPMU_ASYM_SCHEME
13665
13666scheme parameters
13667
1366811.2.4.5
13669
13670TPM2B_PUBLIC_KEY_RSA
13671
13672This sized buffer holds the largest RSA public key supported by the TPM.
13673NOTE
13674
13675The reference implementation only supports key sizes of 1,024 and 2,048 bits.
13676
13677Table 159 — Definition of {RSA} TPM2B_PUBLIC_KEY_RSA Structure
13678Parameter
13679
13680Type
13681
13682Description
13683
13684size
13685
13686UINT16
13687
13688size of the buffer
13689The value of zero is only valid for create.
13690
13691buffer[size] {: MAX_RSA_KEY_BYTES}
13692
13693BYTE
13694
13695Value
13696
1369711.2.4.6
13698
13699TPMI_RSA_KEY_BITS
13700
13701This holds the value that is the maximum size allowed for an RSA key.
13702NOTE 1
13703
13704An implementation is allowed to provide limited support for smaller RSA key sizes. That is, a TPM may be
13705able to accept a smaller RSA key size in TPM2_LoadExternal() when only the public area is loaded but
13706not accept that smaller key size in any command that loads both the public and private portions of an RSA
13707key. This would allow the TPM to validate signatures using the smaller key but would prevent the TPM
13708from using the smaller key size for any other purpose.
13709
13710NOTE 2
13711
13712The definition for RSA_KEY_SIZES_BITS used in the reference implementation is found in Annex B
13713
13714Page 118
13715October 31, 2013
13716
13717Published
13718Copyright © TCG 2006-2013
13719
13720Family “2.0”
13721Level 00 Revision 00.99
13722
13723Trusted Platform Module Library
13724
13725Part 2: Structures
13726
13727Table 160 — Definition of {RSA} (TPM_KEY_BITS) TPMI_RSA_KEY_BITS Type
13728Parameter
13729
13730Description
13731
13732$RSA_KEY_SIZES_BITS
13733
13734the number of bits in the supported key
13735
13736#TPM_RC_VALUE
13737
13738error when key size is not supported
13739
1374011.2.4.7
13741
13742TPM2B_PRIVATE_KEY_RSA
13743
13744This sized buffer holds the largest RSA prime number supported by the TPM.
13745NOTE
13746
13747All primes are required to have exactly half the number of significant bits as the public modulus , and the
13748square of each prime is required to have the same number of significant bits as the public modulus.
13749
13750Table 161 — Definition of {RSA} TPM2B_PRIVATE_KEY_RSA Structure
13751Parameter
13752
13753Type
13754
13755size
13756
13757UINT16
13758
13759buffer[size]{:MAX_RSA_KEY_BYTES/2}
13760
13761BYTE
13762
13763Family “2.0”
13764Level 00 Revision 00.99
13765
13766Description
13767
13768Published
13769Copyright © TCG 2006-2013
13770
13771Page 119
13772October 31, 2013
13773
13774Part 2: Structures
13775
13776Trusted Platform Module Library
13777
1377811.2.5 ECC
1377911.2.5.1
13780
13781TPM2B_ECC_PARAMETER
13782
13783This sized buffer holds the largest ECC parameter (coordinate) supported by the TPM.
13784Table 162 — Definition of {ECC} TPM2B_ECC_PARAMETER Structure
13785Parameter
13786
13787Type
13788
13789Description
13790
13791size
13792
13793UINT16
13794
13795size of buffer
13796
13797buffer[size] {:MAX_ECC_KEY_BYTES}
13798
13799BYTE
13800
13801the parameter data
13802
1380311.2.5.2
13804
13805TPMS_ECC_POINT
13806
13807This structure holds two ECC coordinates that, together, make up an ECC point.
13808Table 163 — Definition of {ECC} TPMS_ECC_POINT Structure
13809Parameter
13810
13811Type
13812
13813Description
13814
13815x
13816
13817TPM2B_ECC_PARAMETER
13818
13819X coordinate
13820
13821y
13822
13823TPM2B_ECC_PARAMETER
13824
13825Y coordinate
13826
1382711.2.5.3
13828
13829TPM2B_ECC_POINT
13830
13831This structure is defined to allow a point to be a single sized parameter so that it may be encrypted.
13832NOTE
13833
13834If the point is to be omitted, the X and Y coordinates need to be individual ly set to Empty Buffers. The
13835minimum value for size will be four. It is checked indirectly by unmarshaling of the TPMS_ECC_POINT. If
13836the type of point were BYTE, then size could have been zero. However, this would complicate the process
13837of marshaling the structure.
13838
13839Table 164 — Definition of {ECC} TPM2B_ECC_POINT Structure
13840Parameter
13841
13842Type
13843
13844Description
13845
13846size=
13847
13848UINT16
13849
13850size of the remainder of this structure
13851
13852point
13853
13854TPMS_ECC_POINT
13855
13856coordinates
13857error returned if the unmarshaled size of point is
13858not exactly equal to size
13859
13860#TPM_RC_SIZE
13861
13862Page 120
13863October 31, 2013
13864
13865Published
13866Copyright © TCG 2006-2013
13867
13868Family “2.0”
13869Level 00 Revision 00.99
13870
13871Trusted Platform Module Library
1387211.2.5.4
13873
13874Part 2: Structures
13875
13876TPMI_ALG_ECC_SCHEME
13877Table 165 — Definition of (TPM_ALG_ID) {ECC} TPMI_ALG_ECC_SCHEME Type
13878
13879Values
13880
13881Comments
13882
13883TPM_ALG_ECDSA
13884
13885these are the selections allowed for an ECC key
13886
13887TPM_ALG_SM2
13888TPM_ALG_ECDAA
13889TPM_ALG_ECSCHNORR
13890TPM_ALG_ECDH
13891+TPM_ALG_NULL
13892#TPM_RC_SCHEME
13893
1389411.2.5.5
13895
13896TPMI_ECC_CURVE
13897
13898The ECC curves implemented by the TPM.
13899NOTE
13900
13901The definition of ECC_CURVES used in the reference implementation is found in Annex B
13902
13903Table 166 — Definition of {ECC} (TPM_ECC_CURVE) TPMI_ECC_CURVE Type
13904Parameter
13905
13906Description
13907
13908$ECC_CURVES
13909
13910the list of implemented curves
13911
13912#TPM_RC_CURVE
13913
13914error when curve is not supported
13915
1391611.2.5.6
13917
13918TPMT_ECC_SCHEME
13919
13920Table 167 — Definition of (TPMT_SIG_SCHEME) {ECC} TPMT_ECC_SCHEME Structure
13921Parameter
13922
13923Type
13924
13925Description
13926
13927scheme
13928
13929+TPMI_ALG_ECC_SCHEME
13930
13931scheme selector
13932
13933[scheme]details
13934
13935TPMU_SIG_SCHEME
13936
13937scheme parameters
13938
13939Family “2.0”
13940Level 00 Revision 00.99
13941
13942Published
13943Copyright © TCG 2006-2013
13944
13945Page 121
13946October 31, 2013
13947
13948Part 2: Structures
1394911.2.5.7
13950
13951Trusted Platform Module Library
13952
13953TPMS_ALGORITHM_DETAIL_ECC
13954
13955This structure is used to report on the curve parameters of an ECC curve. It is returned by
13956TPM2_ECC_Parameters().
13957Table 168 — Definition of {ECC} TPMS_ALGORITHM_DETAIL_ECC Structure <OUT>
13958Parameter
13959
13960Type
13961
13962Description
13963
13964curveID
13965
13966TPM_ECC_CURVE
13967
13968identifier for the curve
13969
13970keySize
13971
13972UINT16
13973
13974Size in bits of the key
13975
13976kdf
13977
13978TPMT_KDF_SCHEME
13979
13980the default KDF and hash algorithm used in secret sharing
13981operations
13982
13983sign
13984
13985TPMT_ECC_SCHEME+
13986
13987If not TPM_ALG_NULL, this is the mandatory signature
13988scheme that is required to be used with this curve.
13989
13990p
13991
13992TPM2B_ECC_PARAMETER
13993
13994Fp (the modulus)
13995
13996a
13997
13998TPM2B_ECC_PARAMETER
13999
14000coefficient of the linear term in the curve equation
14001
14002b
14003
14004TPM2B_ECC_PARAMETER
14005
14006constant term for curve equation
14007
14008gX
14009
14010TPM2B_ECC_PARAMETER
14011
14012x coordinate of base point G
14013
14014gY
14015
14016TPM2B_ECC_PARAMETER
14017
14018y coordinate of base point G
14019
14020n
14021
14022TPM2B_ECC_PARAMETER
14023
14024order of G
14025
14026h
14027
14028TPM2B_ECC_PARAMETER
14029
14030cofactor (a size of zero indicates a cofactor of 1)
14031
1403211.3 Signatures
1403311.3.1 TPMS_SIGNATURE_RSASSA
14034Table 169 — Definition of {RSA} TPMS_SIGNATURE_RSASSA Structure
14035Parameter
14036
14037Type
14038
14039Description
14040
14041hash
14042
14043TPMI_ALG_HASH
14044
14045the hash algorithm used to digest the message
14046TPM_ALG_NULL is not allowed.
14047
14048sig
14049
14050TPM2B_PUBLIC_KEY_RSA
14051
14052The signature is the size of a public key.
14053
1405411.3.2 TPMS_SIGNATURE_RSAPSS
14055When the TPM generates a PSS signature, the salt size is the largest size allowed by the key and hash
14056combination.
14057EXAMPLE
14058
14059For a 2,048-bit public modulus key and SHA1 hash, the salt size is 256 – 20 – 2 = 234 octets.
14060
14061NOTE
14062
14063While this is significantly larger than required from a securit y perspective, it avoids issues of whether a
14064particular size of salt value is sufficient.
14065
14066Page 122
14067October 31, 2013
14068
14069Published
14070Copyright © TCG 2006-2013
14071
14072Family “2.0”
14073Level 00 Revision 00.99
14074
14075Trusted Platform Module Library
14076
14077Part 2: Structures
14078
14079Table 170 — Definition of {RSA} TPMS_SIGNATURE_RSAPSS Structure
14080Parameter
14081
14082Type
14083
14084Description
14085
14086hash
14087
14088TPMI_ALG_HASH
14089
14090the hash algorithm used in the signature process
14091TPM_ALG_NULL is not allowed.
14092
14093sig
14094
14095TPM2B_PUBLIC_KEY_RSA
14096
14097The signature is the size of a public key.
14098
1409911.3.3 TPMS_SIGNATURE_ECDSA
14100Table 171 — Definition of {ECC} TPMS_SIGNATURE_ECDSA Structure
14101Parameter
14102
14103Type
14104
14105Description
14106
14107hash
14108
14109TPMI_ALG_HASH
14110
14111the hash algorithm used in the signature process
14112TPM_ALG_NULL is not allowed.
14113
14114signatureR
14115
14116TPM2B_ECC_PARAMETER
14117
14118signatureS
14119
14120TPM2B_ECC_PARAMETER
14121
1412211.3.4 TPMU_SIGNATURE
14123A TPMU_SIGNATURE_COMPOSITE is a union of the various signatures that is supported by a particular
14124TPM implementation. The union allows substitution of any signature algorithm wherever a signature is
14125required in a structure. Table 172 is an illustration of a TPMU_SIGNATURE for a TPM that implements
14126both RSA and ECC signing.
14127NOTE 1
14128
14129All TPM are required to support a hash algorithm and the HMAC algorithm.
14130
14131When a symmetric algorithm is used for signing, the signing algorithm is assumed to be an HMAC based
14132on the indicated hash algorithm. The HMAC key will either be referenced as part of the usage or will be
14133implied by context.
14134NOTE 2
14135
14136The table below is illustrative. It would be modified to reflect the signatures produced by the TPM.
14137
14138Table 172 — Definition of TPMU_SIGNATURE Union <IN/OUT, S>
14139Parameter
14140
14141Type
14142
14143Selector
14144
14145Description
14146
14147rsassa
14148
14149TPMS_SIGNATURE_RSASSA
14150
14151TPM_ALG_RSASSA
14152
14153a PKCS#1v1.5 signature
14154
14155rsapss
14156
14157TPMS_SIGNATURE_RSAPSS
14158
14159TPM_ALG_RSAPSS
14160
14161a PKCS#1v2.1PSS signature
14162
14163ecdsa
14164
14165TPMS_SIGNATURE_ECDSA
14166
14167TPM_ALG_ECDSA
14168
14169an ECDSA signature
14170
14171sm2
14172
14173TPMS_SIGNATURE_ECDSA
14174
14175TPM_ALG_SM2
14176
14177same format as ECDSA
14178
14179ecdaa
14180
14181TPMS_SIGNATURE_ECDSA
14182
14183TPM_ALG_ECDAA
14184
14185same format as ECDSA
14186
14187ecschnorr
14188
14189TPMS_SIGNATURE_ECDSA
14190
14191TPM_ALG_ECSCHNORR
14192
14193same format as ECDSA
14194
14195hmac
14196
14197TPMT_HA
14198
14199TPM_ALG_HMAC
14200
14201HMAC signature (required to
14202be supported)
14203
14204any
14205
14206TPMS_SCHEME_SIGHASH
14207
14208null
14209
14210Family “2.0”
14211Level 00 Revision 00.99
14212
14213used to access the hash
14214TPM_ALG_NULL
14215
14216Published
14217Copyright © TCG 2006-2013
14218
14219the NULL signature
14220
14221Page 123
14222October 31, 2013
14223
14224Part 2: Structures
14225
14226Trusted Platform Module Library
14227
1422811.3.5 TPMT_SIGNATURE
14229Table 173 shows the basic algorithm-agile structure when a symmetric or asymmetric signature is
14230indicated. The sigAlg parameter indicates the algorithm used for the signature. This structure is output
14231from the attestation commands and is an input to TPM2_VerifySignature(), TPM2_PolicySigned(), and
14232TPM2_FieldUpgradeStart().
14233Table 173 — Definition of TPMT_SIGNATURE Structure
14234Parameter
14235
14236Type
14237
14238Description
14239
14240sigAlg
14241
14242+TPMI_ALG_SIG_SCHEME
14243
14244selector of the algorithm used to construct the signature
14245
14246[sigAlg]signature
14247
14248TPMU_SIGNATURE
14249
14250This shall be the actual signature information.
14251
1425211.4 Key/Secret Exchange
1425311.4.1 Introduction
14254The structures in this clause are used when a key or secret is being exchanged. The exchange may be in
1425514256
14257TPM2_StartAuthSession() where the secret is injected for salting the session,
14258
1425914260
14261TPM2_Duplicate(), TPM2_Import, or TPM2_Rewrap() where the secret is the symmetric encryption
14262key for the outer wrapper of a duplication blob, or
14263
1426414265
14266TPM2_ActivateIdentity() or TPM2_CreateIdentity() where the secret is the symmetric encryption key
14267for the credential blob.
14268
14269Particulars are described in Part 1.
1427011.4.2 TPMU_ENCRYPTED_SECRET
14271This structure is used to hold either an ephemeral public point for ECDH, an OAEP-encrypted block for
14272RSA, or a symmetrically encrypted value. This structure is defined for the limited purpose of determining
14273the size of a TPM2B_ENCRYPTED_SECRET.
14274The symmetrically encrypted value may use either CFB or XOR encryption.
14275NOTE
14276
14277Table 174 is illustrative. It would be modified depending on the algorithms supported in the TPM.
14278
14279Table 174 — Definition of TPMU_ENCRYPTED_SECRET Union <S>
14280Parameter
14281
14282Type
14283
14284Selector
14285
14286ecc[sizeof(TPMS_ECC_POINT)]
14287
14288BYTE
14289
14290TPM_ALG_ECC
14291
14292rsa[MAX_RSA_KEY_BYTES]
14293
14294BYTE
14295
14296TPM_ALG_RSA
14297
14298symmetric[sizeof(TPM2B_DIGEST)]
14299
14300BYTE
14301
14302TPM_ALG_SYMCIPHER
14303
14304keyedHash[sizeof(TPM2B_DIGEST)]
14305
14306BYTE
14307
14308TPM_ALG_KEYEDHASH
14309
14310Page 124
14311October 31, 2013
14312
14313Published
14314Copyright © TCG 2006-2013
14315
14316Description
14317
14318Any symmetrically encrypted
14319secret value will be limited to
14320be no larger than a digest.
14321
14322Family “2.0”
14323Level 00 Revision 00.99
14324
14325Trusted Platform Module Library
14326
14327Part 2: Structures
14328
1432911.4.3 TPM2B_ENCRYPTED_SECRET
14330Table 175 — Definition of TPM2B_ENCRYPTED_SECRET Structure
14331Parameter
14332
14333Type
14334
14335Description
14336
14337size
14338
14339UINT16
14340
14341size of the secret value
14342
14343secret[size] {:sizeof(TPMU_ENCRYPTED_SECRET)}
14344
14345BYTE
14346
14347secret
14348
14349Family “2.0”
14350Level 00 Revision 00.99
14351
14352Published
14353Copyright © TCG 2006-2013
14354
14355Page 125
14356October 31, 2013
14357
14358Part 2: Structures
14359
14360Trusted Platform Module Library
14361
1436212 Key/Object Complex
1436312.1 Introduction
14364An object description requires a TPM2B_PUBLIC structure and may require a TPMT_SENSITIVE
14365structure. When the structure is stored off the TPM, the TPMT_SENSITIVE structure is encrypted within a
14366TPM2B_PRIVATE structure.
14367When the object requires two components for its description, those components are loaded as separate
14368parameters in the TPM2_Load() command. When the TPM creates an object that requires both
14369components, the TPM will return them as separate parameters from the TPM2_Create() operation.
14370The TPM may produce multiple different TPM2B_PRIVATE structures for a single TPM2B_PUBLIC
14371structure. Creation of a modified TPM2B_PRIVATE structure requires that the full structure be loaded with
14372the TPM2_Load() command, modification of the TPMT_SENSITIVE data, and output of a new
14373TPM2B_PRIVATE structure.
1437412.2 Public Area Structures
1437512.2.1 Description
14376This clause defines the TPM2B_PUBLIC structure and the higher-level substructure that may be
14377contained in a TPM2B_PUBLIC. The higher-level structures that are currently defined for inclusion in a
14378TPM2B_PUBLIC are the
1437914380
14381structures for asymmetric keys,
14382
1438314384
14385structures for symmetric keys, and
14386
1438714388
14389structures for sealed data.
14390
1439112.2.2 TPMI_ALG_PUBLIC
14392Table 176 — Definition of (TPM_ALG_ID) TPMI_ALG_PUBLIC Type
14393Values
14394
14395Comments
14396
14397TPM_ALG_KEYEDHASH
14398
14399required of all TPM
14400
14401TPM_ALG_SYMCIPHER
14402
14403required of all TPM
14404
14405TPM_ALG_RSA
14406
14407At least one asymmetric algorithm shall be implemented.
14408
14409TPM_ALG_ECC
14410
14411At least one asymmetric algorithm shall be implemented.
14412
14413#TPM_RC_TYPE
14414
14415response code when a public type is not supported
14416
1441712.2.3 Type-Specific Parameters
1441812.2.3.1
14419
14420Description
14421
14422The public area contains two fields (parameters and unique) that vary by object type. The parameters
14423field varies according to the type of the object but the contents may be the same across multiple
14424instances of a particular type. The unique field format also varies according to the type of the object and
14425will also be unique for each instance.
14426
14427Page 126
14428October 31, 2013
14429
14430Published
14431Copyright © TCG 2006-2013
14432
14433Family “2.0”
14434Level 00 Revision 00.99
14435
14436Trusted Platform Module Library
14437
14438Part 2: Structures
14439
14440For a symmetric key (type == TPM_ALG_SYMCIPHER), HMAC key (type == TPM_ALG_KEYEDHASH)
14441or data object (also, type == TPM_ALG_KEYEDHASH), the contents of unique shall be computed from
14442components of the sensitive area of the object as follows:
14443
14444unique ≔ HnameAlg(seedValue || sensitive)
14445
14446(8)
14447
14448where
14449
14450HnameAlg()
14451
14452the hash algorithm used to compute the Name of the object
14453
14454seedValue
14455
14456the digest-sized obfuscation value in the sensitive area of a symmetric
14457key
14458or
14459symmetric
14460data
14461object
14462found
14463in
14464a
14465TPMT_SENSITIVE.seedValue.buffer
14466
14467sensitive
14468
14469the
14470secret
14471key/data
14472of
14473TPMT_SENSITIVE.sensitive.any.buffer
14474
1447512.2.3.2
14476
14477the
14478
14479object
14480
14481in
14482
14483the
14484
14485TPMU_PUBLIC_ID
14486Table 177 — Definition of TPMU_PUBLIC_ID Union <IN/OUT, S>
14487
14488Parameter
14489
14490Type
14491
14492Selector
14493
14494keyedHash
14495
14496TPM2B_DIGEST
14497
14498TPM_ALG_KEYEDHASH
14499
14500sym
14501
14502TPM2B_DIGEST
14503
14504TPM_ALG_SYMCIPHER
14505
14506rsa
14507
14508TPM2B_PUBLIC_KEY_RSA
14509
14510TPM_ALG_RSA
14511
14512ecc
14513
14514TPMS_ECC_POINT
14515
14516TPM_ALG_ECC
14517
1451812.2.3.3
14519
14520Description
14521
14522TPMS_KEYEDHASH_PARMS
14523
14524This structure describes the parameters that would appear in the public area of a KEYEDHASH object.
14525Note
14526
14527Although the names are the same, the types of the structures are not the same as for asymmetric
14528parameter lists.
14529
14530Table 178 — Definition of TPMS_KEYEDHASH_PARMS Structure
14531Parameter
14532
14533Type
14534
14535Description
14536
14537scheme
14538
14539TPMT_KEYEDHASH_SCHEME+
14540
14541Indicates the signing method used for a keyedHash signing
14542object. This field also determines the size of the data field for a
14543data object created with TPM2_Create(). This field shall not be set
14544to TPM_ALG_NULL in a template if either sign or encrypt is SET.
14545
1454612.2.3.4
14547
14548TPMS_ASYM_PARMS
14549
14550This structure contains the common public area parameters for an asymmetric key. The first two
14551parameters of the parameter definition structures of an asymmetric key shall have the same two first
14552components.
14553NOTE
14554
14555The sign parameter may have a different type in order to allow different schemes to be selected for each
14556asymmetric type but the first parameter of each scheme definition shall be a TPM_ALG_ID for a valid
14557signing scheme.
14558
14559Family “2.0”
14560Level 00 Revision 00.99
14561
14562Published
14563Copyright © TCG 2006-2013
14564
14565Page 127
14566October 31, 2013
14567
14568Part 2: Structures
14569
14570Trusted Platform Module Library
14571Table 179 — Definition of TPMS_ASYM_PARMS Structure <>
14572
14573Parameter
14574
14575Type
14576
14577Description
14578
14579symmetric
14580
14581TPMT_SYM_DEF_OBJECT+
14582
14583the companion symmetric algorithm for a restricted
14584decryption key and shall be set to a supported symmetric
14585algorithm
14586This field is optional for keys that are not decryption keys
14587and shall be set to TPM_ALG_NULL if not used.
14588
14589scheme
14590
14591TPMT_ASYM_SCHEME+
14592
14593for a key with the sign attribute SET, a valid signing
14594scheme for the key type
14595for a key with the decrypt attribute SET, a valid key
14596exchange protocol
14597for a key with sign and decrypt attributes, shall be
14598TPM_ALG_NULL
14599
1460012.2.3.5
14601
14602TPMS_RSA_PARMS
14603
14604A TPM compatible with this specification and supporting RSA shall support numPrimes of two and an
14605exponent of zero. Support for other values is optional. Use of other exponents in duplicated keys is not
14606recommended because the resulting keys would not be interoperable with other TPMs.
14607NOTE 1
14608
14609Implementations are not required to check that exponent is the default exponent. They may fail to load the
14610key if exponent is not zero. The reference implementation allows the values listed in the table.
14611
14612Table 180 — Definition of {RSA} TPMS_RSA_PARMS Structure
14613Parameter
14614
14615Type
14616
14617Description
14618
14619symmetric
14620
14621TPMT_SYM_DEF_OBJECT+ for a restricted decryption key, shall be set to a
14622supported symmetric algorithm, key size, and mode.
14623if the key is not a restricted decryption key, this field
14624shall be set to TPM_ALG_NULL.
14625
14626scheme
14627
14628TPMT_RSA_SCHEME+
14629
14630for a signing key, shall be either TPM_ALG_RSAPSS
14631TPM_ALG_RSASSA or TPM_ALG_NULL
14632for an unrestricted decryption key, shall be
14633TPM_ALG_RSAES,
14634TPM_ALG_OAEP,
14635or
14636TPM_ALG_NULL unless the object also has the sign
14637attribute
14638for a restricted decryption key, this field shall be
14639TPM_ALG_NULL
14640NOTE
14641
14642keyBits
14643
14644When both sign and decrypt are SET, restricted
14645shall be CLEAR and scheme shall be
14646TPM_ALG_NULL.
14647
14648TPMI_RSA_KEY_BITS
14649
14650number of bits in the public modulus
14651
14652UINT32
14653
14654the public exponent
14655A prime number greater than 2.
14656When zero, indicates that the exponent is the default
1465716
14658of 2 + 1
14659
14660#TPM_RC_KEY_SIZE
14661exponent
14662
14663#TPM_RC_VALUE
14664
14665Page 128
14666October 31, 2013
14667
14668Published
14669Copyright © TCG 2006-2013
14670
14671Family “2.0”
14672Level 00 Revision 00.99
14673
14674Trusted Platform Module Library
1467512.2.3.6
14676
14677Part 2: Structures
14678
14679TPMS_ECC_PARMS
14680
14681This structure contains the parameters for prime modulus ECC.
14682Table 181 — Definition of {ECC} TPMS_ECC_PARMS Structure
14683Parameter
14684
14685Type
14686
14687Description
14688
14689symmetric
14690
14691TPMT_SYM_DEF_OBJECT+
14692
14693for a restricted decryption key, shall be set to a supported
14694symmetric algorithm, key size. and mode.
14695if the key is not a restricted decryption key, this field shall be
14696set to TPM_ALG_NULL.
14697
14698scheme
14699
14700TPMT_ECC_SCHEME+
14701
14702If the sign attribute of the key is SET, then this shall be a valid
14703signing scheme.
14704NOTE
14705
14706If the sign parameter in curveID indicates a mandatory
14707scheme, then this field shall have the same value.
14708
14709If the decrypt attribute of the key is SET, then this shall be a
14710valid key exchange scheme or TPM_ALG_NULL.
14711If the key is a Storage Key, then this field shall be
14712TPM_ALG_NULL.
14713curveID
14714
14715TPMI_ECC_CURVE
14716
14717ECC curve ID
14718
14719kdf
14720
14721TPMT_KDF_SCHEME+
14722
14723an optional key derivation scheme for generating a symmetric
14724key from a Z value
14725If the kdf
14726parameter associated with curveID is not
14727TPM_ALG_NULL then this is required to be NULL.
14728NOTE
14729
1473012.2.3.7
14731
14732There are currently no commands where this parameter
14733has effect and, in the reference code, this field needs to
14734be set to TPM_ALG_NULL.
14735
14736TPMU_PUBLIC_PARMS
14737
14738Table 182 defines the possible parameter definition structures that may be contained in the public portion
14739of a key.
14740Table 182 — Definition of TPMU_PUBLIC_PARMS Union <IN/OUT, S>
14741Parameter
14742
14743Type
14744
14745(1)
14746
14747Selector
14748
14749Description
14750
14751keyedHashDetail TPMS_KEYEDHASH_PARMS
14752
14753TPM_ALG_KEYEDHASH
14754
14755sign | encrypt | neither
14756
14757symDetail
14758
14759TPMS_SYMCIPHER_PARMS
14760
14761TPM_ALG_SYMCIPHER
14762
14763a symmetric block cipher
14764
14765rsaDetail
14766
14767TPMS_RSA_PARMS
14768
14769TPM_ALG_RSA
14770
14771decrypt + sign
14772
14773(2)
14774
14775eccDetail
14776
14777TPMS_ECC_PARMS
14778
14779TPM_ALG_ECC
14780
14781decrypt + sign
14782
14783(2)
14784
14785asymDetail
14786
14787TPMS_ASYM_PARMS
14788
14789common scheme structure
14790for RSA and ECC keys
14791
14792NOTES
147931)
14794
14795Description column indicates which of TPMA_OBJECT.decrypt or TPMA_OBJECT.sign may be set.
14796
147972)
14798
14799“+” indicates that both may be set but one shall be set. “|” indicates the optional settings.
14800
14801Family “2.0”
14802Level 00 Revision 00.99
14803
14804Published
14805Copyright © TCG 2006-2013
14806
14807Page 129
14808October 31, 2013
14809
14810Part 2: Structures
1481112.2.3.8
14812
14813Trusted Platform Module Library
14814
14815TPMT_PUBLIC_PARMS
14816
14817This structure is used in TPM2_TestParms() to validate that a set of algorithm parameters is supported by
14818the TPM.
14819Table 183 — Definition of TPMT_PUBLIC_PARMS Structure
14820Parameter
14821
14822Type
14823
14824Description
14825
14826type
14827
14828TPMI_ALG_PUBLIC
14829
14830the algorithm to be tested
14831
14832[type]parameters
14833
14834TPMU_PUBLIC_PARMS the algorithm details
14835
1483612.2.4 TPMT_PUBLIC
14837Table 184 defines the public area structure. The Name of the object is nameAlg concatenated with the
14838digest of this structure using nameAlg.
14839Table 184 — Definition of TPMT_PUBLIC Structure
14840Parameter
14841
14842Type
14843
14844Description
14845
14846type
14847
14848TPMI_ALG_PUBLIC
14849
14850“algorithm” associated with this object
14851
14852nameAlg
14853
14854+TPMI_ALG_HASH
14855
14856algorithm used for computing the Name of the object
14857NOTE
14858
14859The "+" indicates that the instance of a TPMT_PUBLIC may have
14860a "+" to indicate that the nameAlg may be TPM_ALG_NULL.
14861
14862objectAttributes
14863
14864TPMA_OBJECT
14865
14866attributes that, along with type, determine the manipulations of this
14867object
14868
14869authPolicy
14870
14871TPM2B_DIGEST
14872
14873optional policy for using this key
14874The policy is computed using the nameAlg of the object.
14875NOTE
14876
14877Shall be the Empty Buffer if no authorization policy is present.
14878
14879[type]parameters
14880
14881TPMU_PUBLIC_PARMS the algorithm or structure details
14882
14883[type]unique
14884
14885TPMU_PUBLIC_ID
14886
14887Page 130
14888October 31, 2013
14889
14890the unique identifier of the structure
14891For an asymmetric key, this would be the public key.
14892
14893Published
14894Copyright © TCG 2006-2013
14895
14896Family “2.0”
14897Level 00 Revision 00.99
14898
14899Trusted Platform Module Library
14900
14901Part 2: Structures
14902
1490312.2.5 TPM2B_PUBLIC
14904This sized buffer is used to embed a TPMT_PUBLIC in a command.
14905Table 185 — Definition of TPM2B_PUBLIC Structure
14906Parameter
14907
14908Type
14909
14910Description
14911
14912size=
14913
14914UINT16
14915
14916size of publicArea
14917NOTE
14918
14919publicArea
14920
14921+TPMT_PUBLIC
14922
14923The “=” will force the TPM to try to unmarshal a
14924TPMT_PUBLIC and check that the unmarshaled size
14925matches the value of size. If all the required fields of
14926a TPMT_PUBLIC are not present, the TPM will return
14927an error (generally TPM_RC_SIZE) when attempting
14928to unmarshal the TPMT_PUBLIC.
14929
14930the public area
14931NOTE
14932
14933The “+” indicates that the caller may specify that use
14934of TPM_ALG_NULL is allowed for nameAlg.
14935
1493612.3 Private Area Structures
1493712.3.1 Introduction
14938The structures in 12.3 define the contents and construction of the private portion of a TPM object. A
14939TPM2B_PRIVATE along with a TPM2B_PUBLIC are needed to describe a TPM object.
14940A TPM2B_PRIVATE area may be encrypted by different symmetric algorithms or, in some cases, not
14941encrypted at all.
1494212.3.2 Sensitive Data Structures
1494312.3.2.1
14944
14945Introduction
14946
14947The structures in 12.3.2 define the presumptive internal representations of the sensitive areas of the
14948various entities. A TPM may store the sensitive information in any desired format but when constructing a
14949TPM_PRIVATE, the formats in this clause shall be used.
1495012.3.2.2
14951
14952TPM2B_PRIVATE_VENDOR_SPECIFIC
14953
14954This structure is defined for coding purposes. For IO to the TPM, the sensitive portion of the key will be in
14955a canonical form. For an RSA key, this will be one of the prime factors of the public modulus. After
14956loading, it is typical that other values will be computed so that computations using the private key will not
14957need to start with just one prime factor. This structure allows the vendor-specific structure to use the
14958space of the
14959The value for RSA_VENDOR_SPECIFIC is determined by the vendor.
14960Table 186 — Definition of {RSA} TPM2B_PRIVATE_VENDOR_SPECIFIC Structure<>
14961Parameter
14962
14963Type
14964
14965size
14966
14967UINT16
14968
14969buffer[size]{:PRIVATE_VENDOR_SPECIFIC_BYTES}
14970
14971BYTE
14972
14973Family “2.0”
14974Level 00 Revision 00.99
14975
14976Published
14977Copyright © TCG 2006-2013
14978
14979Description
14980
14981Page 131
14982October 31, 2013
14983
14984Part 2: Structures
1498512.3.2.3
14986
14987Trusted Platform Module Library
14988
14989TPMU_SENSITIVE_COMPOSITE
14990Table 187 — Definition of TPMU_SENSITIVE_COMPOSITE Union <IN/OUT, S>
14991
14992Parameter
14993
14994Type
14995
14996Selector
14997
14998Description
14999
15000rsa
15001
15002TPM2B_PRIVATE_KEY_RSA
15003
15004TPM_ALG_RSA
15005
15006a prime factor of the public
15007key
15008
15009ecc
15010
15011TPM2B_ECC_PARAMETER
15012
15013TPM_ALG_ECC
15014
15015the integer private key
15016
15017bits
15018
15019TPM2B_SENSITIVE_DATA
15020
15021TPM_ALG_KEYEDHASH
15022
15023the private data
15024
15025sym
15026
15027TPM2B_SYM_KEY
15028
15029TPM_ALG_SYMCIPHER
15030
15031the symmetric key
15032
15033any
15034
15035TPM2B_PRIVATE_VENDOR_SPECIFIC
15036
1503712.3.2.4
15038
15039vendor-specific size for key
15040storage
15041
15042TPMT_SENSITIVE
15043Table 188 — Definition of TPMT_SENSITIVE Structure
15044
15045Parameter
15046
15047Type
15048
15049Description
15050
15051sensitiveType
15052
15053TPMI_ALG_PUBLIC
15054
15055identifier for the sensitive area
15056This shall be the same as the type parameter of the
15057associated public area.
15058
15059authValue
15060
15061TPM2B_AUTH
15062
15063user authorization data
15064The authValue may be a zero-length string.
15065This value shall not be larger than the size of the
15066digest produced by the nameAlg of the object.
15067
15068seedValue
15069
15070TPM2B_DIGEST
15071
15072for asymmetric key object, the optional protection
15073seed; for other objects, the obfuscation value
15074This value shall not be larger than the size of the
15075digest produced by nameAlg of the object.
15076
15077[sensitiveType]sensitive
15078
15079TPMU_SENSITIVE_COMPOSITE
15080
15081the type-specific private data
15082
1508312.3.3 TPM2B_SENSITIVE
15084The TPM2B_SENSITIVE structure is used as a parameter in TPM2_LoadExternal(). It is an unencrypted
15085sensitive area but it may be encrypted using parameter encryption.
15086NOTE
15087
15088When this structure is unmarshaled, the size of the sensitiveType determines what type of value is
15089unmarshaled. Each value of sensitiveType is associated with a TPM2B. It is the maximum size for each of
15090the TPM2B values will determine if the unmarshal operation is successful . Since there is no selector for
15091the any or vendor options for the union, the maximum input and output sizes for a TMP2B_SENSITIVE
15092are not affected by the sizes of those parameters.
15093
15094Table 189 — Definition of TPM2B_SENSITIVE Structure <IN/OUT>
15095Parameter
15096
15097Type
15098
15099Description
15100
15101size
15102
15103UINT16
15104
15105size of the private structure
15106
15107sensitiveArea
15108
15109TPMT_SENSITIVE
15110
15111an unencrypted sensitive area
15112
15113Page 132
15114October 31, 2013
15115
15116Published
15117Copyright © TCG 2006-2013
15118
15119Family “2.0”
15120Level 00 Revision 00.99
15121
15122Trusted Platform Module Library
15123
15124Part 2: Structures
15125
1512612.3.4 Encryption
15127A TPMS_SENSITIVE is the input to the encryption process. All TPMS_ENCRYPT structures are CFBencrypted using a key and Initialization Vector (IV) that are derived from a seed value.
15128The method of generating the key and IV is described in “Protected Storage” subclause “Symmetric
15129Encryption.” in Part 1.
1513012.3.5 Integrity
15131The integrity computation is used to ensure that a protected object is modified when stored in memory
15132outside of the TPM.
15133The method of protecting the integrity of the sensitive area is described in “Protected Storage” subclause
15134“Integrity” in Part 1.
1513512.3.6 _PRIVATE
15136This structure is defined to size the contents of a TPM2B_PRIVATE. This structure is not directly
15137marshaled or unmarshaled.
15138For TPM2_Duplicate() and TPM2_Import(), the TPM2B_PRIVATE may contain multiply encrypted data
15139and two integrity values. In some cases, the sensitive data is not encrypted and the integrity value is not
15140present.
15141For TPM2_Load() and TPM2_Create(), integrityInner is always present.
15142If integrityInner is present, it and sensitive are encrypted as a single block.
15143When an integrity value is not needed, it is not present and it is not represented by an Empty Buffer.
15144Table 190 — Definition of _PRIVATE Structure <>
15145Parameter
15146
15147Type
15148
15149Description
15150
15151integrityOuter
15152
15153TPM2B_DIGEST
15154
15155integrityInner
15156
15157TPM2B_DIGEST
15158
15159could also be a TPM2B_IV
15160
15161sensitive
15162
15163TPMT_SENSITIVE
15164
15165the sensitive area
15166
1516712.3.7 TPM2B_PRIVATE
15168The TPM2B_PRIVATE structure is used as a parameter in multiple commands that create, load, and
15169modify the sensitive area of an object.
15170Table 191 — Definition of TPM2B_PRIVATE Structure <IN/OUT, S>
15171Parameter
15172
15173Type
15174
15175Description
15176
15177size
15178
15179UINT16
15180
15181size of the private structure
15182
15183buffer[size] {:sizeof(_PRIVATE)}
15184
15185BYTE
15186
15187an encrypted private area
15188
15189Family “2.0”
15190Level 00 Revision 00.99
15191
15192Published
15193Copyright © TCG 2006-2013
15194
15195Page 133
15196October 31, 2013
15197
15198Part 2: Structures
15199
15200Trusted Platform Module Library
15201
1520212.4 Identity Object
1520312.4.1 Description
15204An identity object is used to convey credential protection value (CV) to a TPM that can load the object
15205associated with the object. The CV is encrypted to a storage key on the target TPM, and if the credential
15206integrity checks and the proper object is loaded in the TPM, then the TPM will return the CV.
1520712.4.2 _ID_OBJECT
15208This structure is used for sizing the TPM2_ID_OBJECT.
15209Table 192 — Definition of _ID_OBJECT Structure <>
15210Parameter
15211
15212Type
15213
15214Description
15215
15216integrityHMAC
15217
15218TPM2B_DIGEST
15219
15220HMAC using the nameAlg of the storage key on the target
15221TPM
15222
15223encIdentity
15224
15225TPM2B_DIGEST
15226
15227credential protector information returned if name matches the
15228referenced object
15229All of the encIdentity is encrypted, including the size field.
15230NOTE
15231
15232The TPM is not required to check that the size is not larger
15233than the digest of the nameAlg. However, if the size is
15234larger, the ID object may not be usable on a TPM that has
15235no digest larger than produced by nameAlg.
15236
1523712.4.3 TPM2B_ID_OBJECT
15238This structure is an output from TPM2_MakeCredential() and is an input to TPM2_ActivateCredential().
15239Table 193 — Definition of TPM2B_ID_OBJECT Structure <IN/OUT>
15240Parameter
15241
15242Type
15243
15244Description
15245
15246size
15247
15248UINT16
15249
15250size of the credential structure
15251
15252credential[size]{:sizeof(_ID_OBJECT)}
15253
15254BYTE
15255
15256an encrypted credential area
15257
15258Page 134
15259October 31, 2013
15260
15261Published
15262Copyright © TCG 2006-2013
15263
15264Family “2.0”
15265Level 00 Revision 00.99
15266
15267Trusted Platform Module Library
15268
15269Part 2: Structures
15270
1527113 NV Storage Structures
1527213.1 TPM_NV_INDEX
15273A TPM_NV_INDEX is used to reference a defined location in NV memory. The format of the Index is
15274changed from TPM 1.2 in order to include the Index in the reserved handle space. Handles in this range
15275use the digest of the public area of the Index as the Name of the entity in authorization computations
15276The 32-bit TPM 1.2 NV Index format is shown in Figure 4. In order to allow the Index to fit into the 24 bits
15277available in the reserved handle space, the Index value format is changed as shown in Figure 5.
152783 3 2 2 2 2 2 2 2
152791 0 9 8 7 6 5 4 3
15280
152811 1
152826 5
15283
15284T P U D reserved
15285
152860
152870
15288
15289Purview
15290
15291Index
15292
15293Figure 4 — TPM 1.2 TPM_NV_INDEX
152943
152951
15296
152972 2
152984 3
15299
153000
153010
15302
15303TPM_HT_NV_INDEX
15304
15305Index
15306
15307Figure 5 — TPM 2.0 TPM_NV_INDEX
15308NOTE
15309
15310This TPM_NV_INDEX format does not retain the Purview field and the D bit is not a part of an Index
15311handle as in TPM 1.2. The TPMA_NV_PLATFORMCREATE attribute is a property of an Index that
15312provides functionality similar to the D bit.
15313
15314A valid Index handle will have an MSO of TPM_HT_NV_INDEX.
15315NOTE
15316
15317This structure is not used. It is defined here to indicate how the fields of the handle are assigned. The
15318exemplary unmarshaling code unmarshals a TPM_HANDLE and validates that it is in the range for a
15319TPM_NV_INDEX.
15320
15321Table 194 — Definition of (UINT32) TPM_NV_INDEX Bits <>
15322Bit
15323
15324Name
15325
15326Definition
15327
1532823:0
15329
15330index
15331
15332The index of the NV location
15333
1533431:24
15335
15336RH_NV
15337
15338constant value of TPM_HT_NV_INDEX indicating the NV Index range
15339
15340#TPM_RC_VALUE
15341
15342response code returned if unmarshaling of this type fails because the handle
15343value is incorrect
15344
15345Family “2.0”
15346Level 00 Revision 00.99
15347
15348Published
15349Copyright © TCG 2006-2013
15350
15351Page 135
15352October 31, 2013
15353
15354Part 2: Structures
15355
15356Trusted Platform Module Library
15357Table 195 — Options for space Field of TPM_NV_INDEX
15358
15359Some prior versions of this specification contained a table here that assigned subsets of the index field to
15360different entities. Since this assignment was a convention and not an architectural element of the TPM,
15361the table was removed and the information is now contained in a registry document that is maintained by
15362the TCG.
1536313.2 TPMA_NV (NV Index Attributes)
15364This structure allows the TPM to keep track of the data and permissions to manipulate an NV Index.
15365The platform controls (TPMA_NV_PPWRITE and TPMA_NV_PPREAD) and owner controls
15366(TPMA_NV_OWNERWRITE and TPMA_NV_OWNERREAD) give the platform and owner access to NV
15367Indexes using platformAuth or ownerAuth rather than the authValue or authPolicy of the Index.
15368If access to an NV Index is to be restricted based on PCR, then an appropriate authPolicy shall be
15369provided.
15370NOTE
15371
15372platformAuth or ownerAuth can be provided in any type of authorization session or as a password.
15373
15374If TPMA_NV_AUTHREAD is SET, then the Index may be read if the Index authValue is provided. If
15375TPMA_NV_POLICYREAD is SET, then the Index may be read if the Index authPolicy is satisfied.
15376At least one of TPMA_NV_PPREAD,
15377TPMA_NV_POLICYREAD shall be SET.
15378
15379TPMA_NV_OWNERREAD,
15380
15381TPMA_NV_AUTHREAD,
15382
15383or
15384
15385If TPMA_NV_AUTHWRITE is SET, then the Index may be written if the Index authValue is provided. If
15386TPMA_NV_POLICYWRITE is SET, then the Index may be written if the Index authPolicy is satisfied.
15387At least one of TPMA_NV_PPWRITE, TPMA_NV_OWNERWRITE TPMA_NV_AUTHWRITE, or
15388TPMA_NV_POLICYWRITE shall be SET.
15389If TPMA_NV_WRITELOCKED is SET, then the Index may not be written. If TPMA_NV_WRITEDEFINE is
15390SET, TPMA_NV_WRITELOCKED may not be CLEAR except by deleting and redefining the Index. If
15391TPMA_NV_WRITEDEFINE is CLEAR, then TPMA_NV_WRITELOCK will be CLEAR on the next
15392TPM2_Startup(TPM_SU_CLEAR).
15393If TPMA_NV_READLOCKED is SET, then the Index may not be read. TPMA_NV_READLOCK will be
15394CLEAR on the next TPM2_Startup(TPM_SU_CLEAR).
15395NOTE
15396
15397The TPM is expected to maintain indicators to indicate that the Index is temporarily locked. The state of
15398these indicators is reported in the TPMA_NV_READLOCKED and TPMA_NV_WRITELOCKED attributes.
15399
15400If TPMA_NV_EXTEND is SET, then writes to the Index will cause an update of the Index using the extend
15401operation with the nameAlg used to create the digest.
15402Only one of TPMA_NV_EXTEND, TPMA_NV_COUNTER, or TPMA_NV_BITS may be set.
15403When
15404the
15405Index
15406is
15407created
15408(TPM2_NV_DefineSpace()),
15409TPMA_NV_WRITELOCKED,
15410TPMA_NV_READLOCKED, TPMA_NV_WRITTEN shall all be CLEAR in the parameter that defines the
15411attributes of the created Index.
15412
15413Page 136
15414October 31, 2013
15415
15416Published
15417Copyright © TCG 2006-2013
15418
15419Family “2.0”
15420Level 00 Revision 00.99
15421
15422Trusted Platform Module Library
15423
15424Part 2: Structures
15425
15426Table 196 — Definition of (UINT32) TPMA_NV Bits
15427Bit
15428
15429Name
15430
15431Description
15432
154330
15434
15435TPMA_NV_PPWRITE
15436
15437SET (1): The Index data can be written if platformAuth is provided.
15438CLEAR (0): Writing of the Index data cannot be authorized with
15439platformAuth.
15440
154411
15442
15443TPMA_NV_OWNERWRITE
15444
15445SET (1): The Index data can be written if ownerAuth is provided.
15446CLEAR (0): Writing of the Index data cannot be authorized with
15447ownerAuth.
15448
154492
15450
15451TPMA_NV_AUTHWRITE
15452
15453SET (1): Authorizations to change the Index contents that require
15454USER role may be provided with an HMAC session or password.
15455CLEAR (0): Authorizations to change the Index contents that require
15456USER role may not be provided with an HMAC session or password.
15457
154583
15459
15460TPMA_NV_POLICYWRITE
15461
15462SET (1): Authorizations to change the Index contents that require
15463USER role may be provided with a policy session.
15464CLEAR (0): Authorizations to change the Index contents that require
15465USER role may not be provided with a policy session.
15466NOTE
15467
15468TPM2_NV_ChangeAuth() always requires that authorization be
15469provided in a policy session.
15470
154714
15472
15473TPMA_NV_COUNTER
15474
15475SET (1): Index contains an 8-octet value that is to be used as a
15476counter and can only be modified with TPM2_NV_Increment().
15477CLEAR (0): The Index is not a counter.
15478
154795
15480
15481TPMA_NV_BITS
15482
15483SET (1): Index contains an 8-octet value to be used as a bit field and
15484can only be modified with TPM2_NV_SetBits().
15485CLEAR (0): The Index is not a bit field.
15486
154876
15488
15489TPMA_NV_EXTEND
15490
15491SET (1): Index contains a digest-sized value used like a PCR. The
15492Index may only be modified using TPM2_NV_Extend. The extend will
15493use the nameAlg of the Index.
15494CLEAR (0): Index is not a PCR.
15495
154969:7
15497
15498Reserved
15499
15500shall be zero
15501reserved for use in defining additional write controls
15502
1550310
15504
15505TPMA_NV_POLICY_DELETE
15506
15507SET (1): Index may not be deleted unless the authPolicy is satisfied.
15508CLEAR (0): Index may be deleted with proper platform or owner
15509authorization.
15510
1551111
15512
15513TPMA_NV_WRITELOCKED
15514
15515SET (1): Index cannot be written.
15516CLEAR (0): Index can be written.
15517
1551812
15519
15520TPMA_NV_WRITEALL
15521
15522SET (1): A partial write of the Index data is not allowed. The write
15523size shall match the defined space size.
15524CLEAR (0): Partial writes are allowed. This setting is required if
15525TPMA_NV_BITS is SET.
15526
1552713
15528
15529TPMA_NV_WRITEDEFINE
15530
15531SET (1): TPM2_NV_WriteLock() may be used to prevent further
15532writes to this location.
15533CLEAR (0): TPM2_NV_WriteLock() does not block subsequent
15534writes.
15535
1553614
15537
15538TPMA_NV_WRITE_STCLEAR
15539
15540SET (1): TPM2_NV_WriteLock() may be used to prevent further
15541writes to this location until the next TPM Reset or TPM Restart.
15542CLEAR (0): A write to this Index with a data size of zero does not
15543change the write access.
15544
15545Family “2.0”
15546Level 00 Revision 00.99
15547
15548Published
15549Copyright © TCG 2006-2013
15550
15551Page 137
15552October 31, 2013
15553
15554Part 2: Structures
15555
15556Trusted Platform Module Library
15557
15558Bit
15559
15560Name
15561
15562Description
15563
1556415
15565
15566TPMA_NV_GLOBALLOCK
15567
15568SET (1): If TPM2_NV_GlobalWriteLock() is successful, then further
15569writes to this location are not permitted until the next TPM Reset or
15570TPM Restart.
15571CLEAR (0): TPM2_NV_GlobalWriteLock() has no effect on the
15572writing of the data at this Index.
15573
1557416
15575
15576TPMA_NV_PPREAD
15577
15578SET (1): The Index data can be read if platformAuth is provided.
15579CLEAR (0): Reading of the Index data cannot be authorized with
15580platformAuth.
15581
1558217
15583
15584TPMA_NV_OWNERREAD
15585
15586SET (1): The Index data can be read if ownerAuth is provided.
15587CLEAR (0): Reading of the Index data cannot be authorized with
15588ownerAuth.
15589
1559018
15591
15592TPMA_NV_AUTHREAD
15593
15594SET (1): The Index data may be read if the authValue is provided.
15595CLEAR (0): Reading of the Index data cannot be authorized with the
15596Index authValue.
15597
1559819
15599
15600TPMA_NV_POLICYREAD
15601
15602SET (1): The Index data may be read if the authPolicy is satisfied.
15603CLEAR (0): Reading of the Index data cannot be authorized with the
15604Index authPolicy.
15605
15606Reserved
15607
15608shall be zero
15609reserved for use in defining additional read controls
15610
1561125
15612
15613TPMA_NV_NO_DA
15614
15615SET (1): Authorization failures of the Index do not affect the DA logic
15616and authorization of the Index is not blocked when the TPM is in
15617Lockout mode.
15618CLEAR (0): Authorization failures of the Index will increment the
15619authorization failure counter and authorizations of this Index are not
15620allowed when the TPM is in Lockout mode.
15621
1562226
15623
15624TPMA_NV_ORDERLY
15625
15626SET (1): NV Index state is only required to be saved when the TPM
15627performs an orderly shutdown (TPM2_Shutdown()). Only an Index
15628with TPMA_NV_COUNTER SET may have this setting.
15629CLEAR (0): NV Index state is required to be persistent after the
15630command to update the Index completes successfully (that is, the NV
15631update is synchronous with the update command).
15632
1563327
15634
15635TPMA_NV_CLEAR_STCLEAR
15636
15637SET (1): TPMA_NV_WRITTEN for the Index is CLEAR by TPM
15638Reset or TPM Restart.
15639CLEAR (0): TPMA_NV_WRITTEN is not changed by TPM Restart.
15640
1564124:20
15642
15643NOTE
15644
15645This attribute may only be SET if TPMA_NV_COUNTER is not
15646SET.
15647
15648NOTE
15649
15650If the TPMA_NV_ORDERLY is SET, TPMA_NV_WRITTEN will
15651be CLEAR by TPM Reset.
15652
1565328
15654
15655TPMA_NV_READLOCKED
15656
15657SET (1): Reads of the Index are blocked until the next TPM Reset or
15658TPM Restart.
15659CLEAR (0): Reads of the Index are allowed if proper authorization is
15660provided.
15661
1566229
15663
15664TPMA_NV_WRITTEN
15665
15666SET (1): Index has been written.
15667CLEAR (0): Index has not been written.
15668
1566930
15670
15671TPMA_NV_PLATFORMCREATE
15672
15673SET (1): This Index may be undefined with platformAuth but not with
15674ownerAuth.
15675CLEAR (0): This Index may be undefined using ownerAuth but not
15676with platformAuth.
15677The TPM will validate that this attribute is SET when the Index is
15678defined using platformAuth and will validate that this attribute is
15679CLEAR when the Index is defined using ownerAuth.
15680
15681Page 138
15682October 31, 2013
15683
15684Published
15685Copyright © TCG 2006-2013
15686
15687Family “2.0”
15688Level 00 Revision 00.99
15689
15690Trusted Platform Module Library
15691
15692Part 2: Structures
15693
15694Bit
15695
15696Name
15697
15698Description
15699
1570031
15701
15702TPMA_NV_READ_STCLEAR
15703
15704SET (1): TPM2_NV_ReadLock() may be used to SET
15705TPMA_NV_READLOCKED for this Index.
15706CLEAR (0): TPM2_NV_ReadLock() has no effect on this Index.
15707
1570813.3 TPMS_NV_PUBLIC
15709This structure describes an NV Index.
15710Table 197 — Definition of TPMS_NV_PUBLIC Structure
15711Name
15712
15713Type
15714
15715Description
15716
15717nvIndex
15718
15719TPMI_RH_NV_INDEX
15720
15721the handle of the data area
15722
15723nameAlg
15724
15725TPMI_ALG_HASH
15726
15727hash algorithm used to compute the name of the
15728Index and used for the authPolicy
15729
15730attributes
15731
15732TPMA_NV
15733
15734the Index attributes
15735
15736authPolicy
15737
15738TPM2B_DIGEST
15739
15740the access policy for the Index
15741
15742dataSize{:MAX_NV_INDEX_SIZE}
15743
15744UINT16
15745
15746the size of the data area
15747The
15748maximum
15749size is implementationdependent. The minimum maximum size is
15750platform-specific.
15751
15752#TPM_RC_SIZE
15753
15754response code returned when the requested size
15755is too large for the implementation
15756
1575713.4 TPM2B_NV_PUBLIC
15758This structure is used when a TPMS_NV_PUBLIC is sent on the TPM interface.
15759Table 198 — Definition of TPM2B_NV_PUBLIC Structure
15760Name
15761
15762Type
15763
15764Description
15765
15766size=
15767
15768UINT16
15769
15770size of nvPublic
15771
15772nvPublic
15773
15774TPMS_NV_PUBLIC
15775
15776the public area
15777
15778Family “2.0”
15779Level 00 Revision 00.99
15780
15781Published
15782Copyright © TCG 2006-2013
15783
15784Page 139
15785October 31, 2013
15786
15787Part 2: Structures
15788
15789Trusted Platform Module Library
15790
1579114 Context Data
1579214.1 Introduction
15793This clause defines the contents of the
15794TPM2_ContextLoad() command parameters.
15795
15796TPM2_ContextSave()
15797
15798response
15799
15800parameters
15801
15802and
15803
15804If the parameters provided by the caller in TPM2_ContextLoad() do not match the values returned by the
15805TPM when the context was saved, the integrity check of the TPM2B_CONTEXT will fail and the object or
15806session will not be loaded.
1580714.2 TPM2B_CONTEXT_SENSITIVE
15808This structure holds the object or session context data. When saved, the full structure is encrypted.
15809Table 199 — Definition of TPM2B_CONTEXT_SENSITIVE Structure <IN/OUT>
15810Parameter
15811
15812Type
15813
15814size
15815
15816Description
15817
15818UINT16
15819
15820buffer[size]{:MAX_CONTEXT_SIZE} BYTE
15821
15822the sensitive data
15823
1582414.3 TPMS_CONTEXT_DATA
15825This structure holds the integrity value and the encrypted data for a context.
15826Table 200 — Definition of TPMS_CONTEXT_DATA Structure <IN/OUT, S>
15827Parameter
15828
15829Type
15830
15831Description
15832
15833integrity
15834
15835TPM2B_DIGEST
15836
15837the integrity value
15838
15839encrypted
15840
15841TPM2B_CONTEXT_SENSITIVE
15842
15843the sensitive area
15844
1584514.4 TPM2B_CONTEXT_DATA
15846This structure is used in a TPMS_CONTEXT.
15847Table 201 — Definition of TPM2B_CONTEXT_DATA Structure <IN/OUT>
15848Parameter
15849
15850Type
15851
15852size
15853
15854Description
15855
15856UINT16
15857
15858buffer[size] {:sizeof(TPMS_CONTEXT_DATA)} BYTE
15859
15860Page 140
15861October 31, 2013
15862
15863Published
15864Copyright © TCG 2006-2013
15865
15866Family “2.0”
15867Level 00 Revision 00.99
15868
15869Trusted Platform Module Library
15870
15871Part 2: Structures
15872
1587314.5 TPMS_CONTEXT
15874This structure is used in TPM2_ContextLoad() and TPM2_ContextSave(). If the values of the
15875TPMS_CONTEXT structure in TPM2_ContextLoad() are not the same as the values when the context
15876was saved (TPM2_ContextSave()), then the TPM shall not load the context.
15877Saved object contexts shall not be loaded as long as the associated hierarchy is disabled.
15878Saved object contexts are invalidated when the Primary Seed of their hierarchy changes. Objects in the
15879Endorsement hierarchy are invalidated when either the EPS or SPS is changed.
15880When an object has the stClear attribute, it shall not be possible to reload the context or any descendant
15881object after a TPM Reset or TPM Restart.
15882NOTE 1
15883
15884The reference implementation prevents reloads after TPM Restart by including the curre nt value of a
15885clearCount in the saved object context. When an object is loaded, this value is compared with the current
15886value of the clearCount if the object has the stClear attribute. If the values are not the same, then the
15887object cannot be loaded.
15888
15889A sequence value is contained within the integrity-protected part of the saved context. The sequence
15890value is repeated in the sequence parameter of the TPMS_CONTEXT of the context. The sequence
15891parameter, along with other values, is used in the generation the protection values of the context.
15892If the integrity value of the context is valid, but the sequence value of the decrypted context does not
15893match the value in the sequence parameter, then TPM shall enter the failure mode because this is
15894indicative of a specific type of attack on the context values.
15895NOTE 2
15896
15897If the integrity value is correct, but the decryption fails and produces the wrong value for sequence, this
15898implies that either the TPM is faulty or an external entity is able to forge an integrity val ue for the context
15899but they have insufficient information to know what the encryption key of the context. Since the TPM
15900generated the valid context, then there is no reason for the sequence value in the context to be decrypted
15901incorrectly other than the TPM is faulty or the TPM is under attack. In either case, it is appropriate for the
15902TPM to enter failure more.
15903
15904Table 202 — Definition of TPMS_CONTEXT Structure
15905Name
15906
15907Type
15908
15909Description
15910
15911sequence
15912
15913UINT64
15914
15915the sequence number of the context
15916NOTE
15917
15918Transient object contexts and
15919contexts used different counters.
15920
15921session
15922
15923savedHandle
15924
15925TPMI_DH_CONTEXT
15926
15927the handle of the session, object or sequence
15928
15929hierarchy
15930
15931TPMI_RH_HIERARCHY+
15932
15933the hierarchy of the context
15934
15935contextBlob
15936
15937TPM2B_CONTEXT_DATA
15938
15939the context data and integrity HMAC
15940
15941Family “2.0”
15942Level 00 Revision 00.99
15943
15944Published
15945Copyright © TCG 2006-2013
15946
15947Page 141
15948October 31, 2013
15949
15950Part 2: Structures
15951
15952Trusted Platform Module Library
15953
1595414.6 Parameters of TPMS_CONTEXT
1595514.6.1 sequence
15956The sequence parameter is used to differentiate the contexts and to allow the TPM to create a different
15957encryption key for each context. Objects and sessions use different sequence counters. The sequence
15958counter for objects (transient and sequence) is incremented when an object context is saved, and the
15959sequence counter for sessions increments when a session is created or when it is loaded
15960(TPM2_ContextLoad()). The session sequence number is the contextID counter.
15961For a session, the sequence number also allows the TRM to find the “older” contexts so that they may be
15962refreshed if the contextID are too widely separated.
15963If an input value for sequence is larger than the value used in any saved context, the TPM shall return an
15964error (TPM_RC_VALUE) and do no additional processing of the context.
15965If the context is a session context and the input value for sequence is less than the current value of
15966contextID minus the maximum range for sessions, the TPM shall return an error (TPM_RC_VALUE) and
15967do no additional processing of the context.
1596814.6.2 savedHandle
15969For a session, this is the handle that was assigned to the session when it was saved. For a transient
15970object, the handle will have one of the values shown in Table 203.
15971If the handle type for savedHandle is TPM_HT_TRANSIENT, then the low order bits are used to
15972differentiate static objects from sequence objects.
15973If an input value for handle is outside of the range of values used by the TPM, the TPM shall return an
15974error (TPM_RC_VALUE) and do no additional processing of the context.
15975Table 203 — Context Handle Values
15976Value
15977
15978Description
15979
159800x02xxxxxx
15981
15982an HMAC session context
15983
159840x03xxxxxx
15985
15986a policy session context
15987
159880x80000000
15989
15990an ordinary transient object
15991
159920x80000001
15993
15994a sequence object
15995
159960x80000002
15997
15998a transient object with the stClear attribute SET
15999
16000Page 142
16001October 31, 2013
16002
16003Published
16004Copyright © TCG 2006-2013
16005
16006Family “2.0”
16007Level 00 Revision 00.99
16008
16009Trusted Platform Module Library
16010
16011Part 2: Structures
16012
1601314.6.3 hierarchy
16014This is the hierarchy (TPMI_RH_HIERARCHY) for the saved context and determines the proof value used
16015in the construction of the encryption and integrity values for the context. For session and sequence
16016contexts, the hierarchy is TPM_RC_NULL. The hierarchy for a transient object may be TPM_RH_NULL
16017but it is not required.
1601814.7 Context Protection
1601914.7.1 Context Integrity
16020The integrity of the context blob is protected by an HMAC. The integrity value is constructed such that
16021changes to the component values will invalidate the context and prevent it from being loaded.
16022Previously saved contexts for objects in the Platform hierarchy shall not be loadable after the PPS is
16023changed.
16024Previously saved contexts for objects in the Storage hierarchy shall not be loadable after the SPS is
16025changed.
16026Previously saved contexts for objects in the Endorsement hierarchy shall not be loadable after either the
16027EPS or SPS is changed.
16028Previously saved sessions shall not be loadable after the SPS changes.
16029Previously saved contexts for objects that have their stClear attribute SET shall not be loadable after a
16030TPM Restart. If a Storage Key has its stClear attribute SET, the descendants of this key shall not be
16031loadable after TPM Restart.
16032Previously saved contexts for a session and objects shall not be loadable after a TPM Reset.
16033A saved context shall not be loaded if its HMAC is not valid. The equation for computing the HMAC for a
16034context is found in “Context Integrity Protection” in Part 1.
1603514.7.2 Context Confidentiality
16036The context data of sessions and objects shall be protected by symmetric encryption using CFB. The
16037method for computing the IV and encryption key is found in “Context Confidentiality Protection” in Part 1.
16038
16039Family “2.0”
16040Level 00 Revision 00.99
16041
16042Published
16043Copyright © TCG 2006-2013
16044
16045Page 143
16046October 31, 2013
16047
16048Part 2: Structures
16049
16050Trusted Platform Module Library
16051
1605215 Creation Data
1605315.1 TPMS_CREATION_DATA
16054This structure provides information relating to the creation environment for the object. The creation data
16055includes the parent Name, parent Qualified Name, and the digest of selected PCR. These values
16056represent the environment in which the object was created. Creation data allows a relying party to
16057determine if an object was created when some appropriate protections were present.
16058When the object is created, the structure shown in Table 204 is generated and a ticket is computed over
16059this data.
16060If
16061the
16062parent
16063is
16064a
16065permanent
16066handle
16067(TPM_RH_OWNER,
16068TPM_RH_PLATFORM,
16069TPM_RH_ENDORSEMENT, or TPM_RH_NULL), then parentName and parentQualifiedName will be set
16070to the parent handle value and parentNameAlg will be TPM_ALG_NULL.
16071Table 204 — Definition of TPMS_CREATION_DATA Structure <OUT>
16072Parameter
16073
16074Type
16075
16076Description
16077
16078pcrSelect
16079
16080TPML_PCR_SELECTION
16081
16082list indicating the PCR included in pcrDigest
16083
16084pcrDigest
16085
16086TPM2B_DIGEST
16087
16088digest of the selected PCR using nameAlg of the object for
16089which this structure is being created
16090pcrDigest.size shall be zero if the pcrSelect list is empty.
16091
16092locality
16093
16094TPMA_LOCALITY
16095
16096the locality at which the object was created
16097
16098parentNameAlg
16099
16100TPM_ALG_ID
16101
16102nameAlg of the parent
16103
16104parentName
16105
16106TPM2B_NAME
16107
16108Name of the parent at time of creation
16109The size will match digest size associated with parentNameAlg
16110unless it is TPM_ALG_NULL, in which case the size will be 4
16111and parentName will be the hierarchy handle.
16112
16113parentQualifiedName
16114
16115TPM2B_NAME
16116
16117Qualified Name of the parent at the time of creation
16118Size is the same as parentName.
16119
16120outsideInfo
16121
16122TPM2B_DATA
16123
16124association with additional information added by the key
16125creator
16126This will be the contents of the outsideInfo parameter in
16127TPM2_Create() or TPM2_CreatePrimary().
16128
1612915.2 TPM2B_CREATION_DATA
16130This structure is created by TPM2_Create() and TPM2_CreatePrimary(). It is never entered into the TPM
16131and never has a size of zero.
16132Table 205 — Definition of TPM2B_CREATION_DATA Structure <OUT>
16133Parameter
16134
16135Type
16136
16137Description
16138
16139size=
16140
16141UINT16
16142
16143size of the creation data
16144
16145creationData
16146
16147TPMS_CREATION_DATA
16148
16149Page 144
16150October 31, 2013
16151
16152Published
16153Copyright © TCG 2006-2013
16154
16155Family “2.0”
16156Level 00 Revision 00.99
16157
16158Trusted Platform Module Library
16159
16160Part 2: Structures
16161
16162Annex A
16163(informative)
16164Algorithm Constants
16165A.1
16166
16167Introduction
16168
16169This annex contains constants that are defined by algorithms.
16170
16171A.2
16172A.2.1
16173
16174Allowed Hash Algorithms
16175SHA1
16176Table 206 — Defines for SHA1 Hash Values
16177
16178Name
16179
16180Value
16181
16182SHA1_DIGEST_SIZE
16183
1618420
16185
16186SHA1_BLOCK_SIZE
16187
1618864
16189
16190SHA1_DER_SIZE
16191
16192Description
16193
1619415
16195
16196SHA1_DER
16197
16198A.2.2
16199
16200Values are in octets.
16201
16202{0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,
162030x03,0x02,0x1A,0x05,0x00,0x04,0x14}
16204
16205SHA256
16206Table 207 — Defines for SHA256 Hash Values
16207
16208Name
16209
16210Value
16211
16212SHA256_DIGEST_SIZE
16213
1621432
16215
16216SHA256_BLOCK_SIZE
16217
1621864
16219
16220SHA256_DER_SIZE
16221
16222Description
16223
1622419
16225
16226SHA256_DER
16227
16228A.2.3
16229
16230Values are in octets.
16231
16232{0x30,0x31,0x30,0x0d,0x06,0x09,0x60,0x86,
162330x48,0x01,0x65,0x03,0x04,0x02,0x01,0x05,
162340x00,0x04,0x20}
16235
16236SHA384
16237Table 208 — Defines for SHA384 Hash Values
16238
16239Name
16240
16241Value
16242
16243SHA384_DIGEST_SIZE
16244
1624548
16246
16247SHA384_BLOCK_SIZE
16248
16249128
16250
16251SHA384_DER_SIZE
16252
16253Description
16254
1625519
16256
16257SHA384_DER
16258
16259Family “2.0”
16260Level 00 Revision 00.99
16261
16262Values are in octets.
16263
16264{0x30,0x41,0x30,0x0d,0x06,0x09,0x60,0x86,
162650x48,0x01,0x65,0x03,0x04,0x02,0x02,0x05,
162660x00,0x04,0x30}
16267
16268Published
16269Copyright © TCG 2006-2013
16270
16271Page 145
16272October 31, 2013
16273
16274Part 2: Structures
16275A.2.4
16276
16277Trusted Platform Module Library
16278
16279SHA512
16280Table 209 — Defines for SHA512 Hash Values
16281
16282Name
16283
16284Value
16285
16286SHA512_DIGEST_SIZE
16287
1628864
16289
16290SHA512_BLOCK_SIZE
16291
16292128
16293
16294SHA512_DER_SIZE
16295
16296Description
16297
1629819
16299
16300SHA512_DER
16301
16302A.2.5
16303
16304Values are in octets.
16305
16306{0x30,0x51,0x30,0x0d,0x06,0x09,0x60,0x86,
163070x48,0x01,0x65,0x03,0x04,0x02,0x03,0x05,
163080x00,0x04,0x40}
16309
16310SM3_256
16311Table 210 — Defines for SM3_256 Hash Values
16312
16313Name
16314
16315Value
16316
16317Description
16318
16319SM3_256_DIGEST_SIZE
16320
1632132
16322
16323Values are in octets.
16324
16325SM3_256_BLOCK_SIZE
16326
1632764
16328
16329??
16330
16331SM3_256_DER_SIZE
16332
1633318
16334
16335SM3_256_DER
16336
16337A.3
16338
16339{0x30,0x30,0x30,0x0c,0x06,0x08,0x2a,0x81,
163400x1c,0x81,0x45,0x01,0x83,0x11,0x05,0x00,
163410x04,0x20}
16342
16343Unknown
16344
16345Architectural Limits
16346Table 211 — Defines for Architectural Limits Values
16347
16348Name
16349MAX_SESSION_NUMBER
16350
16351Page 146
16352October 31, 2013
16353
16354Value
163553
16356
16357Description
16358the maximum number of authorization sessions that may be in a
16359command
16360This value may be increased if new commands require more than
16361two authorization handles.
16362
16363Published
16364Copyright © TCG 2006-2013
16365
16366Family “2.0”
16367Level 00 Revision 00.99
16368
16369Trusted Platform Module Library
16370
16371Part 2: Structures
16372
16373Annex B
16374(informative)
16375Implementation Definitions
16376B.1
16377
16378Introduction
16379
16380This annex contains some of the tables that are used to define the desired implementation for the
16381automated tools.
16382NOTE
16383
16384B.2
16385
16386The reference implementation assumes that stdint.h is used.
16387
16388Logic Values
16389
16390The values in this clause are used to see the generation of the subsequent tables. These values should
16391not be changed.
16392Table 212 — Defines for Logic Values
16393Name
16394
16395Value
16396
16397YES
16398
163991
16400
16401NO
16402
164030
16404
16405TRUE
16406
164071
16408
16409FALSE
16410
164110
16412
16413SET
16414
164151
16416
16417CLEAR
16418
16419Description
16420
164210
16422
16423B.3
16424
16425Processor Values
16426
16427These values are used to control generation of octet-swapping routines. The canonical octet ordering for
16428the TPM input/output buffer is “big endian” with the most significant octet of any datum at the lowest
16429address.
16430NOTE
16431
16432The setting for the exemplar is for the x86 family of processor.
16433
16434Table 213 — Defines for Processor Values
16435Name
16436
16437Value
16438
16439Description
16440
16441BIG_ENDIAN_TPM
16442
16443NO
16444
16445set to YES or NO according to the processor
16446
16447LITTLE_ENDIAN_TPM
16448
16449YES
16450
16451set to YES or NO according to the processor
16452NOTE
16453
16454NO_AUTO_ALIGN
16455
16456NO
16457
16458set to YES if the processor does not allow unaligned accesses
16459NOTE
16460
16461Family “2.0”
16462Level 00 Revision 00.99
16463
16464BIG_ENDIAN and LITTLE_ENDIAN shall be set to opposite values.
16465
16466If LITTLE_ENDIAN is YES, then the setting of this value has no effect.
16467
16468Published
16469Copyright © TCG 2006-2013
16470
16471Page 147
16472October 31, 2013
16473
16474Part 2: Structures
16475
16476B.4
16477
16478Trusted Platform Module Library
16479
16480Implemented Algorithms
16481
16482Table 214 is used to indicate the algorithms that are implemented in a TPM. The selections in the Value
16483column may be changed to reflect the implementation. The values shown are illustrative.
16484The "Implemented" column contains a "Y", "YES", or blank to indicate that the command is present in the
16485implementation, an "N" or "NO" to indicate that the command is not implemented.
16486The leading and trailing “_” characters are to avoid name space collisions with some crypto libraries.
16487
16488NOTE
16489
16490Table 214 — Defines for Implemented Algorithms
16491Algorithm Name
16492
16493Implemented
16494
16495RSA
16496
16497YES
16498
16499SHA1
16500
16501YES
16502
16503HMAC
16504
16505YES
16506
16507AES
16508
16509YES
16510
16511MGF1
16512
16513YES
16514
16515XOR
16516
16517YES
16518
16519KEYEDHASH
16520
16521YES
16522
16523SHA256
16524
16525YES
16526
16527SHA384
16528
16529NO
16530
16531SHA512
16532
16533NO
16534
16535SM3_256
16536
16537YES
16538
16539SM4
16540
16541Comments
16542
16543YES
16544
16545REQUIRED, do not change this value
16546
16547REQUIRED, do not change this value
16548
16549RSASSA
16550
16551(YES * RSA)
16552
16553requires RSA
16554
16555RSAES
16556
16557(YES * RSA)
16558
16559requires RSA
16560
16561RSAPSS
16562
16563(YES * RSA)
16564
16565requires RSA
16566
16567OAEP
16568
16569(YES * RSA)
16570
16571requires RSA
16572
16573ECC
16574
16575YES
16576
16577ECDH
16578
16579(YES * ECC)
16580
16581requires ECC
16582
16583ECDSA
16584
16585(YES * ECC)
16586
16587requires ECC
16588
16589ECDAA
16590
16591(YES * ECC)
16592
16593requires ECC
16594
16595SM2
16596
16597(YES * ECC)
16598
16599requires ECC
16600
16601ECSCHNORR
16602
16603(YES * ECC)
16604
16605requires ECC
16606
16607ECMQV
16608
16609(NO * ECC)
16610
16611requires ECC
16612
16613SYMCIPHER
16614KDF1_SP800_56a
16615
16616YES
16617
16618REQUIRED, at least one symmetric algorithm shall be implemented
16619
16620(YES * ECC)
16621
16622KDF2
16623
16624NO
16625
16626KDF1_SP800_108
16627
16628YES
16629
16630CTR
16631
16632YES
16633
16634OFB
16635
16636YES
16637
16638CBC
16639
16640YES
16641
16642CFB
16643
16644YES
16645
16646ECB
16647
16648requires ECC
16649
16650YES
16651
16652B.5
16653
16654REQUIRED, do not change this value
16655
16656Implemented Commands
16657
16658Page 148
16659October 31, 2013
16660
16661Published
16662Copyright © TCG 2006-2013
16663
16664Family “2.0”
16665Level 00 Revision 00.99
16666
16667Trusted Platform Module Library
16668
16669Part 2: Structures
16670
16671This table is used to indicate which of the commands are implemented. In the reference implementation,
16672this table determines which commands can be called and drives the generation of various commanddependent switch statements.
16673The "Implemented or Dependent" column contains a "Y", "YES", or blank to indicate that the command is
16674present in the implementation; an "N" or "NO" to indicate that the command is not implemented; and an
16675algorithm value if implementation of the command is dependent on a setting in Table 214. Linkage to
16676Table 214 is not required and is provide as a convenience.
16677To indicate that the command is implemented, only "Y", "N", blank, or a value from Table 214 is allowed.
16678Table 215 — Defines for Implemented Commands
16679Name
16680ActivateCredential
16681
16682Implemented
16683or Dependent
16684
16685Comments
16686
16687YES
16688
16689Certify
16690
16691Y
16692
16693CertifyCreation
16694
16695Y
16696
16697ChangeEPS
16698
16699Y
16700
16701ChangePPS
16702
16703Y
16704
16705Clear
16706
16707Y
16708
16709ClearControl
16710
16711Y
16712
16713ClockRateAdjust
16714
16715Y
16716
16717ClockSet
16718
16719Y
16720
16721Commit
16722
16723ECC
16724
16725ContextLoad
16726
16727Y
16728
16729Context
16730
16731ContextSave
16732
16733Y
16734
16735Context
16736
16737Create
16738
16739Y
16740
16741CreatePrimary
16742
16743Y
16744
16745DictionaryAttackLockReset
16746
16747Y
16748
16749DictionaryAttackParameters
16750
16751Y
16752
16753Duplicate
16754
16755Y
16756
16757ECC_Parameters
16758
16759ECC
16760
16761ECDH_KeyGen
16762
16763ECC
16764
16765ECDH_ZGen
16766
16767ECC
16768
16769EncryptDecrypt
16770
16771Y
16772
16773EventSequenceComplete
16774
16775Y
16776
16777EvictControl
16778
16779Y
16780
16781FieldUpgradeData
16782
16783N
16784
16785FieldUpgradeStart
16786
16787N
16788
16789FirmwareRead
16790
16791N
16792
16793FlushContext
16794
16795Y
16796
16797GetCapability
16798
16799Y
16800
16801GetCommandAuditDigest
16802
16803Y
16804
16805GetRandom
16806
16807Y
16808
16809GetSessionAuditDigest
16810
16811Y
16812
16813Family “2.0”
16814Level 00 Revision 00.99
16815
16816Context
16817
16818Published
16819Copyright © TCG 2006-2013
16820
16821Page 149
16822October 31, 2013
16823
16824Part 2: Structures
16825
16826Name
16827
16828Trusted Platform Module Library
16829Implemented
16830or Dependent
16831
16832Comments
16833
16834GetTestResult
16835
16836Y
16837
16838GetTime
16839
16840Y
16841
16842Hash
16843
16844Y
16845
16846HashSequenceStart
16847
16848Y
16849
16850HierarchyChangeAuth
16851
16852Y
16853
16854HierarchyControl
16855
16856Y
16857
16858HMAC
16859
16860Y
16861
16862HMAC_Start
16863
16864Y
16865
16866Import
16867
16868Y
16869
16870IncrementalSelfTest
16871
16872Y
16873
16874Load
16875
16876Y
16877
16878LoadExternal
16879
16880Y
16881
16882MakeCredential
16883
16884Y
16885
16886NV_Certify
16887
16888Y
16889
16890NV_ChangeAuth
16891
16892Y
16893
16894NV_DefineSpace
16895
16896Y
16897
16898NV_Extend
16899
16900Y
16901
16902NV_GlobalWriteLock
16903
16904Y
16905
16906NV_Increment
16907
16908Y
16909
16910NV_Read
16911
16912Y
16913
16914NV_ReadLock
16915
16916Y
16917
16918NV_ReadPublic
16919
16920Y
16921
16922NV_SetBits
16923
16924Y
16925
16926NV_UndefineSpace
16927
16928Y
16929
16930NV_UndefineSpaceSpecial
16931
16932Y
16933
16934NV_Write
16935
16936Y
16937
16938NV_WriteLock
16939
16940Y
16941
16942ObjectChangeAuth
16943
16944Y
16945
16946PCR_Allocate
16947
16948Y
16949
16950PCR_Event
16951
16952Y
16953
16954PCR_Extend
16955
16956Y
16957
16958PCR_Read
16959
16960Y
16961
16962PCR
16963
16964PCR_Reset
16965
16966Y
16967
16968PCR
16969
16970PCR_SetAuthPolicy
16971
16972Y
16973
16974PCR_SetAuthValue
16975
16976Y
16977
16978PolicyAuthorize
16979
16980Y
16981
16982Policy
16983
16984PolicyAuthValue
16985
16986Y
16987
16988Policy
16989
16990PolicyCommandCode
16991
16992Y
16993
16994Policy
16995
16996PolicyCounterTimer
16997
16998Y
16999
17000Policy
17001
17002PolicyCpHash
17003
17004Y
17005
17006Policy
17007
17008Page 150
17009October 31, 2013
17010
17011NV
17012
17013PCR
17014
17015Published
17016Copyright © TCG 2006-2013
17017
17018Family “2.0”
17019Level 00 Revision 00.99
17020
17021Trusted Platform Module Library
17022
17023Part 2: Structures
17024Implemented
17025or Dependent
17026
17027Name
17028
17029Comments
17030
17031PolicyDuplicationSelect
17032
17033Y
17034
17035Policy
17036
17037PolicyGetDigest
17038
17039Y
17040
17041Policy
17042
17043PolicyLocality
17044
17045Y
17046
17047Policy
17048
17049PolicyNameHash
17050
17051Y
17052
17053Policy
17054
17055PolicyNV
17056
17057Y
17058
17059Policy
17060
17061PolicyOR
17062
17063Y
17064
17065Policy
17066
17067PolicyPassword
17068
17069Y
17070
17071Policy
17072
17073PolicyPCR
17074
17075Y
17076
17077Policy
17078
17079PolicyPhysicalPresence
17080
17081Y
17082
17083Policy
17084
17085PolicyRestart
17086
17087Y
17088
17089PolicySecret
17090
17091Y
17092
17093Policy
17094
17095PolicySigned
17096
17097Y
17098
17099Policy
17100
17101PolicyTicket
17102
17103Y
17104
17105Policy
17106
17107PP_Commands
17108
17109Y
17110
17111Quote
17112
17113Y
17114
17115ReadClock
17116
17117Y
17118
17119ReadPublic
17120
17121Y
17122
17123Rewrap
17124
17125Y
17126
17127RSA_Decrypt
17128
17129RSA
17130
17131RSA_Encrypt
17132
17133RSA
17134
17135SelfTest
17136
17137Y
17138
17139SequenceComplete
17140
17141Y
17142
17143SequenceUpdate
17144
17145Y
17146
17147SetAlgorithmSet
17148
17149Y
17150
17151SetCommandCodeAuditStatus
17152
17153Y
17154
17155SetPrimaryPolicy
17156
17157Y
17158
17159Shutdown
17160
17161Y
17162
17163Sign
17164
17165Y
17166
17167StartAuthSession
17168
17169Y
17170
17171Startup
17172
17173Y
17174
17175StirRandom
17176
17177Y
17178
17179TestParms
17180
17181Y
17182
17183Unseal
17184
17185Y
17186
17187VerifySignature
17188
17189Y
17190
17191ZGen_2Phase
17192
17193Y
17194
17195EC_Ephemeral
17196
17197Y
17198
17199PolicyNvWritten
17200
17201Y
17202
17203B.6
17204
17205Algorithm Constants
17206
17207Family “2.0”
17208Level 00 Revision 00.99
17209
17210Published
17211Copyright © TCG 2006-2013
17212
17213Page 151
17214October 31, 2013
17215
17216Part 2: Structures
17217B.6.1
17218
17219Trusted Platform Module Library
17220
17221RSA
17222Table 216 — Defines for RSA Algorithm Constants
17223
17224Name
17225
17226Value
17227
17228Comments
17229
17230RSA_KEY_SIZES_BITS
17231
17232{1024, 2048}
17233
17234braces because this is a
17235list value
17236
17237MAX_RSA_KEY_BITS
17238
172392048
17240
17241MAX_RSA_KEY_BYTES
17242
17243((MAX_RSA_KEY_BITS + 7) / 8)
17244
17245B.6.2
17246
17247ECC
17248Table 217 — Defines for ECC Algorithm Constants
17249
17250Name
17251
17252Value
17253
17254ECC_CURVES
17255
17256{TPM_ECC_NIST_P256, TPM_ECC_BN_P256,
17257TPM_ECC_SM2_P256}
17258
17259ECC_KEY_SIZES_BITS
17260
17261{256}
17262
17263MAX_ECC_KEY_BITS
17264
17265256
17266
17267MAX_ECC_KEY_BYTES
17268
17269((MAX_ECC_KEY_BITS + 7) / 8)
17270
17271B.6.3
17272
17273Comments
17274
17275this is a list value with
17276length of one
17277
17278AES
17279Table 218 — Defines for AES Algorithm Constants
17280
17281Name
17282
17283Value
17284
17285AES_KEY_SIZES_BITS
17286
17287{128}
17288
17289MAX_AES_KEY_BITS
17290
17291128
17292
17293MAX_AES_BLOCK_SIZE_BYTES
17294
1729516
17296
17297MAX_AES_KEY_BYTES
17298
17299((MAX_AES_KEY_BITS + 7) / 8)
17300
17301B.6.4
17302
17303Comments
17304
17305SM4
17306Table 219 — Defines for SM4 Algorithm Constants
17307
17308Name
17309
17310Value
17311
17312SM4_KEY_SIZES_BITS
17313
17314{128}
17315
17316MAX_SM4_KEY_BITS
17317
17318128
17319
17320MAX_SM4_BLOCK_SIZE_BYTES
17321
1732216
17323
17324MAX_SM4_KEY_BYTES
17325
17326((MAX_SM4_KEY_BITS + 7) / 8)
17327
17328Page 152
17329October 31, 2013
17330
17331Comments
17332
17333Published
17334Copyright © TCG 2006-2013
17335
17336Family “2.0”
17337Level 00 Revision 00.99
17338
17339Trusted Platform Module Library
17340B.6.5
17341
17342Part 2: Structures
17343
17344Symmetric
17345
17346The definitions in this table are derived from the implemented symmetric algorithms.
17347Table 220 — Defines for Symmetric Algorithm Constants
17348Name
17349
17350Value
17351
17352MAX_SYM_KEY_BITS
17353
17354MAX_AES_KEY_BITS
17355
17356MAX_SYM_KEY_BYTES
17357
17358MAX_AES_KEY_BYTES
17359
17360MAX_SYM_BLOCK_SIZE
17361
17362MAX_AES_BLOCK_SIZE_BYTES
17363
17364Family “2.0”
17365Level 00 Revision 00.99
17366
17367Comments
17368
17369Published
17370Copyright © TCG 2006-2013
17371
17372Page 153
17373October 31, 2013
17374
17375Part 2: Structures
17376
17377B.7
17378
17379Trusted Platform Module Library
17380
17381Implementation Specific Values
17382
17383The values listed in Table 221 are defined for a specific TPM implementation. The numbers in the Value
17384column may be changed to reflect the implementation. The values shown are illustrative.
17385Table 221 — Defines for Implementation Values
17386Name
17387
17388Value
17389
17390Description
17391
17392FIELD_UPGRADE_IMPLEMENTED
17393
17394NO
17395
17396temporary define
17397
17398BSIZE
17399
17400UINT16
17401
17402size used for internal storage of
17403the size field of a TPM2B
17404This is the definition used for
17405the reference design.
17406Compilation with this value
17407changed may cause warnings
17408about conversions.
17409
17410BUFFER_ALIGNMENT
17411
174124
17413
17414sets the size granularity for the
17415buffers in a TPM2B structure
17416TPMxB buffers will be assigned
17417a space that is a multiple of this
17418value. This does not set the size
17419limits for IO. Those are set by
17420the canonical form of the
17421TPMxB
17422
17423IMPLEMENTATION_PCR
17424
1742524
17426
17427the number of PCR in the TPM
17428
17429PLATFORM_PCR
17430
1743124
17432
17433the number of PCR required by
17434the relevant platform
17435specification
17436
17437DRTM_PCR
17438
1743917
17440
17441the DRTM PCR
17442
17443HCRTM_PCR
17444
174450
17446
17447the PCR that will receive the HCRTM value at TPM2_Startup
17448
17449NUM_LOCALITIES
17450
174515
17452
17453the number of localities
17454supported by the TPM
17455This is expected to be either 5
17456for a PC, or 1 for just about
17457everything else.
17458
17459MAX_HANDLE_NUM
17460
174613
17462
17463the maximum number of
17464handles in the handle area
17465This should be produced by the
17466Part 3 parser but is here for
17467now.
17468
17469MAX_ACTIVE_SESSIONS
17470
1747164
17472
17473the number of simultaneously
17474active sessions that are
17475supported by the TPM
17476implementation
17477
17478CONTEXT_SLOT
17479
17480UINT16
17481
17482the type of an entry in the array
17483of saved contexts
17484
17485CONTEXT_COUNTER
17486
17487UINT64
17488
17489the type of the saved session
17490counter
17491
17492MAX_LOADED_SESSIONS
17493
174943
17495
17496the number of sessions that the
17497TPM may have in memory
17498
17499MAX_SESSION_NUM
17500
175013
17502
17503this is the current maximum
17504value
17505
17506Page 154
17507October 31, 2013
17508
17509Published
17510Copyright © TCG 2006-2013
17511
17512Family “2.0”
17513Level 00 Revision 00.99
17514
17515Trusted Platform Module Library
17516
17517Part 2: Structures
17518
17519Name
17520
17521Value
17522
17523Description
17524
17525MAX_LOADED_OBJECTS
17526
175273
17528
17529the number of simultaneously
17530loaded objects that are
17531supported by the TPM; this
17532number does not include the
17533objects that may be placed in
17534NV memory by
17535TPM2_EvictControl().
17536
17537MIN_EVICT_OBJECTS
17538
175392
17540
17541the minimum number of evict
17542objects supported by the TPM
17543
17544PCR_SELECT_MIN
17545
17546((PLATFORM_PCR+7)/8)
17547
17548PCR_SELECT_MAX
17549
17550((IMPLEMENTATION_PCR+7)/8)
17551
17552NUM_POLICY_PCR_GROUP
17553
175541
17555
17556number of PCR groups that
17557have individual policies
17558
17559NUM_AUTHVALUE_PCR_GROUP
17560
175611
17562
17563number of PCR groups that
17564have individual authorization
17565values
17566
17567MAX_CONTEXT_SIZE
17568
175694000
17570
17571This may be larger than
17572necessary
17573
17574MAX_DIGEST_BUFFER
17575
175761024
17577
17578MAX_NV_INDEX_SIZE
17579
175802048
17581
17582maximum data size allowed in
17583an NV Index
17584
17585MAX_NV_BUFFER_SIZE
17586
175871024
17588
17589maximum data size in one NV
17590read or write command
17591
17592MAX_CAP_BUFFER
17593
175941024
17595
17596NV_MEMORY_SIZE
17597
1759816384
17599
17600NUM_STATIC_PCR
17601
1760216
17603
17604MAX_ALG_LIST_SIZE
17605
1760664
17607
17608number of algorithms that can
17609be in a list
17610
17611TIMER_PRESCALE
17612
17613100000
17614
17615nominal value for the pre-scale
17616value of Clock (the number of
17617cycles of the TPM's oscillator for
17618each increment of Clock)
17619
17620PRIMARY_SEED_SIZE
17621
1762232
17623
17624size of the Primary Seed in
17625octets
17626
17627CONTEXT_ENCRYPT_ALG
17628
17629TPM_ALG_AES
17630
17631context encryption algorithm
17632
17633CONTEXT_ENCRYPT_KEY_BITS
17634
17635MAX_SYM_KEY_BITS
17636
17637context encryption key size in
17638bits
17639
17640CONTEXT_ENCRYPT_KEY_BYTES
17641
17642((CONTEXT_ENCRYPT_KEY_BITS+7
17643)/8)
17644
17645CONTEXT_INTEGRITY_HASH_ALG
17646
17647TPM_ALG_SHA256
17648
17649context integrity hash algorithm
17650
17651CONTEXT_INTEGRITY_HASH_SIZE
17652
17653SHA256_DIGEST_SIZE
17654
17655number of byes in the context
17656integrity digest
17657
17658PROOF_SIZE
17659
17660CONTEXT_INTEGRITY_HASH_SIZE
17661
17662size of proof value in octets
17663This size of the proof should be
17664consistent with the digest size
17665used for context integrity.
17666
17667NV_CLOCK_UPDATE_INTERVAL
17668
1766912
17670
17671the update interval expressed
17672as a power of 2 seconds
17673
17674size of NV memory in octets
17675
17676A value of 12 is 4,096 seconds
17677(~68 minutes).
17678
17679Family “2.0”
17680Level 00 Revision 00.99
17681
17682Published
17683Copyright © TCG 2006-2013
17684
17685Page 155
17686October 31, 2013
17687
17688Part 2: Structures
17689
17690Trusted Platform Module Library
17691
17692Name
17693
17694Value
17695
17696Description
17697
17698NUM_POLICY_PCR
17699
177001
17701
17702number of PCR that allow
17703policy/auth
17704
17705MAX_COMMAND_SIZE
17706
177074096
17708
17709maximum size of a command
17710
17711MAX_RESPONSE_SIZE
17712
177134096
17714
17715maximum size of a response
17716
17717ORDERLY_BITS
17718
177198
17720
17721number between 1 and 32
17722inclusive
17723
17724MAX_ORDERLY_COUNT
17725
17726((1 << ORDERLY_BITS) - 1)
17727
17728maximum count of orderly
17729counter before NV is updated
17730This must be of the form 2N – 1
17731where 1 ≤ N ≤ 32.
17732
17733ALG_ID_FIRST
17734
17735TPM_ALG_FIRST
17736
17737used by GetCapability()
17738processing to bound the
17739algorithm search
17740
17741ALG_ID_LAST
17742
17743TPM_ALG_LAST
17744
17745used by GetCapability()
17746processing to bound the
17747algorithm search
17748
17749MAX_SYM_DATA
17750
17751128
17752
17753this is the maximum number of
17754octets that may be in a sealed
17755blob.
17756
17757MAX_RNG_ENTROPY_SIZE
17758
1775964
17760
17761RAM_INDEX_SPACE
17762
17763512
17764
17765RSA_DEFAULT_PUBLIC_EXPONENT
17766
177670x00010001
17768
17769216 + 1
17770
17771ENABLE_PCR_NO_INCREMENT
17772
17773YES
17774
17775indicates if the
17776TPM_PT_PCR_NO_INCREME
17777NT group is implemented
17778
17779CRT_FORMAT_RSA
17780
17781YES
17782
17783PRIVATE_VENDOR_SPECIFIC_BYTES
17784
17785((MAX_RSA_KEY_BYTES/2) * (3 +
17786CRT_FORMAT_RSA * 2))
17787
17788Page 156
17789October 31, 2013
17790
17791Published
17792Copyright © TCG 2006-2013
17793
17794Family “2.0”
17795Level 00 Revision 00.99
17796
17797
17798