logo资料库

TPM2.0 Commands part3.pdf

第1页 / 共455页
第2页 / 共455页
第3页 / 共455页
第4页 / 共455页
第5页 / 共455页
第6页 / 共455页
第7页 / 共455页
第8页 / 共455页
资料共455页,剩余部分请下载后查看
1 Scope
2 Terms and Definitions
3 Symbols and abbreviated terms
4 Notation
4.1 Introduction
4.2 Table Decorations
4.2.1 Handle and Parameter Demarcation
4.3 AuthorizationSize and ParameterSize
4.4 Return Code Alias
5 Command Processing
5.1 Introduction
5.2 Command Header Validation
5.3 Mode Checks
5.4 Handle Area Validation
5.5 Session Area Validation
5.6 Authorization Checks
5.7 Parameter Decryption
5.8 Parameter Unmarshaling
5.8.1 Introduction
5.8.2 Unmarshaling Errors
5.9 Command Post Processing
6 Response Values
6.1 Tag
6.2 Response Codes
7 Implementation Dependent
8 Detailed Actions Assumptions
8.1 Introduction
8.2 Pre-processing
8.3 Post Processing
9 Start-up
9.1 Introduction
9.2 _TPM_Init
9.2.1 General Description
9.2.2 Detailed Actions
9.3 TPM2_Startup
9.3.1 General Description
9.3.2 Command and Response
9.3.3 Detailed Actions
9.4 TPM2_Shutdown
9.4.1 General Description
9.4.2 Command and Response
9.4.3 Detailed Actions
10 Testing
10.1 Introduction
10.2 TPM2_SelfTest
10.2.1 General Description
10.2.2 Command and Response
10.2.3 Detailed Actions
10.3 TPM2_IncrementalSelfTest
10.3.1 General Description
10.3.2 Command and Response
10.3.3 Detailed Actions
10.4 TPM2_GetTestResult
10.4.1 General Description
10.4.2 Command and Response
10.4.3 Detailed Actions
11 Session Commands
11.1 TPM2_StartAuthSession
11.1.1 General Description
11.1.2 Command and Response
11.1.3 Detailed Actions
11.2 TPM2_PolicyRestart
11.2.1 General Description
11.2.2 Command and Response
11.2.3 Detailed Actions
12 Object Commands
12.1 TPM2_Create
12.1.1 General Description
12.1.2 Command and Response
12.1.3 Detailed Actions
12.2 TPM2_Load
12.2.1 General Description
12.2.2 Command and Response
12.2.3 Detailed Actions
12.3 TPM2_LoadExternal
12.3.1 General Description
12.3.2 Command and Response
12.3.3 Detailed Actions
12.4 TPM2_ReadPublic
12.4.1 General Description
12.4.2 Command and Response
12.4.3 Detailed Actions
12.5 TPM2_ActivateCredential
12.5.1 General Description
12.5.2 Command and Response
12.5.3 Detailed Actions
12.6 TPM2_MakeCredential
12.6.1 General Description
12.6.2 Command and Response
12.6.3 Detailed Actions
12.7 TPM2_Unseal
12.7.1 General Description
12.7.2 Command and Response
12.7.3 Detailed Actions
12.8 TPM2_ObjectChangeAuth
12.8.1 General Description
12.8.2 Command and Response
12.8.3 Detailed Actions
12.9 TPM2_CreateLoaded
12.9.1 General Description
12.9.2 Command and Response
12.9.3 Detailed Actions
13 Duplication Commands
13.1 TPM2_Duplicate
13.1.1 General Description
13.1.2 Command and Response
13.1.3 Detailed Actions
13.2 TPM2_Rewrap
13.2.1 General Description
13.2.2 Command and Response
13.2.3 Detailed Actions
13.3 TPM2_Import
13.3.1 General Description
13.3.2 Command and Response
13.3.3 Detailed Actions
14 Asymmetric Primitives
14.1 Introduction
14.2 TPM2_RSA_Encrypt
14.2.1 General Description
14.2.2 Command and Response
14.2.3 Detailed Actions
14.3 TPM2_RSA_Decrypt
14.3.1 General Description
14.3.2 Command and Response
14.3.3 Detailed Actions
14.4 TPM2_ECDH_KeyGen
14.4.1 General Description
14.4.2 Command and Response
14.4.3 Detailed Actions
14.5 TPM2_ECDH_ZGen
14.5.1 General Description
14.5.2 Command and Response
14.5.3 Detailed Actions
14.6 TPM2_ECC_Parameters
14.6.1 General Description
14.6.2 Command and Response
14.6.3 Detailed Actions
14.7 TPM2_ZGen_2Phase
14.7.1 General Description
14.7.2 Command and Response
14.7.3 Detailed Actions
15 Symmetric Primitives
15.1 Introduction
15.2 TPM2_EncryptDecrypt
15.2.1 General Description
15.2.2 Command and Response
15.2.3 Detailed Actions
15.3 TPM2_EncryptDecrypt2
15.3.1 General Description
15.3.2 Comand and Response
15.3.3 Detailed Actions
15.4 TPM2_Hash
15.4.1 General Description
15.4.2 Command and Response
15.4.3 Detailed Actions
15.5 TPM2_HMAC
15.5.1 General Description
15.5.2 Command and Response
15.5.3 Detailed Actions
16 Random Number Generator
16.1 TPM2_GetRandom
16.1.1 General Description
16.1.2 Command and Response
16.1.3 Detailed Actions
16.2 TPM2_StirRandom
16.2.1 General Description
16.2.2 Command and Response
16.2.3 Detailed Actions
17 Hash/HMAC/Event Sequences
17.1 Introduction
17.2 TPM2_HMAC_Start
17.2.1 General Description
17.2.2 Command and Response
17.2.3 Detailed Actions
17.3 TPM2_HashSequenceStart
17.3.1 General Description
17.3.2 Command and Response
17.3.3 Detailed Actions
17.4 TPM2_SequenceUpdate
17.4.1 General Description
17.4.2 Command and Response
17.4.3 Detailed Actions
17.5 TPM2_SequenceComplete
17.5.1 General Description
17.5.2 Command and Response
17.5.3 Detailed Actions
17.6 TPM2_EventSequenceComplete
17.6.1 General Description
17.6.2 Command and Response
17.6.3 Detailed Actions
18 Attestation Commands
18.1 Introduction
18.2 TPM2_Certify
18.2.1 General Description
18.2.2 Command and Response
18.2.3 Detailed Actions
18.3 TPM2_CertifyCreation
18.3.1 General Description
18.3.2 Command and Response
18.3.3 Detailed Actions
18.4 TPM2_Quote
18.4.1 General Description
18.4.2 Command and Response
18.4.3 Detailed Actions
18.5 TPM2_GetSessionAuditDigest
18.5.1 General Description
18.5.2 Command and Response
18.5.3 Detailed Actions
18.6 TPM2_GetCommandAuditDigest
18.6.1 General Description
18.6.2 Command and Response
18.6.3 Detailed Actions
18.7 TPM2_GetTime
18.7.1 General Description
18.7.2 Command and Response
18.7.3 Detailed Actions
19 Ephemeral EC Keys
19.1 Introduction
19.2 TPM2_Commit
19.2.1 General Description
19.2.2 Command and Response
19.2.3 Detailed Actions
19.3 TPM2_EC_Ephemeral
19.3.1 General Description
19.3.2 Command and Response
19.3.3 Detailed Actions
20 Signing and Signature Verification
20.1 TPM2_VerifySignature
20.1.1 General Description
20.1.2 Command and Response
20.1.3 Detailed Actions
20.2 TPM2_Sign
20.2.1 General Description
20.2.2 Command and Response
20.2.3 Detailed Actions
21 Command Audit
21.1 Introduction
21.2 TPM2_SetCommandCodeAuditStatus
21.2.1 General Description
21.2.2 Command and Response
21.2.3 Detailed Actions
22 Integrity Collection (PCR)
22.1 Introduction
22.2 TPM2_PCR_Extend
22.2.1 General Description
22.2.2 Command and Response
22.2.3 Detailed Actions
22.3 TPM2_PCR_Event
22.3.1 General Description
22.3.2 Command and Response
22.3.3 Detailed Actions
22.4 TPM2_PCR_Read
22.4.1 General Description
22.4.2 Command and Response
22.4.3 Detailed Actions
22.5 TPM2_PCR_Allocate
22.5.1 General Description
22.5.2 Command and Response
22.5.3 Detailed Actions
22.6 TPM2_PCR_SetAuthPolicy
22.6.1 General Description
22.6.2 Command and Response
22.6.3 Detailed Actions
22.7 TPM2_PCR_SetAuthValue
22.7.1 General Description
22.7.2 Command and Response
22.7.3 Detailed Actions
22.8 TPM2_PCR_Reset
22.8.1 General Description
22.8.2 Command and Response
22.8.3 Detailed Actions
22.9 _TPM_Hash_Start
22.9.1 Description
22.9.2 Detailed Actions
22.10 _TPM_Hash_Data
22.10.1 Description
22.10.2 Detailed Actions
22.11 _TPM_Hash_End
22.11.1 Description
22.11.2 Detailed Actions
23 Enhanced Authorization (EA) Commands
23.1 Introduction
23.2 Signed Authorization Actions
23.2.1 Introduction
23.2.2 Policy Parameter Checks
23.2.3 Policy Digest Update Function (PolicyUpdate())
23.2.4 Policy Context Updates
23.2.5 Policy Ticket Creation
23.3 TPM2_PolicySigned
23.3.1 General Description
23.3.2 Command and Response
23.3.3 Detailed Actions
23.4 TPM2_PolicySecret
23.4.1 General Description
23.4.2 Command and Response
23.4.3 Detailed Actions
23.5 TPM2_PolicyTicket
23.5.1 General Description
23.5.2 Command and Response
23.5.3 Detailed Actions
23.6 TPM2_PolicyOR
23.6.1 General Description
23.6.2 Command and Response
23.6.3 Detailed Actions
23.7 TPM2_PolicyPCR
23.7.1 General Description
23.7.2 Command and Response
23.7.3 Detailed Actions
23.8 TPM2_PolicyLocality
23.8.1 General Description
23.8.2 Command and Response
23.8.3 Detailed Actions
23.9 TPM2_PolicyNV
23.9.1 General Description
23.9.2 Command and Response
23.9.3 Detailed Actions
23.10 TPM2_PolicyCounterTimer
23.10.1 General Description
23.10.2 Command and Response
23.10.3 Detailed Actions
23.11 TPM2_PolicyCommandCode
23.11.1 General Description
23.11.2 Command and Response
23.11.3 Detailed Actions
23.12 TPM2_PolicyPhysicalPresence
23.12.1 General Description
23.12.2 Command and Response
23.12.3 Detailed Actions
23.13 TPM2_PolicyCpHash
23.13.1 General Description
23.13.2 Command and Response
23.13.3 Detailed Actions
23.14 TPM2_PolicyNameHash
23.14.1 General Description
23.14.2 Command and Response
23.14.3 Detailed Actions
23.15 TPM2_PolicyDuplicationSelect
23.15.1 General Description
23.15.2 Command and Response
23.15.3 Detailed Actions
23.16 TPM2_PolicyAuthorize
23.16.1 General Description
23.16.2 Command and Response
23.16.3 Detailed Actions
23.17 TPM2_PolicyAuthValue
23.17.1 General Description
23.17.2 Command and Response
23.17.3 Detailed Actions
23.18 TPM2_PolicyPassword
23.18.1 General Description
23.18.2 Command and Response
23.18.3 Detailed Actions
23.19 TPM2_PolicyGetDigest
23.19.1 General Description
23.19.2 Command and Response
23.19.3 Detailed Actions
23.20 TPM2_PolicyNvWritten
23.20.1 General Description
23.20.2 Command and Response
23.20.3 Detailed Actions
23.21 TPM2_PolicyTemplate
23.21.1 General Description
23.21.2 Command and Response
23.21.3 Detailed Actions
23.22 TPM2_PolicyAuthorizeNV
23.22.1 General Description
23.22.2 Command and Response
23.22.3 Detailed Actions
24 Hierarchy Commands
24.1 TPM2_CreatePrimary
24.1.1 General Description
24.1.2 Command and Response
24.1.3 Detailed Actions
24.2 TPM2_HierarchyControl
24.2.1 General Description
24.2.2 Command and Response
24.2.3 Detailed Actions
24.3 TPM2_SetPrimaryPolicy
24.3.1 General Description
24.3.2 Command and Response
24.3.3 Detailed Actions
24.4 TPM2_ChangePPS
24.4.1 General Description
24.4.2 Command and Response
24.4.3 Detailed Actions
24.5 TPM2_ChangeEPS
24.5.1 General Description
24.5.2 Command and Response
24.5.3 Detailed Actions
24.6 TPM2_Clear
24.6.1 General Description
24.6.2 Command and Response
24.6.3 Detailed Actions
24.7 TPM2_ClearControl
24.7.1 General Description
24.7.2 Command and Response
24.7.3 Detailed Actions
24.8 TPM2_HierarchyChangeAuth
24.8.1 General Description
24.8.2 Command and Response
24.8.3 Detailed Actions
25 Dictionary Attack Functions
25.1 Introduction
25.2 TPM2_DictionaryAttackLockReset
25.2.1 General Description
25.2.2 Command and Response
25.2.3 Detailed Actions
25.3 TPM2_DictionaryAttackParameters
25.3.1 General Description
25.3.2 Command and Response
25.3.3 Detailed Actions
26 Miscellaneous Management Functions
26.1 Introduction
26.2 TPM2_PP_Commands
26.2.1 General Description
26.2.2 Command and Response
26.2.3 Detailed Actions
26.3 TPM2_SetAlgorithmSet
26.3.1 General Description
26.3.2 Command and Response
26.3.3 Detailed Actions
27 Field Upgrade
27.1 Introduction
27.2 TPM2_FieldUpgradeStart
27.2.1 General Description
27.2.2 Command and Response
27.2.3 Detailed Actions
27.3 TPM2_FieldUpgradeData
27.3.1 General Description
27.3.2 Command and Response
27.3.3 Detailed Actions
27.4 TPM2_FirmwareRead
27.4.1 General Description
27.4.2 Command and Response
27.4.3 Detailed Actions
28 Context Management
28.1 Introduction
28.2 TPM2_ContextSave
28.2.1 General Description
28.2.2 Command and Response
28.2.3 Detailed Actions
28.3 TPM2_ContextLoad
28.3.1 General Description
28.3.2 Command and Response
28.3.3 Detailed Actions
28.4 TPM2_FlushContext
28.4.1 General Description
28.4.2 Command and Response
28.4.3 Detailed Actions
28.5 TPM2_EvictControl
28.5.1 General Description
28.5.2 Command and Response
28.5.3 Detailed Actions
29 Clocks and Timers
29.1 TPM2_ReadClock
29.1.1 General Description
29.1.2 Command and Response
29.1.3 Detailed Actions
29.2 TPM2_ClockSet
29.2.1 General Description
29.2.2 Command and Response
29.2.3 Detailed Actions
29.3 TPM2_ClockRateAdjust
29.3.1 General Description
29.3.2 Command and Response
29.3.3 Detailed Actions
30 Capability Commands
30.1 Introduction
30.2 TPM2_GetCapability
30.2.1 General Description
30.2.2 Command and Response
30.2.3 Detailed Actions
30.3 TPM2_TestParms
30.3.1 General Description
30.3.2 Command and Response
30.3.3 Detailed Actions
31 Non-volatile Storage
31.1 Introduction
31.2 NV Counters
31.3 TPM2_NV_DefineSpace
31.3.1 General Description
31.3.2 Command and Response
31.3.3 Detailed Actions
31.4 TPM2_NV_UndefineSpace
31.4.1 General Description
31.4.2 Command and Response
31.4.3 Detailed Actions
31.5 TPM2_NV_UndefineSpaceSpecial
31.5.1 General Description
31.5.2 Command and Response
31.5.3 Detailed Actions
31.6 TPM2_NV_ReadPublic
31.6.1 General Description
31.6.2 Command and Response
31.6.3 Detailed Actions
31.7 TPM2_NV_Write
31.7.1 General Description
31.7.2 Command and Response
31.7.3 Detailed Actions
31.8 TPM2_NV_Increment
31.8.1 General Description
31.8.2 Command and Response
31.8.3 Detailed Actions
31.9 TPM2_NV_Extend
31.9.1 General Description
31.9.2 Command and Response
31.9.3 Detailed Actions
31.10 TPM2_NV_SetBits
31.10.1 General Description
31.10.2 Command and Response
31.10.3 Detailed Actions
31.11 TPM2_NV_WriteLock
31.11.1 General Description
31.11.2 Command and Response
31.11.3 Detailed Actions
31.12 TPM2_NV_GlobalWriteLock
31.12.1 General Description
31.12.2 Command and Response
31.12.3 Detailed Actions
31.13 TPM2_NV_Read
31.13.1 General Description
31.13.2 Command and Response
31.13.3 Detailed Actions
31.14 TPM2_NV_ReadLock
31.14.1 General Description
31.14.2 Command and Response
31.14.3 Detailed Actions
31.15 TPM2_NV_ChangeAuth
31.15.1 General Description
31.15.2 Command and Response
31.15.3 Detailed Actions
31.16 TPM2_NV_Certify
31.16.1 General Description
31.16.2 Command and Response
31.16.3 Detailed Actions
32 Vendor Specific
32.1 Introduction
32.2 TPM2_Vendor_TCG_Test
32.2.1 General Description
32.2.2 Command and Response
32.2.3 Detailed Actions
Trusted Platform Module Library Part 3: Commands Family “2.0” Level 00 Revision 01.38 September 29, 2016 Contact: admin@trustedcomputinggroup.org TCG Published Copyright © TCG 2006-2016 TCG
Part 3: Commands Trusted Platform Module Library Licenses and Notices Copyright Licenses:  Trusted Computing Group (TCG) grants to the user of the source code in this specification (the “Source Code”) a worldwide, irrevocable, nonexclusive, royalty free, copyright license to reproduce, create derivative works, distribute, display and perform the Source Code and derivative works thereof, and to grant others the rights granted herein.  The TCG grants to the user of the other parts of the specification (other than the Source Code) the rights to reproduce, distribute, display, and perform the specification solely for the purpose of developing products based on such documents. Source Code Distribution Conditions:  Redistributions of Source Code must retain the above copyright licenses, this list of conditions and the following disclaimers.  Redistributions in binary form must reproduce the above copyright licenses, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. Disclaimers:  THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. Contact TCG Administration (admin@trustedcomputinggroup.org) for information on specification licensing rights available through TCG membership agreements.  THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.  Without limitation, TCG and its members and licensors disclaim all liability, including liability for infringement of any proprietary rights, relating to use of information in this specification and to the implementation of this specification, and TCG disclaims all liability for cost of procurement of substitute goods or services, lost profits, loss of use, loss of data or any incidental, consequential, direct, indirect, or special damages, whether under contract, tort, warranty or otherwise, arising in any way out of use or reliance upon this specification or any information herein. Any marks and brands contained herein are the property of their respective owners. Family “2.0” TCG Published Page ii Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
Trusted Platform Module Library Part 3: Commands CONTENTS Scope .................................................................................................................................................... 1 1 Terms and Definitions ........................................................................................................................... 1 2 3 Symbols and abbreviated terms ............................................................................................................ 1 4 Notation ................................................................................................................................................. 2 4.1 Introduction ..................................................................................................................................... 2 4.2 Table Decorations ........................................................................................................................... 2 4.3 AuthorizationSize and ParameterSize ............................................................................................ 4 4.4 Return Code Alias ........................................................................................................................... 4 5 Command Processing ........................................................................................................................... 5 Introduction ..................................................................................................................................... 5 5.1 5.2 Command Header Validation .......................................................................................................... 5 5.3 Mode Checks .................................................................................................................................. 5 5.4 Handle Area Validation ................................................................................................................... 6 5.5 Session Area Validation .................................................................................................................. 7 5.6 Authorization Checks ...................................................................................................................... 8 5.7 Parameter Decryption ................................................................................................................... 10 5.8 Parameter Unmarshaling .............................................................................................................. 10 5.9 Command Post Processing .......................................................................................................... 12 6 Response Values ................................................................................................................................ 13 6.1 Tag ................................................................................................................................................ 13 6.2 Response Codes .......................................................................................................................... 13 7 Implementation Dependent ................................................................................................................. 16 8 Detailed Actions Assumptions ............................................................................................................. 17 8.1 Introduction ................................................................................................................................... 17 8.2 Pre-processing .............................................................................................................................. 17 8.3 Post Processing ............................................................................................................................ 17 9 Start-up ................................................................................................................................................ 18 Introduction ................................................................................................................................... 18 9.1 9.2 _TPM_Init ...................................................................................................................................... 18 9.3 TPM2_Startup ............................................................................................................................... 20 9.4 TPM2_Shutdown .......................................................................................................................... 27 10 Testing ................................................................................................................................................. 30 Introduction ................................................................................................................................... 30 10.1 10.2 TPM2_SelfTest ............................................................................................................................. 31 10.3 TPM2_IncrementalSelfTest .......................................................................................................... 34 10.4 TPM2_GetTestResult ................................................................................................................... 37 11 Session Commands ............................................................................................................................ 40 11.1 TPM2_StartAuthSession .............................................................................................................. 40 11.2 TPM2_PolicyRestart ..................................................................................................................... 45 12 Object Commands ............................................................................................................................... 48 12.1 TPM2_Create................................................................................................................................ 48 12.2 TPM2_Load .................................................................................................................................. 54 Family “2.0” TCG Published Page iii Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
Trusted Platform Module Library Part 3: Commands 12.3 TPM2_LoadExternal ..................................................................................................................... 58 12.4 TPM2_ReadPublic ........................................................................................................................ 63 12.5 TPM2_ActivateCredential ............................................................................................................. 66 12.6 TPM2_MakeCredential ................................................................................................................. 70 12.7 TPM2_Unseal ............................................................................................................................... 73 12.8 TPM2_ObjectChangeAuth ............................................................................................................ 76 12.9 TPM2_CreateLoaded ................................................................................................................... 79 13 Duplication Commands ....................................................................................................................... 84 13.1 TPM2_Duplicate ........................................................................................................................... 84 13.2 TPM2_Rewrap .............................................................................................................................. 88 13.3 TPM2_Import ................................................................................................................................ 92 14 Asymmetric Primitives ......................................................................................................................... 98 14.1 Introduction ................................................................................................................................... 98 14.2 TPM2_RSA_Encrypt ..................................................................................................................... 98 14.3 TPM2_RSA_Decrypt .................................................................................................................. 102 14.4 TPM2_ECDH_KeyGen ............................................................................................................... 106 14.5 TPM2_ECDH_ZGen ................................................................................................................... 109 14.6 TPM2_ECC_Parameters ............................................................................................................ 112 14.7 TPM2_ZGen_2Phase ................................................................................................................. 115 15 Symmetric Primitives ......................................................................................................................... 119 15.1 Introduction ................................................................................................................................. 119 15.2 TPM2_EncryptDecrypt ................................................................................................................ 121 15.3 TPM2_EncryptDecrypt2 .............................................................................................................. 125 15.4 TPM2_Hash ................................................................................................................................ 128 15.5 TPM2_HMAC .............................................................................................................................. 131 16 Random Number Generator .............................................................................................................. 135 16.1 TPM2_GetRandom ..................................................................................................................... 135 16.2 TPM2_StirRandom ..................................................................................................................... 138 17 Hash/HMAC/Event Sequences ......................................................................................................... 141 17.1 Introduction ................................................................................................................................. 141 17.2 TPM2_HMAC_Start .................................................................................................................... 141 17.3 TPM2_HashSequenceStart ........................................................................................................ 144 17.4 TPM2_SequenceUpdate ............................................................................................................ 147 17.5 TPM2_SequenceComplete ......................................................................................................... 151 17.6 TPM2_EventSequenceComplete ............................................................................................... 155 18 Attestation Commands ...................................................................................................................... 159 18.1 Introduction ................................................................................................................................. 159 18.2 TPM2_Certify .............................................................................................................................. 161 18.3 TPM2_CertifyCreation ................................................................................................................ 164 18.4 TPM2_Quote............................................................................................................................... 167 18.5 TPM2_GetSessionAuditDigest ................................................................................................... 170 18.6 TPM2_GetCommandAuditDigest ............................................................................................... 173 18.7 TPM2_GetTime........................................................................................................................... 176 19 Ephemeral EC Keys .......................................................................................................................... 179 Family “2.0” TCG Published Page iv Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
Trusted Platform Module Library Part 3: Commands 19.1 Introduction ................................................................................................................................. 179 19.2 TPM2_Commit ............................................................................................................................ 180 19.3 TPM2_EC_Ephemeral ................................................................................................................ 184 20 Signing and Signature Verification .................................................................................................... 187 20.1 TPM2_VerifySignature ................................................................................................................ 187 20.2 TPM2_Sign ................................................................................................................................. 190 21 Command Audit ................................................................................................................................. 194 Introduction ................................................................................................................................. 194 21.1 21.2 TPM2_SetCommandCodeAuditStatus ....................................................................................... 195 22 Integrity Collection (PCR) .................................................................................................................. 198 22.1 Introduction ................................................................................................................................. 198 22.2 TPM2_PCR_Extend ................................................................................................................... 199 22.3 TPM2_PCR_Event ..................................................................................................................... 202 22.4 TPM2_PCR_Read ...................................................................................................................... 205 22.5 TPM2_PCR_Allocate .................................................................................................................. 208 22.6 TPM2_PCR_SetAuthPolicy ........................................................................................................ 211 22.7 TPM2_PCR_SetAuthValue ......................................................................................................... 214 22.8 TPM2_PCR_Reset ..................................................................................................................... 217 22.9 _TPM_Hash_Start ...................................................................................................................... 220 22.10 _TPM_Hash_Data ...................................................................................................................... 222 22.11 _TPM_Hash_End ....................................................................................................................... 224 23 Enhanced Authorization (EA) Commands ........................................................................................ 226 23.1 Introduction ................................................................................................................................. 226 23.2 Signed Authorization Actions ...................................................................................................... 227 23.3 TPM2_PolicySigned ................................................................................................................... 231 23.4 TPM2_PolicySecret .................................................................................................................... 237 23.5 TPM2_PolicyTicket ..................................................................................................................... 241 23.6 TPM2_PolicyOR ......................................................................................................................... 245 23.7 TPM2_PolicyPCR ....................................................................................................................... 248 23.8 TPM2_PolicyLocality .................................................................................................................. 253 23.9 TPM2_PolicyNV .......................................................................................................................... 257 23.10 TPM2_PolicyCounterTimer ......................................................................................................... 261 23.11 TPM2_PolicyCommandCode ..................................................................................................... 265 23.12 TPM2_PolicyPhysicalPresence .................................................................................................. 268 23.13 TPM2_PolicyCpHash .................................................................................................................. 271 23.14 TPM2_PolicyNameHash ............................................................................................................. 274 23.15 TPM2_PolicyDuplicationSelect ................................................................................................... 277 23.16 TPM2_PolicyAuthorize ............................................................................................................... 280 23.17 TPM2_PolicyAuthValue .............................................................................................................. 284 23.18 TPM2_PolicyPassword ............................................................................................................... 287 23.19 TPM2_PolicyGetDigest ............................................................................................................... 290 23.20 TPM2_PolicyNvWritten ............................................................................................................... 293 23.21 TPM2_PolicyTemplate ................................................................................................................ 296 23.22 TPM2_PolicyAuthorizeNV .......................................................................................................... 299 24 Hierarchy Commands ........................................................................................................................ 303 24.1 TPM2_CreatePrimary ................................................................................................................. 303 Family “2.0” TCG Published Page v Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
Trusted Platform Module Library Part 3: Commands 24.2 TPM2_HierarchyControl ............................................................................................................. 307 24.3 TPM2_SetPrimaryPolicy ............................................................................................................. 311 24.4 TPM2_ChangePPS .................................................................................................................... 314 24.5 TPM2_ChangeEPS .................................................................................................................... 317 24.6 TPM2_Clear ................................................................................................................................ 320 24.7 TPM2_ClearControl .................................................................................................................... 324 24.8 TPM2_HierarchyChangeAuth ..................................................................................................... 327 25 Dictionary Attack Functions ............................................................................................................... 330 25.1 Introduction ................................................................................................................................. 330 25.2 TPM2_DictionaryAttackLockReset ............................................................................................. 330 25.3 TPM2_DictionaryAttackParameters............................................................................................ 333 26 Miscellaneous Management Functions ............................................................................................. 336 26.1 Introduction ................................................................................................................................. 336 26.2 TPM2_PP_Commands ............................................................................................................... 336 26.3 TPM2_SetAlgorithmSet .............................................................................................................. 339 27 Field Upgrade .................................................................................................................................... 342 27.1 Introduction ................................................................................................................................. 342 27.2 TPM2_FieldUpgradeStart ........................................................................................................... 344 27.3 TPM2_FieldUpgradeData ........................................................................................................... 347 27.4 TPM2_FirmwareRead ................................................................................................................. 350 28 Context Management ........................................................................................................................ 353 28.1 Introduction ................................................................................................................................. 353 28.2 TPM2_ContextSave .................................................................................................................... 353 28.3 TPM2_ContextLoad .................................................................................................................... 358 28.4 TPM2_FlushContext ................................................................................................................... 363 28.5 TPM2_EvictControl ..................................................................................................................... 366 29 Clocks and Timers ............................................................................................................................. 371 29.1 TPM2_ReadClock ....................................................................................................................... 371 29.2 TPM2_ClockSet .......................................................................................................................... 374 29.3 TPM2_ClockRateAdjust .............................................................................................................. 377 30 Capability Commands ....................................................................................................................... 380 30.1 Introduction ................................................................................................................................. 380 30.2 TPM2_GetCapability ................................................................................................................... 380 30.3 TPM2_TestParms ....................................................................................................................... 388 31 Non-volatile Storage .......................................................................................................................... 391 31.1 Introduction ................................................................................................................................. 391 31.2 NV Counters ............................................................................................................................... 392 31.3 TPM2_NV_DefineSpace ............................................................................................................. 393 31.4 TPM2_NV_UndefineSpace ......................................................................................................... 399 31.5 TPM2_NV_UndefineSpaceSpecial ............................................................................................. 402 31.6 TPM2_NV_ReadPublic ............................................................................................................... 405 31.7 TPM2_NV_Write ......................................................................................................................... 408 31.8 TPM2_NV_Increment ................................................................................................................. 411 31.9 TPM2_NV_Extend ...................................................................................................................... 414 Family “2.0” TCG Published Page vi Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
Trusted Platform Module Library Part 3: Commands 31.10 TPM2_NV_SetBits ...................................................................................................................... 417 31.11 TPM2_NV_WriteLock ................................................................................................................. 420 31.12 TPM2_NV_GlobalWriteLock ....................................................................................................... 423 31.13 TPM2_NV_Read ......................................................................................................................... 426 31.14 TPM2_NV_ReadLock ................................................................................................................. 429 31.15 TPM2_NV_ChangeAuth ............................................................................................................. 432 31.16 TPM2_NV_Certify ....................................................................................................................... 435 32 Vendor Specific ................................................................................................................................. 439 32.1 Introduction ................................................................................................................................. 439 32.2 TPM2_Vendor_TCG_Test .......................................................................................................... 439 Family “2.0” TCG Published Page vii Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
Trusted Platform Module Library Part 3: Commands Tables Table 1 — Command Modifiers and Decoration ........................................................................................... 2 Table 2 — Separators ................................................................................................................................... 4 Table 3 — Unmarshaling Errors ................................................................................................................. 11 Table 4 — Command-Independent Response Codes ................................................................................ 14 Table 5 — TPM2_Startup Command .......................................................................................................... 23 Table 6 — TPM2_Startup Response .......................................................................................................... 23 Table 7 — TPM2_Shutdown Command ..................................................................................................... 28 Table 8 — TPM2_Shutdown Response ...................................................................................................... 28 Table 9 — TPM2_SelfTest Command ........................................................................................................ 32 Table 10 — TPM2_SelfTest Response ...................................................................................................... 32 Table 11 — TPM2_IncrementalSelfTest Command ................................................................................... 35 Table 12 — TPM2_IncrementalSelfTest Response ................................................................................... 35 Table 13 — TPM2_GetTestResult Command ............................................................................................ 38 Table 14 — TPM2_GetTestResult Response............................................................................................. 38 Table 15 — TPM2_StartAuthSession Command ....................................................................................... 42 Table 16 — TPM2_StartAuthSession Response ........................................................................................ 42 Table 17 — TPM2_PolicyRestart Command .............................................................................................. 46 Table 18 — TPM2_PolicyRestart Response .............................................................................................. 46 Table 19 — TPM2_Create Command ........................................................................................................ 51 Table 20 — TPM2_Create Response ......................................................................................................... 51 Table 21 — TPM2_Load Command ........................................................................................................... 55 Table 22 — TPM2_Load Response ............................................................................................................ 55 Table 23 — TPM2_LoadExternal Command .............................................................................................. 60 Table 24 — TPM2_LoadExternal Response .............................................................................................. 60 Table 25 — TPM2_ReadPublic Command ................................................................................................. 64 Table 26 — TPM2_ReadPublic Response ................................................................................................. 64 Table 27 — TPM2_ActivateCredential Command ...................................................................................... 67 Table 28 — TPM2_ActivateCredential Response ...................................................................................... 67 Table 29 — TPM2_MakeCredential Command .......................................................................................... 71 Table 30 — TPM2_MakeCredential Response .......................................................................................... 71 Table 31 — TPM2_Unseal Command ........................................................................................................ 74 Table 32 — TPM2_Unseal Response ........................................................................................................ 74 Table 33 — TPM2_ObjectChangeAuth Command ..................................................................................... 77 Table 34 — TPM2_ObjectChangeAuth Response ..................................................................................... 77 Table 35 — TPM2_CreateLoaded Command ............................................................................................ 80 Table 36 — TPM2_CreateLoaded Response ............................................................................................. 80 Table 37 — TPM2_Duplicate Command .................................................................................................... 85 Family “2.0” TCG Published Page viii Level 00 Revision 01.38 Copyright © TCG 2006-2016 September 29, 2016
分享到:
收藏