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
25891.1.1.1.1
2590
2591Family “2.0”
2592Level 00 Revision 00.99
2593
2594Published
2595Copyright © TCG 2006-2013
2596
2597Page 17
2598October 31, 2013
2599
2600Part 2: Structures
2601
26026
2603
2604Trusted Platform Module Library
2605
2606Constants
2607
26086.1
2609
2610TPM_SPEC (Specification Version Values)
2611
2612These values are readable with TPM2_GetCapability().
2613NOTE
2614
2615This table will require editing when the specification is updated.
2616
2617Table 5 — Definition of (UINT32) TPM_SPEC Constants <>
2618Name
2619
2620Value
2621
2622Comments
2623ASCII “2.0” with null terminator
2624
2625TPM_SPEC_FAMILY
2626
26270x322E3000
2628
2629TPM_SPEC_LEVEL
2630
263100
2632
2633the level number for the specification
2634
2635TPM_SPEC_VERSION
2636
263799
2638
2639the version number of the spec (00.99 * 100)
2640
2641TPM_SPEC_YEAR
2642
26432013
2644
2645the year of the version
2646
2647TPM_SPEC_DAY_OF_YEAR
2648
2649304
2650
2651the day of the year (October 31, 2013)
2652
26536.2
2654
2655TPM_GENERATED
2656
2657This constant value differentiates TPM-generated structures from non-TPM structures.
2658Table 6 — Definition of (UINT32) TPM_GENERATED Constants <O>
2659Name
2660
2661Value
2662
2663Comments
2664
2665TPM_GENERATED_VALUE
2666
26670xff544347
2668
26690xFF ‘TCG’ (FF 54 43 4716)
2670
2671Page 18
2672October 31, 2013
2673
2674Published
2675Copyright © TCG 2006-2013
2676
2677Family “2.0”
2678Level 00 Revision 00.99
2679
2680Trusted Platform Module Library
26816.3
2682
2683Part 2: Structures
2684
2685TPM_ALG_ID
2686
2687The TCG maintains a registry of all algorithms that have an assigned algorithm ID. That registry is the
2688definitive list of algorithms that may be supported by a TPM.
2689NOTE
2690
2691Inclusion of an algorithm does NOT indicate that the necessary claims of the algorithm are av ailable
2692under RAND terms from a TCG member.
2693
2694Table 7 is a copy of the TPM_ALG_ID constants table in the TCG registry as of the date of publication of
2695this specification. Table 7 is provided for illustrative purposes only.
2696{{Note for TCG Admin: Table 7 and the text in the paragraph above should be updated to reflect the final
2697decisions by the TCG Board of Directors about inclusion of the table and the contents of the table. The
2698desired approach is to leave the text as is and, immediately before publication of this specification for
2699TCG admin to verify that Table 7 is the same as the algorithm registry table published by the TCG.}}
2700An algorithm ID is often used like a tag to determine the type of a structure in a context-sensitive way.
2701The values for TPM_ALG_ID shall be in the range of 00 0016 – 7F FF16. Other structure tags will be in the
2702range 80 0016 – FF FF16.
2703NOTE
2704
2705In TPM 1.2, these were defined as 32-bit constants. This specification limits the future size of the
2706algorithm ID to 16 bits. The TPM_ALGORITHM_ID data type will continue to be a 32-bit number.
2707
2708An algorithm shall not be assigned a value in the range 00 C116 – 00 C616 in order to prevent any overlap
2709with the command structure tags used in TPM 1.2.
2710The implementation of some algorithms is dependent on the presence of other algorithms. When there is
2711a dependency, the algorithm that is required is listed in column labeled "D" (dependent) in Table 7.
2712EXAMPLE
2713
2714Implementation of TPM_ALG_RSASSA requires that the RSA algorithm be implemented.
2715
2716TPM_ALG_KEYEDHASH and TPM_ALG_NULL are required of all TPM implementations.
2717Table 7 — Definition of (UINT16) TPM_ALG_ID Constants <IN/OUT, S>
2718Algorithm Name
2719
2720Value
2721
2722Type
2723
2724a
2725
2726D
2727
2728Comments
2729
2730TPM_ALG_ERROR
2731
27320x0000
2733
2734should not occur
2735
2736TPM_ALG_FIRST
2737
27380x0001
2739
2740TPM_ALG_RSA
2741
27420x0001
2743
2744AO
2745
2746the RSA algorithm
2747
2748TPM_ALG_SHA
2749
27500x0004
2751
2752H
2753
2754the SHA1 algorithm
2755
2756TPM_ALG_SHA1
2757
27580x0004
2759
2760H
2761
2762redefinition for documentation consistency
2763OID 30 21 30 09 06 05 2B 0E 03 02 1A 05 00 04 14 16
2764
2765TPM_ALG_HMAC
2766
27670x0005
2768
2769HX
2770
2771the RFC 2104 Hash Message Authentication Code
2772(HMAC) algorithm
2773
2774TPM_ALG_AES
2775
27760x0006
2777
2778S
2779
2780
2781TPM_ALG_MGF1
2782
27830x0007
2784
2785HM
2786
2787the mask-generation function defined in IEEE Std
27881363-2000
2789
2790TPM_ALG_KEYEDHASH
2791
27920x0008
2793
2794HEXO
2795
2796an encryption or signing algorithm using a keyed hash,
2797defined by TCG in the TPM 2.0 specification
2798may also refer to a data object that is neither signing
2799nor encrypting
2800
2801TPM_ALG_XOR
2802
28030x000A
2804
2805HS
2806
2807marker value
2808
2809the XOR obfuscation algorithm
2810NOTE
2811
2812Family “2.0”
2813Level 00 Revision 00.99
2814
2815Published
2816Copyright © TCG 2006-2013
2817
2818Page 19
2819October 31, 2013
2820
2821Part 2: Structures
2822Algorithm Name
2823
2824Trusted Platform Module Library
2825a
2826
2827Value
2828
2829Type
2830
2831TPM_ALG_SHA256
2832
28330x000B
2834
2835H
2836
2837D
2838
2839Comments
2840the SHA 256 algorithm
2841OID 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05
284200 04 2016
2843
2844TPM_ALG_SHA384
2845
28460x000C
2847
2848H
2849
2850the SHA 384 algorithm
2851OID 30 41 30 0d 06 09 60 86 48 01 65 03 04 02 02 05
285200 04 3016
2853
2854TPM_ALG_SHA512
2855
28560x000D
2857
2858H
2859
2860the SHA 512 algorithm
2861OID 30 51 30 0d 06 09 60 86 48 01 65 03 04 02 03 05
286200 04 4016
2863
2864TPM_ALG_NULL
2865
28660x0010
2867
2868TPM_ALG_SM3_256
2869
28700x0012
2871
2872H
2873
2874hash algorithm standardized by OSCCA
2875Block size is 512 bits.
2876Output size is 256 bits.
2877
2878TPM_ALG_SM4
2879
28800x0013
2881
2882S
2883
2884symmetric algorithm standardized by OSCCA
2885Key and block size are 128 bits.
2886
2887TPM_ALG_RSASSA
2888
28890x0014
2890
2891AX
2892
2893RSA a signature algorithm according to PKCS#1v2.1, 8.2
2894
2895TPM_ALG_RSAES
2896
28970x0015
2898
2899AE
2900
2901RSA a padding algorithm according to PKCS#1v2.1, 7.2
2902
2903TPM_ALG_RSAPSS
2904
29050x0016
2906
2907AX
2908
2909RSA signature algorithm (RSSASSA-PSS) according to
2910PKCS#1v2.1, 8.1
2911
2912TPM_ALG_OAEP
2913
29140x0017
2915
2916AE
2917
2918RSA padding algorithm
2919PKCS#1v2.1, 7.1
2920
2921TPM_ALG_ECDSA
2922
29230x0018
2924
2925AX
2926
2927ECC signature algorithm using elliptic curve cryptography
2928(ECC)
2929
2930TPM_ALG_ECDH
2931
29320x0019
2933
2934AM
2935
2936ECC secret sharing using ECC from SP800-56A
2937Based on context, this can be either One-Pass DiffieHellman, C(1, 1, ECC CDH) defined in 6.2.2.2 or Full
2938Unified Model C(2, 2, ECC CDH) defined in 6.1.1.2
2939
2940TPM_ALG_ECDAA
2941
29420x001A
2943
2944AX
2945
2946ECC elliptic-curve based, anonymous signing scheme
2947
2948TPM_ALG_SM2
2949
29500x001B
2951
2952AXE
2953
2954Null algorithm
2955
2956(RSAES_OAEP)
2957
2958according
2959
2960to
2961
2962ECC depending on context, either an elliptic-curve based,
2963signature algorithm or a key exchange protocol
2964NOTE
2965
2966This would be one of the algorithms specified in
2967CM/T 0002 – 2012.
2968
2969TPM_ALG_ECSCHNORR
2970
29710x001C
2972
2973AX
2974
2975ECC elliptic-curve-based Schnorr signature
2976
2977TPM_ALG_ECMQV
2978
29790x001D
2980
2981AE
2982
2983ECC two-phase elliptic-curve key exchange -- C(2, 2, ECC
2984MQV) from SP800-56A
2985
2986TPM_ALG_KDF1_SP800_56a
2987
29880x0020
2989
2990HM
2991
2992ECC key derivation alternative #1 from SP800-56A
2993
2994TPM_ALG_KDF2
2995
29960x0021
2997
2998HM
2999
3000key derivation function from IEEE Std 1363a-2004
3001
3002TPM_ALG_KDF1_SP800_108
3003
30040x0022
3005
3006HM
3007
3008a key derivation method according to SP 800-108, "5.1
3009KDF in Counter Mode”
3010
3011TPM_ALG_ECC
3012
30130x0023
3014
3015AO
3016
3017prime field ECC
3018
3019TPM_ALG_SYMCIPHER
3020
30210x0025
3022
3023O
3024
3025TPM_ALG_CTR
3026
30270x0040
3028
3029SE
3030
3031Counter mode – if implemented, all symmetric block
3032ciphers (S type) implemented shall be capable of using
3033this mode.
3034
3035TPM_ALG_OFB
3036
30370x0041
3038
3039SE
3040
3041Output Feedback mode – if implemented, all
3042symmetric block ciphers (S type) implemented shall be
3043capable of using this mode.
3044
3045TPM_ALG_CBC
3046
30470x0042
3048
3049SE
3050
3051Cipher Block Chaining mode – if implemented, all
3052symmetric block ciphers (S type) implemented shall be
3053capable of using this mode.
3054
3055Page 20
3056October 31, 2013
3057
3058the object type for a symmetric block cipher
3059
3060Published
3061Copyright © TCG 2006-2013
3062
3063Family “2.0”
3064Level 00 Revision 00.99
3065
3066Trusted Platform Module Library
3067
3068Part 2: Structures
3069a
3070
3071Algorithm Name
3072
3073Value
3074
3075Type
3076
3077TPM_ALG_CFB
3078
30790x0043
3080
3081SE
3082
3083D
3084
3085Comments
3086Cipher Feedback mode – if implemented, all
3087symmetric block ciphers (S type) implemented shall be
3088capable of using this mode.
3089
3090TPM_ALG_ECB
3091
30920x0044
3093
3094SE
3095
3096Electronic Codebook mode – if implemented, all
3097symmetric block ciphers (S type) implemented shall be
3098capable of using this mode.
3099NOTE
3100
3101This mode is not recommended for uses unless
3102the key is frequently rotated such as in video
3103codecs.
3104
3105TPM_ALG_LAST
3106
31070x0044
3108
3109marker value
3110
3111reserved
3112
31130x00C1
3114
31150x00C1 – 0x00C6 are reserved
3116
3117reserved
3118
31190x00C2
3120
3121reserved
3122
31230x00C3
3124
3125reserved
3126
31270x00C4
3128
3129reserved
3130
31310x00C5
3132
3133reserved
3134
31350x00C6
3136
3137NOTE a Column Indicates the algorithm type and use of the algorithm inside of the TPM. The values are:
3138A – asymmetric algorithm with a public and private key
3139S – symmetric algorithm with only a private key
3140H – hash algorithm that compresses input data to a digest value
3141X – signing algorithm
3142E – an encryption algorithm
3143M – a method such as a mask generation function
3144O – an object type
3145
3146Family “2.0”
3147Level 00 Revision 00.99
3148
3149Published
3150Copyright © TCG 2006-2013
3151
3152Page 21
3153October 31, 2013
3154
3155Part 2: Structures
31566.4
3157
3158Trusted Platform Module Library
3159
3160TPM_ECC_CURVE
3161
3162The TCG maintains a registry of all curves that have an assigned curve identifier. That registry is the
3163definitive list of curves that may be supported by a TPM.
3164Table 8 is a copy of the TPM_ECC_CURVE constants table in the TCG registry as of the date of
3165publication of this specification. Table 8 is provided for illustrative purposes only.
3166{{Note for TCG Admin: Table 8 and the text in the paragraph above should be updated to reflect the final
3167decisions by the TCG Board of Directors about inclusion of the table and the contents of the table. The
3168desired approach is to leave the text as is and, immediately before publication of this specification for
3169TCG admin to verify that Table 8 is the same as the curve registry table published by the TCG.}}
3170Table 8 — Definition of (UINT16) {ECC} TPM_ECC_CURVE Constants <IN/OUT, S>
3171Name
3172
3173Value
3174
3175Comments
3176
3177TPM_ECC_NONE
3178
31790x0000
3180
3181TPM_ECC_NIST_P192
3182
31830x0001
3184
3185TPM_ECC_NIST_P224
3186
31870x0002
3188
3189TPM_ECC_NIST_P256
3190
31910x0003
3192
3193TPM_ECC_NIST_P384
3194
31950x0004
3196
3197TPM_ECC_NIST_P521
3198
31990x0005
3200
3201TPM_ECC_BN_P256
3202
32030x0010
3204
3205curve to support ECDAA
3206
3207TPM_ECC_BN_P638
3208
32090x0011
3210
3211curve to support ECDAA
3212
3213TPM_ECC_SM2_P256
3214
32150x0020
3216
3217#TPM_RC_CURVE
3218
32196.5
32206.5.1
3221
3222TPM_CC (Command Codes)
3223Format
3224
3225A command is a 32-bit structure with fields assigned as shown in Figure 1.
32263 3 2 2
32271 0 9 8
3228
3229Res V
3230
32311 1
32326 5
3233
3234Reserved
3235
32360
32370
3238
3239Command Index
3240
3241Figure 1 — Command Format
3242Table 9 — TPM Command Format Fields Description
3243Bit
324415:0
3245
3246Name
3247
3248Definition
3249
3250Command Index
3251
3252the index of the command
3253
325428:16 Reserved
325529
3256
3257V
3258
325931:30 Res
3260
3261Page 22
3262October 31, 2013
3263
3264shall be zero
3265SET(1): the command is vendor specific
3266CLEAR(0): the command is not vendor specific
3267shall be zero
3268
3269Published
3270Copyright © TCG 2006-2013
3271
3272Family “2.0”
3273Level 00 Revision 00.99
3274
3275Trusted Platform Module Library
32766.5.2
3277
3278Part 2: Structures
3279
3280Description
3281
3282Table 10 provides the legend for the interpretation of the column data in Table 11.
3283Table 10 — Legend for Command Code Tables
3284Column
3285
3286Allowed
3287Values
3288
3289Comments
3290
3291Name
3292
3293Command
3294Code Name
3295
3296Name of the command
3297
3298Command Code
3299
3300Numeric value
3301
3302the numeric value for the commandCode
3303
3304NV Write
3305
3306blank, Y, O
3307
3308indicates whether the command may cause an NV write operation
3309If this column contains a “Y,” then successful completion of the
3310command is expected to cause modification of the NV memory
3311because of the command actions.
3312If the column contains an “O,” then the command may cause a
3313modification to NV associated with an orderly shutdown. That is, the
3314command may modify the orderly save state of NV, in which case, an
3315NV write will be necessary.
3316NOTE 1
3317
3318Any command may be delayed in order for the TPM to complete
3319NV actions due to a previous command or because of an
3320asynchronous update of Clock.
3321
3322NOTE 2
3323
3324Any command with an authorization value may cause an NV write
3325on an authorization failure but the command does not complete
3326successfully.
3327
3328If the entry is blank, then writing to NV is not allowed in the command
3329actions.
3330Physical Presence
3331
3332blank, Y
3333
3334indicates whether the platformAuth for this command may require
3335confirmation through a physical presence indication
3336
3337Encrypted
3338
3339blank, 2, 4
3340
3341A numeric value that indicates the number of octets in the size field of
3342the first parameter of a command
3343Blank indicates that no size field is present and no parameter
3344encryption is allowed.
3345
3346Encrypt
3347
3348blank, 2, 4
3349
3350A numeric value that indicates the number of octets in the size field of
3351the first parameter of a response
3352Blank indicates that no size field is present and no parameter
3353encryption is allowed.
3354
3355Family “2.0”
3356Level 00 Revision 00.99
3357
3358Published
3359Copyright © TCG 2006-2013
3360
3361Page 23
3362October 31, 2013
3363
3364Part 2: Structures
33656.5.3
3366
3367Trusted Platform Module Library
3368
3369TPM_CC Listing
3370
3371Table 11 lists the command codes and their attributes. The only normative column in this table is the
3372column indicating the command code assigned to a specific command (the "Command Code" column).
3373For all other columns, the command and response tables in Part 3 are definitive.
3374
3375Encrypt
3376
3377Encrypted
3378
3379Physical Presence
3380
3381NV Write
3382
3383Table 11 — Definition of (UINT32) TPM_CC Constants (Numeric Order) <IN/OUT, S>
3384
3385Name
3386
3387Command
3388Code
3389
3390TPM_CC_FIRST
3391
33920x0000011F
3393
3394Compile variable. May decrease
3395based on implementation.
3396
3397TPM_CC_PP_FIRST
3398
33990x0000011F
3400
3401Compile variable. Would decrease
3402if new PP commands are added
3403
3404TPM_CC_NV_UndefineSpaceSpecial
3405
34060x0000011F
3407
3408Y
3409
3410Y
3411
3412TPM_CC_EvictControl
3413
34140x00000120
3415
3416Y
3417
3418Y
3419
3420TPM_CC_HierarchyControl
3421
34220x00000121
3423
3424Y
3425
3426Y
3427
3428TPM_CC_NV_UndefineSpace
3429
34300x00000122
3431
3432Y
3433
3434Y
3435
3436TPM_CC_ChangeEPS
3437
34380x00000124
3439
3440Y
3441
3442Y
3443
3444TPM_CC_ChangePPS
3445
34460x00000125
3447
3448Y
3449
3450Y
3451
3452TPM_CC_Clear
3453
34540x00000126
3455
3456Y
3457
3458Y
3459
3460TPM_CC_ClearControl
3461
34620x00000127
3463
3464Y
3465
3466Y
3467
3468TPM_CC_ClockSet
3469
34700x00000128
3471
3472Y
3473
3474Y
3475
3476TPM_CC_HierarchyChangeAuth
3477
34780x00000129
3479
3480Y
3481
3482Y
3483
34842
3485
3486TPM_CC_NV_DefineSpace
3487
34880x0000012A
3489
3490Y
3491
3492Y
3493
34942
3495
3496TPM_CC_PCR_Allocate
3497
34980x0000012B
3499
3500Y
3501
3502Y
3503
3504TPM_CC_PCR_SetAuthPolicy
3505
35060x0000012C
3507
3508Y
3509
3510Y
3511
3512TPM_CC_PP_Commands
3513
35140x0000012D
3515
3516Y
3517
3518Y
3519
3520TPM_CC_SetPrimaryPolicy
3521
35220x0000012E
3523
3524Y
3525
3526Y
3527
35282
3529
3530TPM_CC_FieldUpgradeStart
3531
35320x0000012F
3533
3534O
3535
3536Y
3537
35382
3539
3540TPM_CC_ClockRateAdjust
3541
35420x00000130
3543
3544O
3545
3546Y
3547
3548TPM_CC_CreatePrimary
3549
35500x00000131
3551
3552TPM_CC_NV_GlobalWriteLock
3553
35540x00000132
3555
3556TPM_CC_PP_LAST
3557
35580x00000132
3559
3560TPM_CC_GetCommandAuditDigest
3561
35620x00000133
3563
3564Y
3565
3566TPM_CC_NV_Increment
3567
35680x00000134
3569
3570Y
3571
3572Page 24
3573October 31, 2013
3574
3575Y
3576O
3577
3578Comments
3579
35802
3581
35822
3583
35842
3585
3586Y
3587Compile variable
35882
3589
3590Published
3591Copyright © TCG 2006-2013
3592
3593Family “2.0”
3594Level 00 Revision 00.99
3595
3596Command
3597Code
3598
3599TPM_CC_NV_SetBits
3600
36010x00000135
3602
3603Y
3604
3605TPM_CC_NV_Extend
3606
36070x00000136
3608
3609Y
3610
3611TPM_CC_NV_Write
3612
36130x00000137
3614
3615Y
3616
3617TPM_CC_NV_WriteLock
3618
36190x00000138
3620
3621Y
3622
3623TPM_CC_DictionaryAttackLockReset
3624
36250x00000139
3626
3627O
3628
3629TPM_CC_DictionaryAttackParameters
3630
36310x0000013A
3632
3633Y
3634
3635TPM_CC_NV_ChangeAuth
3636
36370x0000013B
3638
3639Y
3640
36412
3642
3643TPM_CC_PCR_Event
3644
36450x0000013C
3646
3647O
3648
36492
3650
3651TPM_CC_PCR_Reset
3652
36530x0000013D
3654
3655O
3656
3657TPM_CC_SequenceComplete
3658
36590x0000013E
3660
3661O
3662
3663TPM_CC_SetAlgorithmSet
3664
36650x0000013F
3666
3667Y
3668
3669TPM_CC_SetCommandCodeAuditStatus
3670
36710x00000140
3672
3673Y
3674
3675TPM_CC_FieldUpgradeData
3676
36770x00000141
3678
3679O
3680
3681TPM_CC_IncrementalSelfTest
3682
36830x00000142
3684
3685O
3686
3687TPM_CC_SelfTest
3688
36890x00000143
3690
3691O
3692
3693TPM_CC_Startup
3694
36950x00000144
3696
3697Y
3698
3699TPM_CC_Shutdown
3700
37010x00000145
3702
3703Y
3704
3705TPM_CC_StirRandom
3706
37070x00000146
3708
3709Y
3710
3711TPM_CC_ActivateCredential
3712
37130x00000147
3714
3715TPM_CC_Certify
3716
37170x00000148
3718
3719TPM_CC_PolicyNV
3720
37210x00000149
3722
3723TPM_CC_CertifyCreation
3724
37250x0000014A
3726
3727TPM_CC_Duplicate
3728
37290x0000014B
3730
3731TPM_CC_GetTime
3732
37330x0000014C
3734
3735O
3736
37372
3738
3739TPM_CC_GetSessionAuditDigest
3740
37410x0000014D
3742
3743O
3744
37452
3746
3747TPM_CC_NV_Read
3748
37490x0000014E
3750
3751TPM_CC_NV_ReadLock
3752
37530x0000014F
3754
3755TPM_CC_ObjectChangeAuth
3756
37570x00000150
3758
37592
3760
3761TPM_CC_PolicySecret
3762
37630x00000151
3764
37652
3766
3767TPM_CC_Rewrap
3768
37690x00000152
3770
37712
3772
3773Family “2.0”
3774Level 00 Revision 00.99
3775
3776Encrypt
3777
3778Name
3779
3780NV Write
3781
3782Encrypted
3783
3784Part 2: Structures
3785
3786Physical Presence
3787
3788Trusted Platform Module Library
3789
37902
3791
3792PCR
3793PCR
3794
37952
3796
37972
3798
37992
3800
38012
38022
3803
3804O
3805
38062
3807
38082
3809
38102
3811
38122
3813O
3814
3815Comments
3816
3817Policy
3818
38192
3820
38212
3822
38232
3824
38252
3826
38272
3828O
3829
3830Published
3831Copyright © TCG 2006-2013
3832
38332
3834Policy
38352
3836
3837Page 25
3838October 31, 2013
3839
3840Trusted Platform Module Library
3841
3842Command
3843Code
3844
3845Encrypt
3846
3847TPM_CC_Create
3848
38490x00000153
3850
38512
3852
38532
3854
3855TPM_CC_ECDH_ZGen
3856
38570x00000154
3858
38592
3860
38612
3862
3863TPM_CC_HMAC
3864
38650x00000155
3866
38672
3868
38692
3870
3871TPM_CC_Import
3872
38730x00000156
3874
38752
3876
38772
3878
3879TPM_CC_Load
3880
38810x00000157
3882
38832
3884
38852
3886
3887TPM_CC_Quote
3888
38890x00000158
3890
38912
3892
38932
3894
3895TPM_CC_RSA_Decrypt
3896
38970x00000159
3898
3899TPM_CC_HMAC_Start
3900
39010x0000015B
3902
39032
3904
3905TPM_CC_SequenceUpdate
3906
39070x0000015C
3908
39092
3910
3911TPM_CC_Sign
3912
39130x0000015D
3914
39152
3916
3917TPM_CC_Unseal
3918
39190x0000015E
3920
3921TPM_CC_PolicySigned
3922
39230x00000160
3924
3925TPM_CC_ContextLoad
3926
39270x00000161
3928
3929O
3930
3931Context
3932
3933TPM_CC_ContextSave
3934
39350x00000162
3936
3937O
3938
3939Context
3940
3941TPM_CC_ECDH_KeyGen
3942
39430x00000163
3944
39452
3946
3947TPM_CC_EncryptDecrypt
3948
39490x00000164
3950
39512
3952
3953TPM_CC_FlushContext
3954
39550x00000165
3956
3957TPM_CC_LoadExternal
3958
39590x00000167
3960
39612
3962
39632
3964
3965TPM_CC_MakeCredential
3966
39670x00000168
3968
39692
3970
39712
3972
3973TPM_CC_NV_ReadPublic
3974
39750x00000169
3976
3977TPM_CC_PolicyAuthorize
3978
39790x0000016A
3980
3981TPM_CC_PolicyAuthValue
3982
39830x0000016B
3984
3985Policy
3986
3987TPM_CC_PolicyCommandCode
3988
39890x0000016C
3990
3991Policy
3992
3993TPM_CC_PolicyCounterTimer
3994
39950x0000016D
3996
39972
3998
3999Policy
4000
4001TPM_CC_PolicyCpHash
4002
40030x0000016E
4004
40052
4006
4007Policy
4008
4009TPM_CC_PolicyLocality
4010
40110x0000016F
4012
4013TPM_CC_PolicyNameHash
4014
40150x00000170
4016
4017TPM_CC_PolicyOR
4018
40190x00000171
4020
4021TPM_CC_PolicyTicket
4022
40230x00000172
4024
4025TPM_CC_ReadPublic
4026
40270x00000173
4028
4029Page 26
4030October 31, 2013
4031
4032NV Write
4033
4034Name
4035
4036Encrypted
4037
4038Physical Presence
4039
4040Part 2: Structures
4041
4042O
4043
4044Comments
4045
40462
40472
4048
40492
40502
4051
4052Policy
4053
4054O
4055
4056Context
4057
4058NV
40592
4060
4061Policy
4062
4063Policy
40642
4065
4066Policy
4067Policy
4068
40692
4070
4071Published
4072Copyright © TCG 2006-2013
4073
4074Policy
40752
4076
4077Family “2.0”
4078Level 00 Revision 00.99
4079
4080Encrypt
4081
40822
4083
4084NV Write
4085
4086Encrypted
4087
4088Part 2: Structures
4089
4090Physical Presence
4091
4092Trusted Platform Module Library
4093
40942
4095
40962
4097
40982
4099
4100Name
4101
4102Command
4103Code
4104
4105TPM_CC_RSA_Encrypt
4106
41070x00000174
4108
4109TPM_CC_StartAuthSession
4110
41110x00000176
4112
4113TPM_CC_VerifySignature
4114
41150x00000177
4116
4117TPM_CC_ECC_Parameters
4118
41190x00000178
4120
4121TPM_CC_FirmwareRead
4122
41230x00000179
4124
4125TPM_CC_GetCapability
4126
41270x0000017A
4128
4129TPM_CC_GetRandom
4130
41310x0000017B
4132
4133TPM_CC_GetTestResult
4134
41350x0000017C
4136
4137TPM_CC_Hash
4138
41390x0000017D
4140
4141TPM_CC_PCR_Read
4142
41430x0000017E
4144
4145PCR
4146
4147TPM_CC_PolicyPCR
4148
41490x0000017F
4150
4151Policy
4152
4153TPM_CC_PolicyRestart
4154
41550x00000180
4156
4157TPM_CC_ReadClock
4158
41590x00000181
4160
4161TPM_CC_PCR_Extend
4162
41630x00000182
4164
4165O
4166
41672
4168
4169TPM_CC_PCR_SetAuthValue
4170
41710x00000183
4172
4173N
4174
41752
4176
4177TPM_CC_NV_Certify
4178
41790x00000184
4180
4181O
4182
4183TPM_CC_EventSequenceComplete
4184
41850x00000185
4186
4187O
4188
4189TPM_CC_HashSequenceStart
4190
41910x00000186
4192
4193TPM_CC_PolicyPhysicalPresence
4194
41950x00000187
4196
4197Policy
4198
4199TPM_CC_PolicyDuplicationSelect
4200
42010x00000188
4202
4203Policy
4204
4205TPM_CC_PolicyGetDigest
4206
42070x00000189
4208
4209Policy
4210
4211TPM_CC_TestParms
4212
42130x0000018A
4214
4215TPM_CC_Commit
4216
42170x0000018B
4218
4219TPM_CC_PolicyPassword
4220
42210x0000018C
4222
4223TPM_CC_ZGen_2Phase
4224
42250x0000018D
4226
4227TPM_CC_EC_Ephemeral
4228
42290x0000018E
4230
4231TPM_CC_PolicyNvWritten
4232
42330x0000018F
4234
4235Policy
4236
4237TPM_CC_LAST
4238
42390x0000018F
4240
4241Compile variable. May increase
4242based on implementation.
4243
4244O
4245
4246Comments
4247
42482
4249
42502
4251
42522
4253
4254O
4255
42562
4257
42582
4259
42602
4261Policy
4262
42632
4264
42652
4266
4267NOTE
4268
4269#TPM_RC_COMMAND_CODE
4270
4271Family “2.0”
4272Level 00 Revision 00.99
4273
4274Published
4275Copyright © TCG 2006-2013
4276
4277This is not a FMT1 code
4278and a parameter indicator
4279value may not be added to
4280
4281Page 27
4282October 31, 2013
4283
4284Encrypt
4285
4286Encrypted
4287
4288Command
4289Code
4290
4291Name
4292
4293Physical Presence
4294
4295Trusted Platform Module Library
4296
4297NV Write
4298
4299Part 2: Structures
4300
4301Comments
4302this value.
4303
43046.6
4305
4306TPM_RC (Response Codes)
4307
43086.6.1
4309
4310Description
4311
4312Each return from the TPM has a 32-bit response code. The TPM will always set the upper 20 bits (31:12)
4313of the response code to 0 00 0016 and the low-order 12 bits (11:00) will contain the response code.
4314When a command succeeds, the TPM shall return TPM_RC_SUCCESS (0 0016) and will update any
4315authorization-session nonce associated with the command.
4316When a command fails to complete for any reason, the TPM shall return
43174318
4319a TPM_ST (UINT16) with a value of TPM_TAG_RSP_COMMAND or TPM_ST_NO_SESSIONS,
4320followed by
4321
43224323
4324a UINT32 (responseSize) with a value of 10, followed by
4325
43264327
4328a UINT32 containing a response code with a value other than TPM_RC_SUCCESS.
4329
4330Commands defined in this specification will use a tag of either TPM_ST_NO_SESSIONS or
4331TPM_ST_SESSIONS. Error responses will use a tag value of TPM_ST_NO_SESSIONS and the
4332response code will be as defined in this specification. Commands that use tags defined in the TPM 1.2
4333specification will use TPM_TAG_RSP_COMMAND in an error and a response code defined in TPM 1.2.
4334If the tag of the command is not a recognized command tag, the TPM error response will differ depending
4335on TPM 1.2 compatibility. If the TPM supports 1.2 compatibility, the TPM shall return a tag of
4336TPM_TAG_RSP_COMMAND and an appropriate TPM 1.2 response code (TPM_BADTAG =
433700 00 00 1E16). If the TPM does not have compatibility with TPM 1.2, the TPM shall return
4338TPM_ST_NO_SESSION and a response code of TPM_RC_TAG.
4339When a command fails, the TPM shall not update the authorization-session nonces associated with the
4340command and will not close the authorization sessions used by the command. Audit digests will not be
4341updated on an error. Unless noted in the command actions, a command that returns an error shall leave
4342the state of the TPM as if the command had not been attempted. The exception to this principle is that a
4343failure due to an authorization failure may update the dictionary-attack protection values.
4344
4345Page 28
4346October 31, 2013
4347
4348Published
4349Copyright © TCG 2006-2013
4350
4351Family “2.0”
4352Level 00 Revision 00.99
4353
4354Trusted Platform Module Library
43556.6.2
4356
4357Part 2: Structures
4358
4359Response Code Formats
4360
4361The response codes for this specification are defined such that there is no overlap between the response
4362codes used for this specification and those assigned in previous TPM specifications.
4363The formats defined in this clause only apply when the tag for the response is TPM_ST_NO_SESSIONS.
4364The response codes use two different format groups. One group contains the TPM 1.2 compatible
4365response codes and the response codes for this specification that are not related to command
4366parameters. The second group contains the errors that may be associated with a command parameter,
4367handle, or session.
4368Figure 2 shows the format for the response codes when bit 7 is zero.
43691
43701
4371
43721
43730
4374
43750
43769
4377
43780
43798
4380
43810
43827
4383
4384S
4385
4386bit
4387
4388T
4389
4390r
4391
4392V
4393
43940
43956
4396
43970
43985
4399
4400F
4401
44020
44034
4404
44050
44063
4407
44080
44092
4410
44110
44121
4413
44140
44150
4416
4417E
4418
4419Figure 2 — Format-Zero Response Codes
4420
4421Family “2.0”
4422Level 00 Revision 00.99
4423
4424Published
4425Copyright © TCG 2006-2013
4426
4427Page 29
4428October 31, 2013
4429
4430Part 2: Structures
4431
4432Trusted Platform Module Library
4433
4434The field definitions are:
4435Table 12 — Format-Zero Response Codes
4436Bit
4437
4438Name
4439
4440Definition
4441
444206:00
4443
4444E
4445
4446the error number
4447The interpretation of this field is dependent on the setting of the G and S fields.
4448
444907
4450
4451F
4452
4453format selector
4454CLEAR when the format is as defined in this Table 12 or when the response code is
4455TPM_RC_BAD_TAG.
4456
445708
4458
4459V
4460
4461version
4462SET (1): The error number is defined in this specification and is returned when the response tag
4463is TPM_ST_NO_SESSIONS.
4464CLEAR (0): The error number is defined by a previous TPM specification. The error number is
4465returned when the response tag is TPM_TAG_RSP_COMMAND.
4466NOTE
4467
446809
4469
4470In any error number returned by a TPM, the F (bit 7) and V (bit 8) attributes shall be CLEAR
4471when the response tag is TPM_TAG_RSP_COMMAND value used in TPM 1.2.
4472
4473Reserved shall be zero.
4474
447510
4476
4477T
4478
4479TCG/Vendor indicator
4480SET (1): The response code is defined by the TPM vendor.
4481CLEAR (0): The response code is defined by the TCG (a value in this specification).
4482NOTE
4483
448411
4485
4486S
4487
4488This attribute does not indicate a vendor-specific code unless the F attribute (bit[07]) is CLEAR.
4489
4490severity
4491SET (1): The response code is a warning and the command was not necessarily in error. This
4492command indicates that the TPM is busy or that the resources of the TPM have to be adjusted in
4493order to allow the command to execute.
4494CLEAR (0): The response code indicates that the command had an error that would prevent it
4495from running.
4496
4497When the format bit (bit 7) is SET, then the error occurred during the unmarshaling or validation of an
4498input parameter to the TPM. Figure 3 shows the format for the response codes when bit 7 is one.
4499bit
4500
45011
45021
4503
45041
45050
4506
45070
45089
4509
4510N
4511
45120
45138
4514
45150
45167
4517
45180
45196
4520
45211
4522
45230
45245
4525
4526P
4527
45280
45294
4530
45310
45323
4533
45340
45352
4536
45370
45381
4539
45400
45410
4542
4543E
4544
4545Figure 3 — Format-One Response Codes
4546There are 64 errors with this format. The errors can be associated with a parameter, handle, or session.
4547The error number for this format is in bits[05:00]. When an error is associated with a parameter, 0 40 16 is
4548added and N is set to the parameter number.
4549For an error associated with a handle, a parameter number (1 to 7) is added to the N field. For an error
4550associated with a session, a value of 8 plus the session number (1 to 7) is added to the N field. In other
4551words, 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
4552will indicate a session error.
4553NOTE
4554
4555If an implementation is not able to designate the handle, session, or parameter in error, then P and N will
4556be zero.
4557
4558Page 30
4559October 31, 2013
4560
4561Published
4562Copyright © TCG 2006-2013
4563
4564Family “2.0”
4565Level 00 Revision 00.99
4566
4567Trusted Platform Module Library
4568
4569Part 2: Structures
4570
4571The field definitions are:
4572Table 13 — Format-One Response Codes
4573Bit
4574
4575Name Definition
4576
457705:00
4578
4579E
4580
4581the error number
4582The error number is independent of the other settings.
4583
458406
4585
4586P
4587
4588SET (1): The error is associated with a parameter.
4589CLEAR (0): The error is associated with a handle or a session.
4590
459107
4592
4593F
4594
4595the response code format selector
4596This field shall be SET for the format in this table.
4597
459811:08
4599
4600N
4601
4602the number of the handle, session, or parameter in error
4603If P is SET, then this field is the parameter in error. If P is CLEAR, then this field indicates the
4604handle or session in error. Handles use values of N between 0000 2 and 01112. Sessions use
4605values between 10002 and 11112.
4606
4607The groupings of response codes are determined by bits 08, 07, and 06 of the response code as
4608summarized in Table 14.
4609Table 14 — Response Code Groupings
4610Bit
46110
46128
4613
46140
46157
4616
46170
46186
4619
4620Definition
4621
46220
4623
46240
4625
4626x
4627
4628a response code defined by TPM 1.2
4629NOTE
4630
4631An “x” in a column indicates that this may be either 0 or 1 and not affect the grouping of the response
4632code.
4633
46341
4635
46360
4637
4638x
4639
4640a response code defined by this specification with no handle, session, or parameter number modifier
4641
4642x
4643
46441
4645
46460
4647
4648a response code defined by this specification with either a handle or session number modifier
4649
4650x
4651
46521
4653
46541
4655
4656a response code defined by this specification with a parameter number modifier
4657
4658Family “2.0”
4659Level 00 Revision 00.99
4660
4661Published
4662Copyright © TCG 2006-2013
4663
4664Page 31
4665October 31, 2013
4666
4667Part 2: Structures
46686.6.3
4669
4670Trusted Platform Module Library
4671
4672TPM_RC Values
4673
4674In general, response codes defined in Part 2 will be unmarshaling errors and will have the F (format) bit
4675SET. Codes that are unique to Part 3 will have the F bit CLEAR but the V (version) attribute will be SET to
4676indicate that it is a TPM 2.0 response code.
4677NOTE
4678
4679The constant RC_VER1 is used to indicate that the V attribute is SET and the constant RC_ FMT1 is used
4680to indicate that the F attribute is SET and that the return code is variable based on handle, session, and
4681parameter modifiers.
4682
4683Table 15 — Definition of (UINT32) TPM_RC Constants (Actions) <OUT>
4684Name
4685
4686Value
4687
4688Description
4689
4690TPM_RC_SUCCESS
4691
46920x000
4693
4694TPM_RC_BAD_TAG
4695
46960x01E
4697
4698defined for compatibility with TPM 1.2
4699
4700RC_VER1
4701
47020x100
4703
4704set for all format 0 response codes
4705
4706TPM_RC_INITIALIZE
4707
4708RC_VER1 + 0x000
4709
4710TPM not initialized
4711commands not being accepted because of a TPM
4712failure
4713
4714TPM_RC_FAILURE
4715
4716RC_VER1 + 0x001
4717
4718NOTE
4719
4720TPM_RC_SEQUENCE
4721
4722RC_VER1 + 0x003
4723
4724improper use of a sequence handle
4725
4726TPM_RC_PRIVATE
4727
4728RC_VER1 + 0x00B
4729
4730TPM_RC_HMAC
4731
4732RC_VER1 + 0x019
4733
4734TPM_RC_DISABLED
4735
4736RC_VER1 + 0x020
4737
4738TPM_RC_EXCLUSIVE
4739
4740RC_VER1 + 0x021
4741
4742command failed because audit sequence required
4743exclusivity
4744
4745TPM_RC_AUTH_TYPE
4746
4747RC_VER1 + 0x024
4748
4749authorization handle is not correct for command
4750
4751TPM_RC_AUTH_MISSING
4752
4753RC_VER1 + 0x025
4754
4755command requires an authorization session for
4756handle and it is not present.
4757
4758TPM_RC_POLICY
4759
4760RC_VER1 + 0x026
4761
4762policy Failure In Math Operation or an invalid
4763authPolicy value
4764
4765TPM_RC_PCR
4766
4767RC_VER1 + 0x027
4768
4769PCR check fail
4770
4771TPM_RC_PCR_CHANGED
4772
4773RC_VER1 + 0x028
4774
4775PCR have changed since checked.
4776
4777TPM_RC_UPGRADE
4778
4779RC_VER1 + 0x02D
4780
4781for
4782all
4783commands
4784other
4785than
4786TPM2_FieldUpgradeData(), this code indicates
4787that the TPM is in field upgrade mode; for
4788TPM2_FieldUpgradeData(), this code indicates
4789that the TPM is not in field upgrade mode
4790
4791TPM_RC_TOO_MANY_CONTEXTS
4792
4793RC_VER1 + 0x02E
4794
4795context ID counter is at maximum.
4796
4797TPM_RC_AUTH_UNAVAILABLE
4798
4799RC_VER1 + 0x02F
4800
4801authValue or authPolicy is not available for
4802selected entity.
4803
4804TPM_RC_REBOOT
4805
4806RC_VER1 + 0x030
4807
4808a _TPM_Init and Startup(CLEAR) is required
4809before the TPM can resume operation.
4810
4811TPM_RC_UNBALANCED
4812
4813RC_VER1 + 0x031
4814
4815the protection algorithms (hash and symmetric) are
4816not reasonably balanced. The digest size of the
4817hash must be larger than the key size of the
4818symmetric algorithm.
4819
4820Page 32
4821October 31, 2013
4822
4823This
4824may
4825be
4826returned
4827by
4828TPM2_GetTestResult() as the testResult
4829parameter.
4830
4831Published
4832Copyright © TCG 2006-2013
4833
4834Family “2.0”
4835Level 00 Revision 00.99
4836
4837Trusted Platform Module Library
4838Name
4839
4840Part 2: Structures
4841Value
4842
4843Description
4844
4845TPM_RC_COMMAND_SIZE
4846
4847RC_VER1 + 0x042
4848
4849command commandSize value is inconsistent with
4850contents of the command buffer; either the size is
4851not the same as the octets loaded by the hardware
4852interface layer or the value is not large enough to
4853hold a command header
4854
4855TPM_RC_COMMAND_CODE
4856
4857RC_VER1 + 0x043
4858
4859command code not supported
4860
4861TPM_RC_AUTHSIZE
4862
4863RC_VER1 + 0x044
4864
4865the value of authorizationSize is out of range or the
4866number of octets in the Authorization Area is
4867greater than required
4868
4869TPM_RC_AUTH_CONTEXT
4870
4871RC_VER1 + 0x045
4872
4873use of an authorization session with a context
4874command
4875
4876TPM_RC_NV_RANGE
4877
4878RC_VER1 + 0x046
4879
4880NV offset+size is out of range.
4881
4882TPM_RC_NV_SIZE
4883
4884RC_VER1 + 0x047
4885
4886Requested allocation size is larger than allowed.
4887
4888TPM_RC_NV_LOCKED
4889
4890RC_VER1 + 0x048
4891
4892NV access locked.
4893
4894TPM_RC_NV_AUTHORIZATION
4895
4896RC_VER1 + 0x049
4897
4898NV access authorization fails in command actions
4899(this failure does not affect lockout.action)
4900
4901TPM_RC_NV_UNINITIALIZED
4902
4903RC_VER1 + 0x04A
4904
4905an NV Index is used before being initialized or the
4906state saved by TPM2_Shutdown(STATE) could not
4907be restored
4908
4909TPM_RC_NV_SPACE
4910
4911RC_VER1 + 0x04B
4912
4913insufficient space for NV allocation
4914
4915TPM_RC_NV_DEFINED
4916
4917RC_VER1 + 0x04C
4918
4919NV Index or persistend object already defined
4920
4921TPM_RC_BAD_CONTEXT
4922
4923RC_VER1 + 0x050
4924
4925context in TPM2_ContextLoad() is not valid
4926
4927TPM_RC_CPHASH
4928
4929RC_VER1 + 0x051
4930
4931cpHash value already set or not correct for use
4932
4933TPM_RC_PARENT
4934
4935RC_VER1 + 0x052
4936
4937handle for parent is not a valid parent
4938
4939TPM_RC_NEEDS_TEST
4940
4941RC_VER1 + 0x053
4942
4943some function needs testing.
4944
4945TPM_RC_NO_RESULT
4946
4947RC_VER1 + 0x054
4948
4949returned when an internal function cannot process
4950a request due to an unspecified problem. This
4951code is usually related to invalid parameters that
4952are not properly filtered by the input unmarshaling
4953code.
4954
4955TPM_RC_SENSITIVE
4956
4957RC_VER1 + 0x055
4958
4959the sensitive area did not unmarshal correctly after
4960decryption – this code is used in lieu of the other
4961unmarshaling errors so that an attacker cannot
4962determine where the unmarshaling error occurred
4963
4964RC_MAX_FM0
4965
4966RC_VER1 + 0x07F
4967
4968largest version 1 code that is not a warning
4969
4970New Subsection
4971
4972RC_FMT1
4973
49740x080
4975
4976This bit is SET in all format 1 response codes
4977The codes in this group may have a value added to
4978them to indicate the handle, session, or parameter
4979to which they apply.
4980
4981TPM_RC_ASYMMETRIC
4982
4983RC_FMT1 + 0x001
4984
4985asymmetric algorithm not supported or not correct
4986
4987TPM_RC_ATTRIBUTES
4988
4989RC_FMT1 + 0x002
4990
4991inconsistent attributes
4992
4993TPM_RC_HASH
4994
4995RC_FMT1 + 0x003
4996
4997hash algrithm not supported or not appropriate
4998
4999TPM_RC_VALUE
5000
5001RC_FMT1 + 0x004
5002
5003value is out of range or is not correct for the
5004context
5005
5006TPM_RC_HIERARCHY
5007
5008RC_FMT1 + 0x005
5009
5010hierarchy is not enabled or is not correct for the
5011use
5012
5013Family “2.0”
5014Level 00 Revision 00.99
5015
5016Published
5017Copyright © TCG 2006-2013
5018
5019Page 33
5020October 31, 2013
5021
5022Part 2: Structures
5023
5024Trusted Platform Module Library
5025
5026Name
5027
5028Value
5029
5030Description
5031
5032TPM_RC_KEY_SIZE
5033
5034RC_FMT1 + 0x007
5035
5036key size is not supported
5037
5038TPM_RC_MGF
5039
5040RC_FMT1 + 0x008
5041
5042mask generation function not supported
5043
5044TPM_RC_MODE
5045
5046RC_FMT1 + 0x009
5047
5048mode of operation not supported
5049
5050TPM_RC_TYPE
5051
5052RC_FMT1 + 0x00A
5053
5054the type of the value is not appropriate for the use
5055
5056TPM_RC_HANDLE
5057
5058RC_FMT1 + 0x00B
5059
5060the handle is not correct for the use
5061
5062TPM_RC_KDF
5063
5064RC_FMT1 + 0x00C
5065
5066unsupported key derivation function or function not
5067appropriate for use
5068
5069TPM_RC_RANGE
5070
5071RC_FMT1 + 0x00D
5072
5073value was out of allowed range.
5074
5075TPM_RC_AUTH_FAIL
5076
5077RC_FMT1 + 0x00E
5078
5079the authorization HMAC check failed and DA
5080counter incremented
5081
5082TPM_RC_NONCE
5083
5084RC_FMT1 + 0x00F
5085
5086invalid nonce size
5087
5088TPM_RC_PP
5089
5090RC_FMT1 + 0x010
5091
5092authorization requires assertion of PP
5093
5094TPM_RC_SCHEME
5095
5096RC_FMT1 + 0x012
5097
5098unsupported or incompatible scheme
5099
5100TPM_RC_SIZE
5101
5102RC_FMT1 + 0x015
5103
5104structure is the wrong size
5105
5106TPM_RC_SYMMETRIC
5107
5108RC_FMT1 + 0x016
5109
5110unsupported symmetric algorithm or key size, or
5111not appropriate for instance
5112
5113TPM_RC_TAG
5114
5115RC_FMT1 + 0x017
5116
5117incorrect structure tag
5118
5119TPM_RC_SELECTOR
5120
5121RC_FMT1 + 0x018
5122
5123union selector is incorrect
5124
5125TPM_RC_INSUFFICIENT
5126
5127RC_FMT1 + 0x01A
5128
5129the TPM was unable to unmarshal a value
5130because there were not enough octets in the input
5131buffer
5132
5133TPM_RC_SIGNATURE
5134
5135RC_FMT1 + 0x01B
5136
5137the signature is not valid
5138
5139TPM_RC_KEY
5140
5141RC_FMT1 + 0x01C
5142
5143key fields are not compatible with the selected use
5144
5145TPM_RC_POLICY_FAIL
5146
5147RC_FMT1 + 0x01D
5148
5149a policy check failed
5150
5151TPM_RC_INTEGRITY
5152
5153RC_FMT1 + 0x01F
5154
5155integrity check failed
5156
5157TPM_RC_TICKET
5158
5159RC_FMT1 + 0x020
5160
5161invalid ticket
5162
5163TPM_RC_RESERVED_BITS
5164
5165RC_FMT1 + 0x021
5166
5167reserved bits not set to zero as required
5168
5169TPM_RC_BAD_AUTH
5170
5171RC_FMT1 + 0x022
5172
5173authroization failure without DA implications
5174
5175TPM_RC_EXPIRED
5176
5177RC_FMT1 + 0x023
5178
5179the policy has expired
5180
5181TPM_RC_POLICY_CC
5182
5183RC_FMT1 + 0x024
5184
5185the commandCode in the policy is not the
5186commandCode of the command or the command
5187code in a policy command references a command
5188that is not implemented
5189
5190TPM_RC_BINDING
5191
5192RC_FMT1 + 0x025
5193
5194public and sensitive portions of an object are not
5195cryptographically bound
5196
5197TPM_RC_CURVE
5198
5199RC_FMT1 + 0x026
5200
5201curve not supported
5202
5203TPM_RC_ECC_POINT
5204
5205RC_FMT1 + 0x027
5206
5207point is not on the required curve.
5208
5209New Subsection
5210RC_WARN
5211
52120x900
5213
5214set for warning response codes
5215
5216TPM_RC_CONTEXT_GAP
5217
5218RC_WARN + 0x001
5219
5220gap for context ID is too large
5221
5222TPM_RC_OBJECT_MEMORY
5223
5224RC_WARN + 0x002
5225
5226out of memory for object contexts
5227
5228Page 34
5229October 31, 2013
5230
5231Published
5232Copyright © TCG 2006-2013
5233
5234Family “2.0”
5235Level 00 Revision 00.99
5236
5237Trusted Platform Module Library
5238
5239Part 2: Structures
5240
5241Name
5242
5243Value
5244
5245Description
5246
5247TPM_RC_SESSION_MEMORY
5248
5249RC_WARN + 0x003
5250
5251out of memory for session contexts
5252
5253TPM_RC_MEMORY
5254
5255RC_WARN + 0x004
5256
5257out of shared object/session memory or need
5258space for internal operations
5259
5260TPM_RC_SESSION_HANDLES
5261
5262RC_WARN + 0x005
5263
5264out of session handles – a session must be flushed
5265before a new session may be created
5266out of object handles – the handle space for
5267objects is depleted and a reboot is required
5268NOTE
5269
5270This cannot occur
5271implementation.
5272
5273NOTE
5274
5275There is no reason why an implementation
5276would implement a design that would deplete
5277handle space. Platform specifications are
5278encouraged to forbid it.
5279
5280TPM_RC_OBJECT_HANDLES
5281
5282RC_WARN + 0x006
5283
5284TPM_RC_LOCALITY
5285
5286RC_WARN + 0x007
5287
5288TPM_RC_YIELDED
5289
5290RC_WARN + 0x008
5291
5292on
5293
5294the
5295
5296reference
5297
5298bad locality
5299the TPM has suspended operation on the
5300command; forward progress was made and the
5301command may be retried.
5302See Part 1, “Multi-tasking.”
5303NOTE
5304
5305This cannot occur
5306implementation.
5307
5308on
5309
5310the
5311
5312reference
5313
5314TPM_RC_CANCELED
5315
5316RC_WARN + 0x009
5317
5318the command was canceled
5319
5320TPM_RC_TESTING
5321
5322RC_WARN + 0x00A
5323
5324TPM is performing self-tests
5325
5326TPM_RC_REFERENCE_H0
5327
5328RC_WARN + 0x010
5329
5330the 1 handle in the handle area references a
5331transient object or session that is not loaded
5332
5333TPM_RC_REFERENCE_H1
5334
5335RC_WARN + 0x011
5336
5337the 2 handle in the handle area references a
5338transient object or session that is not loaded
5339
5340TPM_RC_REFERENCE_H2
5341
5342RC_WARN + 0x012
5343
5344the 3 handle in the handle area references a
5345transient object or session that is not loaded
5346
5347TPM_RC_REFERENCE_H3
5348
5349RC_WARN + 0x013
5350
5351the 4 handle in the handle area references a
5352transient object or session that is not loaded
5353
5354TPM_RC_REFERENCE_H4
5355
5356RC_WARN + 0x014
5357
5358the 5 handle in the handle area references a
5359transient object or session that is not loaded
5360
5361TPM_RC_REFERENCE_H5
5362
5363RC_WARN + 0x015
5364
5365the 6 handle in the handle area references a
5366transient object or session that is not loaded
5367
5368TPM_RC_REFERENCE_H6
5369
5370RC_WARN + 0x016
5371
5372the 7 handle in the handle area references a
5373transient object or session that is not loaded
5374
5375TPM_RC_REFERENCE_S0
5376
5377RC_WARN + 0x018
5378
5379the 1 authorization session handle references a
5380session that is not loaded
5381
5382TPM_RC_REFERENCE_S1
5383
5384RC_WARN + 0x019
5385
5386the 2 authorization session handle references a
5387session that is not loaded
5388
5389TPM_RC_REFERENCE_S2
5390
5391RC_WARN + 0x01A
5392
5393the 3 authorization session handle references a
5394session that is not loaded
5395
5396TPM_RC_REFERENCE_S3
5397
5398RC_WARN + 0x01B
5399
5400the 4th authorization session handle references a
5401session that is not loaded
5402
5403TPM_RC_REFERENCE_S4
5404
5405RC_WARN + 0x01C
5406
5407the 5 session handle references a session that is
5408not loaded
5409
5410TPM_RC_REFERENCE_S5
5411
5412RC_WARN + 0x01D
5413
5414the 6 session handle references a session that is
5415not loaded
5416
5417st
5418
5419nd
5420
5421rd
5422
5423th
5424
5425th
5426
5427th
5428
5429th
5430
5431st
5432
5433nd
5434
5435rd
5436
5437th
5438
5439th
5440
5441Family “2.0”
5442Level 00 Revision 00.99
5443
5444Published
5445Copyright © TCG 2006-2013
5446
5447Page 35
5448October 31, 2013
5449
5450Part 2: Structures
5451
5452Trusted Platform Module Library
5453
5454Name
5455
5456Value
5457
5458Description
5459
5460TPM_RC_REFERENCE_S6
5461
5462RC_WARN + 0x01E
5463
5464the 7 authorization session handle references a
5465session that is not loaded
5466
5467TPM_RC_NV_RATE
5468
5469RC_WARN + 0x020
5470
5471the TPM is rate-limiting accesses to prevent
5472wearout of NV
5473
5474TPM_RC_LOCKOUT
5475
5476RC_WARN + 0x021
5477
5478authorizations for objects subject to DA protection
5479are not allowed at this time because the TPM is in
5480DA lockout mode
5481
5482TPM_RC_RETRY
5483
5484RC_WARN + 0x022
5485
5486the TPM was not able to start the command
5487
5488TPM_RC_NV_UNAVAILABLE
5489
5490RC_WARN + 0x023
5491
5492the command may require writing of NV and NV is
5493not current accessible
5494
5495TPM_RC_NOT_USED
5496
5497RC_WARN + 0x7F
5498
5499this value is reserved and shall not be returned by
5500the TPM
5501
5502th
5503
5504Additional Defines
5505TPM_RC_H
5506
55070x000
5508
5509add to a handle-related error
5510
5511TPM_RC_P
5512
55130x040
5514
5515add to a parameter-related error
5516
5517TPM_RC_S
5518
55190x800
5520
5521add to a session-related error
5522
5523TPM_RC_1
5524
55250x100
5526
5527add to a parameter-, handle-, or session-related
5528error
5529
5530TPM_RC_2
5531
55320x200
5533
5534add to a parameter-, handle-, or session-related
5535error
5536
5537TPM_RC_3
5538
55390x300
5540
5541add to a parameter-, handle-, or session-related
5542error
5543
5544TPM_RC_4
5545
55460x400
5547
5548add to a parameter-, handle-, or session-related
5549error
5550
5551TPM_RC_5
5552
55530x500
5554
5555add to a parameter-, handle-, or session-related
5556error
5557
5558TPM_RC_6
5559
55600x600
5561
5562add to a parameter-, handle-, or session-related
5563error
5564
5565TPM_RC_7
5566
55670x700
5568
5569add to a parameter-, handle-, or session-related
5570error
5571
5572TPM_RC_8
5573
55740x800
5575
5576add to a parameter-related error
5577
5578TPM_RC_9
5579
55800x900
5581
5582add to a parameter-related error
5583
5584TPM_RC_A
5585
55860xA00
5587
5588add to a parameter-related error
5589
5590TPM_RC_B
5591
55920xB00
5593
5594add to a parameter-related error
5595
5596TPM_RC_C
5597
55980xC00
5599
5600add to a parameter-related error
5601
5602TPM_RC_D
5603
56040xD00
5605
5606add to a parameter-related error
5607
5608TPM_RC_E
5609
56100xE00
5611
5612add to a parameter-related error
5613
5614TPM_RC_F
5615
56160xF00
5617
5618add to a parameter-related error
5619
5620TPM_RC_N_MASK
5621
56220xF00
5623
5624number mask
5625
5626Page 36
5627October 31, 2013
5628
5629Published
5630Copyright © TCG 2006-2013
5631
5632Family “2.0”
5633Level 00 Revision 00.99
5634
5635Trusted Platform Module Library
56366.7
5637
5638Part 2: Structures
5639
5640TPM_CLOCK_ADJUST
5641
5642A TPM_CLOCK_ADJUST value is used to change the rate at which the TPM internal oscillator is divided.
5643A change to the divider will change the rate at which Clock and Time change.
5644NOTE
5645
5646The recommended adjustments are approximately 1% for a course adjustment, 0.1% for a medium
5647adjustment, and the minimum possible on the implementation for the fine adjustment (e.g., one count of
5648the pre-scalar if possible).
5649
5650Table 16 — Definition of (INT8) TPM_CLOCK_ADJUST Constants <IN>
5651Name
5652
5653Value
5654
5655Comments
5656
5657TPM_CLOCK_COARSE_SLOWER
5658
5659-3
5660
5661Slow the Clock update rate by one coarse adjustment step.
5662
5663TPM_CLOCK_MEDIUM_SLOWER
5664
5665-2
5666
5667Slow the Clock update rate by one medium adjustment step.
5668
5669TPM_CLOCK_FINE_SLOWER
5670
5671-1
5672
5673Slow the Clock update rate by one fine adjustment step.
5674
5675TPM_CLOCK_NO_CHANGE
5676
56770
5678
5679No change to the Clock update rate.
5680
5681TPM_CLOCK_FINE_FASTER
5682
56831
5684
5685Speed the Clock update rate by one fine adjustment step.
5686
5687TPM_CLOCK_MEDIUM_FASTER
5688
56892
5690
5691Speed the Clock update rate by one medium adjustment step.
5692
5693TPM_CLOCK_COARSE_FASTER
5694
56953
5696
5697Speed the Clock update rate by one coarse adjustment step.
5698
5699#TPM_RC_VALUE
5700
57016.8
5702
5703TPM_EO (EA Arithmetic Operands)
5704Table 17 — Definition of (UINT16) TPM_EO Constants <IN/OUT>
5705
5706Operation Name
5707
5708Value
5709
5710Comments
5711
5712TPM_EO_EQ
5713
57140x0000
5715
5716A=B
5717
5718TPM_EO_NEQ
5719
57200x0001
5721
5722A≠B
5723
5724TPM_EO_SIGNED_GT
5725
57260x0002
5727
5728A > B signed
5729
5730TPM_EO_UNSIGNED_GT
5731
57320x0003
5733
5734A > B unsigned
5735
5736TPM_EO_SIGNED_LT
5737
57380x0004
5739
5740A < B signed
5741
5742TPM_EO_UNSIGNED_LT
5743
57440x0005
5745
5746A < B unsigned
5747
5748TPM_EO_SIGNED_GE
5749
57500x0006
5751
5752A ≥ B signed
5753
5754TPM_EO_UNSIGNED_GE
5755
57560x0007
5757
5758A ≥ B unsigned
5759
5760TPM_EO_SIGNED_LE
5761
57620x0008
5763
5764A ≤ B signed
5765
5766TPM_EO_UNSIGNED_LE
5767
57680x0009
5769
5770A ≤ B unsigned
5771
5772TPM_EO_BITSET
5773
57740x000A
5775
5776All bits SET in B are SET in A. ((A&B)=B)
5777
5778TPM_EO_BITCLEAR
5779
57800x000B
5781
5782All bits SET in B are CLEAR in A. ((A&B)=0)
5783
5784#TPM_RC_VALUE
5785
5786Family “2.0”
5787Level 00 Revision 00.99
5788
5789Response code returned when unmarshaling of this type fails
5790
5791Published
5792Copyright © TCG 2006-2013
5793
5794Page 37
5795October 31, 2013
5796
5797Part 2: Structures
5798
57996.9
5800
5801Trusted Platform Module Library
5802
5803TPM_ST (Structure Tags)
5804
5805Structure tags are used to disambiguate structures. They are 16-bit values with the most significant bit
5806SET so that they do not overlap TPM_ALG_ID values. A single exception is made for the value
5807associated with TPM_ST_RSP_COMMAND (0x00C4), which has the same value as the
5808TPM_TAG_RSP_COMMAND tag from earlier versions of this specification. This value is used when the
5809TPM is compatible with a previous TPM specification and the TPM cannot determine which family of
5810response code to return because the command tag is not valid.
5811Many of the structures defined in this document have parameters that are unions of other structures. That
5812is, a parameter may be one of several structures. The parameter will have a selector value that indicates
5813which of the options is actually present.
5814In order to allow the marshaling and unmarshaling code to determine which of the possible structures is
5815allowed, each selector will have a unique interface type and will constrain the number of possible tag
5816values.
5817Table 18 defines the structure tags values. The definition of many structures is context-sensitive using an
5818algorithm ID. In cases where an algorithm ID is not a meaningful way to designate the structure, the
5819values in this table are used.
5820Table 18 — Definition of (UINT16) TPM_ST Constants <IN/OUT, S>
5821Name
5822TPM_ST_RSP_COMMAND
5823
5824Value
5825
5826Comments
5827
58280x00C4
5829
5830
5831TPM_ST_NULL
5832
58330X8000
5834
5835no structure type specified
5836
5837TPM_ST_NO_SESSIONS
5838
58390x8001
5840
5841tag value for a command/response for a command
5842defined in this specification; indicating that the
5843command/response has no attached sessions and no
5844authorizationSize/parameterSize value is present
5845If the responseCode from the TPM is not
5846TPM_RC_SUCCESS, then the response tag shall
5847have this value.
5848
5849TPM_ST_SESSIONS
5850
58510x8002
5852
5853tag value for a command/response for a command
5854defined in this specification; indicating that the
5855command/response has one or more attached
5856sessions and the authorizationSize/parameterSize
5857field is present
5858
5859Page 38
5860October 31, 2013
5861
5862Published
5863Copyright © TCG 2006-2013
5864
5865Family “2.0”
5866Level 00 Revision 00.99
5867
5868Trusted Platform Module Library
5869Name
5870reserved
5871
5872Part 2: Structures
5873Value
5874
5875Comments
5876
58770x8003
5878
5879When used between application software and the TPM
5880resource manager, this tag indicates that the
5881command has no sessions and the handles are using
5882the Name format rather than the 32-bit handle format.
5883NOTE 1
5884
5885The response to application software will have a
5886tag of TPM_ST_NO_SESSIONS.
5887
5888Between the TRM and TPM, this tag would occur in a
5889response from a TPM that overlaps the tag parameter
5890of a request with the tag parameter of a response,
5891when the response has no associated sessions.
5892NOTE 2
5893
5894reserved
5895
58960x8004
5897
5898This tag is not used by all TPM or TRM
5899implementations.
5900
5901When used between application software and the TPM
5902resource manager, this tag indicates that the
5903command has sessions and the handles are using the
5904Name format rather than the 32-bit handle format.
5905NOTE 1
5906
5907If the command completes successfully, the
5908response to application software will have a tag
5909of TPM_ST_SESSIONS.
5910
5911Between the TRM and TPM, would occur in a
5912response from a TPM that overlaps the tag parameter
5913of a request with the tag parameter of a response,
5914when the response has authorization sessions.
5915NOTE 2
5916
5917This tag is not used by all TPM or TRM
5918implementations.
5919
5920TPM_ST_ATTEST_NV
5921
59220x8014
5923
5924tag for an attestation structure
5925
5926TPM_ST_ATTEST_COMMAND_AUDIT
5927
59280x8015
5929
5930tag for an attestation structure
5931
5932TPM_ST_ATTEST_SESSION_AUDIT
5933
59340x8016
5935
5936tag for an attestation structure
5937
5938TPM_ST_ATTEST_CERTIFY
5939
59400x8017
5941
5942tag for an attestation structure
5943
5944TPM_ST_ATTEST_QUOTE
5945
59460x8018
5947
5948tag for an attestation structure
5949
5950TPM_ST_ATTEST_TIME
5951
59520x8019
5953
5954tag for an attestation structure
5955
5956TPM_ST_ATTEST_CREATION
5957
59580x801A
5959
5960tag for an attestation structure
5961
5962reserved
5963
59640x801B
5965
5966do not use
5967NOTE
5968
5969This
5970was
5971previously
5972assigned
5973to
5974TPM_ST_ATTEST_NV. The tag is changed
5975because the structure has changed
5976
5977TPM_ST_CREATION
5978
59790x8021
5980
5981tag for a ticket type
5982
5983TPM_ST_VERIFIED
5984
59850x8022
5986
5987tag for a ticket type
5988
5989TPM_ST_AUTH_SECRET
5990
59910x8023
5992
5993tag for a ticket type
5994
5995TPM_ST_HASHCHECK
5996
59970x8024
5998
5999tag for a ticket type
6000
6001TPM_ST_AUTH_SIGNED
6002
60030x8025
6004
6005tag for a ticket type
6006
6007TPM_ST_FU_MANIFEST
6008
60090x8029
6010
6011tag for a structure describing a Field Upgrade Policy
6012
6013Family “2.0”
6014Level 00 Revision 00.99
6015
6016Published
6017Copyright © TCG 2006-2013
6018
6019Page 39
6020October 31, 2013
6021
6022Part 2: Structures
6023
6024Trusted Platform Module Library
6025
60266.10 TPM_SU (Startup Type)
6027These values are used in TPM2_Startup() to indicate the shutdown and startup mode. The defined
6028startup sequences are:
6029a) TPM Reset – Two cases:
60301) Shutdown(CLEAR) followed by Startup(CLEAR)
60312) Startup(CLEAR) with no Shutdown()
6032b) TPM Restart – Shutdown(STATE) followed by Startup(CLEAR)
6033c) TPM Resume – Shutdown(STATE) followed by Startup(STATE)
6034TPM_SU values of 80 0016 and above are reserved for internal use of the TPM and may not be assigned
6035values.
6036NOTE
6037
6038In the reference code, a value of FF FF 16 indicates that the startup state has not been set. If this was
6039defined in this table to be, say, TPM_SU_NONE, then TPM_SU_NONE would be a valid input value but
6040the caller is not allowed to indicate the that the startup type is TPM_SU_NONE so the reserved value is
6041defined in the implementation as required for internal TPM uses.
6042
6043Table 19 — Definition of (UINT16) TPM_SU Constants <IN>
6044Name
6045
6046Value
6047
6048Description
6049
6050TPM_SU_CLEAR
6051
60520x0000
6053
6054on TPM2_Shutdown(), indicates that the TPM should prepare
6055for loss of power and save state required for an orderly startup
6056(TPM Reset).
6057on TPM2_Startup(), indicates that the TPM should start from
6058perform TPM Reset or TPM Restart
6059
6060TPM_SU_STATE
6061
60620x0001
6063
6064on TPM2_Shutdown(), indicates that the TPM should prepare
6065for loss of power and save state required for an orderly startup
6066(TPM Restart or TPM Resume)
6067on TPM2_Startup(), indicates that the TPM should restore the
6068state saved by TPM2_Shutdown(TPM_SU_STATE)
6069
6070#TPM_RC_VALUE
6071
6072response code when incorrect value is used
6073
60746.11 TPM_SE (Session Type)
6075This type is used in TPM2_StartAuthSession() to indicate the type of the session to be created.
6076Table 20 — Definition of (UINT8) TPM_SE Constants <IN>
6077Name
6078
6079Value
6080
6081TPM_SE_HMAC
6082
60830x00
6084
6085TPM_SE_POLICY
6086
60870x01
6088
6089TPM_SE_TRIAL
6090
60910x03
6092
6093#TPM_RC_VALUE
6094
6095Page 40
6096October 31, 2013
6097
6098Description
6099
6100The policy session is being used to compute the policyHash and
6101not for command authorization.
6102This setting modifies some policy commands and prevents
6103session from being used to authorize a command.
6104response code when incorrect value is used
6105
6106Published
6107Copyright © TCG 2006-2013
6108
6109Family “2.0”
6110Level 00 Revision 00.99
6111
6112Trusted Platform Module Library
6113
6114Part 2: Structures
6115
61166.12 TPM_CAP (Capabilities)
6117The TPM_CAP values are used in TPM2_GetCapability() to select the type of the value to be returned.
6118The format of the response varies according to the type of the value.
6119Table 21 — Definition of (UINT32) TPM_CAP Constants
6120Capability Name
6121
6122Value
6123
6124Property Type
6125
6126Return Type
6127
6128TPM_CAP_FIRST
6129
61300x00000000
6131
6132TPM_CAP_ALGS
6133
61340x00000000
6135
6136TPM_CAP_HANDLES
6137
61380x00000001
6139
6140TPML_HANDLE
6141
6142TPM_CAP_COMMANDS
6143
61440x00000002
6145
6146TPML_CCA
6147
6148TPM_CAP_PP_COMMANDS
6149
61500x00000003
6151
6152TPML_CC
6153
6154TPM_CAP_AUDIT_COMMANDS
6155
61560x00000004
6157
6158TPML_CC
6159
6160TPM_CAP_PCRS
6161
61620x00000005
6163
6164TPML_PCR_SELECTION
6165
6166TPM_CAP_TPM_PROPERTIES
6167
61680x00000006
6169
6170TPML_TAGGED_TPM_PROPERTY
6171
6172TPM_CAP_PCR_PROPERTIES
6173
61740x00000007
6175
6176(1)
6177
6178TPM_CAP_ECC_CURVES
6179
61800x00000008
6181
6182TPML_ALG_PROPERTY
6183
6184TPML_TAGGED_PCR_PROPERTY
6185(1)
6186
6187TPM_CAP_LAST
6188
61890x00000008
6190
6191TPM_CAP_VENDOR_PROPERTY
61920x00000100
6193
6194TPML_ECC_CURVE
6195
6196manufacturer-specific values
6197
6198#TPM_RC_VALUE
6199NOTES:
6200(1) The TPM_ALG_ID or TPM_ECC_CURVE is cast to a UINT32
6201
62026.13 TPM_PT (Property Tag)
6203The TPM_PT constants are used in TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES) to
6204indicate the property being selected or returned.
6205The values in the fixed group (PT_FIXED) are not changeable through programmatic means other than a
6206firmware update. The values in the variable group (PT_VAR) may be changed with TPM commands but
6207should be persistent over power cycles and only changed when indicated by the detailed actions code.
6208Table 22 — Definition of (UINT32) TPM_PT Constants <IN/OUT, S>
6209Capability Name
6210
6211Value
6212
6213Comments
6214
6215TPM_PT_NONE
6216
62170x00000000
6218
6219indicates no property type
6220
6221PT_GROUP
6222
62230x00000100
6224
6225The number of properties in each group.
6226NOTE The first group with any properties is group 1
6227(PT_GROUP * 1). Group 0 is reserved.
6228
6229PT_FIXED
6230
6231PT_GROUP * 1
6232 the
6233group
6234of
6235fixed
6236properties
6237returned
6238as
6239TPMS_TAGGED_PROPERTY
6240The values in this group are only changed due to a
6241firmware change in the TPM.
6242
6243TPM_PT_FAMILY_INDICATOR
6244
6245PT_FIXED + 0
6246 a 4-octet character string containing the TPM Family value
6247(TPM_SPEC_FAMILY)
6248
6249Family “2.0”
6250Level 00 Revision 00.99
6251
6252Published
6253Copyright © TCG 2006-2013
6254
6255Page 41
6256October 31, 2013
6257
6258Part 2: Structures
6259
6260Capability Name
6261TPM_PT_LEVEL
6262
6263Trusted Platform Module Library
6264
6265Value
6266
6267Comments
6268
6269PT_FIXED + 1
6270 the level of the specification
6271NOTE 1
6272
6273TPM_PT_REVISION
6274
6275PT_FIXED + 2
6276For this specification, the level is zero.
6277
6278NOTE 2
6279
6280The level is on the title page of the specification.
6281
6282 the specification Revision times 100
6283EXAMPLE Revision 01.01 would have a value of 101.
6284NOTE
6285
6286TPM_PT_DAY_OF_YEAR
6287
6288PT_FIXED + 3
6289The Revision value is on the title page of the
6290specification.
6291
6292 the specification day of year using TCG calendar
6293EXAMPLE November 15, 2010, has a day of year value of 319
6294(00 00 01 3F16).
6295NOTE
6296
6297TPM_PT_YEAR
6298
6299PT_FIXED + 4
6300The specification date is on the title page of the
6301specification.
6302
6303 the specification year using the CE
6304EXAMPLE The year 2010 has a value of 00 00 07 DA16.
6305NOTE
6306
6307The specification date is on the title page of the
6308specification.
6309
6310TPM_PT_MANUFACTURER
6311
6312PT_FIXED + 5
6313 the vendor ID unique to each TPM manufacturer
6314
6315TPM_PT_VENDOR_STRING_1
6316
6317PT_FIXED + 6
6318 the first four characters of the vendor ID string
6319NOTE
6320
6321When the vendor string is fewer than 16 octets, the
6322additional property values do not have to be present.
6323A vendor string of 4 octets can be represented in one
632432-bit value and no null terminating character is
6325required.
6326
6327TPM_PT_VENDOR_STRING_2
6328
6329PT_FIXED + 7
6330 the second four characters of the vendor ID string
6331
6332TPM_PT_VENDOR_STRING_3
6333
6334PT_FIXED + 8
6335 the third four characters of the vendor ID string
6336
6337TPM_PT_VENDOR_STRING_4
6338
6339PT_FIXED + 9
6340 the fourth four characters of the vendor ID sting
6341
6342TPM_PT_VENDOR_TPM_TYPE
6343
6344PT_FIXED + 10
6345 vendor-defined value indicating the TPM model
6346
6347TPM_PT_FIRMWARE_VERSION_1
6348
6349PT_FIXED + 11
6350 the most-significant 32 bits of a vendor-specific value
6351indicating the version of the firmware
6352
6353TPM_PT_FIRMWARE_VERSION_2
6354
6355PT_FIXED + 12
6356 the least-significant 32 bits of a vendor-specific value
6357indicating the version of the firmware
6358
6359TPM_PT_INPUT_BUFFER
6360
6361PT_FIXED + 13
6362 the maximum size of
6363TPM2B_MAX_BUFFER)
6364
6365TPM_PT_HR_TRANSIENT_MIN
6366
6367PT_FIXED + 14
6368 the minimum number of transient objects that can be held
6369in TPM RAM
6370NOTE
6371
6372TPM_PT_HR_PERSISTENT_MIN
6373
6374PT_FIXED + 15
6375parameter
6376
6377(typically,
6378
6379a
6380
6381This minimum shall be no less than the minimum
6382value required by the platform-specific specification
6383to which the TPM is built.
6384
6385 the minimum number of persistent objects that can be
6386held in TPM NV memory
6387NOTE
6388
6389TPM_PT_HR_LOADED_MIN
6390
6391PT_FIXED + 16
6392a
6393
6394This minimum shall be no less than the minimum
6395value required by the platform-specific specification
6396to which the TPM is built.
6397
6398 the minimum number of authorization sessions that can
6399be held in TPM RAM
6400NOTE
6401
6402Page 42
6403October 31, 2013
6404
6405This minimum shall be no less than the minimum
6406value required by the platform-specific specification
6407to which the TPM is built.
6408
6409Published
6410
6411Family “2.0”
6412
6413Copyright © TCG 2006-2013
6414
6415Level 00 Revision 00.99
6416
6417Trusted Platform Module Library
6418Capability Name
6419TPM_PT_ACTIVE_SESSIONS_MAX
6420
6421Part 2: Structures
6422Value
6423
6424Comments
6425
6426PT_FIXED + 17
6427 the number of authorization sessions that may be active at
6428a time
6429A session is active when it has a context associated with
6430its handle. The context may either be in TPM RAM or be
6431context saved.
6432NOTE
6433
6434This value shall be no less than the minimum value
6435required by the platform-specific specification to
6436which the TPM is built.
6437
6438TPM_PT_PCR_COUNT
6439
6440PT_FIXED + 18
6441 the number of PCR implemented
6442NOTE This number is determined by the defined
6443attributes, not the number of PCR that are populated.
6444
6445TPM_PT_PCR_SELECT_MIN
6446
6447PT_FIXED + 19
6448 the
6449minimum
6450number
6451of
6452TPMS_PCR_SELECT.sizeOfSelect
6453NOTE
6454
6455TPM_PT_CONTEXT_GAP_MAX
6456
6457PT_FIXED + 20
6458octets
6459
6460in
6461
6462a
6463
6464This value is not determined by the number of PCR
6465implemented but by the number of PCR required by
6466the platform-specific specification with which the TPM
6467is compliant.
6468
6469 the maximum allowed difference (unsigned) between the
6470contextID values of two saved session contexts
647116
6472
6473This value shall be at least 2 -1 (65535).
6474PT_FIXED + 21
6475 skipped
6476TPM_PT_NV_COUNTERS_MAX
6477
6478PT_FIXED + 22
6479 the maximum number of NV Indexes that are allowed to
6480have the TPMA_NV_COUNTER attribute SET
6481NOTE
6482
6483It is allowed for this value to be larger than the
6484number of NV Indexes that can be defined. This
6485would be indicative of a TPM implementation that did
6486not use different implementation technology for
6487different NV Index types.
6488
6489TPM_PT_NV_INDEX_MAX
6490
6491PT_FIXED + 23
6492 the maximum size of an NV Index data area
6493
6494TPM_PT_MEMORY
6495
6496PT_FIXED + 24
6497 a TPMA_MEMORY indicating the memory management
6498method for the TPM
6499
6500TPM_PT_CLOCK_UPDATE
6501
6502PT_FIXED + 25
6503 interval, in milliseconds, between updates to the copy of
6504TPMS_CLOCK_INFO.clock in NV
6505
6506TPM_PT_CONTEXT_HASH
6507
6508PT_FIXED + 26
6509 the algorithm used for the integrity HMAC on saved
6510contexts
6511and
6512for
6513hashing
6514the
6515fuData
6516of
6517TPM2_FirmwareRead()
6518
6519TPM_PT_CONTEXT_SYM
6520
6521PT_FIXED + 27
6522 the algorithm used for encryption of saved contexts
6523
6524TPM_PT_CONTEXT_SYM_SIZE
6525
6526PT_FIXED + 28
6527 the size of the key used for encryption of saved contexts
6528
6529TPM_PT_ORDERLY_COUNT
6530
6531PT_FIXED + 29
6532 the modulus - 1 of the count for NV update of an orderly
6533counter
6534The returned value is MAX_ORDERLY_COUNT.
6535N
6536This will have a value of 2 – 1 where 1 ≤ N ≤ 32
6537NOTE
6538
6539An “orderly counter” is an NV Index with
6540TPMA_NV_COUNTER and TPMA_NV_ORDERLY
6541both SET.
6542
6543TPM_PT_MAX_COMMAND_SIZE
6544
6545PT_FIXED + 30
6546 the maximum value for commandSize in a command
6547
6548TPM_PT_MAX_RESPONSE_SIZE
6549
6550PT_FIXED + 31
6551 the maximum value for responseSize in a response
6552
6553TPM_PT_MAX_DIGEST
6554
6555PT_FIXED + 32
6556 the maximum size of a digest that can be produced by the
6557TPM
6558
6559TPM_PT_MAX_OBJECT_CONTEXT
6560
6561PT_FIXED + 33
6562 the maximum size of an object context that will be
6563returned by TPM2_ContextSave
6564
6565Family “2.0”
6566Level 00 Revision 00.99
6567
6568Published
6569Copyright © TCG 2006-2013
6570
6571Page 43
6572October 31, 2013
6573
6574Part 2: Structures
6575
6576Capability Name
6577
6578Trusted Platform Module Library
6579
6580Value
6581
6582Comments
6583
6584TPM_PT_MAX_SESSION_CONTEXT
6585PT_FIXED + 34
6586 the maximum size of a session context that will be
6587returned by TPM2_ContextSave
6588TPM_PT_PS_FAMILY_INDICATOR
6589
6590PT_FIXED + 35
6591 platform-specific family (a TPM_PS value)(see Table 24)
6592NOTE
6593
6594The platform-specific values for the TPM_PT_PS
6595parameters are in the relevant platform-specific
6596specification. In the reference implementation, all of
6597these values are 0.
6598
6599TPM_PT_PS_LEVEL
6600
6601PT_FIXED + 36
6602 the level of the platform-specific specification
6603
6604TPM_PT_PS_REVISION
6605
6606PT_FIXED + 37
6607 the specification Revision times 100 for the platformspecific specification
6608
6609TPM_PT_PS_DAY_OF_YEAR
6610
6611PT_FIXED + 38
6612 the platform-specific specification day of year using TCG
6613calendar
6614
6615TPM_PT_PS_YEAR
6616
6617PT_FIXED + 39
6618 the platform-specific specification year using the CE
6619
6620TPM_PT_SPLIT_MAX
6621
6622PT_FIXED + 40
6623 the number of split signing operations supported by the
6624TPM
6625
6626TPM_PT_TOTAL_COMMANDS
6627
6628PT_FIXED + 41
6629 total number of commands implemented in the TPM
6630
6631TPM_PT_LIBRARY_COMMANDS
6632
6633PT_FIXED + 42
6634 number of commands from the TPM library that are
6635implemented
6636
6637TPM_PT_VENDOR_COMMANDS
6638
6639PT_FIXED + 43
6640 number of vendor commands that are implemented
6641
6642TPM_PT_NV_BUFFER_MAX
6643
6644PT_FIXED + 44
6645 the maximum data size in one NV write command
6646
6647PT_VAR
6648
6649PT_GROUP * 2
6650 the group of variable properties returned as
6651TPMS_TAGGED_PROPERTY
6652The properties in this group change because of a
6653Protected Capability other than a firmware update. The
6654values are not necessarily persistent across all power
6655transitions.
6656
6657TPM_PT_PERMANENT
6658
6659PT_VAR + 0
6660
6661TPMA_PERMANENT
6662
6663TPM_PT_STARTUP_CLEAR
6664
6665PT_VAR + 1
6666
6667TPMA_STARTUP_CLEAR
6668
6669TPM_PT_HR_NV_INDEX
6670
6671PT_VAR + 2
6672
6673the number of NV Indexes currently defined
6674
6675TPM_PT_HR_LOADED
6676
6677PT_VAR + 3
6678
6679the number of authorization sessions currently loaded into
6680TPM RAM
6681
6682TPM_PT_HR_LOADED_AVAIL
6683
6684PT_VAR + 4
6685
6686the number of additional authorization sessions, of any
6687type, that could be loaded into TPM RAM
6688This value is an estimate. If this value is at least 1, then at
6689least one authorization session of any type may be
6690loaded. Any command that changes the RAM memory
6691allocation can make this estimate invalid.
6692NOTE
6693
6694TPM_PT_HR_ACTIVE
6695
6696Page 44
6697October 31, 2013
6698
6699PT_VAR + 5
6700
6701A valid implementation may return 1 even if more
6702than one authorization session would fit into RAM.
6703
6704the number of active authorization sessions currently
6705being tracked by the TPM
6706This is the sum of the loaded and saved sessions.
6707
6708Published
6709Copyright © TCG 2006-2013
6710
6711Family “2.0”
6712Level 00 Revision 00.99
6713
6714Trusted Platform Module Library
6715Capability Name
6716TPM_PT_HR_ACTIVE_AVAIL
6717
6718Part 2: Structures
6719Value
6720
6721Comments
6722
6723PT_VAR + 6
6724
6725the number of additional authorization sessions, of any
6726type, that could be created
6727This value is an estimate. If this value is at least 1, then at
6728least one authorization session of any type may be
6729created. Any command that changes the RAM memory
6730allocation can make this estimate invalid.
6731NOTE
6732
6733TPM_PT_HR_TRANSIENT_AVAIL
6734
6735PT_VAR + 7
6736
6737A valid implementation may return 1 even if more
6738than one authorization session could be created.
6739
6740estimate of the number of additional transient objects that
6741could be loaded into TPM RAM
6742This value is an estimate. If this value is at least 1, then at
6743least one object of any type may be loaded. Any
6744command that changes the memory allocation can make
6745this estimate invalid.
6746NOTE
6747
6748A valid implementation may return 1 even if more
6749than one transient object would fit into RAM.
6750
6751TPM_PT_HR_PERSISTENT
6752
6753PT_VAR + 8
6754
6755the number of persistent objects currently loaded into
6756TPM NV memory
6757
6758TPM_PT_HR_PERSISTENT_AVAIL
6759
6760PT_VAR + 9
6761
6762the number of additional persistent objects that could be
6763loaded into NV memory
6764This value is an estimate. If this value is at least 1, then at
6765least one object of any type may be made persistent. Any
6766command that changes the NV memory allocation can
6767make this estimate invalid.
6768NOTE
6769
6770A valid implementation may return 1 even if more
6771than one persistent object would fit into NV memory.
6772
6773TPM_PT_NV_COUNTERS
6774
6775PT_VAR + 10
6776
6777the number of defined NV Indexes that have NV
6778TPMA_NV_COUNTER attribute SET
6779
6780TPM_PT_NV_COUNTERS_AVAIL
6781
6782PT_VAR + 11
6783
6784the number of additional NV Indexes that can be defined
6785with
6786their
6787TPMA_NV_COUNTER
6788and
6789TPMA_NV_ORDERLY attribute SET
6790This value is an estimate. If this value is at least 1, then at
6791least one NV Index may be created with the
6792TPMA_NV_COUNTER
6793and
6794TPMA_NV_ORDERLY
6795attributes SET. Any command that changes the NV
6796memory allocation can make this estimate invalid.
6797NOTE A valid implementation may return 1 even if more
6798than one NV counter could be defined.
6799
6800TPM_PT_ALGORITHM_SET
6801
6802PT_VAR + 12
6803
6804code that limits the algorithms that may be used with the
6805TPM
6806
6807TPM_PT_LOADED_CURVES
6808
6809PT_VAR + 13
6810
6811the number of loaded ECC curves
6812
6813TPM_PT_LOCKOUT_COUNTER
6814
6815PT_VAR + 14
6816
6817the current value of the lockout counter (failedTries)
6818
6819TPM_PT_MAX_AUTH_FAIL
6820
6821PT_VAR + 15
6822
6823the number of authorization failures before DA lockout is
6824invoked
6825
6826TPM_PT_LOCKOUT_INTERVAL
6827
6828PT_VAR + 16
6829
6830the number of seconds before the value reported by
6831TPM_PT_LOCKOUT_COUNTER is decremented
6832
6833TPM_PT_LOCKOUT_RECOVERY
6834
6835PT_VAR + 17
6836
6837the number of seconds after a lockoutAuth failure before
6838use of lockoutAuth may be attempted again
6839
6840TPM_PT_NV_WRITE_RECOVERY
6841
6842PT_VAR + 18
6843
6844number of milliseconds before the TPM will accept
6845another command that will modify NV
6846This value is an approximation and may go up or down
6847over time.
6848
6849Family “2.0”
6850Level 00 Revision 00.99
6851
6852Published
6853Copyright © TCG 2006-2013
6854
6855Page 45
6856October 31, 2013
6857
6858Part 2: Structures
6859
6860Capability Name
6861
6862Trusted Platform Module Library
6863
6864Value
6865
6866Comments
6867
6868TPM_PT_AUDIT_COUNTER_0
6869
6870PT_VAR + 19
6871
6872the high-order 32 bits of the command audit counter
6873
6874TPM_PT_AUDIT_COUNTER_1
6875
6876PT_VAR + 20
6877
6878the low-order 32 bits of the command audit counter
6879
6880Page 46
6881October 31, 2013
6882
6883Published
6884Copyright © TCG 2006-2013
6885
6886Family “2.0”
6887Level 00 Revision 00.99
6888
6889Trusted Platform Module Library
6890
6891Part 2: Structures
6892
68936.14 TPM_PT_PCR (PCR Property Tag)
6894The TPM_PT_PCR constants are used in TPM2_GetCapability() to indicate the property being selected
6895or returned. The PCR properties can be read when capability == TPM_CAP_PCR_PROPERTIES.
6896Table 23 — Definition of (UINT32) TPM_PT_PCR Constants <IN/OUT, S>
6897Capability Name
6898
6899Value
6900
6901Comments
6902
6903TPM_PT_PCR_FIRST
6904
69050x00000000
6906
6907bottom of the range of TPM_PT_PCR properties
6908
6909TPM_PT_PCR_SAVE
6910
69110x00000000
6912
6913a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
6914saved and restored by TPM_SU_STATE
6915
6916TPM_PT_PCR_EXTEND_L0
6917
69180x00000001
6919
6920a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6921may be extended from locality 0
6922This property is only present if a locality other than 0 is
6923implemented.
6924
6925TPM_PT_PCR_RESET_L0
6926
69270x00000002
6928
6929a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6930may be reset by TPM2_PCR_Reset() from locality 0
6931
6932TPM_PT_PCR_EXTEND_L1
6933
69340x00000003
6935
6936a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6937may be extended from locality 1
6938This property is only present if locality 1 is implemented.
6939
6940TPM_PT_PCR_RESET_L1
6941
69420x00000004
6943
6944a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6945may be reset by TPM2_PCR_Reset() from locality 1
6946This property is only present if locality 1 is implemented.
6947
6948TPM_PT_PCR_EXTEND_L2
6949
69500x00000005
6951
6952a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6953may be extended from locality 2
6954This property is only present if localities 1 and 2 are
6955implemented.
6956
6957TPM_PT_PCR_RESET_L2
6958
69590x00000006
6960
6961a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6962may be reset by TPM2_PCR_Reset() from locality 2
6963This property is only present if localities 1 and 2 are
6964implemented.
6965
6966TPM_PT_PCR_EXTEND_L3
6967
69680x00000007
6969
6970a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6971may be extended from locality 3
6972This property is only present if localities 1, 2, and 3 are
6973implemented.
6974
6975TPM_PT_PCR_RESET_L3
6976
69770x00000008
6978
6979a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6980may be reset by TPM2_PCR_Reset() from locality 3
6981This property is only present if localities 1, 2, and 3 are
6982implemented.
6983
6984TPM_PT_PCR_EXTEND_L4
6985
69860x00000009
6987
6988a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6989may be extended from locality 4
6990This property is only present if localities 1, 2, 3, and 4 are
6991implemented.
6992
6993TPM_PT_PCR_RESET_L4
6994
69950x0000000A
6996
6997a SET bit in the TPMS_PCR_SELECT indicates that the PCR
6998may be reset by TPM2_PCR_Reset() from locality 4
6999This property is only present if localities 1, 2, 3, and 4 are
7000implemented.
7001
7002Family “2.0”
7003Level 00 Revision 00.99
7004
7005Published
7006Copyright © TCG 2006-2013
7007
7008Page 47
7009October 31, 2013
7010
7011Part 2: Structures
7012
7013Capability Name
7014reserved
7015
7016Trusted Platform Module Library
7017
7018Value
7019
7020Comments
7021
70220x0000000B – the values in this range are reserved
70230x00000010 They correspond to values that may be used to describe
7024attributes associated with the extended localities (32255).synthesize additional software localities. The meaning of
7025these properties need not be the same as the meaning for the
7026Extend and Reset properties above.
7027
7028TPM_PT_PCR_NO_INCREMENT
7029
70300x00000011
7031
7032a SET bit in the TPMS_PCR_SELECT indicates that
7033modifications to this PCR (reset or Extend) will not increment
7034the pcrUpdateCounter
7035
7036TPM_PT_PCR_DRTM_RESET
7037
70380x00000012
7039
7040a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
7041reset by a DRTM event
7042These PCR are reset to -1 on TPM2_Startup() and reset to 0 on
7043a _TPM_Hash_End event following a _TPM_Hash_Start event.
7044
7045TPM_PT_PCR_POLICY
7046
70470x00000013
7048
7049a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
7050controlled by policy
7051This property is only present if the TPM supports policy control
7052of a PCR.
7053
7054TPM_PT_PCR_AUTH
7055
70560x00000014
7057
7058a SET bit in the TPMS_PCR_SELECT indicates that the PCR is
7059controlled by an authorization value
7060This property is only present if the TPM supports authorization
7061control of a PCR.
7062
7063reserved
7064
70650x00000015
7066
7067reserved for the next (2 ) TPM_PT_PCR_POLICY set
7068
7069reserved
7070
70710x00000016
7072
7073reserved for the next (2 ) TPM_PT_PCR_AUTH set
7074
7075reserved
7076
7077nd
7078nd
7079
7080nd
7081
7082th
7083
70840x00000017 – reserved for the 2 through 255 TPM_PT_PCR_POLICY and
70850x00000210 TPM_PT_PCR_AUTH values
7086th
7087
7088and
7089
7090highest
7091
7092allowed,
7093
7094th
7095
7096and
7097
7098highest
7099
7100allowed,
7101
7102reserved
7103
71040x00000211
7105
7106reserved
7107to
7108the
7109256 ,
7110TPM_PT_PCR_POLICY set
7111
7112reserved
7113
71140x00000212
7115
7116reserved
7117to
7118the
7119256 ,
7120TPM_PT_PCR_AUTH set
7121
7122reserved
7123
71240x00000213
7125
7126new PCR property values may be assigned starting with this
7127value
7128
7129TPM_PT_PCR_LAST
7130
71310x00000014
7132
7133top of the range of TPM_PT_PCR properties of the
7134implementation
7135If the TPM receives a request for a PCR property with a value
7136larger than this, the TPM will return a zero length list and set the
7137moreData parameter to NO.
7138NOTE
7139
7140Page 48
7141October 31, 2013
7142
7143This is an implementation-specific value. The value shown
7144reflects the reference code implementation.
7145
7146Published
7147Copyright © TCG 2006-2013
7148
7149Family “2.0”
7150Level 00 Revision 00.99
7151
7152Trusted Platform Module Library
7153
7154Part 2: Structures
7155
71566.15 TPM_PS (Platform Specific)
7157The platform values in Table 24 are used for the TPM_PT_PS_FAMILY_INDICATOR.
7158NOTE
7159
7160Values below six (6) have the same values as the purview assignments in TPM 1.2.
7161
7162Table 24 — Definition of (UINT32) TPM_PS Constants <OUT>
7163Capability Name
7164
7165Value
7166
7167Comments
7168
7169TPM_PS_MAIN
7170
71710x00000000
7172
7173not platform specific
7174
7175TPM_PS_PC
7176
71770x00000001
7178
7179PC Client
7180
7181TPM_PS_PDA
7182
71830x00000002
7184
7185PDA (includes all mobile devices that are not specifically cell
7186phones)
7187
7188TPM_PS_CELL_PHONE
7189
71900x00000003
7191
7192Cell Phone
7193
7194TPM_PS_SERVER
7195
71960x00000004
7197
7198Server WG
7199
7200TPM_PS_PERIPHERAL
7201
72020x00000005
7203
7204Peripheral WG
7205
7206TPM_PS_TSS
7207
72080x00000006
7209
7210TSS WG
7211
7212TPM_PS_STORAGE
7213
72140x00000007
7215
7216Storage WG
7217
7218TPM_PS_AUTHENTICATION
7219
72200x00000008
7221
7222Authentication WG
7223
7224TPM_PS_EMBEDDED
7225
72260x00000009
7227
7228Embedded WG
7229
7230TPM_PS_HARDCOPY
7231
72320x0000000A
7233
7234Hardcopy WG
7235
7236TPM_PS_INFRASTRUCTURE
7237
72380x0000000B
7239
7240Infrastructure WG
7241
7242TPM_PS_VIRTUALIZATION
7243
72440x0000000C
7245 Virtualization WG
7246
7247TPM_PS_TNC
7248
72490x0000000D
7250 Trusted Network Connect WG
7251
7252TPM_PS_MULTI_TENANT
7253
72540x0000000E
7255
7256Multi-tenant WG
7257
7258TPM_PS_TC
7259
72600x0000000F
7261
7262Technical Committee
7263
7264Family “2.0”
7265Level 00 Revision 00.99
7266
7267Published
7268Copyright © TCG 2006-2013
7269
7270Page 49
7271October 31, 2013
7272
7273Part 2: Structures
7274
72757
7276
7277Trusted Platform Module Library
7278
7279Handles
7280
72817.1
7282
7283Introduction
7284
7285Handles are 32-bit values used to reference shielded locations of various types within the TPM.
7286Table 25 — Definition of Types for Handles
7287Type
7288
7289Name
7290
7291Description
7292
7293UINT32
7294
7295TPM_HANDLE
7296
7297Handles may refer to objects (keys or data blobs), authorization sessions (HMAC and policy), NV
7298Indexes, permanent TPM locations, and PCR.
72997.2
7300
7301TPM_HT (Handle Types)
7302
7303The 32-bit handle space is divided into 256 regions of equal size with 2
7304ranges represents a handle type.
7305
730624
7307
7308values in each. Each of these
7309
7310The type of the entity is indicated by the MSO of its handle. The values for the MSO and the entity
7311referenced are shown in Table 26.
7312Table 26 — Definition of (UINT8) TPM_HT Constants <S>
7313Name
7314
7315Value
7316
7317Comments
7318
7319TPM_HT_PCR
7320
73210x00
7322
7323PCR – consecutive numbers, starting at 0, that reference the PCR
7324registers
7325A platform-specific specification will set the minimum number of PCR
7326and an implementation may have more.
7327
7328TPM_HT_NV_INDEX
7329
73300x01
7331
7332NV Index – assigned by the caller
7333
7334TPM_HT_HMAC_SESSION
7335
73360x02
7337
7338HMAC Authorization Session – assigned by the TPM when the
7339session is created
7340
7341TPM_HT_LOADED_SESSION
7342
73430x02
7344
7345Loaded Authorization Session – used only in the context of
7346TPM2_GetCapability
7347This type references both loaded HMAC and loaded policy
7348authorization sessions.
7349
7350TPM_HT_POLICY_SESSION
7351
73520x03
7353
7354Policy Authorization Session – assigned by the TPM when the
7355session is created
7356
7357TPM_HT_ACTIVE_SESSION
7358
73590x03
7360
7361Active Authorization Session – used only in the context of
7362TPM2_GetCapability
7363This type references saved authorization session contexts for which
7364the TPM is maintaining tracking information.
7365
7366TPM_HT_PERMANENT
7367
73680x40
7369
7370Permanent Values – assigned by this specification in Table 27
7371
7372TPM_HT_TRANSIENT
7373
73740x80
7375
7376Transient Objects – assigned by the TPM when an object is loaded
7377into transient-object memory or when a persistent object is converted
7378to a transient object
7379
7380TPM_HT_PERSISTENT
7381
73820x81
7383
7384Persistent Objects – assigned by the TPM when a loaded transient
7385object is made persistent
7386
7387Page 50
7388October 31, 2013
7389
7390Published
7391Copyright © TCG 2006-2013
7392
7393Family “2.0”
7394Level 00 Revision 00.99
7395
7396Trusted Platform Module Library
7397
7398Part 2: Structures
7399
7400When a transient object is loaded, the TPM shall assign a handle with an MSO of TPM_HT_TRANSIENT.
7401The object may be assigned a different handle each time it is loaded. The TPM shall ensure that handles
7402assigned to transient objects are unique and assigned to only one transient object at a time.
7403EXAMPLE
7404
7405If a TPM is only able to hold 4 transient objects in internal memory, it might choose to assign handles to
7406those objects with the values 80 00 00 0016 – 80 00 00 0316.
7407
7408When a transient object is converted to a persistent object (TPM2_EvictControl()), the TPM shall validate
7409that the handle provided by the caller has an MSO of TPM_HT_PERSISTENT and that the handle is not
7410already assigned to a persistent object.
7411A handle is assigned to a session when the session is started. The handle shall have an MSO equal to
7412TPM_HT_SESSION and remain associated with that session until the session is closed or flushed. The
7413TPM shall ensure that a session handle is only associated with one session at a time. When the session
7414is loaded into the TPM using TPM2_LoadContext(), it will have the same handle each time it is loaded.
7415EXAMPLE
7416
74177.3
7418
7419If a TPM is only able to track 64 active sessions at a time, it could number those sessions using the
7420values xx 00 01 0016 – xx 00 01 3F 16 where xx is either 02 16 or 03 16 depending on the session type.
7421
7422Persistent Handle Sub-ranges
7423
7424Persistent handles are assigned by the caller of TPM2_EvictControl(). ownerAuth or platformAuth is
7425required to authorize allocation of space for a persistent object. These entities are given separate ranges
7426of persistent handles so that they do not have to allocate from a common range of handles.
7427NOTE
7428
7429While this “namespace” allocation of the handle ranges could have been handled by convention, TPM
7430enforcement is used to prevent errors by the OS or malicious software from affecting the platform’s use of
7431the NV memory.
7432
7433The Owner is allocated persistent handles in the range of 81 00 00 0016 to 81 7F FF FF16 inclusive and
7434the TPM will return an error if ownerAuth is used to attempt to assign a persistent handle outside of this
7435range.
7436
7437Family “2.0”
7438Level 00 Revision 00.99
7439
7440Published
7441Copyright © TCG 2006-2013
7442
7443Page 51
7444October 31, 2013
7445
7446Part 2: Structures
74477.4
7448
7449Trusted Platform Module Library
7450
7451TPM_RH (Permanent Handles)
7452
7453Table 27 lists the architecturally defined handles that cannot be changed. The handles include
7454authorization handles, and special handles.
7455Table 27 — Definition of (UINT32) TPM_RH Constants <IN, S>
7456Name
7457
7458Value
7459
7460Type
7461
7462TPM_RH_FIRST
7463
74640x40000000
7465
7466R
7467
7468TPM_RH_SRK
7469
74700x40000000
7471
7472R
7473
7474TPM_RH_OWNER
7475
74760x40000001
7477
7478K, A, P
7479
7480TPM_RH_REVOKE
7481
74820x40000002
7483
7484R
7485
7486not used
7487
74881
7489
7490TPM_RH_TRANSPORT
7491
74920x40000003
7493
7494R
7495
7496not used
7497
74981
7499
7500TPM_RH_OPERATOR
7501
75020x40000004
7503
7504R
7505
7506not used
7507
75081
7509
7510TPM_RH_ADMIN
7511
75120x40000005
7513
7514R
7515
7516not used
7517
75181
7519
7520TPM_RH_EK
7521
75220x40000006
7523
7524R
7525
7526not used
7527
75281
7529
7530TPM_RH_NULL
7531
75320x40000007
7533
7534K, A, P
7535
7536a handle associated with the null hierarchy, an EmptyAuth
7537authValue, and an Empty Policy authPolicy.
7538
7539TPM_RH_UNASSIGNED
7540
75410x40000008
7542
7543R
7544
7545value reserved to the TPM to indicate a handle location that
7546has not been initialized or assigned
7547
7548TPM_RS_PW
7549
75500x40000009
7551
7552S
7553
7554authorization value
7555authorization session
7556
7557TPM_RH_LOCKOUT
7558
75590x4000000A
7560
7561A
7562
7563references the authorization associated with the dictionary
7564attack lockout reset
7565
7566TPM_RH_ENDORSEMENT
7567
75680x4000000B
7569
7570K, A, P
7571
7572references the Endorsement Primary
7573endorsementAuth, and endorsementPolicy
7574
7575TPM_RH_PLATFORM
7576
75770x4000000C
7578
7579K, A, P
7580
7581references the Platform Primary Seed (PPS), platformAuth,
7582and platformPolicy
7583
7584TPM_RH_PLATFORM_NV
7585
75860x4000000D
7587
7588C
7589
7590for phEnableNV
7591
7592R
7593
7594the top of the reserved handle area
7595This is set to allow TPM2_GetCapability() to know where to
7596stop. It may vary as implementations add to the permanent
7597handle area.
7598
7599TPM_RH_LAST
7600
76010x4000000D
7602
7603Comments
7604
7605not used
7606
76071
7608
7609handle references the Storage Primary Seed (SPS), the
7610ownerAuth, and the ownerPolicy
7611
7612used
7613
7614to
7615
7616indicate
7617
7618a
7619
7620password
7621
7622Seed
7623
7624(EPS),
7625
7626Type definitions:
7627R – a reserved value
7628K – a Primary Seed
7629A – an authorization value
7630P – a policy value
7631S – a session handle
7632C - 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
7633in any command defined in this version of the specification.
7634
7635Page 52
7636October 31, 2013
7637
7638Published
7639Copyright © TCG 2006-2013
7640
7641Family “2.0”
7642Level 00 Revision 00.99
7643
7644Trusted Platform Module Library
76457.5
7646
7647Part 2: Structures
7648
7649TPM_HC (Handle Value Constants)
7650
7651The definitions in Table 28 are used to define many of the interface data types. However, the values of
7652these constants, other than PCR_FIRST, are informative and may be changed by an implementation as
7653long as the values stay within the prescribed ranges for the handle type.
7654NOTE
7655
7656PCR0 is architecturally defined to have a handle value of 0.
7657
7658For the reference implementation, the handle range for sessions starts at the lowest allowed value for a
7659session handle. The highest value for a session handle is determined by how many active sessions are
7660allowed by the implementation. The MSO of the session handle will be set according to the session type.
7661A similar approach is used for transient objects with the first assigned handle at the bottom of the range
7662defined by TPM_HT_TRANSIENT and the top of the range determined by the implementation-dependent
7663value of MAX_LOADED_OBJECTS.
7664The first assigned handle for evict objects is also at the bottom of the allowed range defined by
7665TPM_HT_PERSISTENT and the top of the range determined by the implementation-dependent value of
7666MAX_EVICT_OBJECTS.
7667NOTE
7668
7669The values in Table 28 are intended to facilitate the process of making the handle larger than 32 bits in
7670the future. It is intended that HR_MASK and HR_SHIFT are the only values that need change to resize
7671the handle space.
7672
7673Family “2.0”
7674Level 00 Revision 00.99
7675
7676Published
7677Copyright © TCG 2006-2013
7678
7679Page 53
7680October 31, 2013
7681
7682Part 2: Structures
7683
7684Trusted Platform Module Library
7685
7686Table 28 — Definition of (TPM_HANDLE) TPM_HC Constants <IN, S>
7687Name
7688
7689Value
7690
7691Comments
7692
7693HR_HANDLE_MASK
7694
76950x00FFFFFF
7696
7697to mask off the HR
7698
7699HR_RANGE_MASK
7700
77010xFF000000
7702
7703to mask off the variable
7704part
7705
7706HR_SHIFT
7707
770824
7709
7710HR_PCR
7711
7712(TPM_HT_PCR << HR_SHIFT)
7713
7714HR_HMAC_SESSION
7715
7716(TPM_HT_HMAC_SESSION << HR_SHIFT)
7717
7718HR_POLICY_SESSION
7719
7720(TPM_HT_POLICY_SESSION << HR_SHIFT)
7721
7722HR_TRANSIENT
7723
7724(TPM_HT_TRANSIENT << HR_SHIFT)
7725
7726HR_PERSISTENT
7727
7728(TPM_HT_PERSISTENT << HR_SHIFT)
7729
7730HR_NV_INDEX
7731
7732(TPM_HT_NV_INDEX << HR_SHIFT)
7733
7734HR_PERMANENT
7735
7736(TPM_HT_PERMANENT << HR_SHIFT)
7737
7738PCR_FIRST
7739
7740(HR_PCR + 0)
7741
7742first PCR
7743
7744PCR_LAST
7745
7746(PCR_FIRST + IMPLEMENTATION_PCR-1)
7747
7748last PCR
7749
7750HMAC_SESSION_FIRST
7751
7752(HR_HMAC_SESSION + 0)
7753
7754first HMAC session
7755
7756HMAC_SESSION_LAST
7757
7758(HMAC_SESSION_FIRST+MAX_ACTIVE_SESSIONS-1)
7759
7760last HMAC session
7761
7762LOADED_SESSION_FIRST HMAC_SESSION_FIRST
7763
7764used in GetCapability
7765
7766LOADED_SESSION_LAST
7767
7768HMAC_SESSION_LAST
7769
7770used in GetCapability
7771
7772POLICY_SESSION_FIRST
7773
7774(HR_POLICY_SESSION + 0)
7775
7776first policy session
7777
7778POLICY_SESSION_LAST
7779
7780(POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS-1)
7781 last policy session
7782
7783TRANSIENT_FIRST
7784
7785(HR_TRANSIENT + 0)
7786
7787first transient object
7788
7789ACTIVE_SESSION_FIRST
7790
7791POLICY_SESSION_FIRST
7792
7793used in GetCapability
7794
7795ACTIVE_SESSION_LAST
7796
7797POLICY_SESSION_LAST
7798
7799used in GetCapability
7800
7801TRANSIENT_LAST
7802
7803(TRANSIENT_FIRST+MAX_LOADED_OBJECTS-1)
7804
7805last transient object
7806
7807PERSISTENT_FIRST
7808
7809(HR_PERSISTENT + 0)
7810
7811first persistent object
7812
7813PERSISTENT_LAST
7814
7815(PERSISTENT_FIRST + 0x00FFFFFF)
7816
7817last persistent object
7818
7819PLATFORM_PERSISTENT
7820
7821(PERSISTENT_FIRST + 0x00800000)
7822
7823first platform persistent
7824object
7825
7826NV_INDEX_FIRST
7827
7828(HR_NV_INDEX + 0)
7829
7830first allowed NV Index
7831
7832NV_INDEX_LAST
7833
7834(NV_INDEX_FIRST + 0x00FFFFFF)
7835
7836last allowed NV Index
7837
7838PERMANENT_FIRST
7839
7840TPM_RH_FIRST
7841
7842PERMANENT_LAST
7843
7844TPM_RH_LAST
7845
7846Page 54
7847October 31, 2013
7848
7849Published
7850Copyright © TCG 2006-2013
7851
7852Family “2.0”
7853Level 00 Revision 00.99
7854
7855Trusted Platform Module Library
7856
7857Part 2: Structures
7858
7859Attribute Structures
7860
78618
78628.1
7863
7864Description
7865
7866Attributes are expressed as bit fields of varying size. An attribute field structure may be 1, 2, or 4 octets in
7867length.
7868The bit numbers for an attribute structure are assigned with the number 0 assigned to the least-significant
7869bit of the structure and the highest number assigned to the most-significant bit of the structure.
7870The least significant bit is determined by treating the attribute structure as an integer. The least-significant
7871bit would be the bit that is set when the value of the integer is 1.
7872When any reserved bit in an attribute is SET, the TPM shall return TPM_RC_RESERVED_BITS. This
7873response code is not shown in the tables for attributes.
78748.2
7875
7876TPMA_ALGORITHM
7877
7878This structure defines the attributes of an algorithm.
7879Each algorithm has a fundamental attribute: asymmetric, symmetric, or hash. In some cases (e.g.,
7880TPM_ALG_RSA or TPM_ALG_AES), this is the only attribute.
7881A mode, method, or scheme may have an associated asymmetric, symmetric, or hash algorithm.
7882Table 29 — Definition of (UINT32) TPMA_ALGORITHM Bits
7883Bit
7884
7885Name
7886
7887Definition
7888
78890
7890
7891asymmetric
7892
7893SET (1): an asymmetric algorithm with public and private portions
7894CLEAR (0): not an asymmetric algorithm
7895
78961
7897
7898symmetric
7899
7900SET (1): a symmetric block cipher
7901CLEAR (0): not a symmetric block cipher
7902
79032
7904
7905hash
7906
7907SET (1): a hash algorithm
7908CLEAR (0): not a hash algorithm
7909
79103
7911
7912object
7913
7914SET (1): an algorithm that may be used as an object type
7915CLEAR (0): an algorithm that is not used as an object type
7916
79177:4
7918
7919Reserved
7920
79218
7922
7923signing
7924
7925SET (1): a signing algorithm. The setting of asymmetric, symmetric, and hash
7926will indicate the type of signing algorithm.
7927CLEAR (0): not a signing algorithm
7928
79299
7930
7931encrypting
7932
7933SET (1): an encryption/decryption algorithm. The setting of asymmetric,
7934symmetric, and hash will indicate the type of encryption/decryption algorithm.
7935CLEAR (0): not an encryption/decryption algorithm
7936
793710
7938
7939method
7940
7941SET (1): a method such as a key derivative function (KDF)
7942CLEAR (0): not a method
7943
794431:11 Reserved
7945
79468.3
79478.3.1
7948
7949TPMA_OBJECT (Object Attributes)
7950Introduction
7951
7952Family “2.0”
7953Level 00 Revision 00.99
7954
7955Published
7956Copyright © TCG 2006-2013
7957
7958Page 55
7959October 31, 2013
7960
7961Part 2: Structures
7962
7963Trusted Platform Module Library
7964
7965This attribute structure indicates an object’s use, its authorization types, and it relationship to other
7966objects.
7967The state of the attributes is determined when the object is created and they are never changed by the
7968TPM. Additionally, the setting of these structures is reflected in the integrity value of the private area of an
7969object in order to allow the TPM to detect modifications of the Protected Object when stored off the TPM.
79708.3.2
7971
7972Structure Definition
7973Table 30 — Definition of (UINT32) TPMA_OBJECT Bits
7974
7975Bit
7976
7977Name
7978
7979Definition
7980
79810
7982
7983Reserved
7984
7985shall be zero
7986
79871
7988
7989fixedTPM
7990
7991SET (1): The hierarchy of the object, as indicated by its Qualified Name, may
7992not change.
7993CLEAR (0): The hierarchy of the object may change as a result of this object or
7994an ancestor key being duplicated for use in another hierarchy.
7995
79962
7997
7998stClear
7999
8000SET (1): Previously saved contexts of this object may not be loaded after
8001Startup(CLEAR).
8002CLEAR (0): Saved contexts of this object may be used after a
8003Shutdown(STATE) and subsequent Startup().
8004
80053
8006
8007Reserved
8008
8009shall be zero
8010
80114
8012
8013fixedParent
8014
8015SET (1): The parent of the object may not change.
8016CLEAR (0): The parent of the object may change as the result of a
8017TPM2_Duplicate() of the object.
8018
80195
8020
8021sensitiveDataOrigin
8022
8023SET (1): Indicates that, when the object was created with TPM2_Create() or
8024TPM2_CreatePrimary(), the TPM generated all of the sensitive data other than
8025the authValue.
8026CLEAR (0): A portion of the sensitive data, other than the authValue, was
8027provided by the caller.
8028
80296
8030
8031userWithAuth
8032
8033SET (1): Approval of USER role actions with this object may be with an HMAC
8034session or with a password using the authValue of the object or a policy
8035session.
8036CLEAR (0): Approval of USER role actions with this object may only be done
8037with a policy session.
8038
80397
8040
8041adminWithPolicy
8042
8043SET (1): Approval of ADMIN role actions with this object may only be done with
8044a policy session.
8045CLEAR (0): Approval of ADMIN role actions with this object may be with an
8046HMAC session or with a password using the authValue of the object or a policy
8047session.
8048
80499:8
8050
8051Reserved
8052
8053shall be zero
8054
805510
8056
8057noDA
8058
8059SET (1): The object is not subject to dictionary attack protections.
8060CLEAR (0): The object is subject to dictionary attack protections.
8061
806211
8063
8064encryptedDuplication
8065
8066SET (1): If the object is duplicated, then symmetricAlg shall not be
8067TPM_ALG_NULL and newParentHandle shall not be TPM_RH_NULL.
8068CLEAR (0): The object may be duplicated without an inner wrapper on the
8069private portion of the object and the new parent may be TPM_RH_NULL.
8070
807115:12 Reserved
807216
8073
8074restricted
8075
8076Page 56
8077October 31, 2013
8078
8079shall be zero
8080SET (1): Key usage is restricted to manipulate structures of known format; the
8081parent of this key shall have restricted SET.
8082CLEAR (0): Key usage is not restricted to use on special formats.
8083
8084Published
8085Copyright © TCG 2006-2013
8086
8087Family “2.0”
8088Level 00 Revision 00.99
8089
8090Trusted Platform Module Library
8091
8092Part 2: Structures
8093
8094Bit
8095
8096Name
8097
8098Definition
8099
810017
8101
8102decrypt
8103
8104SET (1): The private portion of the key may be used to decrypt.
8105CLEAR (0): The private portion of the key may not be used to decrypt.
8106
810718
8108
8109sign
8110
8111SET (1): The private portion of the key may be used to sign.
8112CLEAR (0): The private portion of the key may not be used to sign.
8113
811431:19 Reserved
8115
81168.3.3
81178.3.3.1
8118
8119shall be zero
8120
8121Attribute Descriptions
8122Introduction
8123
8124The following remaining paragraphs in this clause describe the use and settings for each of the
8125TPMA_OBJECT attributes. The description includes checks that are performed on the objectAttributes
8126when an object is created, when it is loaded, and when it is imported. In these descriptions:
8127Creation –
8128
8129indicates
8130settings
8131for
8132TPM2_CreatePrimary()
8133
8134the
8135
8136template
8137
8138parameter
8139
8140in
8141
8142TPM2_Create()
8143
8144or
8145
8146Load
8147
81488149
8150indicates settings for the inPublic parameter in TPM2_Load()
8151
8152Import
8153
81548155
8156indicates settings for the objectPublic parameter in TPM2_Import()
8157
8158External
8159
81608161
8162indicates settings that apply to the inPublic parameter in TPM2_LoadExternal() if both the
8163public and sensitive portions of the object are loaded
8164
8165NOTE
8166
8167For TPM2_LoadExternal() when only the public portion of the object is loaded, the only attribute checks
8168are the checks in the validation code following Table 30 and the reserved attributes check.
8169
8170For any consistency error of attributes in TPMA_OBJECT, the TPM shall return TPM_RC_ATTRIBUTES.
81718.3.3.2
8172
8173Bit[1] – fixedTPM
8174
8175When SET, the object cannot be duplicated for use on a different TPM, either directly or indirectly and the
8176Qualified Name of the object cannot change. When CLEAR, the object’s Qualified Name may change if
8177the object or an ancestor is duplicated.
8178NOTE
8179
8180This attribute is the logical inverse of the migratable attribute in 1.2. That is, when this attribute is C LEAR,
8181it is the equivalent to a 1.2 object with migratable SET.
8182
8183Creation –
8184
8185If fixedTPM is SET in the object's parent, then fixedTPM and fixedParent shall both be
8186set to the same value in template. If fixedTPM is CLEAR in the parent, this attribute shall
8187also be CLEAR in template.
8188NOTE
8189
8190For a Primary Object, the parent is considered to have fixedTPM SET.
8191
8192Load
8193
81948195
8196If fixedTPM is SET in the object's parent, then fixedTPM and fixedParent shall both be
8197set to the same value. If fixedTPM is CLEAR in the parent, this attribute shall also be
8198CLEAR.
8199
8200Import
8201
82028203
8204shall be CLEAR
8205
8206External
8207
82088209
8210shall be CLEAR if both the public and sensitive portions are loaded or if fixedParent is
8211CLEAR, otherwise may be SET or CLEAR
8212
8213Family “2.0”
8214Level 00 Revision 00.99
8215
8216Published
8217Copyright © TCG 2006-2013
8218
8219Page 57
8220October 31, 2013
8221
8222Part 2: Structures
82238.3.3.3
8224
8225Trusted Platform Module Library
8226
8227Bit[2] – stClear
8228
8229If this attribute is SET, then saved contexts of this object will be invalidated on
8230TPM2_Startup(TPM_SU_CLEAR). If the attribute is CLEAR, then the TPM shall not invalidate the saved
8231context if the TPM received TPM2_Shutdown(TPM_SU_STATE). If the saved state is valid when checked
8232at the next TPM2_Startup(), then the TPM shall continue to be able to use the saved contexts.
8233Creation –
8234
8235may be SET or CLEAR in template
8236
8237Load
8238
82398240
8241may be SET or CLEAR
8242
8243Import
8244
82458246
8247may be SET or CLEAR
8248
8249External
8250
82518252
8253may be SET or CLEAR
8254
82558.3.3.4
8256
8257Bit[4] – fixedParent
8258
8259If this attribute is SET, the object’s parent may not be changed. That is, this object may not be the object
8260of a TPM2_Duplicate(). If this attribute is CLEAR, then this object may be the object of a
8261TPM2_Duplicate().
8262Creation –
8263
8264may be SET or CLEAR in template
8265
8266Load
8267
82688269
8270may be SET or CLEAR
8271
8272Import
8273
82748275
8276shall be CLEAR
8277
8278External
8279
82808281
8282shall be CLEAR if both the public and sensitive portions are loaded; otherwise it may be
8283SET or CLEAR
8284
82858.3.3.5
8286
8287Bit[5] – sensitiveDataOrigin
8288
8289This attribute is SET for any key that was generated by TPM in TPM2_Create() or
8290TPM2_CreatePrimary(). If CLEAR, it indicates that the sensitive part of the object (other than the
8291obfuscation value) was provided by the caller.
8292NOTE 1
8293
8294If the fixedTPM attribute is SET, then this attribute is authoritative and accurately reflects the source of
8295the sensitive area data. If the fixedTPM attribute is CLEAR, then validation of this attribute requires
8296evaluation of the properties of the ancestor keys.
8297
8298Creation –
8299
8300If inSensitive.sensitive.data.size is zero, then this attribute shall be SET in the template;
8301otherwise, it shall be CLEAR in the template.
8302
8303NOTE 2
8304
8305The inSensitive.sensitive.data.size parameter is required to be zero for an asymmetric key so
8306sensitiveDataOrigin is required to be SET.
8307
8308NOTE 3
8309
8310The inSensitive.sensitive.data.size parameter may not be zero for a data object so sensitiveDataOrigin is
8311required to be CLEAR. A data object has type = TPM_ALG_KEYEDHASH and its sign and decrypt
8312attributes are CLEAR.
8313
8314Load
8315
83168317
8318may be SET or CLEAR
8319
8320Import
8321
83228323
8324may be SET or CLEAR
8325
8326External
8327
83288329
8330may be SET or CLEAR
8331
8332Page 58
8333October 31, 2013
8334
8335Published
8336Copyright © TCG 2006-2013
8337
8338Family “2.0”
8339Level 00 Revision 00.99
8340
8341Trusted Platform Module Library
83428.3.3.6
8343
8344Part 2: Structures
8345
8346Bit[6] – userWithAuth
8347
8348If SET, authorization for operations that require USER role authorization may be given if the caller
8349provides proof of knowledge of the authValue of the object with an HMAC authorization session or a
8350password.
8351If this attribute is CLEAR, then then HMAC or password authorizations may not be used for USER role
8352authorizations.
8353NOTE 1
8354
8355Regardless of the setting of this attribute, authorizations for operations th at require USER role
8356authorizations may be provided with a policy session that satisfies the object's authPolicy.
8357
8358NOTE 2
8359
8360Regardless of the setting of this attribute, the authValue may be referenced in a policy session or used to
8361provide the bind value in TPM2_StartAuthSession(). However, if userWithAuth is CLEAR, then the object
8362may be used as the bind object in TPM2_StartAuthSession() but the session cannot be used to authorize
8363actions on the object. If this were allowed, then the userWithAuth control could be circumvented simply by
8364using the object as the bind object.
8365
8366Creation –
8367
8368may be SET or CLEAR in template
8369
8370Load
8371
83728373
8374may be SET or CLEAR
8375
8376Import
8377
83788379
8380may be SET or CLEAR
8381
8382External
8383
83848385
8386may be SET or CLEAR
8387
83888.3.3.7
8389
8390Bit[7] – adminWithPolicy
8391
8392If CLEAR, authorization for operations that require ADMIN role may be given if the caller provides proof of
8393knowledge of the authValue of the object with an HMAC authorization session or a password.
8394If this attribute is SET, then then HMAC or password authorizations may not be used for ADMIN role
8395authorizations.
8396NOTE 1
8397
8398Regardless of the setting of this attribute, operations that require ADMIN role authorization may be
8399provided by a policy session that satisfies the object's authPolicy.
8400
8401NOTE 2
8402
8403This attribute is similar to userWithAuth but the logic is a bit different. When userWithAuth is CLEAR, the
8404authValue may not be used for USER mode authorizations. When adminWithPolicy is CLEAR, it means
8405that the authValue may be used for ADMIN role. Policy may always be used regardless of t he setting of
8406userWithAuth or adminWithPolicy.
8407
8408Actions that always require policy (TPM2_Duplicate()) are not affected by the setting of this attribute.
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
84318.3.3.8
8432
8433Bit[10] – noDA
8434
8435If SET, then authorization failures for the object do not affect the dictionary attack protection logic and
8436authorization of the object is not blocked if the TPM is in lockout.
8437Creation –
8438
8439may be SET or CLEAR in template
8440
8441Load
8442
84438444
8445may be SET or CLEAR
8446
8447Import
8448
84498450
8451may be SET or CLEAR
8452
8453External
8454
84558456
8457may be SET or CLEAR
8458
8459Family “2.0”
8460Level 00 Revision 00.99
8461
8462Published
8463Copyright © TCG 2006-2013
8464
8465Page 59
8466October 31, 2013
8467
8468Part 2: Structures
84698.3.3.9
8470
8471Trusted Platform Module Library
8472
8473Bit[11] – encryptedDuplication
8474
8475If SET, then when the object is duplicated, the sensitive portion of the object is required to be encrypted
8476with an inner wrapper and the new parent shall be an asymmetric key and not TPM_RH_NULL
8477NOTE 1
8478
8479Enforcement of these requirements in TPM2_Duplicate() is by not allowing symmetricAlg to be
8480TPM_ALG_NULL and newParentHandle may not be TPM_RH_NULL.
8481
8482This attribute shall not be SET in any object that has fixedTPM SET.
8483NOTE 2
8484
8485This requirement means that encryptedDuplication may not be SET if the object cannot be directly or
8486indirectly duplicated.
8487
8488If an object's parent has fixedTPM SET, and the object is duplicable (fixedParent == CLEAR), then
8489encryptedDuplication may be SET or CLEAR in the object.
8490NOTE 3
8491
8492This allows the object at the boundary between duplicable and non -duplicable objects to have either
8493setting.
8494
8495If an object's parent has fixedTPM CLEAR, then the object is required to have the same setting of
8496encryptedDuplication as its parent.
8497NOTE 4
8498
8499This requirement forces all
8500encryptedDuplication setting.
8501
8502duplicable
8503
8504objects
8505
8506in
8507
8508a
8509
8510duplication
8511
8512group
8513
8514to
8515
8516have
8517
8518the
8519
8520same
8521
8522Creation –
8523
8524shall be CLEAR if fixedTPM is SET. If fixedTPM is CLEAR, then this attribute shall have
8525the same value as its parent unless fixedTPM is SET in the object's parent, in which
8526case, it may be SET or CLEAR.
8527
8528Load
8529
85308531
8532shall be CLEAR if fixedTPM is SET. If fixedTPM is CLEAR, then this attribute shall have
8533the same value as its parent, unless fixedTPM is SET the parent, in which case, it may
8534be SET or CLEAR.
8535
8536Import
8537
85388539
8540if fixedTPM is SET in the object's new parent, then this attribute may be SET or CLEAR,
8541otherwise, it shall have the same setting as the new parent.
8542
8543External
8544
85458546
8547may be SET or CLEAR.
8548
85498.3.3.10
8550
8551Bit[16] – restricted
8552
8553This this attribute modifies the decrypt and sign attributes of an object.
8554NOTE
8555
8556A key with this object CLEAR may not be a parent for another object.
8557
8558Creation –
8559
8560shall be CLEAR in template if neither sign nor decrypt is SET in template.
8561
8562Load
8563
85648565
8566shall be CLEAR if neither sign nor decrypt is SET in the object
8567
8568Import
8569
85708571
8572may be SET or CLEAR
8573
8574External
8575
85768577
8578shall be CLEAR
8579
8580Page 60
8581October 31, 2013
8582
8583Published
8584Copyright © TCG 2006-2013
8585
8586Family “2.0”
8587Level 00 Revision 00.99
8588
8589Trusted Platform Module Library
85908.3.3.11
8591
8592Part 2: Structures
8593
8594Bit[17] – decrypt
8595
8596When SET, the private portion of this key can be used to decrypt an external blob. If restricted is SET,
8597then the TPM will return an error if the external decrypted blob is not formatted as appropriate for the
8598command.
8599NOTE 1
8600
8601Since TPM-generated keys and sealed data will contain a hash and a structure tag, the TPM can ensure
8602that it is not being used to improperly decrypt and return sensitive data that should not be returned. The
8603only type of data that may be returned after decryption is a Sealed Data Object (a keyedHash object with
8604decrypt and sign CLEAR).
8605
8606When restricted is CLEAR, there are no restrictions on the use of the private portion of the key for
8607decryption and the key may be used to decrypt and return any structure encrypted by the public portion of
8608the key.
8609NOTE 2
8610
8611A key with this attribute SET may be a parent for another object if restricted is SET and sign is CLEAR.
8612
8613If decrypt is SET on an object with type set to TPM_ALG_KEYEDHASH, it indicates that the object is an
8614XOR encryption key.
8615Creation –
8616
8617may be SET or CLEAR in template
8618
8619Load
8620
86218622
8623may be SET or CLEAR
8624
8625Import
8626
86278628
8629may be SET or CLEAR
8630
8631External
8632
86338634
8635may be SET or CLEAR
8636
86378.3.3.12
8638
8639Bit[18] – sign
8640
8641When this attribute is SET, the private portion of this key may be used to sign a digest. If restricted is
8642SET, then the key may only be used to sign a digest that was computed by the TPM. A restricted signing
8643key may be used to sign a TPM-generated digest. If a structure is generated by the TPM, it will begin with
8644TPM_GENERATED_VALUE and the TPM may sign the digest of that structure. If the data is externally
8645supplied and has TPM_GENERATED_VALUE as its first octets, then the TPM will not sign a digest of
8646that data with a restricted signing key.
8647If restricted is CLEAR, then the key may be used to sign any digest, whether generated by the TPM or
8648externally provided.
8649NOTE 1
8650
8651Some asymmetric algorithms may not support both sign and decrypt being SET in the same key.
8652
8653If sign is SET on an object with type set to TPM_ALG_KEYEDHASH, it indicates that the object is an
8654HMAC key.
8655NOTE 2
8656
8657A key with this attribute SET may not be a parent for another object.
8658
8659Creation –
8660
8661shall not be SET if decrypt and restricted are both SET
8662
8663Load
8664
86658666
8667shall not be SET if decrypt and restricted are both SET
8668
8669Import
8670
86718672
8673shall not be SET if decrypt and restricted are both SET
8674
8675External
8676
86778678
8679shall not be SET if decrypt and restricted are both SET
8680
8681Family “2.0”
8682Level 00 Revision 00.99
8683
8684Published
8685Copyright © TCG 2006-2013
8686
8687Page 61
8688October 31, 2013
8689
8690Part 2: Structures
86918.4
8692
8693Trusted Platform Module Library
8694
8695TPMA_SESSION (Session Attributes)
8696
8697This octet in each session is used to identify the session type, indicate its relationship to any handles in
8698the command, and indicate its use in parameter encryption.
8699Table 31 — Definition of (UINT8) TPMA_SESSION Bits <IN/OUT>
8700Bit
8701
8702Name
8703
8704Meaning
8705
87060
8707
8708continueSession
8709
8710SET (1): In a command, this setting indicates that the session is to remain active
8711after successful completion of the command. In a response, it indicates that the
8712session is still active. If SET in the command, this attribute shall be SET in the
8713response.
8714CLEAR (0): In a command, this setting indicates that the TPM should close the
8715session and flush any related context when the command completes successfully. In
8716a response, it indicates that the session is closed and the context is no longer active.
8717This attribute has no meaning for a password authorization and the TPM will allow
8718any setting of the attribute in the command and SET the attribute in the response.
8719This attribute will only be CLEAR in one response for a logical session. If the attribute
8720is CLEAR, the context associated with the session is no longer in use and the space
8721is available. A session created after another session is ended may have the same
8722handle but logically is not the same session.
8723This attribute has no effect if the command does not complete successfully.
8724
87251
8726
8727auditExclusive
8728
8729SET (1): In a command, this setting indicates that the command should only be
8730executed if the session is exclusive at the start of the command. In a response, it
8731indicates that the session is exclusive. This setting is only allowed if the audit
8732attribute is SET.
8733CLEAR (0): If audit is CLEAR, then this field is reserved but the error is
8734TPM_RC_ATTRIBUTES rather than TPM_RC_RESERVED_BITS.
8735See "Exclusive Audit Session" clause in Part 1.
8736
87372
8738
8739auditReset
8740
8741SET (1): In a command, this setting indicates that the audit digest of the session
8742should be initialized and the exclusive status of the session SET.
8743CLEAR (0): If audit is CLEAR, then this field is reserved but the error is
8744TPM_RC_ATTRIBUTES rather than TPM_RC_RESERVED_BITS. This setting is
8745always used for a response.
8746
87474:3
8748
8749Reserved
8750
8751shall be CLEAR
8752
8753decrypt
8754
8755SET (1): In a command, this setting indicates that the first parameter in the command
8756is symmetrically encrypted using the parameter encryption scheme described in Part
87571. The TPM will decrypt the parameter after performing any HMAC computations and
8758before unmarshaling the parameter. In a response, the attribute is copied from the
8759request but has no effect on the response.
8760CLEAR (0): Session not used for encryption.
8761
87625
8763
8764For a password authorization, this attribute will be CLEAR in both the command and
8765response.
8766This attribute may only be SET in one session per command.
8767This attribute may be SET in a session that is not associated with a command
8768handle. Such a session is provided for purposes of encrypting a parameter and not
8769for authorization.
8770This attribute may be SET in combination with any other session attributes.
8771This attribute may only be SET if the first parameter of the command is a sized buffer
8772(TPM2B_).
8773
8774Page 62
8775October 31, 2013
8776
8777Published
8778Copyright © TCG 2006-2013
8779
8780Family “2.0”
8781Level 00 Revision 00.99
8782
8783Trusted Platform Module Library
8784
8785Part 2: Structures
8786
8787Bit
8788
8789Name
8790
8791Meaning
8792
87936
8794
8795encrypt
8796
8797SET (1): In a command, this setting indicates that the TPM should use this session to
8798encrypt the first parameter in the response. In a response, it indicates that the
8799attribute was set in the command and that the TPM used the session to encrypt the
8800first parameter in the response using the parameter encryption scheme described in
8801Part 1 of this specification.
8802CLEAR (0): Session not used for encryption.
8803For a password authorization, this attribute will be CLEAR in both the command and
8804response.
8805This attribute may only be SET in one session per command.
8806This attribute may be SET in a session that is not associated with a command
8807handle. Such a session is provided for purposes of encrypting a parameter and not
8808for authorization.
8809This attribute may only be SET if the first parameter of a response is a sized buffer
8810(TPM2B_).
8811
88127
8813
8814SET (1): In a command or response, this setting indicates that the session is for audit
8815and that auditExclusive and auditReset have meaning. This session may also be
8816used for authorization, encryption, or decryption. The encrypted and encrypt fields
8817may be SET or CLEAR.
8818CLEAR (0): Session is not used for audit.
8819
8820audit
8821
8822This attribute may only be SET in one session per command or response. If SET in
8823the command, then this attribute will be SET in the response.
8824
88258.5
8826
8827TPMA_LOCALITY (Locality Attribute)
8828
8829In a TPMS_CREATION_DATA structure, this structure is used to indicate the locality of the command that
8830created the object. No more than one of the locality attributes shall be set in the creation data.
8831When used in TPM2_PolicyLocality(), this structure indicates which localities are approved by the policy.
8832When a policy is started, all localities are allowed. If TPM2_PolicyLocality() is executed, it indicates that
8833the command may only be executed at specific localities. More than one locality may be selected.
8834EXAMPLE 1
8835
8836TPM_LOC_TWO would indicate that only locality 2 is authorized.
8837
8838EXAMPLE 2
8839
8840TPM_LOC_ONE + TPM_LOC_TWO would indicate that locality 1 or 2 is authorized.
8841
8842EXAMPLE 3
8843
8844TPM_LOC_FOUR + TPM_LOC_THREE would indicate that localities 3 or 4 are authorized.
8845
8846EXAMPLE 4
8847
8848A value of 21 16 would represent a locality of 33.
8849
8850NOTE
8851
8852Locality values of 5 through 31 are not selectable.
8853
8854Family “2.0”
8855Level 00 Revision 00.99
8856
8857Published
8858Copyright © TCG 2006-2013
8859
8860Page 63
8861October 31, 2013
8862
8863Part 2: Structures
8864
8865Trusted Platform Module Library
8866
8867If Extended is non-zero, then an extended locality is indicated and the TPMA_LOCALITY contains an
8868integer value.
8869Table 32 — Definition of (UINT8) TPMA_LOCALITY Bits <IN/OUT>
8870Bit
8871
8872Name
8873
8874Definition
8875
88760
8877
8878TPM_LOC_ZERO
8879
88801
8881
8882TPM_LOC_ONE
8883
88842
8885
8886TPM_LOC_TWO
8887
88883
8889
8890TPM_LOC_THREE
8891
88924
8893
8894TPM_LOC_FOUR
8895
88967:5
8897
88988.6
8899
8900Extended
8901
8902If any of these bits is set, an extended locality is indicated
8903
8904TPMA_PERMANENT
8905
8906The attributes in this structure are persistent and are not changed as a result of _TPM_Init or any
8907TPM2_Startup(). Some of the attributes in this structure may change as the result of specific Protected
8908Capabilities.
8909This
8910structure
8911may
8912be
8913read
8914using
8915TPM2_GetCapability(capability
8916=
8917TPM_CAP_TPM_PROPERTIES, property = TPM_PT_PERMANENT).
8918Table 33 — Definition of (UINT32) TPMA_PERMANENT Bits <OUT>
8919Bit
8920
8921Parameter
8922
8923Description
8924
89250
8926
8927ownerAuthSet
8928
8929SET (1): TPM2_HierarchyChangeAuth() with ownerAuth has been executed since
8930the last TPM2_Clear().
8931CLEAR (0): ownerAuth has not been changed since TPM2_Clear().
8932
89331
8934
8935endorsementAuthSet
8936
8937SET (1): TPM2_HierarchyChangeAuth() with endorsementAuth has been executed
8938since the last TPM2_Clear().
8939CLEAR (0): endorsementAuth has not been changed since TPM2_Clear().
8940
89412
8942
8943lockoutAuthSet
8944
8945SET (1): TPM2_HierarchyChangeAuth() with lockoutAuth has been executed since
8946the last TPM2_Clear().
8947CLEAR (0): lockoutAuth has not been changed since TPM2_Clear().
8948
89497:3
89508
8951
8952Reserved
8953disableClear
8954
8955SET (1): TPM2_Clear() is disabled.
8956CLEAR (0): TPM2_Clear() is enabled.
8957NOTE
8958
8959See “TPM2_ClearControl” in Part 3 of this specification for details on changing
8960this attribute.
8961
89629
8963
8964inLockout
8965
8966SET (1): The TPM is in lockout and commands that require authorization with other
8967than platformAuth will not succeed.
8968
896910
8970
8971tpmGeneratedEPS
8972
8973SET (1): The EPS was created by the TPM.
8974CLEAR (0): The EPS was created outside of the TPM using a manufacturerspecific process.
8975
897631:11 Reserved
8977
8978Page 64
8979October 31, 2013
8980
8981Published
8982Copyright © TCG 2006-2013
8983
8984Family “2.0”
8985Level 00 Revision 00.99
8986
8987Trusted Platform Module Library
89888.7
8989
8990Part 2: Structures
8991
8992TPMA_STARTUP_CLEAR
8993
8994These attributes are set to their default state on reset on each TPM Reset or TPM Restart. The attributes
8995are preserved on TPM Resume.
8996On each TPM2_Startup(TPM_SU_CLEAR), the TPM will set these attributes to their indicated defaults.
8997This structure may be read using TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES,
8998property = TPM_PT_STARTUP_CLEAR).
8999Some of attributes may be changed as the result of specific Protected Capabilities.
9000Table 34 — Definition of (UINT32) TPMA_STARTUP_CLEAR Bits <OUT>
9001Bit
90020
9003
9004Parameter
9005
9006Description
9007
9008phEnable
9009
9010SET (1): (default) The platform hierarchy is enabled and platformAuth or
9011platformPolicy may be used for authorization.
9012CLEAR (0): platformAuth and platformPolicy may not be used for authorizations,
9013and objects in the platform hierarchy, including NV Indexes and persistent objects,
9014cannot be used.
9015NOTE
9016
90171
9018
9019shEnable
9020
9021SET (1): (default) The Storage hierarchy is enabled and ownerAuth or ownerPolicy
9022may be used for authorization.
9023CLEAR (0): ownerAuth and ownerPolicy may not be used for authorizations, and
9024objects in the Storage hierarchy, including NV Indexes and persistent objects,
9025cannot be used.
9026NOTE
9027
90282
9029
9030ehEnable
9031
9032phEnableNV
9033
9034See “TPM2_HierarchyControl” in Part 3 of this specification for details on
9035changing this attribute.
9036
9037SET (1): (default) The EPS hierarchy is enabled and endorsementAuth may be
9038used to authorize commands.
9039CLEAR (0): endorsementAuth and endorsementPolicy may not be used for
9040authorizations, and objects in the endorsement hierarchy, including persistent
9041objects, cannot be used.
9042NOTE
9043
90443
9045
9046See “TPM2_HierarchyControl” in Part 3 of this specification for details on
9047changing this attribute.
9048
9049See “TPM2_HierarchyControl” in Part 3 of this specification for details on
9050changing this attribute.
9051
9052SET (1): (default) NV indices that have TPMA_PLATFORM_CREATE SET may be
9053read or written. The platform can create define and undefine indices.
9054CLEAR (0): NV indices that have TPMA_PLATFORM_CREATE SET may not be
9055read or written (TPM_RC_HANDLE). The platform cannot
9056define
9057(TPM_RC_HIERARCHY) or undefined (TPM_RC_HANDLE) indices.
9058NOTE
9059See “TPM2_HierarchyControl” in Part 3 of this specification for details on changing
9060this attribute.
9061NOTE
9062read refers to these commands: TPM2_NV_Read, TPM2_NV_ReadPublic, TPM_NV_Certify,
9063TPM2_PolicyNV
9064write refers to thse commands: TPM2_NV_Write, TPM2_NV_Increment, TPM2_NV_Extend,
9065TPM2_NV_SetBits
9066NOTE The TPM must query the index TPMA_PLATFORM_CREATE attribute to determine
9067whether phEnableNV is applicable. Since the TPM will return TPM_RC_HANDLE if the index
9068does not exist, it also returns this error code if the index is disabled. Otherwise, the TPM
9069would leak the existence of an index even when disabled.
9070
907130:4 Reserved
9072
9073Family “2.0”
9074Level 00 Revision 00.99
9075
9076shall be zero
9077
9078Published
9079Copyright © TCG 2006-2013
9080
9081Page 65
9082October 31, 2013
9083
9084Part 2: Structures
9085
9086Trusted Platform Module Library
9087
9088Bit
9089
9090Parameter
9091
9092Description
9093
909431
9095
9096orderly
9097
9098SET (1): The TPM received a TPM2_Shutdown() and a matching TPM2_Startup().
9099CLEAR (0): TPM2_Startup(TPM_SU_CLEAR) was not preceded by a
9100TPM2_Shutdown() of any type.
9101NOTE
9102
91038.8
9104
9105A shutdown is orderly if the TPM receives a TPM2_Shutdown() of any type
9106followed by a TPM2_Startup() of any type. However, the TPM will return an error if
9107TPM2_Startup(TPM_SU_STATE)
9108was
9109not
9110preceded
9111by
9112TPM2_State_Save(TPM_SU_STATE).
9113
9114TPMA_MEMORY
9115
9116This structure of this attribute is used to report the memory management method used by the TPM for
9117transient
9118objects
9119and
9120authorization
9121sessions.
9122This
9123structure
9124may be
9125read
9126using
9127TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES, property = TPM_PT_MEMORY).
9128If the RAM memory is shared, then context save of a session may make it possible to load an additional
9129transient object.
9130Table 35 — Definition of (UINT32) TPMA_MEMORY Bits <Out>
9131Bit
9132
9133Name
9134
9135Definition
9136
91370
9138
9139sharedRAM
9140
9141SET (1): indicates that the RAM memory used for authorization session
9142contexts is shared with the memory used for transient objects
9143CLEAR (0): indicates that the memory used for authorization sessions is not
9144shared with memory used for transient objects
9145
91461
9147
9148sharedNV
9149
9150SET (1): indicates that the NV memory used for persistent objects is shared
9151with the NV memory used for NV Index values
9152CLEAR (0): indicates that the persistent objects and NV Index values are
9153allocated from separate sections of NV
9154
91552
9156
9157objectCopiedToRam
9158
9159SET (1): indicates that the TPM copies persistent objects to a transient-object
9160slot in RAM when the persistent object is referenced in a command. The TRM
9161is required to make sure that an object slot is available.
9162CLEAR (0): indicates that the TPM does not use transient-object slots when
9163persistent objects are referenced
9164
916531:3
9166
9167Reserved
9168
9169shall be zero
9170
9171Page 66
9172October 31, 2013
9173
9174Published
9175Copyright © TCG 2006-2013
9176
9177Family “2.0”
9178Level 00 Revision 00.99
9179
9180Trusted Platform Module Library
91818.9
9182
9183Part 2: Structures
9184
9185TPMA_CC (Command Code Attributes)
9186
91878.9.1
9188
9189Introduction
9190
9191This structure defines the attributes of a command from a context management perspective. The fields of
9192the structure indicate to the TPM Resource Manager (TRM) the number of resources required by a
9193command and how the command affects the TPM’s resources.
9194This structure is only used in a list returned by the TPM in response to TPM2_GetCapability(capability =
9195TPM_CAP_COMMANDS).
9196For a command to the TPM, only the commandIndex field and V attribute are allowed to be non-zero.
91978.9.2
9198
9199Structure Definition
9200Table 36 — Definition of (TPM_CC) TPMA_CC Bits <OUT>
9201
9202Bit
920315:0
9204
9205Name
9206
9207Definition
9208
9209commandIndex
9210
9211indicates the command being selected
9212
921321:16 Reserved
9214
9215shall be zero
9216
921722
9218
9219nv
9220
9221SET (1): indicates that the command may write to NV
9222CLEAR (0): indicates that the command does not write to NV
9223
922423
9225
9226extensive
9227
9228SET (1): This command could flush any number of loaded contexts.
9229CLEAR (0): no additional changes other than indicated by the flushed attribute
9230
923124
9232
9233flushed
9234
9235SET (1): The context associated with any transient handle in the command will
9236be flushed when this command completes.
9237CLEAR (0): No context is flushed as a side effect of this command.
9238
923927:25 cHandles
9240
9241indicates the number of the handles in the handle area for this command
9242
924328
9244
9245rHandle
9246
9247SET (1): indicates the presence of the handle area in the input
9248
924929
9250
9251V
9252
9253SET (1): indicates that the command is vendor-specific
9254CLEAR (0): indicates that the command is defined in a version of this
9255specification
9256
925731:30 Res
9258
92598.9.3
92608.9.3.1
9261
9262allocated for software; shall be zero
9263
9264Field Descriptions
9265Bits[15:0] – commandIndex
9266
9267This is the command index of the command in the set of commands. The two sets are defined by the V
9268attribute. If V is zero, then the commandIndex shall be in the set of commands defined in a version of this
9269specification. If V is one, then the meaning of commandIndex is as determined by the TPM vendor.
92708.9.3.2
9271
9272Bit[22] – nv
9273
9274If this attribute is SET, then the TPM may perform an NV write as part of the command actions. This write
9275is independent of any write that may occur as a result of dictionary attack protection. If this attribute is
9276CLEAR, then the TPM shall not perform an NV write as part of the command actions.
92778.9.3.3
9278
9279Bit[23] – extensive
9280
9281Family “2.0”
9282Level 00 Revision 00.99
9283
9284Published
9285Copyright © TCG 2006-2013
9286
9287Page 67
9288October 31, 2013
9289
9290Part 2: Structures
9291
9292Trusted Platform Module Library
9293
9294If this attribute is SET, then the TPM may flush many transient objects as a side effect of this command.
9295In Part 3, a command that has this attribute is indicated by using a “{E}” decoration in the “Description”
9296column of the commandCode parameter.
9297EXAMPLE
9298
9299See “TPM2_Clear” in Part 3.
9300
9301NOTE
9302
9303The “{E}” decoration may be combined with other decorations such as “{NV}” in which case the decoration
9304would be “{NV E}.”
9305
93068.9.3.4
9307
9308Bit[24] – flushed
9309
9310If this attribute is SET, then the TPM will flush transient objects as a side effect of this command. Any
9311transient objects listed in the handle area of the command will be flushed from TPM memory. Handles
9312associated with persistent objects, sessions, PCR, or other fixed TPM resources are not flushed.
9313NOTE
9314
9315The TRM is expected to use this value to determine how many objects are loaded into transient TPM
9316memory.
9317
9318NOTE
9319
9320The “{F}” decoration may be combined with other decorations such as “{NV}” in which case the decoration
9321would be “{NV F}.”
9322
9323If this attribute is SET for a command, and the handle of the command is associated with a hierarchy
9324(TPM_RH_PLATFORM, TPM_RH_OWNER, or TPM_RH_ENDORSEMENT), all loaded objects in the
9325indicated hierarchy are flushed.
9326The TRM is expected to know the behaviour of TPM2_ContextSave(), and sessions are flushed when
9327context saved, but objects are not. The flushed attribute for that command shall be CLEAR.
9328In Part 3, a command that has this attribute is indicated by using a “{F}” decoration in the “Description”
9329column of the commandCode parameter.
9330EXAMPLE
9331
93328.9.3.5
9333
9334See “TPM2_SequenceComplete” in Part 3.”
9335
9336Bits[27:25] – cHandles
9337
9338This field indicates the number of handles in the handle area of the command. This number allows the
9339TRM to enumerate the handles in the handle area and find the position of the authorizations (if any).
93408.9.3.6
9341
9342Bit[28] – rHandle
9343
9344If this attribute is SET, then the response to this command has a handle area. This area will contain no
9345more than one handle. This field is necessary to allow the TRM to locate the parameterSize field in the
9346response, which is then used to locate the authorizations.
9347NOTE
9348
9349The TRM is expected to “virtualize” the handle value for any returned handle.
9350
9351Page 68
9352October 31, 2013
9353
9354Published
9355Copyright © TCG 2006-2013
9356
9357Family “2.0”
9358Level 00 Revision 00.99
9359
9360Trusted Platform Module Library
9361
9362Part 2: Structures
9363
9364A TPM command is only allowed to have one handle in the session area.
93658.9.3.7
9366
9367Bit[29] – V
9368
9369When this attribute is SET, it indicates that the command operation is defined by the TPM vendor. When
9370CLEAR, it indicates that the command is defined by a version of this specification.
93718.9.3.8
9372
9373Bits[31:30] – Res
9374
9375This field is reserved for system software. This field is required to be zero for a command to the TPM.
9376
9377Family “2.0”
9378Level 00 Revision 00.99
9379
9380Published
9381Copyright © TCG 2006-2013
9382
9383Page 69
9384October 31, 2013
9385
9386Part 2: Structures
9387
93889
9389
9390Trusted Platform Module Library
9391
9392Interface Types
9393
93949.1
9395
9396Introduction
9397
9398This clause contains definitions for interface types. An interface type is type checked when it is
9399unmarshaled. These types are based on an underlying type that is indicated in the table title by the value
9400in parentheses. When an interface type is used, the base type is unmarshaled and then checked to see if
9401it has one of the allowed values.
94029.2
9403
9404TPMI_YES_NO
9405
9406This interface type is used in place of a Boolean type in order to eliminate ambiguity in the handling of a
9407octet that conveys a single bit of information. This type only has two allowed values, YES (1) and NO (0).
9408NOTE
9409
9410This list is not used as input to the TPM.
9411
9412Table 37 — Definition of (BYTE) TPMI_YES_NO Type
9413Value
9414
9415Description
9416
9417NO
9418
9419a value of 0
9420
9421YES
9422
9423a value of 1
9424
9425#TPM_RC_VALUE
9426
94279.3
9428
9429TPMI_DH_OBJECT
9430
9431The TPMI_DH_OBJECT interface type is a handle that references a loaded object. The handles in this
9432set are used to refer to either transient or persistent object. The range of these values would change
9433according to the TPM implementation.
9434NOTE
9435
9436These interface types should not be used by system software to qualify the keys produced by the TPM.
9437The value returned by the TPM shall be used to reference the object.
9438
9439Table 38 — Definition of (TPM_HANDLE) TPMI_DH_OBJECT Type
9440Values
9441
9442Comments
9443
9444{TRANSIENT_FIRST:TRANSIENT_LAST}
9445
9446allowed range for transient objects
9447
9448{PERSISTENT_FIRST:PERSISTENT_LAST}
9449
9450allowed range for persistent objects
9451
9452+TPM_RH_NULL
9453
9454the conditional value
9455
9456#TPM_RC_VALUE
9457
9458Page 70
9459October 31, 2013
9460
9461Published
9462Copyright © TCG 2006-2013
9463
9464Family “2.0”
9465Level 00 Revision 00.99
9466
9467Trusted Platform Module Library
94689.4
9469
9470Part 2: Structures
9471
9472TPMI_DH_PERSISTENT
9473
9474The TPMI_DH_PERSISTENT interface type is a handle that references a location for a transient object.
9475This type is used in TPM2_EvictControl() to indicate the handle to be assigned to the persistent object.
9476Table 39 — Definition of (TPM_HANDLE) TPMI_DH_PERSISTENT Type
9477Values
9478
9479Comments
9480
9481{PERSISTENT_FIRST:PERSISTENT_LAST}
9482
9483allowed range for persistent objects
9484
9485#TPM_RC_VALUE
9486
94879.5
9488
9489TPMI_DH_ENTITY
9490
9491The TPMI_DH_ENTITY interface type is TPM-defined values that are used to indicate that the handle
9492refers to an authValue. The range of these values would change according to the TPM implementation.
9493Table 40 — Definition of (TPM_HANDLE) TPMI_DH_ENTITY Type <IN>
9494Values
9495
9496Comments
9497
9498TPM_RH_OWNER
9499TPM_RH_ENDORSEMENT
9500TPM_RH_PLATFORM
9501TPM_RH_LOCKOUT
9502{TRANSIENT_FIRST : TRANSIENT_LAST}
9503
9504range of object handles
9505
9506{PERSISTENT_FIRST : PERSISTENT_LAST}
9507{NV_INDEX_FIRST : NV_INDEX_LAST}
9508{PCR_FIRST : PCR_LAST}
9509+TPM_RH_NULL
9510
9511conditional value
9512
9513#TPM_RC_VALUE
9514
9515Family “2.0”
9516Level 00 Revision 00.99
9517
9518Published
9519Copyright © TCG 2006-2013
9520
9521Page 71
9522October 31, 2013
9523
9524Part 2: Structures
95259.6
9526
9527Trusted Platform Module Library
9528
9529TPMI_DH_PCR
9530
9531This interface type consists of the handles that may be used as PCR references. The upper end of this
9532range of values would change according to the TPM implementation.
9533NOTE 1
9534
9535Typically, the 0 th PCR will have a handle value of zero.
9536
9537NOTE 2
9538
9539The handle range for PCR is defined to be the same as the handle range for PCR in previous versions of
9540TPM specifications.
9541
9542Table 41 — Definition of (TPM_HANDLE) TPMI_DH_PCR Type <IN>
9543Values
9544
9545Comments
9546
9547{PCR_FIRST:PCR_LAST}
9548+TPM_RH_NULL
9549
9550conditional value
9551
9552#TPM_RC_VALUE
9553
95549.7
9555
9556TPMI_SH_AUTH_SESSION
9557
9558The TPMI_SH_AUTH_SESSION interface type is TPM-defined values that are used to indicate that the
9559handle refers to an authorization session.
9560Table 42 — Definition of (TPM_HANDLE) TPMI_SH_AUTH_SESSION Type <IN/OUT>
9561Values
9562
9563Comments
9564
9565{HMAC_SESSION_FIRST : HMAC_SESSION_LAST}
9566
9567range of HMAC authorization session handles
9568
9569{POLICY_SESSION_FIRST: POLICY_SESSION_LAST}
9570
9571range of policy authorization session handles
9572
9573+TPM_RS_PW
9574
9575a password authorization
9576
9577#TPM_RC_VALUE
9578
9579error returned if the handle is out of range
9580
95819.8
9582
9583TPMI_SH_HMAC
9584
9585This interface type is used for an authorization handle when the authorization session uses an HMAC.
9586Table 43 — Definition of (TPM_HANDLE) TPMI_SH_HMAC Type <IN/OUT>
9587Values
9588
9589Comments
9590
9591{HMAC_SESSION_FIRST: HMAC_SESSION_LAST}
9592
9593range of HMAC authorization session handles
9594
9595#TPM_RC_VALUE
9596
9597error returned if the handle is out of range
9598
95999.9
9600
9601TPMI_SH_POLICY
9602
9603This interface type is used for a policy handle when it appears in a policy command.
9604Table 44 — Definition of (TPM_HANDLE) TPMI_SH_POLICY Type <IN/OUT>
9605Values
9606
9607Comments
9608
9609{POLICY_SESSION_FIRST: POLICY_SESSION_LAST}
9610
9611range of policy authorization session handles
9612
9613#TPM_RC_VALUE
9614
9615error returned if the handle is out of range
9616
9617Page 72
9618October 31, 2013
9619
9620Published
9621Copyright © TCG 2006-2013
9622
9623Family “2.0”
9624Level 00 Revision 00.99
9625
9626Trusted Platform Module Library
9627
9628Part 2: Structures
9629
96309.10 TPMI_DH_CONTEXT
9631This type defines the handle values that may be used in TPM2_ContextSave() or TPM2_Flush().
9632Table 45 — Definition of (TPM_HANDLE) TPMI_DH_CONTEXT Type
9633Values
9634
9635Comments
9636
9637{HMAC_SESSION_FIRST : HMAC_SESSION_LAST}
9638{POLICY_SESSION_FIRST:POLICY_SESSION_LAST}
9639{TRANSIENT_FIRST:TRANSIENT_LAST}
9640#TPM_RC_VALUE
9641
96429.11 TPMI_RH_HIERARCHY
9643The TPMI_RH_HIERARCHY interface type is used as the type of a handle in a command when the
9644handle is required to be one of the hierarchy selectors.
9645Table 46 — Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY 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
9662+TPM_RH_NULL
9663
9664no hierarchy
9665
9666#TPM_RC_VALUE
9667
9668response code returned when the unmarshaling of this type fails
9669
96709.12 TPMI_RH_ENABLES
9671The TPMI_RH_ENABLES interface type is used as the type of a handle in a command when the handle
9672is required to be one of the hierarchy or NV enables.
9673Table 47 — Definition of (TPM_HANDLE) TPMI_RH_ENABLES Type
9674Values
9675
9676Comments
9677
9678TPM_RH_OWNER
9679
9680Storage hierarchy
9681
9682TPM_RH_PLATFORM
9683
9684Platform hierarchy
9685
9686TPM_RH_ENDORSEMENT
9687
9688Endorsement hierarchy
9689
9690TPM_RH_PLATFORM_NV
9691
9692Platform NV
9693
9694+TPM_RH_NULL
9695
9696no hierarchy
9697
9698#TPM_RC_VALUE
9699
9700response code returned when the unmarshaling of this type fails
9701
9702Family “2.0”
9703Level 00 Revision 00.99
9704
9705Published
9706Copyright © TCG 2006-2013
9707
9708Page 73
9709October 31, 2013
9710
9711Part 2: Structures
9712
9713Trusted Platform Module Library
9714
97159.13 TPMI_RH_HIERARCHY_AUTH
9716This interface type is used as the type of a handle in a command when the handle is required to be one of
9717the hierarchy selectors or the Lockout Authorization.
9718Table 48 — Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY_AUTH Type <IN>
9719Values
9720
9721Comments
9722
9723TPM_RH_OWNER
9724
9725Storage hierarchy
9726
9727TPM_RH_PLATFORM
9728
9729Platform hierarchy
9730
9731TPM_RH_ENDORSEMENT
9732
9733Endorsement hierarchy
9734
9735TPM_RH_LOCKOUT
9736
9737Lockout Authorization
9738
9739#TPM_RC_VALUE
9740
9741response code returned when the unmarshaling of this type fails
9742
97439.14 TPMI_RH_PLATFORM
9744The TPMI_RH_PLATFORM interface type is used as the type of a handle in a command when the only
9745allowed handle is TPM_RH_PLATFORM indicating that platformAuth is required.
9746Table 49 — Definition of (TPM_HANDLE) TPMI_RH_PLATFORM Type <IN>
9747Values
9748
9749Comments
9750
9751TPM_RH_PLATFORM
9752
9753Platform hierarchy
9754
9755#TPM_RC_VALUE
9756
9757response code returned when the unmarshaling of this type fails
9758
97599.15 TPMI_RH_OWNER
9760This interface type is used as the type of a handle in a command when the only allowed handle is
9761TPM_RH_OWNER indicating that ownerAuth is required.
9762Table 50 — Definition of (TPM_HANDLE) TPMI_RH_OWNER Type <IN>
9763Values
9764
9765Comments
9766
9767TPM_RH_OWNER
9768
9769Owner hierarchy
9770
9771+TPM_RH_NULL
9772
9773may allow the null handle
9774
9775#TPM_RC_VALUE
9776
9777response code returned when the unmarshaling of this type fails
9778
9779Page 74
9780October 31, 2013
9781
9782Published
9783Copyright © TCG 2006-2013
9784
9785Family “2.0”
9786Level 00 Revision 00.99
9787
9788Trusted Platform Module Library
9789
9790Part 2: Structures
9791
97929.16 TPMI_RH_ENDORSEMENT
9793This interface type is used as the type of a handle in a command when the only allowed handle is
9794TPM_RH_ENDORSEMENT indicating that endorsementAuth is required.
9795Table 51 — Definition of (TPM_HANDLE) TPMI_RH_ENDORSEMENT Type <IN>
9796Values
9797
9798Comments
9799
9800TPM_RH_ENDORSEMENT
9801
9802Endorsement hierarchy
9803
9804+TPM_RH_NULL
9805
9806may allow the null handle
9807
9808#TPM_RC_VALUE
9809
9810response code returned when the unmarshaling of this type fails
9811
98129.17 TPMI_RH_PROVISION
9813The TPMI_RH_PROVISION interface type is used as the type of the handle in a command when the only
9814allowed handles are either TPM_RH_OWNER or TPM_RH_PLATFORM indicating that either
9815platformAuth or ownerAuth are allowed.
9816In most cases, either platformAuth or ownerAuth may be used to authorize the commands used for
9817management of the resources of the TPM and this interface type will be used.
9818Table 52 — Definition of (TPM_HANDLE) TPMI_RH_PROVISION Type <IN>
9819Value
9820
9821Comments
9822
9823TPM_RH_OWNER
9824
9825handle for ownerAuth
9826
9827TPM_RH_PLATFORM
9828
9829handle for platformAuth
9830
9831#TPM_RC_VALUE
9832
9833response code returned when the unmarshaling of this type fails
9834
98359.18 TPMI_RH_CLEAR
9836The TPMI_RH_CLEAR interface type is used as the type of the handle in a command when the only
9837allowed handles are either TPM_RH_LOCKOUT or TPM_RH_PLATFORM indicating that either
9838platformAuth or lockoutAuth are allowed.
9839This interface type is normally used for performing or controlling TPM2_Clear().
9840Table 53 — Definition of (TPM_HANDLE) TPMI_RH_CLEAR Type <IN>
9841Value
9842
9843Comments
9844
9845TPM_RH_LOCKOUT
9846
9847handle for lockoutAuth
9848
9849TPM_RH_PLATFORM
9850
9851handle for platformAuth
9852
9853#TPM_RC_VALUE
9854
9855response code returned when the unmarshaling of this type fails
9856
9857Family “2.0”
9858Level 00 Revision 00.99
9859
9860Published
9861Copyright © TCG 2006-2013
9862
9863Page 75
9864October 31, 2013
9865
9866Part 2: Structures
9867
9868Trusted Platform Module Library
9869
98709.19 TPMI_RH_NV_AUTH
9871This interface type is used to identify the source of the authorization for access to an NV location. The
9872handle value of a TPMI_RH_NV_AUTH shall indicate that the authorization value is either platformAuth,
9873ownerAuth, or the authValue. This type is used in the commands that access an NV Index (commands of
9874the form TPM2_NV_xxx) other than TPM2_NV_DefineSpace() and TPM2_NV_UndefineSpace().
9875Table 54 — Definition of (TPM_HANDLE) TPMI_RH_NV_AUTH Type <IN>
9876Value
9877
9878Comments
9879
9880TPM_RH_PLATFORM
9881
9882platformAuth is allowed
9883
9884TPM_RH_OWNER
9885
9886ownerAuth is allowed
9887
9888{NV_INDEX_FIRST:NV_INDEX_LAST}
9889
9890range for NV locations
9891
9892#TPM_RC_VALUE
9893
9894response code returned when unmarshaling of this type fails
9895
98969.20 TPMI_RH_LOCKOUT
9897The TPMI_RH_LOCKOUT interface type is used as the type of a handle in a command when the only
9898allowed handle is TPM_RH_LOCKOUT indicating that lockoutAuth is required.
9899Table 55 — Definition of (TPM_HANDLE) TPMI_RH_LOCKOUT Type <IN>
9900Value
9901
9902Comments
9903
9904TPM_RH_LOCKOUT
9905#TPM_RC_VALUE
9906
9907response code returned when the unmarshaling of this type fails
9908
99099.21 TPMI_RH_NV_INDEX
9910This interface type is used to identify an NV location. This type is used in the NV commands.
9911Table 56 — Definition of (TPM_HANDLE) TPMI_RH_NV_INDEX Type <IN/OUT>
9912Value
9913
9914Comments
9915
9916{NV_INDEX_FIRST:NV_INDEX_LAST}
9917
9918Range of NV Indexes
9919
9920#TPM_RC_VALUE
9921
9922error returned if the handle is out of range
9923
9924Page 76
9925October 31, 2013
9926
9927Published
9928Copyright © TCG 2006-2013
9929
9930Family “2.0”
9931Level 00 Revision 00.99
9932
9933Trusted Platform Module Library
9934
9935Part 2: Structures
9936
99379.22 TPMI_ALG_HASH
9938A TPMI_ALG_HASH is an interface type of all the hash algorithms implemented on a specific TPM. Table
993957 is a list of the hash algorithms that have an algorithm ID assigned by the TCG and does not indicate
9940the algorithms that will be accepted by a TPM.
9941NOTE
9942
9943An implementation would modify this table according to the implemented algorithms, changing the values
9944that are accepted as hash algorithms.
9945
9946Table 57 — Definition of (TPM_ALG_ID) TPMI_ALG_HASH Type
9947Values
9948
9949Comments
9950
9951TPM_ALG_SHA1
9952
9953example
9954
9955TPM_ALG_SHA256
9956
9957example
9958
9959TPM_ALG_SM3_256
9960
9961example
9962
9963TPM_ALG_SHA384
9964
9965example
9966
9967TPM_ALG_SHA512
9968
9969example
9970
9971+TPM_ALG_NULL
9972#TPM_RC_HASH
9973
99749.23 TPMI_ALG_ASYM (Asymmetric Algorithms)
9975A TPMI_ALG_ASYM is an interface type of all the asymmetric algorithms implemented on a specific TPM.
9976Table 58 lists each of the asymmetric algorithms that have an algorithm ID assigned by the TCG.
9977Table 58 — Definition of (TPM_ALG_ID) TPMI_ALG_ASYM Type
9978Values
9979
9980Comments
9981
9982TPM_ALG_RSA
9983TPM_ALG_ECC
9984+TPM_ALG_NULL
9985#TPM_RC_ASYMMETRIC
9986
9987Family “2.0”
9988Level 00 Revision 00.99
9989
9990Published
9991Copyright © TCG 2006-2013
9992
9993Page 77
9994October 31, 2013
9995
9996Part 2: Structures
9997
9998Trusted Platform Module Library
9999
100009.24 TPMI_ALG_SYM (Symmetric Algorithms)
10001A TPMI_ALG_SYM is an interface type of all the symmetric algorithms that have an algorithm ID assigned
10002by the TCG and are implemented on the TPM.
10003The list in the table below is illustrative and will change according to the implementation. The validation
10004code will only accept the subset of algorithms implemented on a TPM.
10005NOTE
10006
10007The validation code produced by an example script will produce a CASE statement with a case for each of
10008the values in the “Values” column. The case for a value is delimited by a #ifdef/#endif pair so that if the
10009algorithm is not implemented on the TPM, then the case for the algorithm is not generated, and use of the
10010algorithm will cause a TPM error (TPM_RC_SYMMETRIC).
10011
10012Table 59 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM Type
10013Values
10014
10015Comments
10016
10017TPM_ALG_AES
10018
10019example
10020
10021TPM_ALG_SM4
10022
10023example
10024
10025TPM_ALG_XOR
10026
10027example
10028
10029+TPM_ALG_NULL
10030
10031required to be present in all versions of this table
10032
10033#TPM_RC_SYMMETRIC
10034
100359.25 TPMI_ALG_SYM_OBJECT
10036A TPMI_ALG_SYM_OBJECT is an interface type of all the TCG-defined symmetric algorithms that may
10037be used as companion symmetric encryption algorithm for an asymmetric object. All algorithms in this list
10038shall be block ciphers usable in Cipher Feedback (CFB).
10039Table 60 is illustrative. It would be modified to indicate the algorithms of the TPM.
10040NOTE
10041
10042TPM_ALG_XOR is not allowed in this list.
10043
10044Table 60 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM_OBJECT Type
10045Values
10046
10047Comments
10048
10049TPM_ALG_AES
10050
10051example
10052
10053TPM_ALG_SM4
10054
10055example
10056
10057+TPM_ALG_NULL
10058
10059required to be present in all versions of this table
10060
10061#TPM_RC_SYMMETRIC
10062
10063Page 78
10064October 31, 2013
10065
10066Published
10067Copyright © TCG 2006-2013
10068
10069Family “2.0”
10070Level 00 Revision 00.99
10071
10072Trusted Platform Module Library
10073
10074Part 2: Structures
10075
100769.26 TPMI_ALG_SYM_MODE
10077A TPMI_ALG_SYM_MODE is an interface type of all the TCG-defined block-cipher modes of operation.
10078This version of the table is not expected to be the table checked by the validation code. Rather, the table
10079would be replaced by one containing the algorithms implemented on the TPM and that the values in that
10080table would be checked by the input validation code.
10081Table 61 — Definition of (TPM_ALG_ID) TPMI_ALG_SYM_MODE Type
10082Values
10083
10084Comments
10085
10086TPM_ALG_CTR
10087
10088IV will be determined by use.
10089If the outside provides the nonce and initial counter, then the caller can
10090know what IV to provide for chaining.
10091
10092TPM_ALG_OFB
10093
10094XOR last cipher text block with last plaintext to create IV for next block
10095
10096TPM_ALG_CBC
10097
10098IV will be determined by use.
10099indefinite chaining using previous output block as IV for next block
10100
10101TPM_ALG_CFB
10102
10103shall be implemented in all TPM compliant with this specification
10104IV will be determined by use.
10105indefinite chaining using previous cipher text as IV
10106
10107TPM_ALG_ECB
10108
10109no IV or chaining value required
10110
10111+TPM_ALG_NULL
10112#TPM_RC_MODE
10113
101149.27 TPMI_ALG_KDF (Key and Mask Generation Functions)
10115A TPMI_ALG_KDF is an interface type of all the key derivation functions implemented on a specific TPM.
10116Table 62 is exemplary and would change based on the algorithms implemented in a TPM.
10117Table 62 — Definition of (TPM_ALG_ID) TPMI_ALG_KDF Type
10118Values
10119
10120Comments
10121
10122TPM_ALG_MGF1
10123TPM_ALG_KDF1_SP800_108
10124TPM_ALG_KDF1_SP800_56a
10125TPM_ALG_KDF2
10126+TPM_ALG_NULL
10127#TPM_RC_KDF
10128
10129Family “2.0”
10130Level 00 Revision 00.99
10131
10132Published
10133Copyright © TCG 2006-2013
10134
10135Page 79
10136October 31, 2013
10137
10138Part 2: Structures
10139
10140Trusted Platform Module Library
10141
101429.28 TPMI_ALG_SIG_SCHEME
10143This is the definition of the interface type for a signature scheme. This table would change according to
10144the algorithms implemented on the TPM.
10145Table 63 — Definition of (TPM_ALG_ID) TPMI_ALG_SIG_SCHEME Type
10146Values
10147
10148Comments
10149
10150TPM_ALG_RSASSA
10151
10152requires that RSA be implemented
10153
10154TPM_ALG_RSAPSS
10155
10156requires that RSA be implemented
10157
10158TPM_ALG_ECDSA
10159
10160requires that ECC be implemented
10161
10162TPM_ALG_ECDAA
10163
10164requires that ECC and ECDAA be implemented
10165
10166TPM_ALG_ECSCHNORR
10167TPM_ALG_SM2
10168
10169requires that ECC be implemented
10170
10171TPM_ALG_HMAC
10172
10173present on all TPM
10174
10175+TPM_ALG_NULL
10176#TPM_RC_SCHEME
10177
10178response code when a signature scheme is not correct
10179
101809.29 TPMI_ECC_KEY_EXCHANGE
10181This is the definition of the interface type for an ECC key exchange scheme. This table would change
10182according to the algorithms implemented on the TPM.
10183Table 64 — Definition of (TPM_ALG_ID) TPMI_ECC_KEY_EXCHANGE Type
10184Values
10185
10186Comments
10187
10188TPM_ALG_ECDH
10189
10190used for single and two phase key exchange
10191
10192TPM_ALG_ECMQV
10193TPM_ALG_SM2
10194
10195requires that ECC be implemented
10196
10197+TPM_ALG_NULL
10198#TPM_RC_SCHEME
10199
10200response code when a key exchange scheme is not correct
10201
102029.30 TPMI_ST_COMMAND_TAG
10203This interface type is used for the command tags.
10204The response code for a bad command tag has the same value as the TPM 1.2 response code
10205(TPM_BAD_TAG). This value is used in case the software is not compatible with this specification and an
10206unexpected response code might have unexpected side effects.
10207Table 65 — Definition of (TPM_ST) TPMI_ST_COMMAND_TAG Type
10208Values
10209
10210Comments
10211
10212TPM_ST_NO_SESSIONS
10213TPM_ST_SESSIONS
10214#TPM_RC_BAD_TAG
10215
10216Page 80
10217October 31, 2013
10218
10219Published
10220Copyright © TCG 2006-2013
10221
10222Family “2.0”
10223Level 00 Revision 00.99
10224
10225Trusted Platform Module Library
10226
10227Part 2: Structures
10228
1022910 Structure Definitions
1023010.1 TPMS_ALGORITHM_DESCRIPTION
10231This structure is a return value for a TPM2_GetCapability() that reads the installed algorithms.
10232Table 66 — Definition of TPMS_ALGORITHM_DESCRIPTION Structure <OUT>
10233Parameter
10234
10235Type
10236
10237Description
10238
10239alg
10240
10241TPM_ALG_ID
10242
10243an algorithm
10244
10245attributes
10246
10247TPMA_ALGORITHM
10248
10249the attributes of the algorithm
10250
1025110.2 Hash/Digest Structures
1025210.2.1 TPMU_HA (Hash)
10253A TPMU_HA is a union of all the hash algorithms implemented on a TPM. Table 67 is exemplary and
10254would change based on the algorithms implemented in a TPM.
10255NOTE
10256
10257If processed by an automated tool, each entry of the table should be qualified (with #ifdef/#endif) so that if
10258the hash algorithm is not implemented on the TPM, the parameter associated with that hash is not
10259present. This will keep the union from being larger than the largest digest of a hash implemented on that
10260TPM.
10261
10262Table 67 — Definition of TPMU_HA Union <IN/OUT, S>
10263Parameter
10264
10265Type
10266
10267Selector
10268
10269sha1 [SHA1_DIGEST_SIZE]
10270
10271BYTE
10272
10273TPM_ALG_SHA1
10274
10275sha256 [SHA256_DIGEST_SIZE]
10276
10277BYTE
10278
10279TPM_ALG_SHA256
10280
10281sm3_256 [SM3_256_DIGEST_SIZE]
10282
10283BYTE
10284
10285TPM_ALG_SM3_256
10286
10287sha384 [SHA384_DIGEST_SIZE]
10288
10289BYTE
10290
10291TPM_ALG_SHA384
10292
10293sha512 [SHA512_DIGEST_SIZE]
10294
10295BYTE
10296
10297TPM_ALG_SHA512
10298
10299null
10300
10301Family “2.0”
10302Level 00 Revision 00.99
10303
10304Description
10305
10306TPM_ALG_NULL
10307
10308Published
10309Copyright © TCG 2006-2013
10310
10311Page 81
10312October 31, 2013
10313
10314Part 2: Structures
10315
10316Trusted Platform Module Library
10317
1031810.2.2 TPMT_HA
10319Table 68 shows the basic hash-agile structure used in this specification. To handle hash agility, this
10320structure uses the hashAlg parameter to indicate the algorithm used to compute the digest and, by
10321implication, the size of the digest.
10322When transmitted, only the number of octets indicated by hashAlg is sent.
10323NOTE
10324
10325In the exemplary code, when a TPMT_HA is allocated, the digest field is large enough to support the
10326largest hash algorithm in the TPMU_HA union.
10327
10328Table 68 — Definition of TPMT_HA Structure <IN/OUT>
10329Parameter
10330
10331Type
10332
10333Description
10334
10335hashAlg
10336
10337+TPMI_ALG_HASH
10338
10339selector of the hash contained in the digest that implies the
10340size of the digest
10341NOTE
10342
10343[hashAlg] digest
10344
10345TPMU_HA
10346
10347The leading “+” on the type indicates that this structure
10348should pass an indication to the unmarshaling function for
10349TPMI_ALG_HASH so that TPM_ALG_NULL will be
10350allowed if a use of a TPMT_HA allows TPM_ALG_NULL.
10351
10352the digest data
10353
1035410.3 Sized Buffers
1035510.3.1 Introduction
10356The “TPM2B_” prefix is used for a structure that has a size field followed by a data buffer with the
10357indicated number of octets. The size field is 16 bits.
10358When the type of the second parameter in a TPM2B_ structure is BYTE, the TPM shall unmarshal the
10359indicated number of octets, which may be zero.
10360When the type of the second parameter in the TPM2B_ structure is not BYTE, the value of the size field
10361shall either be zero indicating that no structure is to be unmarshaled; or it shall be identical to the number
10362of octets unmarshaled for the second parameter.
10363NOTE 1
10364
10365If the TPM2B_ defines a structure and not an array of octets, then the structure is self-describing and the
10366TPM will be able to determine how many octets are in the structure when it is unmarshaled. If that number
10367of octets is not equal to the size parameter, then it is an error.
10368
10369NOTE 2
10370
10371The reason that a structure may be put into a TPM2B_ is that the parts of the structure may be handled
10372as separate opaque blocks by the application/system software. Rather than require that all of the
10373structures in a command or response be marshaled or unmarshaled sequentially, the size field allows the
10374structure to be manipulated as an opaque block. Placing a structure in a TPM2B_ also makes it possible
10375to use parameter encryption on the structure.
10376
10377If a TPM2B_ is encrypted, the TPM will encrypt/decrypt the data field of the TPM2B_ but not the size
10378parameter. The TPM will encrypt/decrypt the number of octets indicated by the size field.
10379NOTE 3
10380
10381In the reference implementation, a TPM2B type is defined that is a 16-bit size field followed by a single
10382byte of data. The TPM2B_ is then defined as a union that contains a TPM2B (union member ‘b’) and the
10383structure in the definition table (union member ‘t’). This union is used for internally generated structures
10384so that there is a way to define a structure of the correct size (forced by the ‘t’ member) while giving a way
10385to pass the structure generically as a ‘b’. Most function calls use the 't' member so that the compiler will
10386generate a warning if there is a type error (a TPM2B_ of the wrong type). Having the type checked helps
10387avoid many issues with buffer overflow caused by a too small buffer being passed to a function.
10388
10389Page 82
10390October 31, 2013
10391
10392Published
10393Copyright © TCG 2006-2013
10394
10395Family “2.0”
10396Level 00 Revision 00.99
10397
10398Trusted Platform Module Library
10399
10400Part 2: Structures
10401
1040210.3.2 TPM2B_DIGEST
10403This structure is used for a sized buffer that cannot be larger than the largest digest produced by any
10404hash algorithm implemented on the TPM.
10405As with all sized buffers, the size is checked to see if it is within the prescribed range. If not, the response
10406code is TPM_RC_SIZE.
10407NOTE
10408
10409For any structure, like the one below, that contains an implied size check, it is implied that TPM_RC_SIZE
10410is a possible response code and the response code will not be listed in the table.
10411
10412Table 69 — Definition of TPM2B_DIGEST Structure
10413Parameter
10414
10415Type
10416
10417Description
10418
10419size
10420
10421UINT16
10422
10423size in octets of the buffer field; may be 0
10424
10425buffer[size]{:sizeof(TPMU_HA)}
10426
10427BYTE
10428
10429the buffer area that can be no larger than a digest
10430
1043110.3.3 TPM2B_DATA
10432This structure is used for a data buffer that is required to be no larger than the size of the Name of an
10433object. This size limit includes the algorithm ID of the hash and the hash data.
10434Table 70 — Definition of TPM2B_DATA Structure
10435Parameter
10436
10437Type
10438
10439Description
10440
10441size
10442
10443UINT16
10444
10445size in octets of the buffer field; may be 0
10446
10447buffer[size]{:sizeof(TPMT_HA)}
10448
10449BYTE
10450
10451the buffer area that contains the algorithm ID and the
10452digest
10453
1045410.3.4 TPM2B_NONCE
10455Table 71 — Definition of Types for TPM2B_NONCE
10456Type
10457
10458Name
10459
10460Description
10461
10462TPM2B_DIGEST
10463
10464TPM2B_NONCE
10465
10466size limited to the same as the digest structure
10467
1046810.3.5 TPM2B_AUTH
10469This structure is used for an authorization value and limits an authValue to being no larger than the
10470largest digest produced by a TPM. In order to ensure consistency within an object, the authValue may be
10471no larger than the size of the digest produced by the object’s nameAlg. This ensures that any TPM that
10472can load the object will be able to handle the authValue of the object.
10473Table 72 — Definition of Types for TPM2B_AUTH
10474Type
10475
10476Name
10477
10478Description
10479
10480TPM2B_DIGEST
10481
10482TPM2B_AUTH
10483
10484size limited to the same as the digest structure
10485
10486Family “2.0”
10487Level 00 Revision 00.99
10488
10489Published
10490Copyright © TCG 2006-2013
10491
10492Page 83
10493October 31, 2013
10494
10495Part 2: Structures
10496
10497Trusted Platform Module Library
10498
1049910.3.6 TPM2B_OPERAND
10500This type is a sized buffer that can hold an operand for a comparison with an NV Index location. The
10501maximum size of the operand is implementation dependent but a TPM is required to support an operand
10502size that is at least as big as the digest produced by any of the hash algorithms implemented on the TPM.
10503Table 73 — Definition of Types for TPM2B_OPERAND
10504Type
10505
10506Name
10507
10508Description
10509
10510TPM2B_DIGEST
10511
10512TPM2B_OPERAND
10513
10514size limited to the same as the digest structure
10515
1051610.3.7 TPM2B_EVENT
10517This type is a sized buffer that can hold event data.
10518Table 74 — Definition of TPM2B_EVENT Structure
10519Parameter
10520
10521Type
10522
10523Description
10524
10525size
10526
10527UINT16
10528
10529size of the operand buffer
10530
10531buffer [size] {:1024}
10532
10533BYTE
10534
10535the operand
10536
1053710.3.8 TPM2B_MAX_BUFFER
10538This type is a sized buffer that can hold a maximally sized buffer for commands that use a large data
10539buffer
10540such
10541as
10542TPM2_PCR_Event(),
10543TPM2_Hash(),
10544TPM2_SequenceUpdate(),
10545or
10546TPM2_FieldUpgradeData().
10547NOTE
10548
10549The above list is not comprehensive and other commands may use this buffer type.
10550
10551Table 75 — Definition of TPM2B_MAX_BUFFER Structure
10552Parameter
10553
10554Type
10555
10556Description
10557
10558size
10559
10560UINT16
10561
10562size of the buffer
10563
10564buffer [size] {:MAX_DIGEST_BUFFER}
10565
10566BYTE
10567
10568the operand
10569NOTE
10570MAX_DIGEST_BUFFER
10571is
10572TPMdependent but is required to be at least 1,024.
10573
1057410.3.9 TPM2B_MAX_NV_BUFFER
10575This type is a sized buffer that can hold a maximally sized buffer for NV data commands such as
10576TPM2_NV_Read(), TPM2_NV_Write(), and TPM2_NV_Certify().
10577Table 76 — Definition of TPM2B_MAX_NV_BUFFER Structure
10578Parameter
10579
10580Type
10581
10582Description
10583
10584size
10585
10586UINT16
10587
10588size of the buffer
10589
10590buffer [size] {:MAX_NV_BUFFER_SIZE}
10591
10592BYTE
10593
10594the operand
10595NOTE
10596MAX_NV_BUFFER_SIZE
10597dependent
10598
10599Page 84
10600October 31, 2013
10601
10602Published
10603Copyright © TCG 2006-2013
10604
10605is
10606
10607TPM-
10608
10609Family “2.0”
10610Level 00 Revision 00.99
10611
10612Trusted Platform Module Library
10613
10614Part 2: Structures
10615
1061610.3.10 TPM2B_TIMEOUT
10617This TPM-dependent structure is used to provide the timeout value for an authorization.
10618Table 77 — Definition of TPM2B_TIMEOUT Structure <IN/OUT>
10619Parameter
10620
10621Type
10622
10623Description
10624
10625size
10626
10627UINT16
10628
10629size of the timeout value
10630This value is fixed for a TPM implementation.
10631
10632buffer [size] {:sizeof(UINT64)}
10633
10634BYTE
10635
10636the timeout value
10637
1063810.3.11 TPM2B_IV
10639This structure is used for passing an initial value for a symmetric block cipher to or from the TPM. The
10640size is set to be the largest block size of any implemented symmetric cipher implemented on the TPM.
10641Table 78 — Definition of TPM2B_IV Structure <IN/OUT>
10642Parameter
10643
10644Type
10645
10646Description
10647
10648size
10649
10650UINT16
10651
10652size of the timeout value
10653This value is fixed for a TPM implementation.
10654
10655buffer [size] {:MAX_SYM_BLOCK_SIZE}
10656
10657BYTE
10658
10659the timeout value
10660
1066110.4 Names
1066210.4.1 Introduction
10663The Name of an entity is used in place of the handle in authorization computations. The substitution
10664occurs in cpHash and policyHash computations.
10665For an entity that is defined by a public area (objects and NV Indexes), the Name is the hash of the public
10666structure that defines the entity. The hash is done using the nameAlg of the entity.
10667NOTE
10668
10669For an object, a TPMT_PUBLIC defines the entity. For an NV Index, a TPMS_NV_PUBLIC defines the
10670entity.
10671
10672For entities not defined by a public area, the Name is the handle that is used to refer to the entity.
1067310.4.2 TPMU_NAME
10674Table 79 — Definition of TPMU_NAME Union <>
10675Parameter
10676
10677Type
10678
10679digest
10680
10681TPMT_HA
10682
10683when the Name is a digest
10684
10685handle
10686
10687TPM_HANDLE
10688
10689when the Name is a handle
10690
10691Family “2.0”
10692Level 00 Revision 00.99
10693
10694Selector
10695
10696Description
10697
10698Published
10699Copyright © TCG 2006-2013
10700
10701Page 85
10702October 31, 2013
10703
10704Part 2: Structures
10705
10706Trusted Platform Module Library
10707
1070810.4.3 TPM2B_NAME
10709This buffer holds a Name for any entity type.
10710The type of Name in the structure is determined by context and the size parameter. If size is four, then
10711the Name is a handle. If size is zero, then no Name is present. Otherwise, the size shall be the size of a
10712TPM_ALG_ID plus the size of the digest produced by the indicated hash algorithm.
10713Table 80 — Definition of TPM2B_NAME Structure
10714Parameter
10715
10716Type
10717
10718Description
10719
10720size
10721
10722UINT16
10723
10724size of the Name structure
10725
10726name[size]{:sizeof(TPMU_NAME)}
10727
10728BYTE
10729
10730the Name structure
10731
1073210.5 PCR Structures
1073310.5.1 TPMS_PCR_SELECT
10734This structure provides a standard method of specifying a list of PCR.
10735PCR numbering starts at zero.
10736PcrSelect is an array of octets. The octet containing the bit corresponding to a specific PCR is found by
10737dividing the PCR number by 8.
10738EXAMPLE 1
10739
10740The bit in pcrSelect corresponding to PCR 19 is in pcrSelect [2] (19/8 = 2).
10741
10742The least significant bit in a octet is bit number 0. The bit in the octet associated with a PCR is the
10743remainder after division by 8.
10744EXAMPLE 2
10745
10746The bit in pcrSelect [2] corresponding to PCR 19 is bit 3 (19 mod 8). If sizeofSelect is 3, then the
10747pcrSelect array that would specify PCR 19 and no other PCR is 00 00 08 16.
10748
10749Each bit in pcrSelect indicates whether the corresponding PCR is selected (1) or not (0). If the pcrSelect
10750is all zero bits, then no PCR is selected.
10751SizeofSelect indicates the number of octets in pcrSelect. The allowable values for sizeofSelect is
10752determined by the number of PCR required by the applicable platform-specific specification and the
10753number of PCR implemented in the TPM. The minimum value for sizeofSelect is:
10754PCR_SELECT_MIN ≔ (PLATFORM_PCR + 7) / 8
10755
10756(1)
10757
10758where
10759PLATFORM_PCR
10760
10761the number of PCR required by the platform-specific specification
10762
10763The maximum value for sizeofSelect is:
10764PCR_SELECT_MAX ≔ (IMPLEMENTATION_PCR + 7) / 8
10765
10766(2)
10767
10768where
10769IMPLEMENTATION_PCR
10770
10771Page 86
10772October 31, 2013
10773
10774the number of PCR implemented on the TPM
10775
10776Published
10777Copyright © TCG 2006-2013
10778
10779Family “2.0”
10780Level 00 Revision 00.99
10781
10782Trusted Platform Module Library
10783
10784Part 2: Structures
10785
10786If the TPM implements more PCR than there are bits in pcrSelect, the additional PCR are not selected.
10787EXAMPLE 3
10788
10789If the applicable platform-specific specification requires that the TPM have a minimum of 24 PCR but the
10790TPM implements 32, then a PCR select of 3 octets would imply that PCR 24-31 are not selected.
10791
10792Table 81 — Definition of TPMS_PCR_SELECT Structure
10793Parameter
10794
10795Type
10796
10797Description
10798
10799sizeofSelect {PCR_SELECT_MIN:}
10800
10801UINT8
10802
10803the size in octets of the pcrSelect array
10804
10805pcrSelect [sizeofSelect] {:PCR_SELECT_MAX}
10806
10807BYTE
10808
10809the bit map of selected PCR
10810
10811#TPM_RC_VALUE
10812
1081310.5.2 TPMS_PCR_SELECTION
10814Table 82 — Definition of TPMS_PCR_SELECTION Structure
10815Parameter
10816
10817Type
10818
10819Description
10820
10821hash
10822
10823TPMI_ALG_HASH
10824
10825the hash algorithm associated with the
10826selection
10827
10828sizeofSelect {PCR_SELECT_MIN:}
10829
10830UINT8
10831
10832the size in octets of the pcrSelect array
10833
10834pcrSelect [sizeofSelect] {:PCR_SELECT_MAX}
10835
10836BYTE
10837
10838the bit map of selected PCR
10839
10840#TPM_RC_VALUE
10841
1084210.6 Tickets
1084310.6.1 Introduction
10844Tickets are evidence that the TPM has previously processed some information. A ticket is an HMAC over
10845the data using a secret key known only to the TPM. A ticket is a way to expand the state memory of the
10846TPM. A ticket is only usable by the TPM that produced it.
10847The formulations for tickets shown in this clause are to be used by a TPM that is compliant with this
10848specification.
10849The method of creating the ticket data is:
10850
10851HMACcontexAlg(proof, (ticketType || param { || param {…}))
10852
10853(3)
10854
10855where
10856
10857HMACcontexAlg()
10858
10859an HMAC using the hash used for context integrity
10860
10861proof
10862
10863a TPM secret value (depends on hierarchy)
10864
10865ticketType
10866
10867a value to differentiate the tickets
10868
10869param
10870
10871one or more values that were checked by the TPM
10872
10873Family “2.0”
10874Level 00 Revision 00.99
10875
10876Published
10877Copyright © TCG 2006-2013
10878
10879Page 87
10880October 31, 2013
10881
10882Part 2: Structures
10883
10884Trusted Platform Module Library
10885
10886The proof value used for each hierarchy is shown in Table 83.
10887Table 83 — Values for proof Used in Tickets
10888Hierarchy
10889
10890proof
10891
10892Description
10893
10894None
10895
10896Empty Buffer
10897
10898Platform
10899
10900phProof
10901
10902a value that changes with each change of the PPS
10903
10904Owner
10905
10906shProof
10907
10908a value that changes with each change of the SPS
10909
10910Endorsement
10911
10912ehProof
10913
10914a value that changes with each change of either the EPS or SPS
10915
10916The format for a ticket is shown in Table 84. This is a template for the tickets shown in the remainder of
10917this clause.
10918Table 84 — General Format of a Ticket
10919Parameter
10920
10921Type
10922
10923Description
10924
10925tag
10926
10927TPM_ST
10928
10929structure tag indicating the type of the ticket
10930
10931hierarchy
10932
10933TPMI_RH_HIERARCHY+
10934
10935the hierarchy of the proof value
10936
10937digest
10938
10939TPM2B_DIGEST
10940
10941the HMAC over the ticket-specific data
10942
1094310.6.2 A NULL Ticket
10944When a command requires a ticket and no ticket is available, the caller is required to provide a structure
10945with a ticket tag that is correct for the context. The hierarchy shall be set to TPM_RH_NULL, and digest
10946shall be the Empty Buffer (a buffer with a size field of zero). This construct is the NULL Ticket. When a
10947response indicates that a ticket is returned, the TPM may return a NULL Ticket.
10948NOTE
10949
10950Because each use of a ticket requires that the structure tag for the ticket be appropriate for the use, t here
10951is no single representation of a NULL Ticket that will work in all circumstances. Minimally, a NULL ticket
10952will have a structure type that is appropriate for the context.
10953
10954Page 88
10955October 31, 2013
10956
10957Published
10958Copyright © TCG 2006-2013
10959
10960Family “2.0”
10961Level 00 Revision 00.99
10962
10963Trusted Platform Module Library
10964
10965Part 2: Structures
10966
1096710.6.3 TPMT_TK_CREATION
10968This ticket is produced by TPM2_Create() or TPM2_CreatePrimary(). It is used to bind the creation data
10969to the object to which it applies. The ticket is computed by
10970
10971HMACcontextAlg(proof, (TPM_ST_CREATION || name || HnameAlg(TPMS_CREATION_DATA)))
10972
10973(4)
10974
10975where
10976
10977HMACcontextAlg()
10978
10979an HMAC using the context integrity hash algorithm
10980
10981proof
10982
10983a TPM secret value associated with the hierarchy associated with name
10984
10985TPM_ST_CREATION
10986
10987a value used to ensure that the ticket is properly used
10988
10989name
10990
10991the Name of the object to which the creation data is to be associated
10992
10993HnameAlg()
10994
10995hash using the nameAlg of the created object
10996
10997TPMS_CREATION_DATA the creation data structure associated with name
10998Table 85 — Definition of TPMT_TK_CREATION Structure
10999Parameter
11000
11001Type
11002
11003Description
11004
11005tag {TPM_ST_CREATION}
11006
11007TPM_ST
11008
11009ticket structure tag
11010error returned when tag is not TPM_ST_CREATION
11011
11012#TPM_RC_TAG
11013hierarchy
11014
11015TPMI_RH_HIERARCHY+
11016
11017the hierarchy containing name
11018
11019digest
11020
11021TPM2B_DIGEST
11022
11023This shall be the HMAC produced using a proof value
11024of hierarchy.
11025
11026EXAMPLE
11027
11028A NULL Creation Ticket is the tuple <TPM_ST_CREATION, TPM_RH_NULL, 0x0000>.
11029
11030Family “2.0”
11031Level 00 Revision 00.99
11032
11033Published
11034Copyright © TCG 2006-2013
11035
11036Page 89
11037October 31, 2013
11038
11039Part 2: Structures
11040
11041Trusted Platform Module Library
11042
1104310.6.4 TPMT_TK_VERIFIED
11044This ticket is produced by TPM2_VerifySignature(). This formulation is used for multiple ticket uses. The
11045ticket provides evidence that the TPM has validated that a digest was signed by a key with the Name of
11046keyName. The ticket is computed by
11047
11048HMACcontextAlg(proof, (TPM_ST_VERIFIED || digest || keyName))
11049
11050(5)
11051
11052where
11053
11054HMACcontextAlg()
11055
11056an HMAC using the context integrity hash
11057
11058proof
11059
11060a TPM secret value associated with the hierarchy associated with
11061
11062TPM_ST_VERIFIED
11063
11064a value used to ensure that the ticket is properly used
11065
11066digest
11067
11068the signed digest
11069
11070keyName
11071
11072Name of the key that signed digest
11073
11074keyName
11075
11076Table 86 — Definition of TPMT_TK_VERIFIED Structure
11077Parameter
11078
11079Type
11080
11081Description
11082
11083tag {TPM_ST_VERIFIED}
11084
11085TPM_ST
11086
11087ticket structure tag
11088error returned when tag is not TPM_ST_VERIFIED
11089
11090#TPM_RC_TAG
11091hierarchy
11092
11093TPMI_RH_HIERARCHY+
11094
11095the hierarchy containing keyName
11096
11097digest
11098
11099TPM2B_DIGEST
11100
11101This shall be the HMAC produced using a proof value
11102of hierarchy.
11103
11104EXAMPLE
11105
11106A NULL Verified Ticket is the tuple <TPM_ST_VERIFIED, TPM_RH_NULL, 0x0000>.
11107
11108Page 90
11109October 31, 2013
11110
11111Published
11112Copyright © TCG 2006-2013
11113
11114Family “2.0”
11115Level 00 Revision 00.99
11116
11117Trusted Platform Module Library
11118
11119Part 2: Structures
11120
1112110.6.5 TPMT_TK_AUTH
11122This ticket is produced by TPM2_PolicySigned() and TPM2_PolicySecret() when the authorization has an
11123expiration time. The ticket is computed by
11124
11125HMACcontextAlg(proof, (TPM_ST_AUTH_xxx || timeout || cpHash || policyRef || keyName))
11126
11127(6)
11128
11129where
11130
11131HMACcontextAlg()
11132
11133an HMAC using the context integrity hash
11134
11135proof
11136
11137a TPM secret value associated with the hierarchy of the key associated
11138with keyName
11139
11140TPM_ST_AUTH_xxx
11141
11142either TPM_ST_AUTH_SIGNED or TPM_ST_AUTH_SECRET; used to
11143ensure that the ticket is properly used
11144
11145timeout
11146
11147implementation-specific value indicating when the authorization expires
11148
11149cpHash
11150
11151optional hash of the authorized command
11152
11153policyRef
11154
11155optional reference to a policy value
11156
11157keyName
11158
11159Name of the key that signed the authorization
11160Table 87 — Definition of TPMT_TK_AUTH Structure
11161
11162Parameter
11163
11164Type
11165
11166Description
11167
11168tag {TPM_ST_AUTH_SIGNED, TPM_ST_AUTH_SECRET} TPM_ST
11169
11170ticket structure tag
11171
11172#TPM_RC_TAG
11173
11174error returned when tag is
11175not TPM_ST_AUTH
11176
11177hierarchy
11178
11179TPMI_RH_HIERARCHY+
11180
11181the hierarchy of the object
11182used to produce the ticket
11183
11184digest
11185
11186TPM2B_DIGEST
11187
11188This shall be the HMAC
11189produced using a proof
11190value of hierarchy.
11191
11192EXAMPLE
11193
11194A NULL Auth Ticket is the tuple <TPM_ST_AUTH_SIGNED, TPM_RH_NULL, 0x0000> or the tuple
11195<TPM_ST_AUTH_SIGNED, TPM_RH_NULL, 0x0000>
11196
11197Family “2.0”
11198Level 00 Revision 00.99
11199
11200Published
11201Copyright © TCG 2006-2013
11202
11203Page 91
11204October 31, 2013
11205
11206Part 2: Structures
11207
11208Trusted Platform Module Library
11209
1121010.6.6 TPMT_TK_HASHCHECK
11211This ticket is produced by TPM2_SequenceComplete() when the message that was digested did not start
11212with TPM_GENERATED_VALUE. The ticket is computed by
11213
11214HMACcontexAlg(proof, (TPM_ST_HASHCHECK || digest))
11215
11216(7)
11217
11218where
11219
11220HMACcontexAlg ()
11221
11222an HMAC using the context integrity hash
11223
11224proof
11225
11226a TPM secret value associated with the hierarchy indicated by the
11227command
11228
11229TPM_ST_HASHCHECK
11230
11231a value used to ensure that the ticket is properly used
11232
11233digest
11234
11235the digest of the data
11236Table 88 — Definition of TPMT_TK_HASHCHECK Structure
11237
11238Parameter
11239
11240Type
11241
11242Description
11243
11244tag {TPM_ST_HASHCHECK}
11245
11246TPM_ST
11247
11248ticket structure tag
11249
11250#TPM_RC_TAG
11251
11252error returned when is not TPM_ST_HASHCHECK
11253
11254hierarchy
11255
11256TPMI_RH_HIERARCHY+
11257
11258the hierarchy
11259
11260digest
11261
11262TPM2B_DIGEST
11263
11264This shall be the HMAC produced using a proof value
11265of hierarchy.
11266
1126710.7 Property Structures
1126810.7.1 TPMS_ALG_PROPERTY
11269This structure is used to report the properties of an algorithm identifier. It is returned in response to a
11270TPM2_GetCapability() with capability = TPM_CAP_ALG.
11271Table 89 — Definition of TPMS_ALG_PROPERTY Structure <OUT>
11272Parameter
11273
11274Type
11275
11276Description
11277
11278alg
11279
11280TPM_ALG_ID
11281
11282an algorithm identifier
11283
11284algProperties
11285
11286TPMA_ALGORITHM
11287
11288the attributes of the algorithm
11289
1129010.7.2 TPMS_TAGGED_PROPERTY
11291This structure is used to report the properties that are UINT32 values. It is returned in response to a
11292TPM2_GetCapability().
11293Table 90 — Definition of TPMS_TAGGED_PROPERTY Structure <OUT>
11294Parameter
11295
11296Type
11297
11298Description
11299
11300property
11301
11302TPM_PT
11303
11304a property identifier
11305
11306value
11307
11308UINT32
11309
11310the value of the property
11311
11312Page 92
11313October 31, 2013
11314
11315Published
11316Copyright © TCG 2006-2013
11317
11318Family “2.0”
11319Level 00 Revision 00.99
11320
11321Trusted Platform Module Library
11322
11323Part 2: Structures
11324
1132510.7.3 TPMS_TAGGED_PCR_SELECT
11326This structure is used in TPM2_GetCapability() to return the attributes of the PCR.
11327Table 91 — Definition of TPMS_TAGGED_PCR_SELECT Structure <OUT>
11328Parameter
11329
11330Type
11331
11332Description
11333
11334tag
11335
11336TPM_PT
11337
11338the property identifier
11339
11340sizeofSelect {PCR_SELECT_MIN:}
11341
11342UINT8
11343
11344the size in octets of the pcrSelect array
11345
11346pcrSelect [sizeofSelect] {:PCR_SELECT_MAX}
11347
11348BYTE
11349
11350the bit map of PCR with the identified property
11351
1135210.8 Lists
1135310.8.1 TPML_CC
11354A list of command codes may be input to the TPM or returned by the TPM depending on the command.
11355Table 92 — Definition of TPML_CC Structure
11356Parameter
11357
11358Type
11359
11360Description
11361
11362count
11363
11364UINT32
11365
11366number of commands in the commandCode list;
11367may be 0
11368
11369commandCodes[count]{:MAX_CAP_CC}
11370
11371TPM_CC
11372
11373a list of command codes
11374The maximum only applies to a command code
11375list in a command. The response size is limited
11376only by the size of the parameter buffer.
11377
11378#TPM_RC_SIZE
11379
11380Family “2.0”
11381Level 00 Revision 00.99
11382
11383response code when count is greater than the
11384maximum allowed list size
11385
11386Published
11387Copyright © TCG 2006-2013
11388
11389Page 93
11390October 31, 2013
11391
11392Part 2: Structures
11393
11394Trusted Platform Module Library
11395
1139610.8.2 TPML_CCA
11397This list is only used in TPM2_GetCapability(capability = TPM_CAP_COMMANDS).
11398The values in the list are returned in commandIndex order with vendor-specific commands returned after
11399other commands. Because of the other attributes, the commands may not be returned in strict numerical
11400order. They will be in commandIndex order.
11401Table 93 — Definition of TPML_CCA Structure <OUT>
11402Parameter
11403
11404Type
11405
11406Description
11407
11408count
11409
11410UINT32
11411
11412number of values in the commandAttributes list;
11413may be 0
11414
11415commandAttributes[count]{:MAX_CAP_CC}
11416
11417TPMA_CC
11418
11419a list of command codes attributes
11420
1142110.8.3 TPML_ALG
11422This list is returned by TPM2_IncrementalSelfTest().
11423Table 94 — Definition of TPML_ALG Structure
11424Parameter
11425
11426Type
11427
11428Description
11429
11430count
11431
11432UINT32
11433
11434number of algorithms in the algorithms list; may be 0
11435
11436algorithms[count]{:MAX_ALG_LIST_SIZE}
11437
11438TPM_ALG_ID
11439
11440 a list of algorithm IDs
11441The maximum only applies to an algorithm list in a
11442command. The response size is limited only by the
11443size of the parameter buffer.
11444response code when count is greater than the
11445maximum allowed list size
11446
11447#TPM_RC_SIZE
11448
1144910.8.4 TPML_HANDLE
11450This structure is used when the TPM returns a list of loaded handles when the capability in
11451TPM2_GetCapability() is TPM_CAP_HANDLE.
11452NOTE
11453
11454This list is not used as input to the TPM.
11455
11456Table 95 — Definition of TPML_HANDLE Structure <OUT>
11457Name
11458
11459Type
11460
11461Description
11462
11463count
11464
11465UINT32
11466
11467the number of handles in the list
11468may have a value of 0
11469
11470handle[count]{: MAX_CAP_HANDLES}
11471
11472TPM_HANDLE
11473
11474an array of handles
11475
11476#TPM_RC_SIZE
11477
11478Page 94
11479October 31, 2013
11480
11481response code when count is greater than the
11482maximum allowed list size
11483
11484Published
11485Copyright © TCG 2006-2013
11486
11487Family “2.0”
11488Level 00 Revision 00.99
11489
11490Trusted Platform Module Library
11491
11492Part 2: Structures
11493
1149410.8.5 TPML_DIGEST
11495This list is used to convey a list of digest values. This type is used in TPM2_PolicyOR() and in
11496TPM2_PCR_Read().
11497Table 96 — Definition of TPML_DIGEST Structure
11498Parameter
11499
11500Type
11501
11502Description
11503
11504count {2:}
11505
11506UINT32
11507
11508number of digests in the list, minimum is two for
11509TPM2_PolicyOR().
11510
11511digests[count]{:8}
11512
11513TPM2B_DIGEST
11514
11515 a list of digests
11516For TPM2_PolicyOR(), all digests will have been
11517computed using the digest of the policy session. For
11518TPM2_PCR_Read(), each digest will be the size of the
11519digest for the bank containing the PCR.
11520
11521#TPM_RC_SIZE
11522
11523response code when count is not at least two or is
11524greater than eight
11525
1152610.8.6 TPML_DIGEST_VALUES
11527This list is used to convey a list of digest values. This type is returned by TPM2_Event() and
11528TPM2_SequenceComplete() and is an input for TPM2_PCR_Extend().
11529NOTE 1
11530
11531This construct limits the number of hashes in the list to the number of digests implemented in the TPM
11532rather than the number of PCR banks. This allows extra values to appear in a call t o
11533TPM2_PCR_Extend().
11534
11535NOTE 2
11536
11537The digest for an unimplemented hash algorithm may not be in a list because the TPM may not recognize
11538the algorithm as being a hash and it may not know the digest size.
11539
11540Table 97 — Definition of TPML_DIGEST_VALUES Structure
11541Parameter
11542
11543Type
11544
11545Description
11546
11547count
11548
11549UINT32
11550
11551number of digests in the list
11552
11553digests[count]{:HASH_COUNT}
11554
11555TPMT_HA
11556
11557a list of tagged digests
11558response code when count is greater than the possible
11559number of banks
11560
11561#TPM_RC_SIZE
11562
1156310.8.7 TPM2B_DIGEST_VALUES
11564Digest list in a sized buffer. This list is returned by TPM2_PCR_SequenceComplete().
11565Table 98 — Definition of TPM2B_DIGEST_VALUES Structure
11566Parameter
11567
11568Type
11569
11570Description
11571
11572size
11573
11574UINT16
11575
11576size of the operand buffer
11577
11578buffer [size] {:sizeof(TPML_DIGEST_VALUES)}
11579
11580BYTE
11581
11582the operand
11583
11584Family “2.0”
11585Level 00 Revision 00.99
11586
11587Published
11588Copyright © TCG 2006-2013
11589
11590Page 95
11591October 31, 2013
11592
11593Part 2: Structures
11594
11595Trusted Platform Module Library
11596
1159710.8.8 TPML_PCR_SELECTION
11598This list is used to indicate the PCR that are included in a selection when more than one PCR value may
11599be selected.
11600This structure is an input parameter to TPM2_PolicyPCR() to indicate the PCR that will be included in the
11601digest of PCR for the authorization. The structure is used in TPM2_PCR_Read() command to indicate the
11602PCR values to be returned and in the response to indicate which PCR are included in the list of returned
11603digests. The structure is an output parameter from TPM2_Create() and indicates the PCR used in the
11604digest of the PCR state when the object was created. The structure is also contained in the attestation
11605structure of TPM2_Quote().
11606When this structure is used to select PCR to be included in a digest, the selected PCR are concatenated
11607to create a “message” containing all of the PCR, and then the message is hashed using the contextspecific hash algorithm.
11608Table 99 — Definition of TPML_PCR_SELECTION Structure
11609Parameter
11610
11611Type
11612
11613Description
11614
11615count
11616
11617UINT32
11618
11619number of selection structures
11620A value of zero is allowed.
11621
11622pcrSelections[count]{:HASH_COUNT}
11623
11624TPMS_PCR_SELECTION
11625
11626list of selections
11627response code when count is greater
11628than the possible number of banks
11629
11630#TPM_RC_SIZE
11631
1163210.8.9 TPML_ALG_PROPERTY
11633This list is used to report on a list of algorithm attributes. It is returned in a TPM2_GetCapability().
11634Table 100 — Definition of TPML_ALG_PROPERTY Structure <OUT>
11635Parameter
11636
11637Type
11638
11639Description
11640
11641count
11642
11643UINT32
11644
11645number of algorithm properties structures
11646A value of zero is allowed.
11647
11648algProperties[count]{:MAX_CAP_ALGS}
11649
11650TPMS_ALG_PROPERTY
11651
11652list of properties
11653
1165410.8.10 TPML_TAGGED_TPM_PROPERTY
11655This list is used to report on a list of properties that are TPMS_TAGGED_PROPERTY values. It is
11656returned by a TPM2_GetCapability().
11657Table 101 — Definition of TPML_TAGGED_TPM_PROPERTY Structure <OUT>
11658Parameter
11659
11660Type
11661
11662Description
11663
11664count
11665
11666UINT32
11667
11668number of properties
11669A value of zero is allowed.
11670
11671tpmProperty[count]{:MAX_TPM_PROPERTIES}
11672
11673TPMS_TAGGED_PROPERTY
11674
11675Page 96
11676October 31, 2013
11677
11678Published
11679Copyright © TCG 2006-2013
11680
11681an array of tagged properties
11682
11683Family “2.0”
11684Level 00 Revision 00.99
11685
11686Trusted Platform Module Library
11687
11688Part 2: Structures
11689
1169010.8.11 TPML_TAGGED_PCR_PROPERTY
11691This list is used to report on a list of properties that are TPMS_PCR_SELECT values. It is returned by a
11692TPM2_GetCapability().
11693Table 102 — Definition of TPML_TAGGED_PCR_PROPERTY Structure <OUT>
11694Parameter
11695
11696Type
11697
11698Description
11699
11700count
11701
11702UINT32
11703
11704number of properties
11705A value of zero is allowed.
11706
11707pcrProperty[count]{:MAX_PCR_PROPERTIES}
11708
11709TPMS_TAGGED_PCR_SELECT
11710
11711 a tagged PCR selection
11712
1171310.8.12 TPML_ECC_CURVE
11714This list is used to report the ECC curve ID values supported by the TPM. It is returned by a
11715TPM2_GetCapability().
11716Table 103 — Definition of {ECC} TPML_ECC_CURVE Structure <OUT>
11717Parameter
11718
11719Type
11720
11721Description
11722
11723count
11724
11725UINT32
11726
11727number of curves
11728A value of zero is allowed.
11729
11730eccCurves[count]{:MAX_ECC_CURVES}
11731
11732TPM_ECC_CURVE
11733
11734array of ECC curve identifiers
11735
1173610.9 Capabilities Structures
1173710.9.1 TPMU_CAPABILITIES
11738Table 104 — Definition of TPMU_CAPABILITIES Union <OUT>
11739Parameter
11740
11741Type
11742
11743Selector
11744
11745algorithms
11746
11747TPML_ALG_PROPERTY
11748
11749TPM_CAP_ALGS
11750
11751handles
11752
11753TPML_HANDLE
11754
11755TPM_CAP_HANDLES
11756
11757command
11758
11759TPML_CCA
11760
11761TPM_CAP_COMMANDS
11762
11763ppCommands
11764
11765TPML_CC
11766
11767TPM_CAP_PP_COMMANDS
11768
11769auditCommands
11770
11771TPML_CC
11772
11773TPM_CAP_AUDIT_COMMANDS
11774
11775assignedPCR
11776
11777TPML_PCR_SELECTION
11778
11779TPM_CAP_PCRS
11780
11781tpmProperties
11782
11783TPML_TAGGED_TPM_PROPERTY
11784
11785TPM_CAP_TPM_PROPERTIES
11786
11787pcrProperties
11788
11789TPML_TAGGED_PCR_PROPERTY
11790
11791TPM_CAP_PCR_PROPERTIES
11792
11793eccCurves
11794
11795TPML_ECC_CURVE
11796
11797TPM_CAP_ECC_CURVES
11798
11799Family “2.0”
11800Level 00 Revision 00.99
11801
11802Published
11803Copyright © TCG 2006-2013
11804
11805Description
11806
11807TPM_ALG_ECC
11808
11809Page 97
11810October 31, 2013
11811
11812Part 2: Structures
11813
11814Trusted Platform Module Library
11815
1181610.9.2 TPMS_CAPABILITY_DATA
11817This data area is returned in response to a TPM2_GetCapability().
11818Table 105 — Definition of TPMS_CAPABILITY_DATA Structure <OUT>
11819Parameter
11820
11821Type
11822
11823Description
11824
11825capability
11826
11827TPM_CAP
11828
11829the capability
11830
11831[capability]data
11832
11833TPMU_CAPABILITIES
11834
11835the capability data
11836
1183710.10 Clock/Counter Structures
1183810.10.1 TPMS_CLOCK_INFO
11839This structure is used in each of the attestation commands.
11840Table 106 — Definition of TPMS_CLOCK_INFO Structure
11841Parameter
11842
11843Type
11844
11845Description
11846
11847clock
11848
11849UINT64
11850
11851time in milliseconds during which the TPM has been powered
11852This structure element is used to report on the TPM's Clock value.
11853The value of Clock shall be recorded in non-volatile memory no
1185422
11855less often than once per 2 milliseconds (~69.9 minutes) of TPM
11856operation. The reference for the millisecond timer is the TPM
11857oscillator.
11858This value is reset to zero when the Storage Primary Seed is
11859changed (TPM2_Clear()).
11860This value may be advanced by TPM2_AdvanceClock().
11861
11862resetCount
11863
11864UINT32
11865
11866number of occurrences of TPM Reset since the last TPM2_Clear()
11867
11868restartCount
11869
11870UINT32
11871
11872number of times that TPM2_Shutdown() or _TPM_Hash_Start have
11873occurred since the last TPM Reset or TPM2_Clear().
11874
11875safe
11876
11877TPMI_YES_NO
11878
11879no value of Clock greater than the current value of Clock has been
11880previously reported by the TPM. Set to YES on TPM2_Clear().
11881
1188210.10.2 Clock
11883Clock is a monotonically increasing counter that advances whenever power is applied to the TPM. The
11884value of Clock may be set forward with TPM2_ClockSet() if ownerAuth or platformAuth is provided. The
11885value of Clock is incremented each millisecond.
11886TPM2_Clear() will set Clock to zero.
11887Clock will be non-volatile but may have a volatile component that is updated every millisecond with the
11888non-volatile component updated at a lower rate. If the implementation uses a volatile component, the non22
11889volatile component shall be updated no less frequently than every 2 milliseconds (~69.9 minutes). The
11890update rate of the non-volatile portion of Clock shall be reported by a TPM2_GetCapability() with
11891capability = TPM_CAP_TPM_PROPERTIES and property = TPM_PT_CLOCK_UPDATE.
1189210.10.3 ResetCount
11893This counter shall increment on each TPM Reset. This counter shall be reset to zero by TPM2_Clear().
11894
11895Page 98
11896October 31, 2013
11897
11898Published
11899Copyright © TCG 2006-2013
11900
11901Family “2.0”
11902Level 00 Revision 00.99
11903
11904Trusted Platform Module Library
11905
11906Part 2: Structures
11907
1190810.10.4 RestartCount
11909This counter shall increment by one for each TPM Restart or TPM Resume. The restartCount shall be
11910reset to zero on a TPM Reset or TPM2_Clear().
1191110.10.5 Safe
11912This parameter is set to YES when the value reported in Clock is guaranteed to be unique for the current
11913Owner. It is set to NO when the value of Clock may have been reported in a previous attestation or
11914access.
11915This parameter will be YES if a TPM2_Startup() was preceded by TPM2_Shutdown() with no intervening
11916commands. It will also be YES after an update of the non-volatile bits of Clock have been updated at the
11917end of an update interval.
11918If a TPM implementation does not implement
11919TPMS_CLOCK_INFO.clock shall always be zero.
11920
11921Clock,
11922
11923Safe
11924
11925shall
11926
11927always
11928
11929be
11930
11931NO
11932
11933and
11934
11935This parameter will be set to YES by TPM2_Clear().
1193610.10.6 TPMS_TIME_INFO
11937This structure is used in the TPM2_TICK attestation.
11938The Time value reported in this structure is reset whenever the TPM is reset. An implementation may
11939reset the value of Time any time after _TPM_Init and before the TPM returns after TPM2_Start(). The
11940value of Time shall increment continuously while power is applied to the TPM.
11941Table 107 — Definition of TPMS_TIME_INFO Structure
11942Parameter
11943
11944Type
11945
11946Description
11947
11948time
11949
11950UINT64
11951
11952time in milliseconds since the last _TPM_Init() or TPM2_Startup()
11953This structure element is used to report on the TPM's Time value.
11954
11955clockInfo
11956
11957TPMS_CLOCK_INFO
11958
11959a structure containing the clock information
11960
11961Family “2.0”
11962Level 00 Revision 00.99
11963
11964Published
11965Copyright © TCG 2006-2013
11966
11967Page 99
11968October 31, 2013
11969
11970Part 2: Structures
11971
11972Trusted Platform Module Library
11973
1197410.11 TPM Attestation Structures
1197510.11.1 Introduction
11976This clause describes the structures that are used when a TPM creates a structure to be signed. The
11977signing structures follow a standard format TPM2B_ATTEST with case-specific information embedded.
1197810.11.2 TPMS_TIME_ATTEST_INFO
11979This structure is used when the TPM performs TPM2_GetClock.
11980Table 108 — Definition of TPMS_TIME_ATTEST_INFO Structure <OUT>
11981Parameter
11982
11983Type
11984
11985Description
11986
11987time
11988
11989TPMS_TIME_INFO
11990
11991the Time, clock, resetCount, restartCount, and Safe indicator
11992
11993firmwareVersion
11994
11995UINT64
11996
11997a vendor-specific value indicating the version number of the
11998firmware
11999
1200010.11.3 TPMS_CERTIFY_INFO
12001This is the attested data for TPM2_Certify().
12002Table 109 — Definition of TPMS_CERTIFY_INFO Structure <OUT>
12003Parameter
12004
12005Type
12006
12007Description
12008
12009name
12010
12011TPM2B_NAME
12012
12013Name of the certified object
12014
12015qualifiedName
12016
12017TPM2B_NAME
12018
12019Qualified Name of the certified object
12020
1202110.11.1 TPMS_QUOTE_INFO
12022This is the attested data for TPM2_Quote().
12023Table 110 — Definition of TPMS_QUOTE_INFO Structure <OUT>
12024Parameter
12025
12026Type
12027
12028Description
12029
12030pcrSelect
12031
12032TPML_PCR_SELECTION
12033
12034information on algID, PCR selected and digest
12035
12036pcrDigest
12037
12038TPM2B_DIGEST
12039
12040digest of the selected PCR using the hash of the signing key
12041
12042Page 100
12043October 31, 2013
12044
12045Published
12046Copyright © TCG 2006-2013
12047
12048Family “2.0”
12049Level 00 Revision 00.99
12050
12051Trusted Platform Module Library
12052
12053Part 2: Structures
12054
1205510.11.2 TPMS_COMMAND_AUDIT_INFO
12056This is the attested data for TPM2_GetCommandAuditDigest().
12057Table 111 — Definition of TPMS_COMMAND_AUDIT_INFO Structure <OUT>
12058Parameter
12059
12060Type
12061
12062Description
12063
12064auditCounter
12065
12066UINT64
12067
12068the monotonic audit counter
12069
12070digestAlg
12071
12072TPM_ALG_ID
12073
12074hash algorithm used for the command audit
12075
12076auditDigest
12077
12078TPM2B_DIGEST
12079
12080the current value of the audit digest
12081
12082commandDigest
12083
12084TPM2B_DIGEST
12085
12086digest of the command codes being audited using digestAlg
12087
1208810.11.3 TPMS_SESSION_AUDIT_INFO
12089This is the attested data for TPM2_GetSessionAuditDigest().
12090Table 112 — Definition of TPMS_SESSION_AUDIT_INFO Structure <OUT>
12091Parameter
12092
12093Type
12094
12095Description
12096
12097exclusiveSession
12098
12099TPMI_YES_NO
12100
12101current exclusive status of the session
12102TRUE if all of the commands recorded in the sessionDigest were
12103executed without any intervening TPM command that did not use
12104this transport session
12105
12106sessionDigest
12107
12108TPM2B_DIGEST
12109
12110the current value of the session audit digest
12111
1211210.11.4 TPMS_CREATION_INFO
12113This is the attested data for TPM2_CertifyCreation().
12114Table 113 — Definition of TPMS_CREATION_INFO Structure <OUT>
12115Parameter
12116
12117Type
12118
12119Description
12120
12121objectName
12122
12123TPM2B_NAME
12124
12125Name of the object
12126
12127creationHash
12128
12129TPM2B_DIGEST
12130
12131creationHash
12132
1213310.11.5 TPMS_NV_CERTIFY_INFO
12134This structure contains the Name and contents of the selected NV Index that is certified by
12135TPM2_NV_Certify().
12136Table 114 — Definition of TPMS_NV_CERTIFY_INFO Structure <OUT>
12137Parameter
12138
12139Type
12140
12141Description
12142
12143indexName
12144
12145TPM2B_NAME
12146
12147Name of the NV Index
12148
12149offset
12150
12151UINT16
12152
12153the offset parameter of TPM2_NV_Certify()
12154
12155nvContents
12156
12157TPM2B_MAX_NV_BUFFER
12158
12159contents of the NV Index
12160
12161Family “2.0”
12162Level 00 Revision 00.99
12163
12164Published
12165Copyright © TCG 2006-2013
12166
12167Page 101
12168October 31, 2013
12169
12170Part 2: Structures
12171
12172Trusted Platform Module Library
12173
1217410.11.6 TPMI_ST_ATTEST
12175Table 115 — Definition of (TPM_ST) TPMI_ST_ATTEST Type <OUT>
12176Value
12177
12178Description
12179
12180TPM_ST_ATTEST_CERTIFY
12181
12182generated by TPM2_Certify()
12183
12184TPM_ST_ATTEST_QUOTE
12185
12186generated by TPM2_Quote()
12187
12188TPM_ST_ATTEST_SESSION_AUDIT
12189
12190generated by TPM2_GetSessionAuditDigest()
12191
12192TPM_ST_ATTEST_COMMAND_AUDIT
12193
12194generated by TPM2_GetCommandAuditDigest()
12195
12196TPM_ST_ATTEST_TIME
12197
12198generated by TPM2_GetTime()
12199
12200TPM_ST_ATTEST_CREATION
12201
12202generated by TPM2_CertifyCreation()
12203
12204TPM_ST_ATTEST_NV
12205
12206generated by TPM2_NV_Certify()
12207
1220810.11.7 TPMU_ATTEST
12209Table 116 — Definition of TPMU_ATTEST Union <OUT>
12210Parameter
12211
12212Type
12213
12214Selector
12215
12216certify
12217
12218TPMS_CERTIFY_INFO
12219
12220TPM_ST_ATTEST_CERTIFY
12221
12222creation
12223
12224TPMS_CREATION_INFO
12225
12226TPM_ST_ATTEST_CREATION
12227
12228quote
12229
12230TPMS_QUOTE_INFO
12231
12232TPM_ST_ATTEST_QUOTE
12233
12234commandAudit
12235
12236TPMS_COMMAND_AUDIT_INFO
12237
12238TPM_ST_ATTEST_COMMAND_AUDIT
12239
12240sessionAudit
12241
12242TPMS_SESSION_AUDIT_INFO
12243
12244TPM_ST_ATTEST_SESSION_AUDIT
12245
12246time
12247
12248TPMS_TIME_ATTEST_INFO
12249
12250TPM_ST_ATTEST_TIME
12251
12252nv
12253
12254TPMS_NV_CERTIFY_INFO
12255
12256TPM_ST_ATTEST_NV
12257
12258Page 102
12259October 31, 2013
12260
12261Published
12262Copyright © TCG 2006-2013
12263
12264Family “2.0”
12265Level 00 Revision 00.99
12266
12267Trusted Platform Module Library
12268
12269Part 2: Structures
12270
1227110.11.8 TPMS_ATTEST
12272This structure is used on each TPM-generated signed structure. The signature is over this structure.
12273When the structure is signed by a key in the Storage hierarchy, the values of clockInfo.resetCount,
12274clockInfo.restartCount, and firmwareVersion are obfuscated with a per-key obfuscation value.
12275Table 117 — Definition of TPMS_ATTEST Structure <OUT>
12276Parameter
12277
12278Type
12279
12280Description
12281
12282magic
12283
12284TPM_GENERATED
12285
12286the indication that this structure was created by a TPM (always
12287TPM_GENERATED_VALUE)
12288
12289type
12290
12291TPMI_ST_ATTEST
12292
12293type of the attestation structure
12294
12295qualifiedSigner
12296
12297TPM2B_NAME
12298
12299Qualified Name of the signing key
12300
12301extraData
12302
12303TPM2B_DATA
12304
12305external information supplied by caller
12306NOTE
12307
12308A TPM2B_DATA structure provides room for a digest and a
12309method indicator to indicate the components of the digest.
12310The definition of this method indicator is outside the scope
12311of this specification.
12312
12313clockInfo
12314
12315TPMS_CLOCK_INFO
12316
12317Clock, resetCount, restartCount, and Safe
12318
12319firmwareVersion
12320
12321UINT64
12322
12323TPM-vendor-specific field identifying the firmware on the TPM
12324
12325[type]attested
12326
12327TPMU_ATTEST
12328
12329the type-specific attestation information
12330
1233110.11.9 TPM2B_ATTEST
12332This sized buffer to contain the signed structure. The attestationData is the signed portion of the structure.
12333The size parameter is not signed.
12334Table 118 — Definition of TPM2B_ATTEST Structure <OUT>
12335Parameter
12336
12337Type
12338
12339Description
12340
12341size
12342
12343UINT16
12344
12345size of the attestationData structure
12346
12347attestationData[size]{:sizeof(TPMS_ATTEST)}
12348
12349BYTE
12350
12351the signed structure
12352
12353Family “2.0”
12354Level 00 Revision 00.99
12355
12356Published
12357Copyright © TCG 2006-2013
12358
12359Page 103
12360October 31, 2013
12361
12362Part 2: Structures
12363
12364Trusted Platform Module Library
12365
1236610.12 Authorization Structures
12367The structures in this clause are used for all authorizations. One or more of these structures will be
12368present in a command or response that has a tag of TPM_ST_SESSIONS.
1236910.12.1 TPMS_AUTH_COMMAND
12370This is the format used for each of the authorizations in the session area of a command.
12371Table 119 — Definition of TPMS_AUTH_COMMAND Structure <IN>
12372Parameter
12373
12374Type
12375
12376Description
12377
12378sessionHandle
12379
12380TPMI_SH_AUTH_SESSION+
12381
12382the session handle
12383
12384nonce
12385
12386TPM2B_NONCE
12387
12388the session nonce, may be the Empty Buffer
12389
12390sessionAttributes
12391
12392TPMA_SESSION
12393
12394the session attributes
12395
12396hmac
12397
12398TPM2B_AUTH
12399
12400either an HMAC, a password, or an EmptyAuth
12401
1240210.12.2 TPMS_AUTH_RESPONSE
12403This is the format for each of the authorizations in the session area of the response. If the TPM returns
12404TPM_RC_SUCCESS, then the session area of the response contains the same number of authorizations
12405as the command and the authorizations are in the same order.
12406Table 120 — Definition of TPMS_AUTH_RESPONSE Structure <OUT>
12407Parameter
12408
12409Type
12410
12411Description
12412
12413nonce
12414
12415TPM2B_NONCE
12416
12417the session nonce, may be the Empty Buffer
12418
12419sessionAttributes
12420
12421TPMA_SESSION
12422
12423the session attributes
12424
12425hmac
12426
12427TPM2B_AUTH
12428
12429either an HMAC, a password, or an EmptyAuth
12430
12431Page 104
12432October 31, 2013
12433
12434Published
12435Copyright © TCG 2006-2013
12436
12437Family “2.0”
12438Level 00 Revision 00.99
12439
12440Trusted Platform Module Library
12441
12442Part 2: Structures
12443
1244411 Algorithm Parameters and Structures
1244511.1 Symmetric
1244611.1.1 Introduction
12447This clause defines the parameters and structures for describing symmetric algorithms.
1244811.1.2 TPMI_AES_KEY_BITS
12449This interface type defines the supported sizes for an AES key. This type is used to allow the
12450unmarshaling routine to generate the proper validation code for the supported key sizes. An
12451implementation that supports different key sizes would have a different set of selections.
12452When used in TPM2_StartAuthSession(), the mode parameter shall be TPM_ALG_CFB.
12453NOTE 1
12454
12455Key size is expressed in bits.
12456
12457NOTE 2
12458
12459The definition for AES_KEY_SIZES_BITS used in the reference implementation is found in Annex B
12460
12461Table 121 — Definition of {AES} (TPM_KEY_BITS) TPMI_AES_KEY_BITS Type
12462Parameter
12463
12464Description
12465
12466$AES_KEY_SIZES_BITS
12467
12468number of bits in the key
12469
12470#TPM_RC_VALUE
12471
12472error when key size is not supported
12473
1247411.1.3 TPMI_SM4_KEY_BITS
12475This interface type defines the supported sizes for an SM4 key. This type is used to allow the
12476unmarshaling routine to generate the proper validation code for the supported key sizes. An
12477implementation that supports different key sizes would have a different set of selections.
12478NOTE
12479
12480SM4 only supports a key size of 128 bits.
12481
12482Table 122 — Definition of {SM4} (TPM_KEY_BITS) TPMI_SM4_KEY_BITS Type
12483Parameter
12484
12485Description
12486
12487$SM4_KEY_SIZES_BITS
12488
12489number of bits in the key
12490
12491#TPM_RC_VALUE
12492
12493Family “2.0”
12494Level 00 Revision 00.99
12495
12496Published
12497Copyright © TCG 2006-2013
12498
12499Page 105
12500October 31, 2013
12501
12502Part 2: Structures
12503
12504Trusted Platform Module Library
12505
1250611.1.4 TPMU_SYM_KEY_BITS
12507This union is used to collect the symmetric encryption key sizes.
12508The xor entry is a hash algorithms selector and not a key size in bits. This overload is used in order to
12509avoid an additional level of indirection with another union and another set of selectors.
12510The xor entry is only selected in a TPMT_SYM_DEF, which is used to select the parameter encryption
12511value.
12512Table 123 — Definition of TPMU_SYM_KEY_BITS Union
12513Parameter
12514
12515Type
12516
12517Selector
12518
12519aes
12520
12521TPMI_AES_KEY_BITS
12522
12523TPM_ALG_AES
12524
12525SM4
12526
12527TPMI_SM4_KEY_BITS
12528
12529TPM_ALG_SM4
12530
12531sym
12532
12533TPM_KEY_BITS
12534
12535xor
12536
12537TPMI_ALG_HASH
12538
12539Description
12540
12541when selector may be any of the
12542symmetric block ciphers
12543
12544overload for using xor
12545NOTE
12546
12547null
12548
12549
1255011.1.5 TPMU_SYM_MODE
12551This union allows the mode value in a TPMT_SYM_DEF or TPMT_SYM_DEF_OBJECT to be empty.
12552Table 124 — Definition of TPMU_SYM_MODE Union
12553Parameter
12554
12555Type
12556
12557Selector
12558
12559Description
12560
12561aes
12562
12563TPMI_ALG_SYM_MODE
12564
12565TPM_ALG_AES
12566
12567NOTE
12568
12569
12570SM4
12571
12572TPMI_ALG_SYM_MODE
12573
12574TPM_ALG_SM4
12575
12576NOTE
12577
12578sym
12579
12580TPMI_ALG_SYM_MODE
12581
12582when selector may be any of the
12583symmetric block ciphers
12584
12585no mode selector
12586
12587null
12588
12589TPM_ALG_NULL
12590
12591no mode selector
12592
12593Page 106
12594October 31, 2013
12595
12596Published
12597Copyright © TCG 2006-2013
12598
12599Family “2.0”
12600Level 00 Revision 00.99
12601
12602Trusted Platform Module Library
12603
12604Part 2: Structures
12605
1260611.1.6 TPMU_SYM_DETAILS
12607This union allows additional parameters to be added for a symmetric cipher. Currently, no additional
12608parameters are required for any of the symmetric algorithms.
12609NOTE
12610
12611The “x” character in the table title will suppress generation of this type as the parser is not, at this time,
12612able to generate the proper values (a union of all empty data types). When an algorithm is added that
12613requires additional parameterization, the Type column will contain a value and the “x” may be removed.
12614
12615Table 125 — xDefinition of TPMU_SYM_DETAILS Union
12616Parameter
12617
12618Type
12619
12620Selector
12621
12622aes
12623
12624TPM_ALG_AES
12625
12626SM4
12627
12628Description
12629
12630TPM_ALG_SM4
12631
12632sym
12633
12634when selector may be any of the
12635symmetric block ciphers
12636
12637xor
12638
12639TPM_ALG_XOR
12640
12641null
12642
12643TPM_ALG_NULL
12644
1264511.1.7 TPMT_SYM_DEF
12646The TPMT_SYM_DEF structure is used to select an algorithm to be used for parameter encryption in
12647those cases when different symmetric algorithms may be selected.
12648Table 126 — Definition of TPMT_SYM_DEF Structure
12649Parameter
12650
12651Type
12652
12653Description
12654
12655algorithm
12656
12657+TPMI_ALG_SYM
12658
12659indicates a symmetric algorithm
12660
12661[algorithm]keyBits
12662
12663TPMU_SYM_KEY_BITS
12664
12665a supported key size
12666
12667[algorithm]mode
12668
12669TPMU_SYM_MODE
12670
12671the mode for the key
12672
12673//[algorithm]details
12674
12675TPMU_SYM_DETAILS
12676
12677contains additional algorithm details
12678NOTE
12679
12680This is commented out at this time as the parser
12681may not produce the proper code for a union if
12682none of the selectors produces any data.
12683
1268411.1.8 TPMT_SYM_DEF_OBJECT
12685This structure is used when different symmetric block cipher (not XOR) algorithms may be selected.
12686Table 127 — Definition of TPMT_SYM_DEF_OBJECT Structure
12687Parameter
12688
12689Type
12690
12691Description
12692
12693algorithm
12694
12695+TPMI_ALG_SYM_OBJECT
12696
12697selects a symmetric block cipher
12698
12699[algorithm]keyBits
12700
12701TPMU_SYM_KEY_BITS
12702
12703the key size
12704
12705[algorithm]mode
12706
12707TPMU_SYM_MODE
12708
12709default mode
12710
12711//[algorithm]details
12712
12713TPMU_SYM_DETAILS
12714
12715contains the additional algorithm details, if any
12716NOTE
12717
12718Family “2.0”
12719Level 00 Revision 00.99
12720
12721This is commented out at this time as the parser
12722may not produce the proper code for a union if
12723none of the selectors produces any data.
12724
12725Published
12726Copyright © TCG 2006-2013
12727
12728Page 107
12729October 31, 2013
12730
12731Part 2: Structures
12732
12733Trusted Platform Module Library
12734
1273511.1.9 TPM2B_SYM_KEY
12736This structure is used to hold a symmetric key in the sensitive area of an asymmetric object.
12737The number of bits in the key is in keyBits in the public area. When keyBits is not an even multiple of 8
12738bits, the unused bits of buffer will be the most significant bits of buffer[0] and size will be rounded up to
12739the number of octets required to hold all bits of the key.
12740Table 128 — Definition of TPM2B_SYM_KEY Structure
12741Parameter
12742
12743Type
12744
12745Description
12746
12747size
12748
12749UINT16
12750
12751size, in octets, of the buffer containing the key; may be
12752zero
12753
12754buffer [size] {:MAX_SYM_KEY_BYTES}
12755
12756BYTE
12757
12758the key
12759
1276011.1.10 TPMS_SYMCIPHER_PARMS
12761This structure contains the parameters for a symmetric block cipher object.
12762Table 129 — Definition of TPMS_SYMCIPHER_PARMS Structure
12763Parameter
12764
12765Type
12766
12767Description
12768
12769sym
12770
12771TPMT_SYM_DEF_OBJECT
12772
12773a symmetric block cipher
12774
1277511.1.11 TPM2B_SENSITIVE_DATA
12776This buffer holds the secret data of a data object. It can hold as much as 128 octets of data.
12777MAX_SYM_DATA shall be 128.
12778NOTE
12779
12780A named value rather than a numeric is used to make coding clearer. A numeric value does not indicate
12781the reason that it has the specific value that is has.
12782
12783Table 130 — Definition of TPM2B_SENSITIVE_DATA Structure
12784Parameter
12785
12786Type
12787
12788size
12789
12790UINT16
12791
12792buffer[size]{: MAX_SYM_DATA}
12793
12794BYTE
12795
12796Page 108
12797October 31, 2013
12798
12799Description
12800
12801the keyed hash private data structure
12802
12803Published
12804Copyright © TCG 2006-2013
12805
12806Family “2.0”
12807Level 00 Revision 00.99
12808
12809Trusted Platform Module Library
12810
12811Part 2: Structures
12812
1281311.1.12 TPMS_SENSITIVE_CREATE
12814This structure defines the values to be placed in the sensitive area of a created object. This structure is
12815only used within a TPM2B_SENSITIVE_CREATE structure.
12816NOTE
12817
12818When sent to the TPM or unsealed, data is usually encrypted using parameter encryption.
12819
12820If data.size is not zero, and the object is not a keyedHash, data.size must match the size indicated in the
12821keySize of public.parameters. If the object is a keyedHash, data.size may be any value up to the
12822maximum allowed in a TPM2B_SENSITIVE_DATA.
12823For an asymmetric object, data shall be an Empty Buffer and sensitiveDataOrigin shall be SET.
12824Table 131 — Definition of TPMS_SENSITIVE_CREATE Structure <IN>
12825Parameter
12826
12827Type
12828
12829Description
12830
12831userAuth
12832
12833TPM2B_AUTH
12834
12835the USER auth secret value
12836
12837data
12838
12839TPM2B_SENSITIVE_DATA
12840
12841data to be sealed
12842
12843Family “2.0”
12844Level 00 Revision 00.99
12845
12846Published
12847Copyright © TCG 2006-2013
12848
12849Page 109
12850October 31, 2013
12851
12852Part 2: Structures
12853
12854Trusted Platform Module Library
12855
1285611.1.13 TPM2B_SENSITIVE_CREATE
12857This structure contains the sensitive creation data in a sized buffer. This structure is defined so that both
12858the userAuth and data values of the TPMS_SENSITIVE_CREATE may be passed as a single parameter
12859for parameter encryption purposes.
12860Table 132 — Definition of TPM2B_SENSITIVE_CREATE Structure <IN, S>
12861Parameter
12862
12863Type
12864
12865Description
12866
12867size=
12868
12869UINT16
12870
12871size of sensitive in octets (may not be zero)
12872NOTE
12873
12874sensitive
12875
12876TPMS_SENSITIVE_CREATE
12877
12878The userAuth and data parameters in this buffer
12879may both be zero length but the minimum size of
12880this parameter will be the sum of the size fields of
12881the
12882two
12883parameters
12884of
12885the
12886TPMS_SENSITIVE_CREATE.
12887
12888data to be sealed or a symmetric key value.
12889
1289011.1.14 TPMS_SCHEME_SIGHASH
12891This structure is the scheme data for schemes that only require a hash to complete the scheme definition.
12892Table 133 — Definition of TPMS_SCHEME_SIGHASH Structure
12893Parameter
12894
12895Type
12896
12897Description
12898
12899hashAlg
12900
12901TPMI_ALG_HASH
12902
12903the hash algorithm used to digest the message
12904
1290511.1.15 TPMI_ALG_HASH_SCHEME
12906This is the list of values that may appear in a keyedHash as the scheme parameter.
12907Table 134 — Definition of (TPM_ALG_ID) TPMI_ALG_KEYEDHASH_SCHEME Type
12908Values
12909
12910Comments
12911
12912TPM_ALG_HMAC
12913
12914the "signing" scheme
12915
12916TPM_ALG_XOR
12917
12918the "obfuscation" scheme
12919
12920+TPM_ALG_NULL
12921#TPM_RC_VALUE
12922
1292311.1.16 HMAC_SIG_SCHEME
12924Table 135 — Definition of Types for HMAC_SIG_SCHEME
12925Type
12926
12927Name
12928
12929TPMS_SCHEME_SIGHASH
12930
12931TPMS_SCHEME_HMAC
12932
12933Page 110
12934October 31, 2013
12935
12936Description
12937
12938Published
12939Copyright © TCG 2006-2013
12940
12941Family “2.0”
12942Level 00 Revision 00.99
12943
12944Trusted Platform Module Library
12945
12946Part 2: Structures
12947
1294811.1.17 TPMS_SCHEME_XOR
12949This structure is for the XOR encryption scheme.
12950Table 136 — Definition of TPMS_SCHEME_XOR Structure
12951Parameter
12952
12953Type
12954
12955Description
12956
12957hashAlg
12958
12959+TPMI_ALG_HASH
12960
12961the hash algorithm used to digest the message
12962
12963kdf
12964
12965TPMI_ALG_KDF
12966
12967the key derivation function
12968
1296911.1.18 TPMU_SCHEME_HMAC
12970Table 137 — Definition of TPMU_SCHEME_KEYEDHASH Union <IN/OUT, S>
12971Parameter
12972
12973Type
12974
12975Selector
12976
12977Description
12978
12979hmac
12980
12981TPMS_SCHEME_HMAC
12982
12983TPM_ALG_HMAC
12984
12985the "signing" scheme
12986
12987xor
12988
12989TPMS_SCHEME_XOR
12990
12991TPM_ALG_XOR
12992
12993the "obfuscation" scheme
12994
12995null
12996
12997TPM_ALG_NULL
12998
1299911.1.19 TPMT_KEYEDHASH_SCHEME
13000This structure is used for a hash signing object.
13001Table 138 — Definition of TPMT_KEYEDHASH_SCHEME Structure
13002Parameter
13003
13004Type
13005
13006Description
13007
13008scheme
13009
13010+TPMI_ALG_KEYEDHASH_SCHEME
13011
13012selects the scheme
13013
13014[scheme]details
13015
13016TPMU_SCHEME_KEYEDHASH
13017
13018the scheme parameters
13019
13020Family “2.0”
13021Level 00 Revision 00.99
13022
13023Published
13024Copyright © TCG 2006-2013
13025
13026Page 111
13027October 31, 2013
13028
13029Part 2: Structures
13030
13031Trusted Platform Module Library
13032
1303311.2 Asymmetric
1303411.2.1 Signing Schemes
1303511.2.1.1
13036
13037Introduction
13038
13039These structures are used to define the method in which the signature is to be created. These schemes
13040would appear in an object’s public area and in commands where the signing scheme is variable.
13041Every scheme is required to indicate a hash that is used in digesting the message.
1304211.2.1.2
13043
13044RSA_SIG_SCHEMES
13045
13046These are the RSA schemes that only need a hash algorithm as a scheme parameter.
13047For 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
13048always the largest salt value that will fit into the available space.
13049Table 139 — Definition of {RSA} Types for RSA_SIG_SCHEMES
13050Type
13051
13052Name
13053
13054Description
13055
13056TPMS_SCHEME_SIGHASH
13057TPMS_SCHEME_RSASSA
13058TPMS_SCHEME_SIGHASH
13059TPMS_SCHEME_RSAPSS
13060
1306111.2.1.3
13062
13063ECC_SIG_SCHEMES
13064
13065These are the ECC schemes that only need a hash algorithm as a controlling parameter.
13066Table 140 — Definition of {ECC} Types for ECC_SIG_SCHEMES
13067Type
13068
13069Name
13070
13071Description
13072
13073TPMS_SCHEME_SIGHASH
13074TPMS_SCHEME_ECDSA
13075TPMS_SCHEME_SIGHASH
13076TPMS_SCHEME_SM2
13077TPMS_SCHEME_SIGHASH
13078TPMS_SCHEME_ECSCHNORR
13079
1308011.2.1.4 TPMS_SCHEME_ECDAA
13081Table 141 — Definition of {ECC} TPMS_SCHEME_ECDAA Structure
13082Parameter
13083
13084Type
13085
13086Description
13087
13088hashAlg
13089
13090TPMI_ALG_HASH
13091
13092the hash algorithm used to digest the message
13093
13094count
13095
13096UINT16
13097
13098the counter value that is used between TPM2_Commit() and the sign
13099operation
13100
13101Page 112
13102October 31, 2013
13103
13104Published
13105Copyright © TCG 2006-2013
13106
13107Family “2.0”
13108Level 00 Revision 00.99
13109
13110Trusted Platform Module Library
1311111.2.1.5
13112
13113Part 2: Structures
13114
13115TPMU_SIG_SCHEME
13116Table 142 — Definition of TPMU_SIG_SCHEME Union <IN/OUT, S>
13117
13118Parameter
13119
13120Type
13121
13122Selector
13123
13124Description
13125
13126rsassa
13127
13128TPMS_SCHEME_RSASSA
13129
13130TPM_ALG_RSASSA
13131
13132the PKCS#1v1.5 scheme
13133
13134rsapss
13135
13136TPMS_SCHEME_RSAPSS
13137
13138TPM_ALG_RSAPSS
13139
13140the PKCS#1v2.1 PSS scheme
13141
13142ecdsa
13143
13144TPMS_SCHEME_ECDSA
13145
13146TPM_ALG_ECDSA
13147
13148the ECDSA scheme
13149
13150sm2
13151
13152TPMS_SCHEME_SM2
13153
13154TPM_ALG_SM2
13155
13156ECDSA from SM2
13157
13158ecdaa
13159
13160TPMS_SCHEME_ECDAA
13161
13162TPM_ALG_ECDAA
13163
13164the ECDAA scheme
13165
13166ecSchnorr
13167
13168TPMS_SCHEME_ECSCHNORR
13169
13170TPM_ALG_ECSCHNORR
13171
13172the EC Schnorr
13173
13174hmac
13175
13176TPMS_SCHEME_HMAC
13177
13178TPM_ALG_HMAC
13179
13180the HMAC scheme
13181
13182any
13183
13184TPMS_SCHEME_SIGHASH
13185
13186null
13187
1318811.2.1.6
13189
13190selector that allows access to
13191digest for any signing scheme
13192TPM_ALG_NULL
13193
13194no scheme or default
13195
13196TPMT_SIG_SCHEME
13197Table 143 — Definition of TPMT_SIG_SCHEME Structure
13198
13199Parameter
13200
13201Type
13202
13203Description
13204
13205scheme
13206
13207+TPMI_ALG_SIG_SCHEME
13208
13209scheme selector
13210
13211[scheme]details
13212
13213TPMU_SIG_SCHEME
13214
13215scheme parameters
13216
13217Family “2.0”
13218Level 00 Revision 00.99
13219
13220Published
13221Copyright © TCG 2006-2013
13222
13223Page 113
13224October 31, 2013
13225
13226Part 2: Structures
13227
13228Trusted Platform Module Library
13229
1323011.2.2 Encryption Schemes
1323111.2.2.1
13232
13233Introduction
13234
13235These structures are used to indicate the hash algorithm used for the encrypting process. These
13236schemes would appear in an object’s public area.
1323711.2.2.2
13238
13239TPMS_SCHEME_OAEP
13240Table 144 — Definition of {RSA} TPMS_SCHEME_OAEP Structure
13241
13242Parameter
13243
13244Type
13245
13246Description
13247
13248hashAlg
13249
13250+TPMI_ALG_HASH
13251
13252the hash algorithm used to digest the message
13253
1325411.2.2.3
13255
13256TPMS_SCHEME_ECDH
13257
13258For ECDH, KDFe is used for the key derivation function that only a hash algorithm is needed to complete
13259the definition.
13260Table 145 — Definition of {ECC} TPMS_SCHEME_ECDH Structure
13261Parameter
13262
13263Type
13264
13265Description
13266
13267hashAlg
13268
13269+TPMI_ALG_HASH
13270
13271the hash algorithm used in the KDF
13272
1327311.2.3 Key Derivation Schemes
1327411.2.3.1
13275
13276Introduction
13277
13278These structures are used to define the key derivation for symmetric secret sharing using asymmetric
13279methods. A secret shareing scheme is required in any asymmetric key with the decrypt attribute SET.
13280These schemes would appear in an object’s public area and in commands where the secret sharing
13281scheme is variable.
13282Each scheme includes a symmetric algorithm and a KDF selection.
1328311.2.3.2
13284
13285TPMS_SCHEME_MGF1
13286Table 146 — Definition of TPMS_SCHEME_MGF1 Structure
13287
13288Parameter
13289
13290Type
13291
13292Description
13293
13294hashAlg
13295
13296TPMI_ALG_HASH
13297
13298the hash algorithm used in the KDF
13299
1330011.2.3.3
13301
13302TPMS_SCHEME_KDF1_SP800_56a
13303Table 147 — Definition of {ECC} TPMS_SCHEME_KDF1_SP800_56a Structure
13304
13305Parameter
13306
13307Type
13308
13309Description
13310
13311hashAlg
13312
13313TPMI_ALG_HASH
13314
13315the hash algorithm used in the KDF
13316
13317Page 114
13318October 31, 2013
13319
13320Published
13321Copyright © TCG 2006-2013
13322
13323Family “2.0”
13324Level 00 Revision 00.99
13325
13326Trusted Platform Module Library
1332711.2.3.4
13328
13329Part 2: Structures
13330
13331TPMS_SCHEME_KDF2
13332Table 148 — Definition of TPMS_SCHEME_KDF2 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.5
13347
13348TPMS_SCHEME_KDF1_SP800_108
13349Table 149 — Definition of TPMS_SCHEME_KDF1_SP800_108 Structure
13350
13351Parameter
13352
13353Type
13354
13355Description
13356
13357hashAlg
13358
13359TPMI_ALG_HASH
13360
13361the hash algorithm used in the KDF
13362
1336311.2.3.6
13364
13365TPMU_KDF_SCHEME
13366Table 150 — Definition of TPMU_KDF_SCHEME Union <IN/OUT, S>
13367
13368Parameter
13369
13370Type
13371
13372Selector
13373
13374mgf1
13375
13376TPMS_SCHEME_MGF1
13377
13378TPM_ALG_MGF1
13379
13380kdf1_SP800_56a
13381
13382TPMS_SCHEME_KDF1_SP800_56a
13383
13384TPM_ALG_KDF1_SP800_56a
13385
13386kdf2
13387
13388TPMS_SCHEME_KDF2
13389
13390TPM_ALG_KDF2
13391
13392kdf1_sp800_108
13393
13394TPMS_SCHEME_KDF1_SP800_108
13395
13396Description
13397
13398TPM_ALG_KDF1_SP800_108
13399
13400null
13401
1340211.2.3.7
13403
13404TPM_ALG_NULL
13405
13406TPMT_KDF_SCHEME
13407Table 151 — Definition of TPMT_KDF_SCHEME Structure
13408
13409Parameter
13410
13411Type
13412
13413Description
13414
13415scheme
13416
13417+TPMI_ALG_KDF
13418
13419scheme selector
13420
13421[scheme]details
13422
13423TPMU_KDF_SCHEME
13424
13425scheme parameters
13426
13427Family “2.0”
13428Level 00 Revision 00.99
13429
13430Published
13431Copyright © TCG 2006-2013
13432
13433Page 115
13434October 31, 2013
13435
13436Part 2: Structures
1343711.2.3.8
13438
13439Trusted Platform Module Library
13440
13441TPMI_ALG_ASYM_SCHEME
13442
13443List of all of the scheme types for any asymmetric algorithm. This is used to define the
13444TPMT_ASYM_SCHEME.
13445Table 152 — Definition of (TPM_ALG_ID) TPMI_ALG_ASYM_SCHEME Type <>
13446Values
13447
13448Comments
13449
13450TPM_ALG_RSASSA
13451
13452list of the allowed values
13453
13454TPM_ALG_RSAPSS
13455TPM_ALG_RSAES
13456TPM_ALG_OAEP
13457TPM_ALG_ECDSA
13458TPM_ALG_SM2
13459TPM_ALG_ECDAA
13460TPM_ALG_ECDH
13461+TPM_ALG_NULL
13462#TPM_RC_VALUE
13463
1346411.2.3.9
13465
13466TPMU_ASYM_SCHEME
13467
13468This union of all asymmetric schemes is used in each of the asymmetric scheme structures. The actual
13469scheme structure is defined by the interface type used for the selector.
13470EXAMPLE
13471
13472The TPMT_RSA_SCHEME structure uses the TPMU_ASYM_SCHEME union but the selector type is
13473TPMI_ALG_RSA_SCHEME. This means that the only elements of the union that can be selected for th e
13474TPMT_RSA_SCHEME are those that are in TPMI_RSA_SCHEME.
13475
13476Table 153 — Definition of TPMU_ASYM_SCHEME Union
13477Parameter
13478
13479Type
13480
13481Selector
13482
13483Description
13484
13485rsassa
13486
13487TPMS_SCHEME_RSASSA
13488
13489TPM_ALG_RSASSA
13490
13491the PKCS#1v1.5 scheme
13492
13493rsapss
13494
13495TPMS_SCHEME_RSAPSS
13496
13497TPM_ALG_RSAPSS
13498
13499the PKCS#1v2.1 PSS scheme
13500
13501oaep
13502
13503TPMS_SCHEME_OAEP
13504
13505TPM_ALG_OAEP
13506
13507the PKSC#1v2.1 OAEP scheme
13508
13509ecdsa
13510
13511TPMS_SCHEME_ECDSA
13512
13513TPM_ALG_ECDSA
13514
13515an ECDSA scheme
13516
13517sm2
13518
13519TPMS_SCHEME_SM2
13520
13521TPM_ALG_SM2
13522
13523sign or key exchange from SM2
13524
13525ecdaa
13526
13527TPMS_SCHEME_ECDAA
13528
13529TPM_ALG_ECDAA
13530
13531an ECDAA scheme
13532
13533ecSchnorr
13534
13535TPMS_SCHEME_ECSCHNORR
13536
13537TPM_ALG_ECSCHNORR elliptic curve Schnorr signature
13538
13539ecdh
13540TPMS_SCHEME_ECDH
13541TPM_ALG_ECDH
13542anySig
13543
13544TPMS_SCHEME_SIGHASH
13545
13546null
13547
13548Page 116
13549October 31, 2013
13550
13551TPM_ALG_NULL
13552
13553Published
13554Copyright © TCG 2006-2013
13555
13556no scheme or default
13557This selects the NULL Signature.
13558
13559Family “2.0”
13560Level 00 Revision 00.99
13561
13562Trusted Platform Module Library
13563
13564Part 2: Structures
13565
1356611.2.3.10 TPMT_ASYM_SCHEME
13567This structure is defined to allow overlay of all of the schemes for any asymmetric object. This structure is
13568not sent on the interface.
13569Table 154 — Definition of TPMT_ASYM_SCHEME Structure <>
13570Parameter
13571
13572Type
13573
13574Description
13575
13576scheme
13577
13578+TPMI_ALG_ASYM_SCHEME
13579
13580scheme selector
13581
13582[scheme]details
13583
13584TPMU_ASYM_SCHEME
13585
13586scheme parameters
13587
1358811.2.4 RSA
1358911.2.4.1
13590
13591TPMI_ALG_RSA_SCHEME
13592
13593The list of values that may appear in the scheme parameter of a TPMS_RSA_PARMS structure.
13594Table 155 — Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_SCHEME Type
13595Values
13596
13597Comments
13598
13599TPM_ALG_RSASSA
13600
13601list of the allowed values
13602
13603TPM_ALG_RSAPSS
13604TPM_ALG_RSAES
13605TPM_ALG_OAEP
13606+TPM_ALG_NULL
13607#TPM_RC_VALUE
13608
1360911.2.4.2
13610
13611TPMT_RSA_SCHEME
13612Table 156 — Definition of {RSA} TPMT_RSA_SCHEME Structure
13613
13614Parameter
13615
13616Type
13617
13618Description
13619
13620scheme
13621
13622+TPMI_ALG_RSA_SCHEME
13623
13624scheme selector
13625
13626[scheme]details
13627
13628TPMU_ASYM_SCHEME
13629
13630scheme parameters
13631
13632Family “2.0”
13633Level 00 Revision 00.99
13634
13635Published
13636Copyright © TCG 2006-2013
13637
13638Page 117
13639October 31, 2013
13640
13641Part 2: Structures
1364211.2.4.3
13643
13644Trusted Platform Module Library
13645
13646TPMI_ALG_RSA_DECRYPT
13647
13648The list of values that are allowed in a decryption scheme selection as used in TPM2_RSA_Encrypt() and
13649TPM2_RSA_Decrypt().
13650Table 157 — Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_DECRYPT Type
13651Values
13652
13653Comments
13654
13655TPM_ALG_RSAES
13656TPM_ALG_OAEP
13657+TPM_ALG_NULL
13658#TPM_RC_VALUE
13659
1366011.2.4.4
13661
13662TPMT_RSA_DECRYPT
13663Table 158 — Definition of {RSA} TPMT_RSA_DECRYPT Structure
13664
13665Parameter
13666
13667Type
13668
13669Description
13670
13671scheme
13672
13673+TPMI_ALG_RSA_DECRYPT
13674
13675scheme selector
13676
13677[scheme]details
13678
13679TPMU_ASYM_SCHEME
13680
13681scheme parameters
13682
1368311.2.4.5
13684
13685TPM2B_PUBLIC_KEY_RSA
13686
13687This sized buffer holds the largest RSA public key supported by the TPM.
13688NOTE
13689
13690The reference implementation only supports key sizes of 1,024 and 2,048 bits.
13691
13692Table 159 — Definition of {RSA} TPM2B_PUBLIC_KEY_RSA Structure
13693Parameter
13694
13695Type
13696
13697Description
13698
13699size
13700
13701UINT16
13702
13703size of the buffer
13704The value of zero is only valid for create.
13705
13706buffer[size] {: MAX_RSA_KEY_BYTES}
13707
13708BYTE
13709
13710Value
13711
1371211.2.4.6
13713
13714TPMI_RSA_KEY_BITS
13715
13716This holds the value that is the maximum size allowed for an RSA key.
13717NOTE 1
13718
13719An implementation is allowed to provide limited support for smaller RSA key sizes. That is, a TPM may be
13720able to accept a smaller RSA key size in TPM2_LoadExternal() when only the public area is loaded but
13721not accept that smaller key size in any command that loads both the public and private portions of an RSA
13722key. This would allow the TPM to validate signatures using the smaller key but would prevent the TPM
13723from using the smaller key size for any other purpose.
13724
13725NOTE 2
13726
13727The definition for RSA_KEY_SIZES_BITS used in the reference implementation is found in Annex B
13728
13729Page 118
13730October 31, 2013
13731
13732Published
13733Copyright © TCG 2006-2013
13734
13735Family “2.0”
13736Level 00 Revision 00.99
13737
13738Trusted Platform Module Library
13739
13740Part 2: Structures
13741
13742Table 160 — Definition of {RSA} (TPM_KEY_BITS) TPMI_RSA_KEY_BITS Type
13743Parameter
13744
13745Description
13746
13747$RSA_KEY_SIZES_BITS
13748
13749the number of bits in the supported key
13750
13751#TPM_RC_VALUE
13752
13753error when key size is not supported
13754
1375511.2.4.7
13756
13757TPM2B_PRIVATE_KEY_RSA
13758
13759This sized buffer holds the largest RSA prime number supported by the TPM.
13760NOTE
13761
13762All primes are required to have exactly half the number of significant bits as the public modulus , and the
13763square of each prime is required to have the same number of significant bits as the public modulus.
13764
13765Table 161 — Definition of {RSA} TPM2B_PRIVATE_KEY_RSA Structure
13766Parameter
13767
13768Type
13769
13770size
13771
13772UINT16
13773
13774buffer[size]{:MAX_RSA_KEY_BYTES/2}
13775
13776BYTE
13777
13778Family “2.0”
13779Level 00 Revision 00.99
13780
13781Description
13782
13783Published
13784Copyright © TCG 2006-2013
13785
13786Page 119
13787October 31, 2013
13788
13789Part 2: Structures
13790
13791Trusted Platform Module Library
13792
1379311.2.5 ECC
1379411.2.5.1
13795
13796TPM2B_ECC_PARAMETER
13797
13798This sized buffer holds the largest ECC parameter (coordinate) supported by the TPM.
13799Table 162 — Definition of {ECC} TPM2B_ECC_PARAMETER Structure
13800Parameter
13801
13802Type
13803
13804Description
13805
13806size
13807
13808UINT16
13809
13810size of buffer
13811
13812buffer[size] {:MAX_ECC_KEY_BYTES}
13813
13814BYTE
13815
13816the parameter data
13817
1381811.2.5.2
13819
13820TPMS_ECC_POINT
13821
13822This structure holds two ECC coordinates that, together, make up an ECC point.
13823Table 163 — Definition of {ECC} TPMS_ECC_POINT Structure
13824Parameter
13825
13826Type
13827
13828Description
13829
13830x
13831
13832TPM2B_ECC_PARAMETER
13833
13834X coordinate
13835
13836y
13837
13838TPM2B_ECC_PARAMETER
13839
13840Y coordinate
13841
1384211.2.5.3
13843
13844TPM2B_ECC_POINT
13845
13846This structure is defined to allow a point to be a single sized parameter so that it may be encrypted.
13847NOTE
13848
13849If the point is to be omitted, the X and Y coordinates need to be individual ly set to Empty Buffers. The
13850minimum value for size will be four. It is checked indirectly by unmarshaling of the TPMS_ECC_POINT. If
13851the type of point were BYTE, then size could have been zero. However, this would complicate the process
13852of marshaling the structure.
13853
13854Table 164 — Definition of {ECC} TPM2B_ECC_POINT Structure
13855Parameter
13856
13857Type
13858
13859Description
13860
13861size=
13862
13863UINT16
13864
13865size of the remainder of this structure
13866
13867point
13868
13869TPMS_ECC_POINT
13870
13871coordinates
13872error returned if the unmarshaled size of point is
13873not exactly equal to size
13874
13875#TPM_RC_SIZE
13876
13877Page 120
13878October 31, 2013
13879
13880Published
13881Copyright © TCG 2006-2013
13882
13883Family “2.0”
13884Level 00 Revision 00.99
13885
13886Trusted Platform Module Library
1388711.2.5.4
13888
13889Part 2: Structures
13890
13891TPMI_ALG_ECC_SCHEME
13892Table 165 — Definition of (TPM_ALG_ID) {ECC} TPMI_ALG_ECC_SCHEME Type
13893
13894Values
13895
13896Comments
13897
13898TPM_ALG_ECDSA
13899
13900these are the selections allowed for an ECC key
13901
13902TPM_ALG_SM2
13903TPM_ALG_ECDAA
13904TPM_ALG_ECSCHNORR
13905TPM_ALG_ECDH
13906+TPM_ALG_NULL
13907#TPM_RC_SCHEME
13908
1390911.2.5.5
13910
13911TPMI_ECC_CURVE
13912
13913The ECC curves implemented by the TPM.
13914NOTE
13915
13916The definition of ECC_CURVES used in the reference implementation is found in Annex B
13917
13918Table 166 — Definition of {ECC} (TPM_ECC_CURVE) TPMI_ECC_CURVE Type
13919Parameter
13920
13921Description
13922
13923$ECC_CURVES
13924
13925the list of implemented curves
13926
13927#TPM_RC_CURVE
13928
13929error when curve is not supported
13930
1393111.2.5.6
13932
13933TPMT_ECC_SCHEME
13934
13935Table 167 — Definition of (TPMT_SIG_SCHEME) {ECC} TPMT_ECC_SCHEME Structure
13936Parameter
13937
13938Type
13939
13940Description
13941
13942scheme
13943
13944+TPMI_ALG_ECC_SCHEME
13945
13946scheme selector
13947
13948[scheme]details
13949
13950TPMU_SIG_SCHEME
13951
13952scheme parameters
13953
13954Family “2.0”
13955Level 00 Revision 00.99
13956
13957Published
13958Copyright © TCG 2006-2013
13959
13960Page 121
13961October 31, 2013
13962
13963Part 2: Structures
1396411.2.5.7
13965
13966Trusted Platform Module Library
13967
13968TPMS_ALGORITHM_DETAIL_ECC
13969
13970This structure is used to report on the curve parameters of an ECC curve. It is returned by
13971TPM2_ECC_Parameters().
13972Table 168 — Definition of {ECC} TPMS_ALGORITHM_DETAIL_ECC Structure <OUT>
13973Parameter
13974
13975Type
13976
13977Description
13978
13979curveID
13980
13981TPM_ECC_CURVE
13982
13983identifier for the curve
13984
13985keySize
13986
13987UINT16
13988
13989Size in bits of the key
13990
13991kdf
13992
13993TPMT_KDF_SCHEME
13994
13995the default KDF and hash algorithm used in secret sharing
13996operations
13997
13998sign
13999
14000TPMT_ECC_SCHEME+
14001
14002If not TPM_ALG_NULL, this is the mandatory signature
14003scheme that is required to be used with this curve.
14004
14005p
14006
14007TPM2B_ECC_PARAMETER
14008
14009Fp (the modulus)
14010
14011a
14012
14013TPM2B_ECC_PARAMETER
14014
14015coefficient of the linear term in the curve equation
14016
14017b
14018
14019TPM2B_ECC_PARAMETER
14020
14021constant term for curve equation
14022
14023gX
14024
14025TPM2B_ECC_PARAMETER
14026
14027x coordinate of base point G
14028
14029gY
14030
14031TPM2B_ECC_PARAMETER
14032
14033y coordinate of base point G
14034
14035n
14036
14037TPM2B_ECC_PARAMETER
14038
14039order of G
14040
14041h
14042
14043TPM2B_ECC_PARAMETER
14044
14045cofactor (a size of zero indicates a cofactor of 1)
14046
1404711.3 Signatures
1404811.3.1 TPMS_SIGNATURE_RSASSA
14049Table 169 — Definition of {RSA} TPMS_SIGNATURE_RSASSA Structure
14050Parameter
14051
14052Type
14053
14054Description
14055
14056hash
14057
14058TPMI_ALG_HASH
14059
14060the hash algorithm used to digest the message
14061TPM_ALG_NULL is not allowed.
14062
14063sig
14064
14065TPM2B_PUBLIC_KEY_RSA
14066
14067The signature is the size of a public key.
14068
1406911.3.2 TPMS_SIGNATURE_RSAPSS
14070When the TPM generates a PSS signature, the salt size is the largest size allowed by the key and hash
14071combination.
14072EXAMPLE
14073
14074For a 2,048-bit public modulus key and SHA1 hash, the salt size is 256 – 20 – 2 = 234 octets.
14075
14076NOTE
14077
14078While this is significantly larger than required from a securit y perspective, it avoids issues of whether a
14079particular size of salt value is sufficient.
14080
14081Page 122
14082October 31, 2013
14083
14084Published
14085Copyright © TCG 2006-2013
14086
14087Family “2.0”
14088Level 00 Revision 00.99
14089
14090Trusted Platform Module Library
14091
14092Part 2: Structures
14093
14094Table 170 — Definition of {RSA} TPMS_SIGNATURE_RSAPSS Structure
14095Parameter
14096
14097Type
14098
14099Description
14100
14101hash
14102
14103TPMI_ALG_HASH
14104
14105the hash algorithm used in the signature process
14106TPM_ALG_NULL is not allowed.
14107
14108sig
14109
14110TPM2B_PUBLIC_KEY_RSA
14111
14112The signature is the size of a public key.
14113
1411411.3.3 TPMS_SIGNATURE_ECDSA
14115Table 171 — Definition of {ECC} TPMS_SIGNATURE_ECDSA Structure
14116Parameter
14117
14118Type
14119
14120Description
14121
14122hash
14123
14124TPMI_ALG_HASH
14125
14126the hash algorithm used in the signature process
14127TPM_ALG_NULL is not allowed.
14128
14129signatureR
14130
14131TPM2B_ECC_PARAMETER
14132
14133signatureS
14134
14135TPM2B_ECC_PARAMETER
14136
1413711.3.4 TPMU_SIGNATURE
14138A TPMU_SIGNATURE_COMPOSITE is a union of the various signatures that is supported by a particular
14139TPM implementation. The union allows substitution of any signature algorithm wherever a signature is
14140required in a structure. Table 172 is an illustration of a TPMU_SIGNATURE for a TPM that implements
14141both RSA and ECC signing.
14142NOTE 1
14143
14144All TPM are required to support a hash algorithm and the HMAC algorithm.
14145
14146When a symmetric algorithm is used for signing, the signing algorithm is assumed to be an HMAC based
14147on the indicated hash algorithm. The HMAC key will either be referenced as part of the usage or will be
14148implied by context.
14149NOTE 2
14150
14151The table below is illustrative. It would be modified to reflect the signatures produced by the TPM.
14152
14153Table 172 — Definition of TPMU_SIGNATURE Union <IN/OUT, S>
14154Parameter
14155
14156Type
14157
14158Selector
14159
14160Description
14161
14162rsassa
14163
14164TPMS_SIGNATURE_RSASSA
14165
14166TPM_ALG_RSASSA
14167
14168a PKCS#1v1.5 signature
14169
14170rsapss
14171
14172TPMS_SIGNATURE_RSAPSS
14173
14174TPM_ALG_RSAPSS
14175
14176a PKCS#1v2.1PSS signature
14177
14178ecdsa
14179
14180TPMS_SIGNATURE_ECDSA
14181
14182TPM_ALG_ECDSA
14183
14184an ECDSA signature
14185
14186sm2
14187
14188TPMS_SIGNATURE_ECDSA
14189
14190TPM_ALG_SM2
14191
14192same format as ECDSA
14193
14194ecdaa
14195
14196TPMS_SIGNATURE_ECDSA
14197
14198TPM_ALG_ECDAA
14199
14200same format as ECDSA
14201
14202ecschnorr
14203
14204TPMS_SIGNATURE_ECDSA
14205
14206TPM_ALG_ECSCHNORR
14207
14208same format as ECDSA
14209
14210hmac
14211
14212TPMT_HA
14213
14214TPM_ALG_HMAC
14215
14216HMAC signature (required to
14217be supported)
14218
14219any
14220
14221TPMS_SCHEME_SIGHASH
14222
14223null
14224
14225Family “2.0”
14226Level 00 Revision 00.99
14227
14228Published
14229Copyright © TCG 2006-2013
14230
14231the NULL signature
14232
14233Page 123
14234October 31, 2013
14235
14236Part 2: Structures
14237
14238Trusted Platform Module Library
14239
1424011.3.5 TPMT_SIGNATURE
14241Table 173 shows the basic algorithm-agile structure when a symmetric or asymmetric signature is
14242indicated. The sigAlg parameter indicates the algorithm used for the signature. This structure is output
14243from the attestation commands and is an input to TPM2_VerifySignature(), TPM2_PolicySigned(), and
14244TPM2_FieldUpgradeStart().
14245Table 173 — Definition of TPMT_SIGNATURE Structure
14246Parameter
14247
14248Type
14249
14250Description
14251
14252sigAlg
14253
14254+TPMI_ALG_SIG_SCHEME
14255
14256selector of the algorithm used to construct the signature
14257
14258[sigAlg]signature
14259
14260TPMU_SIGNATURE
14261
14262This shall be the actual signature information.
14263
1426411.4 Key/Secret Exchange
1426511.4.1 Introduction
14266The structures in this clause are used when a key or secret is being exchanged. The exchange may be in
1426714268
14269TPM2_StartAuthSession() where the secret is injected for salting the session,
14270
1427114272
14273TPM2_Duplicate(), TPM2_Import, or TPM2_Rewrap() where the secret is the symmetric encryption
14274key for the outer wrapper of a duplication blob, or
14275
1427614277
14278TPM2_ActivateIdentity() or TPM2_CreateIdentity() where the secret is the symmetric encryption key
14279for the credential blob.
14280
14281Particulars are described in Part 1.
1428211.4.2 TPMU_ENCRYPTED_SECRET
14283This structure is used to hold either an ephemeral public point for ECDH, an OAEP-encrypted block for
14284RSA, or a symmetrically encrypted value. This structure is defined for the limited purpose of determining
14285the size of a TPM2B_ENCRYPTED_SECRET.
14286The symmetrically encrypted value may use either CFB or XOR encryption.
14287NOTE
14288
14289Table 174 is illustrative. It would be modified depending on the algorithms supported in the TPM.
14290
14291Table 174 — Definition of TPMU_ENCRYPTED_SECRET Union <S>
14292Parameter
14293
14294Type
14295
14296Selector
14297
14298ecc[sizeof(TPMS_ECC_POINT)]
14299
14300BYTE
14301
14302TPM_ALG_ECC
14303
14304rsa[MAX_RSA_KEY_BYTES]
14305
14306BYTE
14307
14308TPM_ALG_RSA
14309
14310symmetric[sizeof(TPM2B_DIGEST)]
14311
14312BYTE
14313
14314TPM_ALG_SYMCIPHER
14315
14316keyedHash[sizeof(TPM2B_DIGEST)]
14317
14318BYTE
14319
14320TPM_ALG_KEYEDHASH
14321
14322Page 124
14323October 31, 2013
14324
14325Published
14326Copyright © TCG 2006-2013
14327
14328Description
14329
14330Any symmetrically encrypted
14331secret value will be limited to
14332be no larger than a digest.
14333
14334Family “2.0”
14335Level 00 Revision 00.99
14336
14337Trusted Platform Module Library
14338
14339Part 2: Structures
14340
1434111.4.3 TPM2B_ENCRYPTED_SECRET
14342Table 175 — Definition of TPM2B_ENCRYPTED_SECRET Structure
14343Parameter
14344
14345Type
14346
14347Description
14348
14349size
14350
14351UINT16
14352
14353size of the secret value
14354
14355secret[size] {:sizeof(TPMU_ENCRYPTED_SECRET)}
14356
14357BYTE
14358
14359secret
14360
14361Family “2.0”
14362Level 00 Revision 00.99
14363
14364Published
14365Copyright © TCG 2006-2013
14366
14367Page 125
14368October 31, 2013
14369
14370Part 2: Structures
14371
14372Trusted Platform Module Library
14373
1437412 Key/Object Complex
1437512.1 Introduction
14376An object description requires a TPM2B_PUBLIC structure and may require a TPMT_SENSITIVE
14377structure. When the structure is stored off the TPM, the TPMT_SENSITIVE structure is encrypted within a
14378TPM2B_PRIVATE structure.
14379When the object requires two components for its description, those components are loaded as separate
14380parameters in the TPM2_Load() command. When the TPM creates an object that requires both
14381components, the TPM will return them as separate parameters from the TPM2_Create() operation.
14382The TPM may produce multiple different TPM2B_PRIVATE structures for a single TPM2B_PUBLIC
14383structure. Creation of a modified TPM2B_PRIVATE structure requires that the full structure be loaded with
14384the TPM2_Load() command, modification of the TPMT_SENSITIVE data, and output of a new
14385TPM2B_PRIVATE structure.
1438612.2 Public Area Structures
1438712.2.1 Description
14388This clause defines the TPM2B_PUBLIC structure and the higher-level substructure that may be
14389contained in a TPM2B_PUBLIC. The higher-level structures that are currently defined for inclusion in a
14390TPM2B_PUBLIC are the
1439114392
14393structures for asymmetric keys,
14394
1439514396
14397structures for symmetric keys, and
14398
1439914400
14401structures for sealed data.
14402
1440312.2.2 TPMI_ALG_PUBLIC
14404Table 176 — Definition of (TPM_ALG_ID) TPMI_ALG_PUBLIC Type
14405Values
14406
14407Comments
14408
14409TPM_ALG_KEYEDHASH
14410
14411required of all TPM
14412
14413TPM_ALG_SYMCIPHER
14414
14415required of all TPM
14416
14417TPM_ALG_RSA
14418
14419At least one asymmetric algorithm shall be implemented.
14420
14421TPM_ALG_ECC
14422
14423At least one asymmetric algorithm shall be implemented.
14424
14425#TPM_RC_TYPE
14426
14427response code when a public type is not supported
14428
1442912.2.3 Type-Specific Parameters
1443012.2.3.1
14431
14432Description
14433
14434The public area contains two fields (parameters and unique) that vary by object type. The parameters
14435field varies according to the type of the object but the contents may be the same across multiple
14436instances of a particular type. The unique field format also varies according to the type of the object and
14437will also be unique for each instance.
14438
14439Page 126
14440October 31, 2013
14441
14442Published
14443Copyright © TCG 2006-2013
14444
14445Family “2.0”
14446Level 00 Revision 00.99
14447
14448Trusted Platform Module Library
14449
14450Part 2: Structures
14451
14452For a symmetric key (type == TPM_ALG_SYMCIPHER), HMAC key (type == TPM_ALG_KEYEDHASH)
14453or data object (also, type == TPM_ALG_KEYEDHASH), the contents of unique shall be computed from
14454components of the sensitive area of the object as follows:
14455
14456unique ≔ HnameAlg(seedValue || sensitive)
14457
14458(8)
14459
14460where
14461
14462HnameAlg()
14463
14464the hash algorithm used to compute the Name of the object
14465
14466seedValue
14467
14468the digest-sized obfuscation value in the sensitive area of a symmetric
14469key
14470or
14471symmetric
14472data
14473object
14474found
14475in
14476a
14477TPMT_SENSITIVE.seedValue.buffer
14478
14479sensitive
14480
14481the
14482secret
14483key/data
14484of
14485TPMT_SENSITIVE.sensitive.any.buffer
14486
1448712.2.3.2
14488
14489the
14490
14491object
14492
14493in
14494
14495the
14496
14497TPMU_PUBLIC_ID
14498Table 177 — Definition of TPMU_PUBLIC_ID Union <IN/OUT, S>
14499
14500Parameter
14501
14502Type
14503
14504Selector
14505
14506keyedHash
14507
14508TPM2B_DIGEST
14509
14510TPM_ALG_KEYEDHASH
14511
14512sym
14513
14514TPM2B_DIGEST
14515
14516TPM_ALG_SYMCIPHER
14517
14518rsa
14519
14520TPM2B_PUBLIC_KEY_RSA
14521
14522TPM_ALG_RSA
14523
14524ecc
14525
14526TPMS_ECC_POINT
14527
14528TPM_ALG_ECC
14529
1453012.2.3.3
14531
14532Description
14533
14534TPMS_KEYEDHASH_PARMS
14535
14536This structure describes the parameters that would appear in the public area of a KEYEDHASH object.
14537Note
14538
14539Although the names are the same, the types of the structures are not the same as for asymmetric
14540parameter lists.
14541
14542Table 178 — Definition of TPMS_KEYEDHASH_PARMS Structure
14543Parameter
14544
14545Type
14546
14547Description
14548
14549scheme
14550
14551TPMT_KEYEDHASH_SCHEME+
14552
14553Indicates the signing method used for a keyedHash signing
14554object. This field also determines the size of the data field for a
14555data object created with TPM2_Create(). This field shall not be set
14556to TPM_ALG_NULL in a template if either sign or encrypt is SET.
14557
1455812.2.3.4
14559
14560TPMS_ASYM_PARMS
14561
14562This structure contains the common public area parameters for an asymmetric key. The first two
14563parameters of the parameter definition structures of an asymmetric key shall have the same two first
14564components.
14565NOTE
14566
14567The sign parameter may have a different type in order to allow different schemes to be selected for each
14568asymmetric type but the first parameter of each scheme definition shall be a TPM_ALG_ID for a valid
14569signing scheme.
14570
14571Family “2.0”
14572Level 00 Revision 00.99
14573
14574Published
14575Copyright © TCG 2006-2013
14576
14577Page 127
14578October 31, 2013
14579
14580Part 2: Structures
14581
14582Trusted Platform Module Library
14583Table 179 — Definition of TPMS_ASYM_PARMS Structure <>
14584
14585Parameter
14586
14587Type
14588
14589Description
14590
14591symmetric
14592
14593TPMT_SYM_DEF_OBJECT+
14594
14595the companion symmetric algorithm for a restricted
14596decryption key and shall be set to a supported symmetric
14597algorithm
14598This field is optional for keys that are not decryption keys
14599and shall be set to TPM_ALG_NULL if not used.
14600
14601scheme
14602
14603TPMT_ASYM_SCHEME+
14604
14605for a key with the sign attribute SET, a valid signing
14606scheme for the key type
14607for a key with the decrypt attribute SET, a valid key
14608exchange protocol
14609for a key with sign and decrypt attributes, shall be TPM_ALG_NULL
14610
1461112.2.3.5
14612
14613TPMS_RSA_PARMS
14614
14615A TPM compatible with this specification and supporting RSA shall support numPrimes of two and an
14616exponent of zero. Support for other values is optional. Use of other exponents in duplicated keys is not
14617recommended because the resulting keys would not be interoperable with other TPMs.
14618NOTE 1
14619
14620Implementations are not required to check that exponent is the default exponent. They may fail to load the
14621key if exponent is not zero. The reference implementation allows the values listed in the table.
14622
14623Table 180 — Definition of {RSA} TPMS_RSA_PARMS Structure
14624Parameter
14625
14626Type
14627
14628Description
14629
14630symmetric
14631
14632TPMT_SYM_DEF_OBJECT+
14633
14634for a restricted decryption key, shall be set to a
14635supported symmetric algorithm, key size, and mode.
14636if the key is not a restricted decryption key, this field
14637shall be set to TPM_ALG_NULL.
14638
14639scheme
14640
14641TPMT_RSA_SCHEME+
14642
14643
14644keyBits
14645
14646TPMI_RSA_KEY_BITS
14647
14648number of bits in the public modulus
14649
14650exponent
14651UINT32
14652
14653the public exponent
14654A prime number greater than 2.
14655When zero, indicates that the exponent is the default
1465616
14657of 2 + 1
14658
14659#TPM_RC_KEY_SIZE
14660
14661#TPM_RC_VALUE
14662
14663Page 128
14664October 31, 2013
14665
14666Published
14667Copyright © TCG 2006-2013
14668
14669Family “2.0”
14670Level 00 Revision 00.99
14671
14672Trusted Platform Module Library
1467312.2.3.6
14674
14675Part 2: Structures
14676
14677TPMS_ECC_PARMS
14678
14679This structure contains the parameters for prime modulus ECC.
14680Table 181 — Definition of {ECC} TPMS_ECC_PARMS Structure
14681Parameter
14682
14683Type
14684
14685Description
14686
14687symmetric
14688
14689TPMT_SYM_DEF_OBJECT+
14690
14691for a restricted decryption key, shall be set to a supported
14692symmetric algorithm, key size. and mode.
14693if the key is not a restricted decryption key, this field shall be
14694set to TPM_ALG_NULL.
14695
14696scheme
14697
14698TPMT_ECC_SCHEME+
14699
14700If the sign attribute of the key is SET, then this shall be a valid
14701signing scheme.
14702NOTE
14703
14704If the sign parameter in curveID indicates a mandatory
14705scheme, then this field shall have the same value.
14706
14707curveID
14708TPMI_ECC_CURVE
14709
14710ECC curve ID
14711
14712kdf
14713
14714TPMT_KDF_SCHEME+
14715
14716
1471712.2.3.7
14718
14719There are currently no commands where this parameter
14720has effect and, in the reference code, this field needs to
14721be set to TPM_ALG_NULL.
14722
14723TPMU_PUBLIC_PARMS
14724
14725Table 182 defines the possible parameter definition structures that may be contained in the public portion
14726of a key.
14727Table 182 — Definition of TPMU_PUBLIC_PARMS Union <IN/OUT, S>
14728Parameter
14729
14730Type
14731
14732(1)
14733
14734Selector
14735
14736Description
14737
14738keyedHashDetail
14739
14740TPMS_KEYEDHASH_PARMS
14741
14742TPM_ALG_KEYEDHASH
14743
14744sign | encrypt | neither
14745
14746symDetail
14747
14748TPMS_SYMCIPHER_PARMS
14749
14750TPM_ALG_SYMCIPHER
14751
14752a symmetric block cipher
14753
14754rsaDetail
14755
14756TPMS_RSA_PARMS
14757
14758TPM_ALG_RSA
14759
14760decrypt + sign
14761
14762(2)
14763
14764eccDetail
14765
14766TPMS_ECC_PARMS
14767
14768TPM_ALG_ECC
14769
14770decrypt + sign
14771
14772(2)
14773
14774asymDetail
14775
14776TPMS_ASYM_PARMS
14777
14778common scheme structure
14779for RSA and ECC keys
14780
14781NOTES
147821)
14783
14784Description column indicates which of TPMA_OBJECT.decrypt or TPMA_OBJECT.sign may be set.
14785
147862)
14787
14788“+” indicates that both may be set but one shall be set. “|” indicates the optional settings.
14789
14790Family “2.0”
14791Level 00 Revision 00.99
14792
14793Published
14794Copyright © TCG 2006-2013
14795
14796Page 129
14797October 31, 2013
14798
14799Part 2: Structures
1480012.2.3.8
14801
14802Trusted Platform Module Library
14803
14804TPMT_PUBLIC_PARMS
14805
14806This structure is used in TPM2_TestParms() to validate that a set of algorithm parameters is supported by
14807the TPM.
14808Table 183 — Definition of TPMT_PUBLIC_PARMS Structure
14809Parameter
14810
14811Type
14812
14813Description
14814
14815type
14816
14817TPMI_ALG_PUBLIC
14818
14819the algorithm to be tested
14820
14821[type]parameters
14822
14823TPMU_PUBLIC_PARMS
14824 the algorithm details
14825
1482612.2.4 TPMT_PUBLIC
14827Table 184 defines the public area structure. The Name of the object is nameAlg concatenated with the
14828digest of this structure using nameAlg.
14829Table 184 — Definition of TPMT_PUBLIC Structure
14830Parameter
14831
14832Type
14833
14834Description
14835
14836type
14837
14838TPMI_ALG_PUBLIC
14839
14840“algorithm” associated with this object
14841
14842nameAlg
14843
14844+TPMI_ALG_HASH
14845
14846algorithm used for computing the Name of the object
14847NOTE
14848
14849The "+" indicates that the instance of a TPMT_PUBLIC may have
14850a "+" to indicate that the nameAlg may be TPM_ALG_NULL.
14851
14852objectAttributes
14853
14854TPMA_OBJECT
14855
14856attributes that, along with type, determine the manipulations of this
14857object
14858
14859authPolicy
14860
14861TPM2B_DIGEST
14862
14863optional policy for using this key
14864The policy is computed using the nameAlg of the object.
14865NOTE
14866
14867Shall be the Empty Buffer if no authorization policy is present.
14868
14869[type]parameters
14870
14871TPMU_PUBLIC_PARMS
14872
14873the algorithm or structure details
14874
14875[type]unique
14876
14877TPMU_PUBLIC_ID
14878
14879Page 130
14880October 31, 2013
14881
14882the unique identifier of the structure
14883For an asymmetric key, this would be the public key.
14884
14885Published
14886Copyright © TCG 2006-2013
14887
14888Family “2.0”
14889Level 00 Revision 00.99
14890
14891Trusted Platform Module Library
14892
14893Part 2: Structures
14894
1489512.2.5 TPM2B_PUBLIC
14896This sized buffer is used to embed a TPMT_PUBLIC in a command.
14897Table 185 — Definition of TPM2B_PUBLIC Structure
14898Parameter
14899
14900Type
14901
14902Description
14903
14904size=
14905
14906UINT16
14907
14908size of publicArea
14909NOTE
14910
14911publicArea
14912
14913+TPMT_PUBLIC
14914
14915The “=” will force the TPM to try to unmarshal a
14916TPMT_PUBLIC and check that the unmarshaled size
14917matches the value of size. If all the required fields of
14918a TPMT_PUBLIC are not present, the TPM will return
14919an error (generally TPM_RC_SIZE) when attempting
14920to unmarshal the TPMT_PUBLIC.
14921
14922the public area
14923NOTE
14924
14925The “+” indicates that the caller may specify that use
14926of TPM_ALG_NULL is allowed for nameAlg.
14927
1492812.3 Private Area Structures
1492912.3.1 Introduction
14930The structures in 12.3 define the contents and construction of the private portion of a TPM object. A
14931TPM2B_PRIVATE along with a TPM2B_PUBLIC are needed to describe a TPM object.
14932A TPM2B_PRIVATE area may be encrypted by different symmetric algorithms or, in some cases, not
14933encrypted at all.
1493412.3.2 Sensitive Data Structures
1493512.3.2.1
14936
14937Introduction
14938
14939The structures in 12.3.2 define the presumptive internal representations of the sensitive areas of the
14940various entities. A TPM may store the sensitive information in any desired format but when constructing a
14941TPM_PRIVATE, the formats in this clause shall be used.
1494212.3.2.2
14943
14944TPM2B_PRIVATE_VENDOR_SPECIFIC
14945
14946This structure is defined for coding purposes. For IO to the TPM, the sensitive portion of the key will be in
14947a canonical form. For an RSA key, this will be one of the prime factors of the public modulus. After
14948loading, it is typical that other values will be computed so that computations using the private key will not
14949need to start with just one prime factor. This structure allows the vendor-specific structure to use the
14950space of the
14951The value for RSA_VENDOR_SPECIFIC is determined by the vendor.
14952Table 186 — Definition of {RSA} TPM2B_PRIVATE_VENDOR_SPECIFIC Structure<>
14953Parameter
14954
14955Type
14956
14957size
14958
14959UINT16
14960
14961buffer[size]{:PRIVATE_VENDOR_SPECIFIC_BYTES}
14962
14963BYTE
14964
14965Family “2.0”
14966Level 00 Revision 00.99
14967
14968Published
14969Copyright © TCG 2006-2013
14970
14971Description
14972
14973Page 131
14974October 31, 2013
14975
14976Part 2: Structures
1497712.3.2.3
14978
14979Trusted Platform Module Library
14980
14981TPMU_SENSITIVE_COMPOSITE
14982Table 187 — Definition of TPMU_SENSITIVE_COMPOSITE Union <IN/OUT, S>
14983
14984Parameter
14985
14986Type
14987
14988Selector
14989
14990Description
14991
14992rsa
14993
14994TPM2B_PRIVATE_KEY_RSA
14995
14996TPM_ALG_RSA
14997
14998a prime factor of the public
14999key
15000
15001ecc
15002
15003TPM2B_ECC_PARAMETER
15004
15005TPM_ALG_ECC
15006
15007the integer private key
15008
15009bits
15010
15011TPM2B_SENSITIVE_DATA
15012
15013TPM_ALG_KEYEDHASH
15014
15015the private data
15016
15017sym
15018
15019TPM2B_SYM_KEY
15020
15021TPM_ALG_SYMCIPHER
15022
15023the symmetric key
15024
15025any
15026
15027TPM2B_PRIVATE_VENDOR_SPECIFIC
15028
1502912.3.2.4
15030
15031vendor-specific size for key
15032storage
15033
15034TPMT_SENSITIVE
15035Table 188 — Definition of TPMT_SENSITIVE Structure
15036
15037Parameter
15038
15039Type
15040
15041Description
15042
15043sensitiveType
15044
15045TPMI_ALG_PUBLIC
15046
15047identifier for the sensitive area
15048This shall be the same as the type parameter of the
15049associated public area.
15050
15051authValue
15052
15053TPM2B_AUTH
15054
15055user authorization data
15056The authValue may be a zero-length string.
15057This value shall not be larger than the size of the
15058digest produced by the nameAlg of the object.
15059
15060seedValue
15061
15062TPM2B_DIGEST
15063
15064for asymmetric key object, the optional protection
15065seed; for other objects, the obfuscation value
15066This value shall not be larger than the size of the
15067digest produced by nameAlg of the object.
15068
15069[sensitiveType]sensitive
15070
15071TPMU_SENSITIVE_COMPOSITE
15072
15073the type-specific private data
15074
1507512.3.3 TPM2B_SENSITIVE
15076The TPM2B_SENSITIVE structure is used as a parameter in TPM2_LoadExternal(). It is an unencrypted
15077sensitive area but it may be encrypted using parameter encryption.
15078NOTE
15079
15080When this structure is unmarshaled, the size of the sensitiveType determines what type of value is
15081unmarshaled. Each value of sensitiveType is associated with a TPM2B. It is the maximum size for each of
15082the TPM2B values will determine if the unmarshal operation is successful . Since there is no selector for
15083the any or vendor options for the union, the maximum input and output sizes for a TMP2B_SENSITIVE
15084are not affected by the sizes of those parameters.
15085
15086Table 189 — Definition of TPM2B_SENSITIVE Structure <IN/OUT>
15087Parameter
15088
15089Type
15090
15091Description
15092
15093size
15094
15095UINT16
15096
15097size of the private structure
15098
15099sensitiveArea
15100
15101TPMT_SENSITIVE
15102
15103an unencrypted sensitive area
15104
15105Page 132
15106October 31, 2013
15107
15108Published
15109Copyright © TCG 2006-2013
15110
15111Family “2.0”
15112Level 00 Revision 00.99
15113
15114Trusted Platform Module Library
15115
15116Part 2: Structures
15117
1511812.3.4 Encryption
15119A 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.
15120The method of generating the key and IV is described in “Protected Storage” subclause “Symmetric
15121Encryption.” in Part 1.
1512212.3.5 Integrity
15123The integrity computation is used to ensure that a protected object is modified when stored in memory
15124outside of the TPM.
15125The method of protecting the integrity of the sensitive area is described in “Protected Storage” subclause
15126“Integrity” in Part 1.
1512712.3.6 _PRIVATE
15128This structure is defined to size the contents of a TPM2B_PRIVATE. This structure is not directly
15129marshaled or unmarshaled.
15130For TPM2_Duplicate() and TPM2_Import(), the TPM2B_PRIVATE may contain multiply encrypted data
15131and two integrity values. In some cases, the sensitive data is not encrypted and the integrity value is not
15132present.
15133For TPM2_Load() and TPM2_Create(), integrityInner is always present.
15134If integrityInner is present, it and sensitive are encrypted as a single block.
15135When an integrity value is not needed, it is not present and it is not represented by an Empty Buffer.
15136Table 190 — Definition of _PRIVATE Structure <>
15137Parameter
15138
15139Type
15140
15141Description
15142
15143integrityOuter
15144
15145TPM2B_DIGEST
15146
15147integrityInner
15148
15149TPM2B_DIGEST
15150
15151could also be a TPM2B_IV
15152
15153sensitive
15154
15155TPMT_SENSITIVE
15156
15157the sensitive area
15158
1515912.3.7 TPM2B_PRIVATE
15160The TPM2B_PRIVATE structure is used as a parameter in multiple commands that create, load, and
15161modify the sensitive area of an object.
15162Table 191 — Definition of TPM2B_PRIVATE Structure <IN/OUT, S>
15163Parameter
15164
15165Type
15166
15167Description
15168
15169size
15170
15171UINT16
15172
15173size of the private structure
15174
15175buffer[size] {:sizeof(_PRIVATE)}
15176
15177BYTE
15178
15179an encrypted private area
15180
15181Family “2.0”
15182Level 00 Revision 00.99
15183
15184Published
15185Copyright © TCG 2006-2013
15186
15187Page 133
15188October 31, 2013
15189
15190Part 2: Structures
15191
15192Trusted Platform Module Library
15193
1519412.4 Identity Object
1519512.4.1 Description
15196An identity object is used to convey credential protection value (CV) to a TPM that can load the object
15197associated with the object. The CV is encrypted to a storage key on the target TPM, and if the credential
15198integrity checks and the proper object is loaded in the TPM, then the TPM will return the CV.
1519912.4.2 _ID_OBJECT
15200This structure is used for sizing the TPM2_ID_OBJECT.
15201Table 192 — Definition of _ID_OBJECT Structure <>
15202Parameter
15203
15204Type
15205
15206Description
15207
15208integrityHMAC
15209
15210TPM2B_DIGEST
15211
15212encIdentity
15213
15214TPM2B_DIGEST
15215
15216credential protector information returned if name matches the
15217referenced object
15218All of the encIdentity is encrypted, including the size field.
15219NOTE
15220
15221The TPM is not required to check that the size is not larger
15222than the digest of the nameAlg. However, if the size is
15223larger, the ID object may not be usable on a TPM that has
15224no digest larger than produced by nameAlg.
15225
1522612.4.3 TPM2B_ID_OBJECT
15227This structure is an output from TPM2_MakeCredential() and is an input to TPM2_ActivateCredential().
15228Table 193 — Definition of TPM2B_ID_OBJECT Structure <IN/OUT>
15229Parameter
15230
15231Type
15232
15233Description
15234
15235size
15236
15237UINT16
15238
15239size of the credential structure
15240
15241credential[size]{:sizeof(_ID_OBJECT)}
15242
15243BYTE
15244
15245an encrypted credential area
15246
15247Page 134
15248October 31, 2013
15249
15250Published
15251Copyright © TCG 2006-2013
15252
15253Family “2.0”
15254Level 00 Revision 00.99
15255
15256Trusted Platform Module Library
15257
15258Part 2: Structures
15259
1526013 NV Storage Structures
1526113.1 TPM_NV_INDEX
15262A TPM_NV_INDEX is used to reference a defined location in NV memory. The format of the Index is
15263changed from TPM 1.2 in order to include the Index in the reserved handle space. Handles in this range
15264use the digest of the public area of the Index as the Name of the entity in authorization computations
15265The 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
15266available in the reserved handle space, the Index value format is changed as shown in Figure 5.
152673 3 2 2 2 2 2 2 2
152681 0 9 8 7 6 5 4 3
15269
152701 1
152716 5
15272
15273T P U D reserved
15274
152750
152760
15277
15278Purview
15279
15280Index
15281
15282Figure 4 — TPM 1.2 TPM_NV_INDEX
152833
152841
15285
152862 2
152874 3
15288
152890
152900
15291
15292TPM_HT_NV_INDEX
15293
15294Index
15295
15296Figure 5 — TPM 2.0 TPM_NV_INDEX
15297NOTE
15298
15299This TPM_NV_INDEX format does not retain the Purview field and the D bit is not a part of an Index
15300handle as in TPM 1.2. The TPMA_NV_PLATFORMCREATE attribute is a property of an Index that
15301provides functionality similar to the D bit.
15302
15303A valid Index handle will have an MSO of TPM_HT_NV_INDEX.
15304NOTE
15305
15306This structure is not used. It is defined here to indicate how the fields of the handle are assigned. The
15307exemplary unmarshaling code unmarshals a TPM_HANDLE and validates that it is in the range for a
15308TPM_NV_INDEX.
15309
15310Table 194 — Definition of (UINT32) TPM_NV_INDEX Bits <>
15311Bit
15312
15313Name
15314
15315Definition
15316
1531723:0
15318
15319index
15320
15321The index of the NV location
15322
1532331:24
15324
15325RH_NV
15326
15327constant value of TPM_HT_NV_INDEX indicating the NV Index range
15328
15329#TPM_RC_VALUE
15330
15331response code returned if unmarshaling of this type fails because the handle
15332value is incorrect
15333
15334Family “2.0”
15335Level 00 Revision 00.99
15336
15337Published
15338Copyright © TCG 2006-2013
15339
15340Page 135
15341October 31, 2013
15342
15343Part 2: Structures
15344
15345Trusted Platform Module Library
15346Table 195 — Options for space Field of TPM_NV_INDEX
15347
15348Some prior versions of this specification contained a table here that assigned subsets of the index field to
15349different entities. Since this assignment was a convention and not an architectural element of the TPM,
15350the table was removed and the information is now contained in a registry document that is maintained by
15351the TCG.
1535213.2 TPMA_NV (NV Index Attributes)
15353This structure allows the TPM to keep track of the data and permissions to manipulate an NV Index.
15354The platform controls (TPMA_NV_PPWRITE and TPMA_NV_PPREAD) and owner controls
15355(TPMA_NV_OWNERWRITE and TPMA_NV_OWNERREAD) give the platform and owner access to NV
15356Indexes using platformAuth or ownerAuth rather than the authValue or authPolicy of the Index.
15357If access to an NV Index is to be restricted based on PCR, then an appropriate authPolicy shall be
15358provided.
15359NOTE
15360
15361platformAuth or ownerAuth can be provided in any type of authorization session or as a password.
15362
15363If TPMA_NV_AUTHREAD is SET, then the Index may be read if the Index authValue is provided. If
15364TPMA_NV_POLICYREAD is SET, then the Index may be read if the Index authPolicy is satisfied.
15365At least one of TPMA_NV_PPREAD,
15366TPMA_NV_POLICYREAD shall be SET.
15367
15368TPMA_NV_OWNERREAD,
15369
15370TPMA_NV_AUTHREAD,
15371
15372or
15373
15374If TPMA_NV_AUTHWRITE is SET, then the Index may be written if the Index authValue is provided. If
15375TPMA_NV_POLICYWRITE is SET, then the Index may be written if the Index authPolicy is satisfied.
15376At least one of TPMA_NV_PPWRITE, TPMA_NV_OWNERWRITE TPMA_NV_AUTHWRITE, or
15377TPMA_NV_POLICYWRITE shall be SET.
15378If TPMA_NV_WRITELOCKED is SET, then the Index may not be written. If TPMA_NV_WRITEDEFINE is
15379SET, TPMA_NV_WRITELOCKED may not be CLEAR except by deleting and redefining the Index. If
15380TPMA_NV_WRITEDEFINE is CLEAR, then TPMA_NV_WRITELOCK will be CLEAR on the next
15381TPM2_Startup(TPM_SU_CLEAR).
15382If TPMA_NV_READLOCKED is SET, then the Index may not be read. TPMA_NV_READLOCK will be
15383CLEAR on the next TPM2_Startup(TPM_SU_CLEAR).
15384NOTE
15385
15386The TPM is expected to maintain indicators to indicate that the Index is temporarily locked. The state of
15387these indicators is reported in the TPMA_NV_READLOCKED and TPMA_NV_WRITELOCKED attributes.
15388
15389If TPMA_NV_EXTEND is SET, then writes to the Index will cause an update of the Index using the extend
15390operation with the nameAlg used to create the digest.
15391Only one of TPMA_NV_EXTEND, TPMA_NV_COUNTER, or TPMA_NV_BITS may be set.
15392When
15393the
15394Index
15395is
15396created
15397(TPM2_NV_DefineSpace()),
15398TPMA_NV_WRITELOCKED,
15399TPMA_NV_READLOCKED, TPMA_NV_WRITTEN shall all be CLEAR in the parameter that defines the
15400attributes of the created Index.
15401
15402Page 136
15403October 31, 2013
15404
15405Published
15406Copyright © TCG 2006-2013
15407
15408Family “2.0”
15409Level 00 Revision 00.99
15410
15411Trusted Platform Module Library
15412
15413Part 2: Structures
15414
15415Table 196 — Definition of (UINT32) TPMA_NV Bits
15416Bit
15417
15418Name
15419
15420Description
15421
154220
15423
15424TPMA_NV_PPWRITE
15425
15426SET (1): The Index data can be written if platformAuth is provided.
15427CLEAR (0): Writing of the Index data cannot be authorized with
15428platformAuth.
15429
154301
15431
15432TPMA_NV_OWNERWRITE
15433
15434SET (1): The Index data can be written if ownerAuth is provided.
15435CLEAR (0): Writing of the Index data cannot be authorized with
15436ownerAuth.
15437
154382
15439
15440TPMA_NV_AUTHWRITE
15441
15442SET (1): Authorizations to change the Index contents that require
15443USER role may be provided with an HMAC session or password.
15444CLEAR (0): Authorizations to change the Index contents that require
15445USER role may not be provided with an HMAC session or password.
15446
154473
15448
15449TPMA_NV_POLICYWRITE
15450
15451SET (1): Authorizations to change the Index contents that require
15452USER role may be provided with a policy session.
15453CLEAR (0): Authorizations to change the Index contents that require
15454USER role may not be provided with a policy session.
15455NOTE
15456
15457TPM2_NV_ChangeAuth() always requires that authorization be
15458provided in a policy session.
15459
154604
15461
15462TPMA_NV_COUNTER
15463
15464SET (1): Index contains an 8-octet value that is to be used as a
15465counter and can only be modified with TPM2_NV_Increment().
15466CLEAR (0): The Index is not a counter.
15467
154685
15469
15470TPMA_NV_BITS
15471
15472SET (1): Index contains an 8-octet value to be used as a bit field and
15473can only be modified with TPM2_NV_SetBits().
15474CLEAR (0): The Index is not a bit field.
15475
154766
15477
15478TPMA_NV_EXTEND
15479
15480SET (1): Index contains a digest-sized value used like a PCR. The
15481Index may only be modified using TPM2_NV_Extend. The extend will
15482use the nameAlg of the Index.
15483CLEAR (0): Index is not a PCR.
15484
154859:7
15486
15487Reserved
15488
15489shall be zero
15490reserved for use in defining additional write controls
15491
1549210
15493
15494TPMA_NV_POLICY_DELETE
15495
15496SET (1): Index may not be deleted unless the authPolicy is satisfied.
15497CLEAR (0): Index may be deleted with proper platform or owner
15498authorization.
15499
1550011
15501
15502TPMA_NV_WRITELOCKED
15503
15504SET (1): Index cannot be written.
15505CLEAR (0): Index can be written.
15506
1550712
15508
15509TPMA_NV_WRITEALL
15510
15511SET (1): A partial write of the Index data is not allowed. The write
15512size shall match the defined space size.
15513CLEAR (0): Partial writes are allowed. This setting is required if
15514TPMA_NV_BITS is SET.
15515
1551613
15517
15518TPMA_NV_WRITEDEFINE
15519
15520SET (1): TPM2_NV_WriteLock() may be used to prevent further
15521writes to this location.
15522CLEAR (0): TPM2_NV_WriteLock() does not block subsequent
15523writes.
15524
1552514
15526
15527TPMA_NV_WRITE_STCLEAR
15528
15529SET (1): TPM2_NV_WriteLock() may be used to prevent further
15530writes to this location until the next TPM Reset or TPM Restart.
15531CLEAR (0): A write to this Index with a data size of zero does not
15532change the write access.
15533
15534Family “2.0”
15535Level 00 Revision 00.99
15536
15537Published
15538Copyright © TCG 2006-2013
15539
15540Page 137
15541October 31, 2013
15542
15543Part 2: Structures
15544
15545Trusted Platform Module Library
15546
15547Bit
15548
15549Name
15550
15551Description
15552
1555315
15554
15555TPMA_NV_GLOBALLOCK
15556
15557SET (1): If TPM2_NV_GlobalWriteLock() is successful, then further
15558writes to this location are not permitted until the next TPM Reset or
15559TPM Restart.
15560CLEAR (0): TPM2_NV_GlobalWriteLock() has no effect on the
15561writing of the data at this Index.
15562
1556316
15564
15565TPMA_NV_PPREAD
15566
15567SET (1): The Index data can be read if platformAuth is provided.
15568CLEAR (0): Reading of the Index data cannot be authorized with
15569platformAuth.
15570
1557117
15572
15573TPMA_NV_OWNERREAD
15574
15575SET (1): The Index data can be read if ownerAuth is provided.
15576CLEAR (0): Reading of the Index data cannot be authorized with
15577ownerAuth.
15578
1557918
15580
15581TPMA_NV_AUTHREAD
15582
15583SET (1): The Index data may be read if the authValue is provided.
15584CLEAR (0): Reading of the Index data cannot be authorized with the
15585Index authValue.
15586
1558719
15588
15589TPMA_NV_POLICYREAD
15590
15591SET (1): The Index data may be read if the authPolicy is satisfied.
15592CLEAR (0): Reading of the Index data cannot be authorized with the
15593Index authPolicy.
15594
15595Reserved
15596
15597shall be zero
15598reserved for use in defining additional read controls
15599
1560025
15601
15602TPMA_NV_NO_DA
15603
15604SET (1): Authorization failures of the Index do not affect the DA logic
15605and authorization of the Index is not blocked when the TPM is in
15606Lockout mode.
15607CLEAR (0): Authorization failures of the Index will increment the
15608authorization failure counter and authorizations of this Index are not
15609allowed when the TPM is in Lockout mode.
15610
1561126
15612
15613TPMA_NV_ORDERLY
15614
15615SET (1): NV Index state is only required to be saved when the TPM
15616performs an orderly shutdown (TPM2_Shutdown()). Only an Index
15617with TPMA_NV_COUNTER SET may have this setting.
15618CLEAR (0): NV Index state is required to be persistent after the
15619command to update the Index completes successfully (that is, the NV
15620update is synchronous with the update command).
15621
1562227
15623
15624TPMA_NV_CLEAR_STCLEAR
15625
15626SET (1): TPMA_NV_WRITTEN for the Index is CLEAR by TPM
15627Reset or TPM Restart.
15628CLEAR (0): TPMA_NV_WRITTEN is not changed by TPM Restart.
15629
1563024:20
15631
15632NOTE
15633
15634This attribute may only be SET if TPMA_NV_COUNTER is not
15635SET.
15636
15637NOTE
15638
15639If the TPMA_NV_ORDERLY is SET, TPMA_NV_WRITTEN will
15640be CLEAR by TPM Reset.
15641
1564228
15643
15644TPMA_NV_READLOCKED
15645
15646SET (1): Reads of the Index are blocked until the next TPM Reset or
15647TPM Restart.
15648CLEAR (0): Reads of the Index are allowed if proper authorization is
15649provided.
15650
1565129
15652
15653TPMA_NV_WRITTEN
15654
15655SET (1): Index has been written.
15656CLEAR (0): Index has not been written.
15657
1565830
15659
15660TPMA_NV_PLATFORMCREATE
15661
15662SET (1): This Index may be undefined with platformAuth but not with
15663ownerAuth.
15664CLEAR (0): This Index may be undefined using ownerAuth but not
15665with platformAuth.
15666The TPM will validate that this attribute is SET when the Index is
15667defined using platformAuth and will validate that this attribute is
15668CLEAR when the Index is defined using ownerAuth.
15669
15670Page 138
15671October 31, 2013
15672
15673Published
15674Copyright © TCG 2006-2013
15675
15676Family “2.0”
15677Level 00 Revision 00.99
15678
15679Trusted Platform Module Library
15680
15681Part 2: Structures
15682
15683Bit
15684
15685Name
15686
15687Description
15688
1568931
15690
15691TPMA_NV_READ_STCLEAR
15692
15693SET (1): TPM2_NV_ReadLock() may be used to SET
15694TPMA_NV_READLOCKED for this Index.
15695CLEAR (0): TPM2_NV_ReadLock() has no effect on this Index.
15696
1569713.3 TPMS_NV_PUBLIC
15698This structure describes an NV Index.
15699Table 197 — Definition of TPMS_NV_PUBLIC Structure
15700Name
15701
15702Type
15703
15704Description
15705
15706nvIndex
15707
15708TPMI_RH_NV_INDEX
15709
15710the handle of the data area
15711
15712nameAlg
15713
15714TPMI_ALG_HASH
15715
15716hash algorithm used to compute the name of the
15717Index and used for the authPolicy
15718
15719attributes
15720
15721TPMA_NV
15722
15723the Index attributes
15724
15725authPolicy
15726
15727TPM2B_DIGEST
15728
15729the access policy for the Index
15730
15731dataSize{:MAX_NV_INDEX_SIZE}
15732
15733UINT16
15734
15735the size of the data area
15736The
15737maximum
15738size is implementationdependent. The minimum maximum size is
15739platform-specific.
15740
15741#TPM_RC_SIZE
15742
15743response code returned when the requested size
15744is too large for the implementation
15745
1574613.4 TPM2B_NV_PUBLIC
15747This structure is used when a TPMS_NV_PUBLIC is sent on the TPM interface.
15748Table 198 — Definition of TPM2B_NV_PUBLIC Structure
15749Name
15750
15751Type
15752
15753Description
15754
15755size=
15756
15757UINT16
15758
15759size of nvPublic
15760
15761nvPublic
15762
15763TPMS_NV_PUBLIC
15764
15765the public area
15766
15767Family “2.0”
15768Level 00 Revision 00.99
15769
15770Published
15771Copyright © TCG 2006-2013
15772
15773Page 139
15774October 31, 2013
15775
15776Part 2: Structures
15777
15778Trusted Platform Module Library
15779
1578014 Context Data
1578114.1 Introduction
15782This clause defines the contents of the
15783TPM2_ContextLoad() command parameters.
15784
15785TPM2_ContextSave()
15786
15787response
15788
15789parameters
15790
15791and
15792
15793If the parameters provided by the caller in TPM2_ContextLoad() do not match the values returned by the
15794TPM when the context was saved, the integrity check of the TPM2B_CONTEXT will fail and the object or
15795session will not be loaded.
1579614.2 TPM2B_CONTEXT_SENSITIVE
15797This structure holds the object or session context data. When saved, the full structure is encrypted.
15798Table 199 — Definition of TPM2B_CONTEXT_SENSITIVE Structure <IN/OUT>
15799Parameter
15800
15801Type
15802
15803size
15804
15805Description
15806
15807UINT16
15808
15809buffer[size]{:MAX_CONTEXT_SIZE}
15810BYTE
15811
15812the sensitive data
15813
1581414.3 TPMS_CONTEXT_DATA
15815This structure holds the integrity value and the encrypted data for a context.
15816Table 200 — Definition of TPMS_CONTEXT_DATA Structure <IN/OUT, S>
15817Parameter
15818
15819Type
15820
15821Description
15822
15823integrity
15824
15825TPM2B_DIGEST
15826
15827the integrity value
15828
15829encrypted
15830
15831TPM2B_CONTEXT_SENSITIVE
15832
15833the sensitive area
15834
1583514.4 TPM2B_CONTEXT_DATA
15836This structure is used in a TPMS_CONTEXT.
15837Table 201 — Definition of TPM2B_CONTEXT_DATA Structure <IN/OUT>
15838Parameter
15839
15840Type
15841
15842size
15843
15844Description
15845
15846UINT16
15847
15848buffer[size] {:sizeof(TPMS_CONTEXT_DATA)}
15849BYTE
15850
15851Page 140
15852October 31, 2013
15853
15854Published
15855Copyright © TCG 2006-2013
15856
15857Family “2.0”
15858Level 00 Revision 00.99
15859
15860Trusted Platform Module Library
15861
15862Part 2: Structures
15863
1586414.5 TPMS_CONTEXT
15865This structure is used in TPM2_ContextLoad() and TPM2_ContextSave(). If the values of the
15866TPMS_CONTEXT structure in TPM2_ContextLoad() are not the same as the values when the context
15867was saved (TPM2_ContextSave()), then the TPM shall not load the context.
15868Saved object contexts shall not be loaded as long as the associated hierarchy is disabled.
15869Saved object contexts are invalidated when the Primary Seed of their hierarchy changes. Objects in the
15870Endorsement hierarchy are invalidated when either the EPS or SPS is changed.
15871When an object has the stClear attribute, it shall not be possible to reload the context or any descendant
15872object after a TPM Reset or TPM Restart.
15873NOTE 1
15874
15875The reference implementation prevents reloads after TPM Restart by including the curre nt value of a
15876clearCount in the saved object context. When an object is loaded, this value is compared with the current
15877value of the clearCount if the object has the stClear attribute. If the values are not the same, then the
15878object cannot be loaded.
15879
15880A sequence value is contained within the integrity-protected part of the saved context. The sequence
15881value is repeated in the sequence parameter of the TPMS_CONTEXT of the context. The sequence
15882parameter, along with other values, is used in the generation the protection values of the context.
15883If the integrity value of the context is valid, but the sequence value of the decrypted context does not
15884match the value in the sequence parameter, then TPM shall enter the failure mode because this is
15885indicative of a specific type of attack on the context values.
15886NOTE 2
15887
15888If the integrity value is correct, but the decryption fails and produces the wrong value for sequence, this
15889implies that either the TPM is faulty or an external entity is able to forge an integrity val ue for the context
15890but they have insufficient information to know what the encryption key of the context. Since the TPM
15891generated the valid context, then there is no reason for the sequence value in the context to be decrypted
15892incorrectly other than the TPM is faulty or the TPM is under attack. In either case, it is appropriate for the
15893TPM to enter failure more.
15894
15895Table 202 — Definition of TPMS_CONTEXT Structure
15896Name
15897
15898Type
15899
15900Description
15901
15902sequence
15903
15904UINT64
15905
15906the sequence number of the context
15907NOTE
15908
15909Transient object contexts and
15910contexts used different counters.
15911
15912session
15913
15914savedHandle
15915
15916TPMI_DH_CONTEXT
15917
15918the handle of the session, object or sequence
15919
15920hierarchy
15921
15922TPMI_RH_HIERARCHY+
15923
15924the hierarchy of the context
15925
15926contextBlob
15927
15928TPM2B_CONTEXT_DATA
15929
15930the context data and integrity HMAC
15931
15932Family “2.0”
15933Level 00 Revision 00.99
15934
15935Published
15936Copyright © TCG 2006-2013
15937
15938Page 141
15939October 31, 2013
15940
15941Part 2: Structures
15942
15943Trusted Platform Module Library
15944
1594514.6 Parameters of TPMS_CONTEXT
1594614.6.1 sequence
15947The sequence parameter is used to differentiate the contexts and to allow the TPM to create a different
15948encryption key for each context. Objects and sessions use different sequence counters. The sequence
15949counter for objects (transient and sequence) is incremented when an object context is saved, and the
15950sequence counter for sessions increments when a session is created or when it is loaded
15951(TPM2_ContextLoad()). The session sequence number is the contextID counter.
15952For a session, the sequence number also allows the TRM to find the “older” contexts so that they may be
15953refreshed if the contextID are too widely separated.
15954If an input value for sequence is larger than the value used in any saved context, the TPM shall return an
15955error (TPM_RC_VALUE) and do no additional processing of the context.
15956If the context is a session context and the input value for sequence is less than the current value of
15957contextID minus the maximum range for sessions, the TPM shall return an error (TPM_RC_VALUE) and
15958do no additional processing of the context.
1595914.6.2 savedHandle
15960For a session, this is the handle that was assigned to the session when it was saved. For a transient
15961object, the handle will have one of the values shown in Table 203.
15962If the handle type for savedHandle is TPM_HT_TRANSIENT, then the low order bits are used to
15963differentiate static objects from sequence objects.
15964If an input value for handle is outside of the range of values used by the TPM, the TPM shall return an
15965error (TPM_RC_VALUE) and do no additional processing of the context.
15966Table 203 — Context Handle Values
15967Value
15968
15969Description
15970
159710x02xxxxxx
15972
15973an HMAC session context
15974
159750x03xxxxxx
15976
15977a policy session context
15978
159790x80000000
15980
15981an ordinary transient object
15982
159830x80000001
15984
15985a sequence object
15986
159870x80000002
15988
15989a transient object with the stClear attribute SET
15990
15991Page 142
15992October 31, 2013
15993
15994Published
15995Copyright © TCG 2006-2013
15996
15997Family “2.0”
15998Level 00 Revision 00.99
15999
16000Trusted Platform Module Library
16001
16002Part 2: Structures
16003
1600414.6.3 hierarchy
16005This is the hierarchy (TPMI_RH_HIERARCHY) for the saved context and determines the proof value used
16006in the construction of the encryption and integrity values for the context. For session and sequence
16007contexts, the hierarchy is TPM_RC_NULL. The hierarchy for a transient object may be TPM_RH_NULL
16008but it is not required.
1600914.7 Context Protection
1601014.7.1 Context Integrity
16011The integrity of the context blob is protected by an HMAC. The integrity value is constructed such that
16012changes to the component values will invalidate the context and prevent it from being loaded.
16013Previously saved contexts for objects in the Platform hierarchy shall not be loadable after the PPS is
16014changed.
16015Previously saved contexts for objects in the Storage hierarchy shall not be loadable after the SPS is
16016changed.
16017Previously saved contexts for objects in the Endorsement hierarchy shall not be loadable after either the
16018EPS or SPS is changed.
16019Previously saved sessions shall not be loadable after the SPS changes.
16020Previously saved contexts for objects that have their stClear attribute SET shall not be loadable after a
16021TPM Restart. If a Storage Key has its stClear attribute SET, the descendants of this key shall not be
16022loadable after TPM Restart.
16023Previously saved contexts for a session and objects shall not be loadable after a TPM Reset.
16024A saved context shall not be loaded if its HMAC is not valid. The equation for computing the HMAC for a
16025context is found in “Context Integrity Protection” in Part 1.
1602614.7.2 Context Confidentiality
16027The context data of sessions and objects shall be protected by symmetric encryption using CFB. The
16028method for computing the IV and encryption key is found in “Context Confidentiality Protection” in Part 1.
16029
16030Family “2.0”
16031Level 00 Revision 00.99
16032
16033Published
16034Copyright © TCG 2006-2013
16035
16036Page 143
16037October 31, 2013
16038
16039Part 2: Structures
16040
16041Trusted Platform Module Library
16042
1604315 Creation Data
1604415.1 TPMS_CREATION_DATA
16045This structure provides information relating to the creation environment for the object. The creation data
16046includes the parent Name, parent Qualified Name, and the digest of selected PCR. These values
16047represent the environment in which the object was created. Creation data allows a relying party to
16048determine if an object was created when some appropriate protections were present.
16049When the object is created, the structure shown in Table 204 is generated and a ticket is computed over
16050this data.
16051If
16052the
16053parent
16054is
16055a
16056permanent
16057handle
16058(TPM_RH_OWNER,
16059TPM_RH_PLATFORM,
16060TPM_RH_ENDORSEMENT, or TPM_RH_NULL), then parentName and parentQualifiedName will be set
16061to the parent handle value and parentNameAlg will be TPM_ALG_NULL.
16062Table 204 — Definition of TPMS_CREATION_DATA Structure <OUT>
16063Parameter
16064
16065Type
16066
16067Description
16068
16069pcrSelect
16070
16071TPML_PCR_SELECTION
16072
16073list indicating the PCR included in pcrDigest
16074
16075pcrDigest
16076
16077TPM2B_DIGEST
16078
16079digest of the selected PCR using nameAlg of the object for
16080which this structure is being created
16081pcrDigest.size shall be zero if the pcrSelect list is empty.
16082
16083locality
16084
16085TPMA_LOCALITY
16086
16087the locality at which the object was created
16088
16089parentNameAlg
16090
16091TPM_ALG_ID
16092
16093nameAlg of the parent
16094
16095parentName
16096
16097TPM2B_NAME
16098
16099Name of the parent at time of creation
16100The size will match digest size associated with parentNameAlg
16101unless it is TPM_ALG_NULL, in which case the size will be 4
16102and parentName will be the hierarchy handle.
16103
16104parentQualifiedName
16105
16106TPM2B_NAME
16107
16108Qualified Name of the parent at the time of creation
16109Size is the same as parentName.
16110
16111outsideInfo
16112
16113TPM2B_DATA
16114
16115association with additional information added by the key
16116creator
16117This will be the contents of the outsideInfo parameter in
16118TPM2_Create() or TPM2_CreatePrimary().
16119
1612015.2 TPM2B_CREATION_DATA
16121This structure is created by TPM2_Create() and TPM2_CreatePrimary(). It is never entered into the TPM
16122and never has a size of zero.
16123Table 205 — Definition of TPM2B_CREATION_DATA Structure <OUT>
16124Parameter
16125
16126Type
16127
16128Description
16129
16130size=
16131
16132UINT16
16133
16134size of the creation data
16135
16136creationData
16137
16138TPMS_CREATION_DATA
16139
161401.1.1.1.1
16141Page 144
16142October 31, 2013
16143
16144Published
16145Copyright © TCG 2006-2013
16146
16147Family “2.0”
16148Level 00 Revision 00.99
16149
16150Trusted Platform Module Library
16151
16152Part 2: Structures
16153
16154Annex A
16155(informative)
16156Algorithm Constants
16157A.1
16158
16159Introduction
16160
16161This annex contains constants that are defined by algorithms.
16162
16163A.2
16164A.2.1
16165
16166Allowed Hash Algorithms
16167SHA1
16168Table 206 — Defines for SHA1 Hash Values
16169
16170Name
16171
16172Value
16173
16174SHA1_DIGEST_SIZE
16175
1617620
16177
16178SHA1_BLOCK_SIZE
16179
1618064
16181
16182SHA1_DER_SIZE
16183
16184Description
16185
1618615
16187
16188SHA1_DER
16189
16190Values are in octets.
16191
16192{0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14}
16193
16194A.2.2
16195
16196SHA256
16197Table 207 — Defines for SHA256 Hash Values
16198
16199Name
16200
16201Value
16202
16203SHA256_DIGEST_SIZE
16204
1620532
16206
16207SHA256_BLOCK_SIZE
16208
1620964
16210
16211SHA256_DER_SIZE
16212
16213Description
16214
1621519
16216
16217SHA256_DER
16218
16219
16220Values are in octets.
16221
16222{0x30,0x31,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x01,0x05,0x00,0x04,0x20}
16223
16224A.2.3
16225SHA384
16226Table 208 — Defines for SHA384 Hash Values
16227
16228Name
16229
16230Value
16231
16232SHA384_DIGEST_SIZE
16233
1623448
16235
16236SHA384_BLOCK_SIZE
16237
16238128
16239
16240SHA384_DER_SIZE
16241
16242Description
16243
1624419
16245
16246SHA384_DER
16247
16248Family “2.0”
16249Level 00 Revision 00.99
16250
16251Values are in octets.
16252
16253{0x30,0x41,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x02,0x05,0x00,0x04,0x30}
16254
16255Published
16256Copyright © TCG 2006-2013
16257
16258Page 145
16259October 31, 2013
16260
16261Part 2: Structures
16262A.2.4
16263
16264Trusted Platform Module Library
16265
16266SHA512
16267Table 209 — Defines for SHA512 Hash Values
16268
16269Name
16270
16271Value
16272
16273SHA512_DIGEST_SIZE
16274
1627564
16276
16277SHA512_BLOCK_SIZE
16278
16279128
16280
16281SHA512_DER_SIZE
16282
16283Description
16284
1628519
16286
16287SHA512_DER
16288
16289
16290Values are in octets.
16291
16292{0x30,0x51,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x03,0x05,0x00,0x04,0x40}
16293
16294A.2.5
16295SM3_256
16296Table 210 — Defines for SM3_256 Hash Values
16297
16298Name
16299
16300Value
16301
16302Description
16303
16304SM3_256_DIGEST_SIZE
16305
1630632
16307
16308Values are in octets.
16309
16310SM3_256_BLOCK_SIZE
16311
1631264
16313
16314??
16315
16316SM3_256_DER_SIZE
16317
1631818
16319
16320SM3_256_DER
16321
16322
16323{0x30,0x30,0x30,0x0c,0x06,0x08,0x2a,0x81,0x1c,0x81,0x45,0x01,0x83,0x11,0x05,0x00,0x04,0x20}
16324
16325A.3
16326Unknown
16327
16328Architectural Limits
16329Table 211 — Defines for Architectural Limits Values
16330
16331Name
16332MAX_SESSION_NUMBER
16333
16334Page 146
16335October 31, 2013
16336
16337Value
163383
16339
16340Description
16341the maximum number of authorization sessions that may be in a
16342command
16343This value may be increased if new commands require more than
16344two authorization handles.
16345
16346Published
16347Copyright © TCG 2006-2013
16348
16349Family “2.0”
16350Level 00 Revision 00.99
16351
16352Trusted Platform Module Library
16353
16354Part 2: Structures
16355
16356Annex B
16357(informative)
16358Implementation Definitions
16359B.1
16360
16361Introduction
16362
16363This annex contains some of the tables that are used to define the desired implementation for the
16364automated tools.
16365NOTE
16366
16367B.2
16368
16369The reference implementation assumes that stdint.h is used.
16370
16371Logic Values
16372
16373The values in this clause are used to see the generation of the subsequent tables. These values should
16374not be changed.
16375Table 212 — Defines for Logic Values
16376Name
16377
16378Value
16379
16380YES
16381
163821
16383
16384NO
16385
163860
16387
16388TRUE
16389
163901
16391
16392FALSE
16393
163940
16395
16396SET
16397
163981
16399
16400CLEAR
16401
16402Description
16403
164040
16405
16406B.3
16407
16408Processor Values
16409
16410These values are used to control generation of octet-swapping routines. The canonical octet ordering for
16411the TPM input/output buffer is “big endian” with the most significant octet of any datum at the lowest
16412address.
16413NOTE
16414
16415The setting for the exemplar is for the x86 family of processor.
16416
16417Table 213 — Defines for Processor Values
16418Name
16419
16420Value
16421
16422Description
16423
16424BIG_ENDIAN_TPM
16425
16426NO
16427
16428set to YES or NO according to the processor
16429
16430LITTLE_ENDIAN_TPM
16431
16432YES
16433
16434set to YES or NO according to the processor
16435NOTE
16436
16437NO_AUTO_ALIGN
16438
16439NO
16440
16441set to YES if the processor does not allow unaligned accesses
16442NOTE
16443
16444Family “2.0”
16445Level 00 Revision 00.99
16446
16447BIG_ENDIAN and LITTLE_ENDIAN shall be set to opposite values.
16448
16449If LITTLE_ENDIAN is YES, then the setting of this value has no effect.
16450
16451Published
16452Copyright © TCG 2006-2013
16453
16454Page 147
16455October 31, 2013
16456
16457Part 2: Structures
16458
16459B.4
16460
16461Trusted Platform Module Library
16462
16463Implemented Algorithms
16464
16465Table 214 is used to indicate the algorithms that are implemented in a TPM. The selections in the Value
16466column may be changed to reflect the implementation. The values shown are illustrative.
16467The "Implemented" column contains a "Y", "YES", or blank to indicate that the command is present in the
16468implementation, an "N" or "NO" to indicate that the command is not implemented.
16469The leading and trailing “_” characters are to avoid name space collisions with some crypto libraries.
16470
16471NOTE
16472
16473Table 214 — Defines for Implemented Algorithms
16474Algorithm Name
16475
16476Implemented
16477
16478RSA
16479
16480YES
16481
16482SHA1
16483
16484YES
16485
16486HMAC
16487
16488YES
16489
16490AES
16491
16492YES
16493
16494MGF1
16495
16496YES
16497
16498XOR
16499
16500YES
16501
16502KEYEDHASH
16503
16504YES
16505
16506SHA256
16507
16508YES
16509
16510SHA384
16511
16512NO
16513
16514SHA512
16515
16516NO
16517
16518SM3_256
16519
16520YES
16521
16522SM4
16523
16524Comments
16525
16526YES
16527
16528REQUIRED, do not change this value
16529
16530REQUIRED, do not change this value
16531
16532RSASSA
16533
16534(YES * RSA)
16535
16536requires RSA
16537
16538RSAES
16539
16540(YES * RSA)
16541
16542requires RSA
16543
16544RSAPSS
16545
16546(YES * RSA)
16547
16548requires RSA
16549
16550OAEP
16551
16552(YES * RSA)
16553
16554requires RSA
16555
16556ECC
16557
16558YES
16559
16560ECDH
16561
16562(YES * ECC)
16563
16564requires ECC
16565
16566ECDSA
16567
16568(YES * ECC)
16569
16570requires ECC
16571
16572ECDAA
16573
16574(YES * ECC)
16575
16576requires ECC
16577
16578SM2
16579
16580(YES * ECC)
16581
16582requires ECC
16583
16584ECSCHNORR
16585
16586(YES * ECC)
16587
16588requires ECC
16589
16590ECMQV
16591
16592(NO * ECC)
16593
16594requires ECC
16595
16596SYMCIPHER
16597KDF1_SP800_56a
16598
16599YES
16600
16601REQUIRED, at least one symmetric algorithm shall be implemented
16602
16603(YES * ECC)
16604
16605KDF2
16606
16607NO
16608
16609KDF1_SP800_108
16610
16611YES
16612
16613CTR
16614
16615YES
16616
16617OFB
16618
16619YES
16620
16621CBC
16622
16623YES
16624
16625CFB
16626
16627YES
16628
16629ECB
16630
16631requires ECC
16632
16633YES
16634
16635B.5
16636
16637REQUIRED, do not change this value
16638
16639Implemented Commands
16640
16641Page 148
16642October 31, 2013
16643
16644Published
16645Copyright © TCG 2006-2013
16646
16647Family “2.0”
16648Level 00 Revision 00.99
16649
16650Trusted Platform Module Library
16651
16652Part 2: Structures
16653
16654This table is used to indicate which of the commands are implemented. In the reference implementation,
16655this table determines which commands can be called and drives the generation of various commanddependent switch statements.
16656The "Implemented or Dependent" column contains a "Y", "YES", or blank to indicate that the command is
16657present in the implementation; an "N" or "NO" to indicate that the command is not implemented; and an
16658algorithm value if implementation of the command is dependent on a setting in Table 214. Linkage to
16659Table 214 is not required and is provide as a convenience.
16660To indicate that the command is implemented, only "Y", "N", blank, or a value from Table 214 is allowed.
16661Table 215 — Defines for Implemented Commands
16662Name
16663ActivateCredential
16664
16665Implemented
16666or Dependent
16667
16668Comments
16669
16670YES
16671
16672Certify
16673
16674Y
16675
16676CertifyCreation
16677
16678Y
16679
16680ChangeEPS
16681
16682Y
16683
16684ChangePPS
16685
16686Y
16687
16688Clear
16689
16690Y
16691
16692ClearControl
16693
16694Y
16695
16696ClockRateAdjust
16697
16698Y
16699
16700ClockSet
16701
16702Y
16703
16704Commit
16705
16706ECC
16707
16708ContextLoad
16709
16710Y
16711
16712Context
16713
16714ContextSave
16715
16716Y
16717
16718Context
16719
16720Create
16721
16722Y
16723
16724CreatePrimary
16725
16726Y
16727
16728DictionaryAttackLockReset
16729
16730Y
16731
16732DictionaryAttackParameters
16733
16734Y
16735
16736Duplicate
16737
16738Y
16739
16740ECC_Parameters
16741
16742ECC
16743
16744ECDH_KeyGen
16745
16746ECC
16747
16748ECDH_ZGen
16749
16750ECC
16751
16752EncryptDecrypt
16753
16754Y
16755
16756EventSequenceComplete
16757
16758Y
16759
16760EvictControl
16761
16762Y
16763
16764FieldUpgradeData
16765
16766N
16767
16768FieldUpgradeStart
16769
16770N
16771
16772FirmwareRead
16773
16774N
16775
16776FlushContext
16777
16778Y
16779
16780GetCapability
16781
16782Y
16783
16784GetCommandAuditDigest
16785
16786Y
16787
16788GetRandom
16789
16790Y
16791
16792GetSessionAuditDigest
16793
16794Y
16795
16796Family “2.0”
16797Level 00 Revision 00.99
16798
16799Context
16800
16801Published
16802Copyright © TCG 2006-2013
16803
16804Page 149
16805October 31, 2013
16806
16807Part 2: Structures
16808
16809Name
16810
16811Trusted Platform Module Library
16812Implemented
16813or Dependent
16814
16815Comments
16816
16817GetTestResult
16818
16819Y
16820
16821GetTime
16822
16823Y
16824
16825Hash
16826
16827Y
16828
16829HashSequenceStart
16830
16831Y
16832
16833HierarchyChangeAuth
16834
16835Y
16836
16837HierarchyControl
16838
16839Y
16840
16841HMAC
16842
16843Y
16844
16845HMAC_Start
16846
16847Y
16848
16849Import
16850
16851Y
16852
16853IncrementalSelfTest
16854
16855Y
16856
16857Load
16858
16859Y
16860
16861LoadExternal
16862
16863Y
16864
16865MakeCredential
16866
16867Y
16868
16869NV_Certify
16870
16871Y
16872
16873NV_ChangeAuth
16874
16875Y
16876
16877NV_DefineSpace
16878
16879Y
16880
16881NV_Extend
16882
16883Y
16884
16885NV_GlobalWriteLock
16886
16887Y
16888
16889NV_Increment
16890
16891Y
16892
16893NV_Read
16894
16895Y
16896
16897NV_ReadLock
16898
16899Y
16900
16901NV_ReadPublic
16902
16903Y
16904
16905NV_SetBits
16906
16907Y
16908
16909NV_UndefineSpace
16910
16911Y
16912
16913NV_UndefineSpaceSpecial
16914
16915Y
16916
16917NV_Write
16918
16919Y
16920
16921NV_WriteLock
16922
16923Y
16924
16925ObjectChangeAuth
16926
16927Y
16928
16929PCR_Allocate
16930
16931Y
16932
16933PCR_Event
16934
16935Y
16936
16937PCR_Extend
16938
16939Y
16940
16941PCR_Read
16942
16943Y
16944
16945PCR
16946
16947PCR_Reset
16948
16949Y
16950
16951PCR
16952
16953PCR_SetAuthPolicy
16954
16955Y
16956
16957PCR_SetAuthValue
16958
16959Y
16960
16961PolicyAuthorize
16962
16963Y
16964
16965Policy
16966
16967PolicyAuthValue
16968
16969Y
16970
16971Policy
16972
16973PolicyCommandCode
16974
16975Y
16976
16977Policy
16978
16979PolicyCounterTimer
16980
16981Y
16982
16983Policy
16984
16985PolicyCpHash
16986
16987Y
16988
16989Policy
16990
16991Page 150
16992October 31, 2013
16993
16994NV
16995
16996PCR
16997
16998Published
16999Copyright © TCG 2006-2013
17000
17001Family “2.0”
17002Level 00 Revision 00.99
17003
17004Trusted Platform Module Library
17005
17006Part 2: Structures
17007Implemented
17008or Dependent
17009
17010Name
17011
17012Comments
17013
17014PolicyDuplicationSelect
17015
17016Y
17017
17018Policy
17019
17020PolicyGetDigest
17021
17022Y
17023
17024Policy
17025
17026PolicyLocality
17027
17028Y
17029
17030Policy
17031
17032PolicyNameHash
17033
17034Y
17035
17036Policy
17037
17038PolicyNV
17039
17040Y
17041
17042Policy
17043
17044PolicyOR
17045
17046Y
17047
17048Policy
17049
17050PolicyPassword
17051
17052Y
17053
17054Policy
17055
17056PolicyPCR
17057
17058Y
17059
17060Policy
17061
17062PolicyPhysicalPresence
17063
17064Y
17065
17066Policy
17067
17068PolicyRestart
17069
17070Y
17071
17072PolicySecret
17073
17074Y
17075
17076Policy
17077
17078PolicySigned
17079
17080Y
17081
17082Policy
17083
17084PolicyTicket
17085
17086Y
17087
17088Policy
17089
17090PP_Commands
17091
17092Y
17093
17094Quote
17095
17096Y
17097
17098ReadClock
17099
17100Y
17101
17102ReadPublic
17103
17104Y
17105
17106Rewrap
17107
17108Y
17109
17110RSA_Decrypt
17111
17112RSA
17113
17114RSA_Encrypt
17115
17116RSA
17117
17118SelfTest
17119
17120Y
17121
17122SequenceComplete
17123
17124Y
17125
17126SequenceUpdate
17127
17128Y
17129
17130SetAlgorithmSet
17131
17132Y
17133
17134SetCommandCodeAuditStatus
17135
17136Y
17137
17138SetPrimaryPolicy
17139
17140Y
17141
17142Shutdown
17143
17144Y
17145
17146Sign
17147
17148Y
17149
17150StartAuthSession
17151
17152Y
17153
17154Startup
17155
17156Y
17157
17158StirRandom
17159
17160Y
17161
17162TestParms
17163
17164Y
17165
17166Unseal
17167
17168Y
17169
17170VerifySignature
17171
17172Y
17173
17174ZGen_2Phase
17175
17176Y
17177
17178EC_Ephemeral
17179
17180Y
17181
17182PolicyNvWritten
17183
17184Y
17185
17186B.6
17187
17188Algorithm Constants
17189
17190Family “2.0”
17191Level 00 Revision 00.99
17192
17193Published
17194Copyright © TCG 2006-2013
17195
17196Page 151
17197October 31, 2013
17198
17199Part 2: Structures
17200B.6.1
17201
17202Trusted Platform Module Library
17203
17204RSA
17205Table 216 — Defines for RSA Algorithm Constants
17206
17207Name
17208
17209Value
17210
17211Comments
17212
17213RSA_KEY_SIZES_BITS
17214
17215{1024, 2048}
17216
17217braces because this is a
17218list value
17219
17220MAX_RSA_KEY_BITS
17221
172222048
17223
17224MAX_RSA_KEY_BYTES
17225
17226((MAX_RSA_KEY_BITS + 7) / 8)
17227
17228B.6.2
17229
17230ECC
17231Table 217 — Defines for ECC Algorithm Constants
17232
17233Name
17234
17235Value
17236
17237ECC_CURVES
17238
17239{TPM_ECC_NIST_P256, TPM_ECC_BN_P256, TPM_ECC_SM2_P256}
17240
17241ECC_KEY_SIZES_BITS
17242
17243{256}
17244
17245MAX_ECC_KEY_BITS
17246
17247256
17248
17249MAX_ECC_KEY_BYTES
17250
17251((MAX_ECC_KEY_BITS + 7) / 8)
17252
17253B.6.3
17254
17255Comments
17256
17257this is a list value with
17258length of one
17259
17260AES
17261Table 218 — Defines for AES Algorithm Constants
17262
17263Name
17264
17265Value
17266
17267AES_KEY_SIZES_BITS
17268
17269{128}
17270
17271MAX_AES_KEY_BITS
17272
17273128
17274
17275MAX_AES_BLOCK_SIZE_BYTES
17276
1727716
17278
17279MAX_AES_KEY_BYTES
17280
17281((MAX_AES_KEY_BITS + 7) / 8)
17282
17283B.6.4
17284
17285Comments
17286
17287SM4
17288Table 219 — Defines for SM4 Algorithm Constants
17289
17290Name
17291
17292Value
17293
17294SM4_KEY_SIZES_BITS
17295
17296{128}
17297
17298MAX_SM4_KEY_BITS
17299
17300128
17301
17302MAX_SM4_BLOCK_SIZE_BYTES
17303
1730416
17305
17306MAX_SM4_KEY_BYTES
17307
17308((MAX_SM4_KEY_BITS + 7) / 8)
17309
17310Page 152
17311October 31, 2013
17312
17313Comments
17314
17315Published
17316Copyright © TCG 2006-2013
17317
17318Family “2.0”
17319Level 00 Revision 00.99
17320
17321Trusted Platform Module Library
17322B.6.5
17323
17324Part 2: Structures
17325
17326Symmetric
17327
17328The definitions in this table are derived from the implemented symmetric algorithms.
17329Table 220 — Defines for Symmetric Algorithm Constants
17330Name
17331
17332Value
17333
17334MAX_SYM_KEY_BITS
17335
17336MAX_AES_KEY_BITS
17337
17338MAX_SYM_KEY_BYTES
17339
17340MAX_AES_KEY_BYTES
17341
17342MAX_SYM_BLOCK_SIZE
17343
17344MAX_AES_BLOCK_SIZE_BYTES
17345
17346Family “2.0”
17347Level 00 Revision 00.99
17348
17349Comments
17350
17351Published
17352Copyright © TCG 2006-2013
17353
17354Page 153
17355October 31, 2013
17356
17357Part 2: Structures
17358
17359B.7
17360
17361Trusted Platform Module Library
17362
17363Implementation Specific Values
17364
17365The values listed in Table 221 are defined for a specific TPM implementation. The numbers in the Value
17366column may be changed to reflect the implementation. The values shown are illustrative.
17367Table 221 — Defines for Implementation Values
17368Name
17369
17370Value
17371
17372Description
17373
17374FIELD_UPGRADE_IMPLEMENTED
17375
17376NO
17377
17378temporary define
17379
17380BSIZE
17381
17382UINT16
17383
17384size used for internal storage of
17385the size field of a TPM2B
17386This is the definition used for
17387the reference design.
17388Compilation with this value
17389changed may cause warnings
17390about conversions.
17391
17392BUFFER_ALIGNMENT
17393
173944
17395
17396sets the size granularity for the
17397buffers in a TPM2B structure
17398TPMxB buffers will be assigned
17399a space that is a multiple of this
17400value. This does not set the size
17401limits for IO. Those are set by
17402the canonical form of the
17403TPMxB
17404
17405IMPLEMENTATION_PCR
17406
1740724
17408
17409the number of PCR in the TPM
17410
17411PLATFORM_PCR
17412
1741324
17414
17415the number of PCR required by
17416the relevant platform
17417specification
17418
17419DRTM_PCR
17420
1742117
17422
17423the DRTM PCR
17424
17425HCRTM_PCR
17426
174270
17428
17429the PCR that will receive the HCRTM value at TPM2_Startup
17430
17431NUM_LOCALITIES
17432
174335
17434
17435the number of localities
17436supported by the TPM
17437This is expected to be either 5
17438for a PC, or 1 for just about
17439everything else.
17440
17441MAX_HANDLE_NUM
17442
174433
17444
17445the maximum number of
17446handles in the handle area
17447This should be produced by the
17448Part 3 parser but is here for
17449now.
17450
17451MAX_ACTIVE_SESSIONS
17452
1745364
17454
17455the number of simultaneously
17456active sessions that are
17457supported by the TPM
17458implementation
17459
17460CONTEXT_SLOT
17461
17462UINT16
17463
17464the type of an entry in the array
17465of saved contexts
17466
17467CONTEXT_COUNTER
17468
17469UINT64
17470
17471the type of the saved session
17472counter
17473
17474MAX_LOADED_SESSIONS
17475
174763
17477
17478the number of sessions that the
17479TPM may have in memory
17480
17481MAX_SESSION_NUM
17482
174833
17484
17485this is the current maximum
17486value
17487
17488Page 154
17489October 31, 2013
17490
17491Published
17492Copyright © TCG 2006-2013
17493
17494Family “2.0”
17495Level 00 Revision 00.99
17496
17497Trusted Platform Module Library
17498
17499Part 2: Structures
17500
17501Name
17502
17503Value
17504
17505Description
17506
17507MAX_LOADED_OBJECTS
17508
175093
17510
17511the number of simultaneously
17512loaded objects that are
17513supported by the TPM; this
17514number does not include the
17515objects that may be placed in
17516NV memory by
17517TPM2_EvictControl().
17518
17519MIN_EVICT_OBJECTS
17520
175212
17522
17523the minimum number of evict
17524objects supported by the TPM
17525
17526PCR_SELECT_MIN
17527
17528((PLATFORM_PCR+7)/8)
17529
17530PCR_SELECT_MAX
17531
17532((IMPLEMENTATION_PCR+7)/8)
17533
17534NUM_POLICY_PCR_GROUP
17535
175361
17537
17538number of PCR groups that
17539have individual policies
17540
17541NUM_AUTHVALUE_PCR_GROUP
17542
175431
17544
17545number of PCR groups that
17546have individual authorization
17547values
17548
17549MAX_CONTEXT_SIZE
17550
175514000
17552
17553This may be larger than
17554necessary
17555
17556MAX_DIGEST_BUFFER
17557
175581024
17559
17560MAX_NV_INDEX_SIZE
17561
175622048
17563
17564maximum data size allowed in
17565an NV Index
17566
17567MAX_NV_BUFFER_SIZE
17568
175691024
17570
17571maximum data size in one NV
17572read or write command
17573
17574MAX_CAP_BUFFER
17575
175761024
17577
17578NV_MEMORY_SIZE
17579
1758016384
17581
17582NUM_STATIC_PCR
17583
1758416
17585
17586MAX_ALG_LIST_SIZE
17587
1758864
17589
17590number of algorithms that can
17591be in a list
17592
17593TIMER_PRESCALE
17594
17595100000
17596
17597nominal value for the pre-scale
17598value of Clock (the number of
17599cycles of the TPM's oscillator for
17600each increment of Clock)
17601
17602PRIMARY_SEED_SIZE
17603
1760432
17605
17606size of the Primary Seed in
17607octets
17608
17609CONTEXT_ENCRYPT_ALG
17610
17611TPM_ALG_AES
17612
17613context encryption algorithm
17614
17615CONTEXT_ENCRYPT_KEY_BITS
17616
17617MAX_SYM_KEY_BITS
17618
17619context encryption key size in
17620bits
17621
17622CONTEXT_ENCRYPT_KEY_BYTES
17623
17624((CONTEXT_ENCRYPT_KEY_BITS+7)/8)
17625
17626CONTEXT_INTEGRITY_HASH_ALG
17627
17628TPM_ALG_SHA256
17629
17630context integrity hash algorithm
17631
17632CONTEXT_INTEGRITY_HASH_SIZE
17633
17634SHA256_DIGEST_SIZE
17635
17636number of byes in the context
17637integrity digest
17638
17639PROOF_SIZE
17640
17641CONTEXT_INTEGRITY_HASH_SIZE
17642
17643size of proof value in octets
17644This size of the proof should be
17645consistent with the digest size
17646used for context integrity.
17647
17648NV_CLOCK_UPDATE_INTERVAL
17649
1765012
17651
17652the update interval expressed
17653as a power of 2 seconds
17654
17655size of NV memory in octets
17656
17657A value of 12 is 4,096 seconds
17658(~68 minutes).
17659
17660Family “2.0”
17661Level 00 Revision 00.99
17662
17663Published
17664Copyright © TCG 2006-2013
17665
17666Page 155
17667October 31, 2013
17668
17669Part 2: Structures
17670
17671Trusted Platform Module Library
17672
17673Name
17674
17675Value
17676
17677Description
17678
17679NUM_POLICY_PCR
17680
176811
17682
17683number of PCR that allow
17684policy/auth
17685
17686MAX_COMMAND_SIZE
17687
176884096
17689
17690maximum size of a command
17691
17692MAX_RESPONSE_SIZE
17693
176944096
17695
17696maximum size of a response
17697
17698ORDERLY_BITS
17699
177008
17701
17702number between 1 and 32
17703inclusive
17704
17705MAX_ORDERLY_COUNT
17706
17707((1 << ORDERLY_BITS) - 1)
17708
17709maximum count of orderly
17710counter before NV is updated
17711This must be of the form 2N – 1
17712where 1 ≤ N ≤ 32.
17713
17714ALG_ID_FIRST
17715
17716TPM_ALG_FIRST
17717
17718used by GetCapability()
17719processing to bound the
17720algorithm search
17721
17722ALG_ID_LAST
17723
17724TPM_ALG_LAST
17725
17726used by GetCapability()
17727processing to bound the
17728algorithm search
17729
17730MAX_SYM_DATA
17731
17732128
17733
17734this is the maximum number of
17735octets that may be in a sealed
17736blob.
17737
17738MAX_RNG_ENTROPY_SIZE
17739
1774064
17741
17742RAM_INDEX_SPACE
17743
17744512
17745
17746RSA_DEFAULT_PUBLIC_EXPONENT
17747
177480x00010001
17749
17750216 + 1
17751
17752ENABLE_PCR_NO_INCREMENT
17753
17754YES
17755
17756
17757CRT_FORMAT_RSA
17758
17759YES
17760
17761PRIVATE_VENDOR_SPECIFIC_BYTES
17762
17763((MAX_RSA_KEY_BYTES/2) * (3 + CRT_FORMAT_RSA * 2))
17764
17765Page 156
17766October 31, 2013
17767
17768Published
17769Copyright © TCG 2006-2013
17770
17771Family “2.0”
17772Level 00 Revision 00.99
17773
17774
17775