1

2
1
2
3
4
5
6
7

TPM MainPart 1 Design Principles

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Specification Version 1.2
Revision 116
1 March 2011
TCG PublishedContact: admin@trustedcomputinggroup.com

TCG Published31
32

Copyright © 2003-2011 Trusted Computing Group, Incorporated

TCG
3

4

5Copyright © TCG
6

TPM Main Part 1 Design Principles
Specification Version 1.2

33Copyright © 2003-2011 Trusted Computing Group, Incorporated.
34Disclaimers, Notices, and License Terms
35THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO WARRANTIES WHATSOEVER,
36INCLUDING ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR
37ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY
38PROPOSAL, SPECIFICATION OR SAMPLE.
39Without limitation, TCG disclaims all liability, including liability for infringement of any
40proprietary rights, relating to use of information in this specification and to the
41implementation of this specification, and TCG disclaims all liability for cost of procurement
42of substitute goods or services, lost profits, loss of use, loss of data or any incidental,
43consequential, direct, indirect, or special damages, whether under contract, tort, warranty
44or otherwise, arising in any way out of use or reliance upon this specification or any
45information herein.
46This document is copyrighted by Trusted Computing Group (TCG), and no license, express or implied, is
47granted herein other than as follows: You may not copy or reproduce the document or distribute it to others
48without written permission from TCG, except that you may freely do so for the purposes of (a) examining or
49implementing TCG specifications or (b) developing, testing, or promoting information technology standards and50best practices, so long as you distribute the document with these disclaimers, notices, and license terms.
51

52Contact
theTrustedComputingGroup
at
53http://www.trustedcomputinggroup.org/">www.trustedcomputinggroup.org for information
54on specification licensing through membership agreements.
55Any marks and brands contained herein are the property of their respective owners.
56

7
8

ii

TCG Published
TCG Published

Revision 116 1 March 2011

9TPM Main Part 1 Design Principles
10Specification Version 1.2

TCG © Copyright11

57Change History
58
VersionDate

Description

Rev 50Jun 2003

Started 30 Jun 2003 by David Grawrock

Rev 52

Jul 2003

First cut at the design principles
Started 15 Jul 2003 by David Grawrock
Moved
Rev 58Aug 2003

Started 27 Aug 2003 by David Grawrock
All emails through 28 August 2003
New delegation from Graeme merged

Rev 62

Oct 2003

Approved by WG, TC and Board as public release of 1.2

Rev 63

Oct 2003

Started 2 Oct 2003 by David Grawrock
Kerry email 7 Oct “Various items in rev62”
kerry email 10 Oct “Other issues in rev 62”
Changes to audit generation

Rev 64

Oct 2003

Started 12 Oct 2003 by David Grawrock
Removed PCRWRITE usage in the NV write commands
Added locality to transport_out log
Disable readpubek now set in takeownership. DisableReadpubek now deprecated, as the functionality is moot.
Oshrats email regarding DSAP/OSAP sessions and the invalidation of them on delegation changes
Changes for CMK commands.
Oshrats email with minor 63 comments

Rev 65

Nov 2003

Action in NV_DefineSpace to ignore the Booleans in the input structure (Kerry email of 10/30
Transport changes from markus 11/6 email
Set rules for encryption of parameters for OIAP,OSAP and DSAP
Rewrote section on debug PCR to specify that the platform spec must indicate which register is the debug PCR
Orlando FtF decisions
CMK changes from Graeme

Rev 66

Nov 2003

Comment that OSAP tied to owner delegation needs to be treated internally in the TPM as a DSAP session
Minor edits from Monty
Added new GetCapability as requested by PC Specific WG
Added new DP section that shows mandatory and optional
Oshrat email of 11/27
Change PCR attributes to use locality selection instead of an array of BOOL’s
Removed transport sessions as something to invalidate when a resource type is flushed.
Oshrat email of 12/3
added checks for NV_Locked in the NV commands
Additional emails from the WG for minor editing fixes

Rev 67

Dec 2003

Made locality_modifier always a 1 size
Changed NV index values to add the reserved bit. Also noticed that the previous NV index values were 10 bytes not 8. Edited
them to correct size.
Audit changes to ensure audit listed as optional and the previous commands properly deleted
Added new OSAP authorization encryption. Changes made with new entity types, new section in DP (bottom of doc) and allcommand rewritten to check for the new encryption

Rev 68

Jan 2004

Added new section to identify all changes made for FIPS. Made some FIPS changes on creating and loading of keys
Added change that OSAP encryption IV creation always uses both odd and even nonces
Added SEALX ordinal and changes to TPM_STORED_DATA12 and seal/unseal to support this

12Revision 116 1 Marchy 201113

TCG Published
TCG Publishediii

14Copyright © TCG
15
Rev 69Feb 2004

TPM Main Part 1 Design Principles
Specification Version 1.2
Fixup on stored_data12.
Removed magic4 from the GPIO
Added in section 34 of DP further discussion of versioning and getcap
DP todo section cleaned up
Changed store_privkey in migrate_asymkey
Moved text for getcapabilities – hopefully it is easier to read and follow through on now.

Rev 70Mar 2004

Rewrite structure doc on PCR selection usage.
New getcap to answer questions regarding TPM support for pcr selection size

Rev 71Mar 2004

Change terms from authorization data to AuthData.

Rev 72

Mar 2004

Zimmermann’s changes for DAA
Added TPM_Quote2, this includes new structure and ordinal
Updated key usage table to include the 1.2 commands
Added security properties section that links the main spec to the conformance WG guidelines (in section 1)

Rev 73

Apr 2004

Changed CMK_MigrateKey to use TPM_KEY12 and removed two input parameters
Allowed TPM_Getcapability and TPM_GetTestResult to execute prior to TPM_Startup when in failure mode

Rev 74

May 2004

Minor editing to reflect comments on web site.
Locked spec and submitted for IP review

Rev 76

Aug 2004

All comments from the WG
Included new SetValue command and all of the indexes to make that work16
17

Rev 77

Aug 2004

All comments from the WG

Rev 78

Oct 2004

Comments from WG. Added new getcaps to report and query current TPM version

Rev 82

Jan 2005

All changes from emails and minutes (I think).

Rev 84

Feb 2005

Final changes for 1.2 level 2

Rev 88Aug 2005

Eratta level 2 release candidate

Rev 91

Sept. 2005

Update to Figure 9 (b) in section 9.2 by Tasneem Brutch

Rev 100

May 2006

Clarified CTR mode

Rev 101

Aug 2006

Added deactivated rationale. Clarified number of sessions. Changed “set to NULL” to “set to zero”. Added NV index D bit
rationale. Added _INFO key rationale and clarified cases where _INFO keys act as _SHA1 keys.

Rev 102

Sept 2006

Minor typos only. No functional changes.

Rev 103

Oct 2006

Note that blobs encrypted in blocks must have integrity chaining. Merged two AIK sections. Self-test checks EK using
encryption, not signing.

Rev 104

Nov 2006

RNG must be NIST approved in FIPS mode. When ordinal says OSAP for ADIP, it means OSAP or DSAP.

Rev 105

Feb 2007

Removed informative reference to getting signed counter values.

Rev 106

April 2007

Updated TPM_TakeOwnership state diagram and text to remove deactivated. Indicated that _INFO ordinals are examples, not acomplete list.

Rev 107

July 2007

Explained that PCRs are still extended when disabled and deactivated. Removed restriction that
TPM_CreateEndorsementKeyPair is not allowed after TPM_CreateRevokableEK or TPM_RevokeTrust.

Rev 108

Aug 2007Field upgrade should not affect shielded locations. TPM MUST support two key slots.

Rev 109

Oct 2007

Cleaned up Opt-in physical presence wording. Changed some physical presence terms to agree with Part 2.

Rev 110May 2008

TPM_AUTH_PRIV_USE_ONLY name change and indication that it refers to reading the public key. Warning that ADIP with awell known secret may require transport.

Rev 111

July 2008

TSC_ ordinals must be tested early. AddedMUST to self tests, but indicated that test methods are examples. Key contexts
cannot be flushed. Deleted unbind payload normative to agreee with part 3.

Rev 112Jan 2009

Default exponent clarified, self-test failure cleared by TPM_Init, self-test failure must delete saved state

Rev 113

Jan 2009

No changes.

Rev 114

Jan 2009

No changes

iv

TCG Published
TCG Published

Revision 116 1 Marchy 2011

18TPM Main Part 1 Design Principles

TCG © Copyright

19Specification Version 1.2

20

Rev 116

Aug 2009

Audit happens at the end of the command. Audit occurs when deactivated to remove a corner case.

59

21Revision 116 1 Marchy 201122

TCG Published
TCG Publishedv

23Copyright © TCG
24

TPM Main Part 1 Design Principles
Specification Version 1.2

60

25
26

vi

TCG Published
TCG Published

Revision 116 1 Marchy 2011

27TPM Main Part 1 Design Principles

TCG © Copyright

28Specification Version 1.2

29

61

30Revision 116 1 Marchy 201131

TCG Published
TCG Publishedvii

32Copyright © TCG
33

TPM Main Part 1 Design Principles
Specification Version 1.2

62Table of Contents
631. Scope and Audience.......................................................................................................................................... 164

1.1 Key words..................................................................................................................................................... 165

1.2 Statement Type............................................................................................................................................ 1

662. Description......................................................................................................................................................... 267

2.1 TODO (notes to keep the editor on track) .................................................................................................... 268

2.2 Questions..................................................................................................................................................... 2

69

2.2.1 Delegation Questions............................................................................................................................. 670

2.2.2 NV Questions....................................................................................................................................... 11713. Protection......................................................................................................................................................... 1372

3.1 Introduction ................................................................................................................................................ 1373

3.2 Threat......................................................................................................................................................... 1474

3.3 Protection of functions................................................................................................................................ 1475

3.4 Protection of information............................................................................................................................. 1476

3.5 Side effects................................................................................................................................................. 1577

3.6 Exceptions and clarifications...................................................................................................................... 15784. TPM Architecture............................................................................................................................................. 1779

4.1 Interoperability............................................................................................................................................ 1780

4.2 Components............................................................................................................................................... 17

81

4.2.1 Input and Output.................................................................................................................................. 18

82

4.2.2 Cryptographic Co-Processor................................................................................................................ 1883

4.2.2.1 RSA Engine................................................................................................................................... 19

84

4.2.2.2 Signature Operations..................................................................................................................... 1985

4.2.2.3 Symmetric Encryption Engine........................................................................................................ 20

86

4.2.2.4 Using Keys.................................................................................................................................... 2087

4.2.3 Key Generation.................................................................................................................................... 21

88

4.2.3.1 Asymmetric – RSA........................................................................................................................ 21

89

4.2.3.2 Nonce Creation.............................................................................................................................. 21

90

4.2.4 HMAC Engine...................................................................................................................................... 21

91

4.2.5 Random Number Generator................................................................................................................. 22

92

4.2.5.1 Entropy Source and Collector........................................................................................................ 23

93

4.2.5.2 State Register................................................................................................................................ 24

94

4.2.5.3 Mixing Function............................................................................................................................. 24

95

4.2.5.4 RNG Reset.................................................................................................................................... 24

96

4.2.6 SHA-1 Engine...................................................................................................................................... 25

97

4.2.7 Power Detection................................................................................................................................... 25

34
35

viii

TCG Published
TCG Published

Revision 116 1 Marchy 2011

36TPM Main Part 1 Design Principles

TCG © Copyright

37Specification Version 1.2

38

98

4.2.8 Opt-In................................................................................................................................................... 26

99

4.2.9 Execution Engine................................................................................................................................. 27100

4.2.10 Non-Volatile Memory.......................................................................................................................... 28

101

4.3 Data Integrity Register (DIR)...................................................................................................................... 28

102

4.4 Platform Configuration Register (PCR)....................................................................................................... 281035. Endorsement Key Creation.............................................................................................................................. 31
104

5.1 Controlling Access to PRIVEK.................................................................................................................... 32

105

5.2 Controlling Access to PUBEK..................................................................................................................... 32

1066. Attestation Identity Keys................................................................................................................................... 33
1077. TPM Ownership............................................................................................................................................... 34
108

7.1 Platform Ownership and Root of Trust for Storage..................................................................................... 34

1098. Authentication and Authorization Data............................................................................................................. 35110

8.1 Dictionary Attack Considerations................................................................................................................ 36

1119. TPM Operation................................................................................................................................................. 38112

9.1 TPM Initialization & Operation State Flow.................................................................................................. 39

113

9.1.1 Initialization ......................................................................................................................................... 39114

9.2 Self-Test Modes......................................................................................................................................... 41

115

9.2.1 Operational Self-Test........................................................................................................................... 43116

9.3 Startup ....................................................................................................................................................... 47

117

9.4 Operational Mode....................................................................................................................................... 47

118

9.4.1 Enabling a TPM................................................................................................................................... 48

119

9.4.2 Activating a TPM.................................................................................................................................. 50

120

9.4.3 Taking TPM Ownership........................................................................................................................ 51

121

9.4.3.1 Enabling Ownership...................................................................................................................... 52

122

9.4.4 Transitioning Between Operational States .......................................................................................... 53

123

9.5 Clearing the TPM ....................................................................................................................................... 54

12410. Physical Presence ......................................................................................................................................... 56
12511. Root of Trust for Reporting (RTR).................................................................................................................. 58
126

11.1 Platform Identity........................................................................................................................................ 58

127

11.2 RTR to Platform Binding .......................................................................................................................... 59

128

11.3 Platform Identity and Privacy Considerations........................................................................................... 59

129

11.4 Attestation Identity Keys........................................................................................................................... 59

130

11.4.1 AIK Creation....................................................................................................................................... 60

131

11.4.2 AIK Storage........................................................................................................................................ 61

13212. Root of Trust for Storage (RTS)..................................................................................................................... 62
133

12.1 Loading and Unloading Blobs................................................................................................................... 62

13413. Transport Sessions and Authorization Protocols............................................................................................ 63

39Revision 116 1 Marchy 201140

TCG Published
TCG Publishedix

41Copyright © TCG
42

TPM Main Part 1 Design Principles
Specification Version 1.2

135

13.1 Authorization Session Setup..................................................................................................................... 66

136

13.2 Parameter Declarations for OIAP and OSAP Examples........................................................................... 67

137

13.2.1 Object-Independent Authorization Protocol (OIAP) ........................................................................... 70

138

13.2.2 Object-Specific Authorization Protocol (OSAP) ................................................................................. 74139

13.3 Authorization Session Handles................................................................................................................. 78

140

13.4 Authorization-Data Insertion Protocol (ADIP)........................................................................................... 79

141

13.5 AuthData Change Protocol (ADCP) ......................................................................................................... 83

142

13.6 Asymmetric Authorization Change Protocol (AACP)................................................................................ 84

14314. FIPS 140 Physical Protection......................................................................................................................... 85
144

14.1 TPM Profile for FIPS Certification............................................................................................................. 8514515. Maintenance................................................................................................................................................... 86
146

15.1 Field Upgrade........................................................................................................................................... 87

14716. Proof of Locality............................................................................................................................................. 89
14817. Monotonic Counter ........................................................................................................................................ 90
14918. Transport Protection....................................................................................................................................... 93
150

18.1 Transport encryption and authorization.................................................................................................... 95

151

18.1.1 MGF1 parameters.............................................................................................................................. 97

152

18.1.2 HMAC calculation............................................................................................................................... 97

153

18.1.3 Transport log creation........................................................................................................................ 98154

18.1.4 Additional Encryption Mechanisms.................................................................................................... 98

155

18.2 Transport Error Handling.......................................................................................................................... 98

156

18.3 Exclusive Transport Sessions................................................................................................................... 99

157

18.4 Transport Audit Handling........................................................................................................................ 100

158

18.4.1 Auditing of wrapped commands....................................................................................................... 100

15919. Audit Commands.......................................................................................................................................... 101
160

19.1 Audit Monotonic Counter........................................................................................................................ 103

16120. Design Section on Time Stamping............................................................................................................... 104
162

20.1 Tick Components.................................................................................................................................... 104

163

20.2 Basic Tick Stamp.................................................................................................................................... 105

164

20.3 Associating a TCV with UTC.................................................................................................................. 105

165

20.4 Additional Comments and Questions...................................................................................................... 107

16621. Context Management................................................................................................................................... 110
16722. Eviction......................................................................................................................................................... 112
16823. Session pool................................................................................................................................................. 113
16924. Initialization Operations ............................................................................................................................... 114
17025. HMAC digest rules....................................................................................................................................... 116
17126. Generic authorization session termination rules........................................................................................... 117
43
44

x

TCG Published
TCG Published

Revision 116 1 Marchy 2011

45TPM Main Part 1 Design Principles

TCG © Copyright

46Specification Version 1.2

4717227. PCR Grand Unification Theory..................................................................................................................... 118
173

27.1 Validate Key for use................................................................................................................................ 121

17428. Non Volatile Storage.................................................................................................................................... 122
175

28.1 NV storage design principles.................................................................................................................. 123

176

28.1.1 NV Storage use models................................................................................................................... 124

177

28.2 Use of NV storage during manufacturing................................................................................................ 125

17829. Delegation Model......................................................................................................................................... 127
179

29.1 Table Requirements .............................................................................................................................. 127

180

29.2 How this works....................................................................................................................................... 128

181

29.3 Family Table........................................................................................................................................... 130

182

29.4 Delegate Table....................................................................................................................................... 131

183

29.5 Delegation Administration Control.......................................................................................................... 132

184

29.5.1 Control in Phase 1............................................................................................................................ 133

185

29.5.2 Control in Phase 2............................................................................................................................ 134

186

29.5.3 Control in Phase 3............................................................................................................................ 134

187

29.6 Family Verification.................................................................................................................................. 134

188

29.7 Use of commands for different states of TPM......................................................................................... 136

189

29.8 Delegation Authorization Values............................................................................................................. 136

190

29.8.1 Using the authorization value .......................................................................................................... 137

191

29.9 DSAP description................................................................................................................................... 137

19230. Physical Presence........................................................................................................................................ 141
193

30.1 Use of Physical Presence....................................................................................................................... 141

19431. TPM Internal Asymmetric Encryption........................................................................................................... 143
195

31.1.1 TPM_ES_RSAESOAEP_SHA1_MGF1........................................................................................... 143

196

31.1.2 TPM_ES_RSAESPKCSV15............................................................................................................ 144

197

31.1.3 TPM_ES_SYM_CTR........................................................................................................................ 144

198

31.1.4 TPM_ES_SYM_OFB........................................................................................................................ 144

199

31.2 TPM Internal Digital Signatures.............................................................................................................. 145

200

31.2.1 TPM_SS_RSASSAPKCS1v15_SHA1............................................................................................. 145

201

31.2.2 TPM_SS_RSASSAPKCS1v15_DER............................................................................................... 146

202

31.2.3 TPM_SS_RSASSAPKCS1v15_INFO.............................................................................................. 146

203

31.2.4 Use of Signature Schemes.............................................................................................................. 146

20432. Key Usage Table.......................................................................................................................................... 148
20533. Direct Anonymous Attestation...................................................................................................................... 150
206

33.1 TPM_DAA_JOIN.................................................................................................................................... 150

207

33.2 TPM_DAA_Sign..................................................................................................................................... 152

208

33.3 DAA Command summary....................................................................................................................... 152

48Revision 116 1 Marchy 201149

TCG Published
TCG Publishedxi

50Copyright © TCG
51

TPM Main Part 1 Design Principles
Specification Version 1.2

209

33.3.1 TPM setup........................................................................................................................................ 153

210

33.3.2 JOIN................................................................................................................................................. 153

211

33.3.3 SIGN................................................................................................................................................ 157

21234. General Purpose IO..................................................................................................................................... 160
21335. Redirection................................................................................................................................................... 161
21436. Structure Versioning..................................................................................................................................... 162
21537. Certified Migration Key Type........................................................................................................................ 164
216

37.1 Certified Migration Requirements........................................................................................................... 164

217

37.2 Key Creation........................................................................................................................................... 165

218

37.3 Migrate CMK to a MA............................................................................................................................. 165

219

37.4 Migrate CMK to a MSA........................................................................................................................... 166

22038. Revoke Trust................................................................................................................................................ 167
22139. Mandatory and Optional Functional Blocks.................................................................................................. 169
22240. 1.1a and 1.2 Differences.............................................................................................................................. 172

223

52
53

xii

TCG Published
TCG Published

Revision 116 1 Marchy 2011

54TPM Main Part 1 Design Principles

TCG © Copyright

55Specification Version 1.2

562241. Scope and Audience
225The TPM main specification is an industry specification that enables trust in computing
226platforms in general. The main specification is broken into parts to make the role of each
227document clear. A version of the specification (like 1.2) requires all parts to be a complete
228specification.
229A TPM designer MUST be aware that for a complete definition of all requirements necessary
230to build a TPM, the designer MUST use the appropriate platform specific specification for all
231TPM requirements.
2321.1

Key words

233The key words “MUST,” “MUST NOT,” “REQUIRED,” “SHALL,” “SHALL NOT,” “SHOULD,”
234“SHOULD NOT,” “RECOMMENDED,” “MAY,” and “OPTIONAL” in the chapters 2-10
235normative statements are to be interpreted as described in [RFC-2119].
2361.2

Statement Type

237Please note a very important distinction between different sections of text throughout this238document. You will encounter two distinctive kinds of text: informative comment and239normative statements. Because most of the text in this specification will be of the kind
240normative statements, the authors have informally defined it as the default and, as such,
241have specifically called out text of the kind informative comment They have done this by
242flagging the beginning and end of each informative comment and highlighting its text in
243gray. This means that unless text is specifically marked as of the kind informative
244comment, you can consider it of the kind normative statements.
245For example:
246Start of informative comment
247This is the first paragraph of several paragraphs containing text of the kind informative
248comment ...
249This is the second paragraph of text of the kind informative comment ...
250This is the nth paragraph of text of the kind informative comment ...
251To understand the TCG specification the user must read the specification. (This use of
252MUST does not require any action).
253End of informative comment
254This is the first paragraph of one or more paragraphs (and/or sections) containing the text
255of the kind normative statements ...
256To understand the TCG specification the user MUST read the specification. (This use of
257MUST indicates a keyword usage and requires an action).

57Revision 116 1 Marchy 201158

TCG Published
TCG Published1

59Copyright © TCG
60

TPM Main Part 1 Design Principles
Specification Version 1.2

2582. Description
259The design principles give the basic concepts of the TPM and generic information relative to260TPM functionality.
261A TPM designer MUST review and implement the information in the TPM Main specification262(parts 1-4) and review the platform specific document for the intended platform. The
263platform specific document will contain normative statements that affect the design and
264implementation of a TPM.
265A TPM designer MUST review and implement the requirements, including testing and266evaluation, as set by the TCG Conformance Workgroup. The TPM MUST comply with the267requirements and pass any evaluations set by the Conformance Workgroup. The TPM MAY
268undergo more stringent testing and evaluation.
269The question section keeps track of questions throughout the development of the
270specification and hence can have information that is no longer current or moot. The
271purpose of the questions is to track the history of various decisions in the specification to272allow those following behind to gain some insight into the committees thinking on various
273points.
2742.1TODO (notes to keep the editor on track)275
2762.2

Questions

277Start of informative comment
278How to version the flag structures?
279
280

I suggest that we simply put the version into the structure and pass it back in the
structure. Add the version information into the persistent and volatile flag structures.

281When using the encryption transport failures are easy to see. Also the watcher on the line
282can tell where the error occurred. If the failure occurs at the transport level the response is283an error (small packet) and it is in the clear. If the error occurs during execution of the
284command then the response is a small encrypted packet. Should we expand the packet size
285or simply let this go through?
286

Not an issue.

287Do we restrict the loading of a counter to once per TPM_Startup(Clear)?
288

Yes once a counter is set it must remain the same until the next successful startup.

289Does the time stamp work as a change on the tag or as a wrapped command like the290transport protection.
291
292
293
294
295
296
297
61
62

While possibly easier at the HW level the tag mechanism seems to be harder at the SW
level as to what commands are sent to the TPM. The issue of how the SW presents the
TS session to the SW writer is not an issue. This is due to the fact that however thesession is presented to the SW writer the writer must take into account which
commands are being time stamped and how to manage the log etc. So accepting amechanism that is easy for the HW developer and having the SW manage the interface isa sufficient direction.
2

TCG Published
TCG Published

Revision 116 1 Marchy 2011

63TPM Main Part 1 Design Principles

TCG © Copyright

64Specification Version 1.2

65298When returning time information do we return the entire time structure or just the time
299and have the caller obtain all the information with a GetCap call?
300

All time returns will use the entire structure with all the details.

301Do we want to return a real clock value or a value with some additional bits (like a
302monotonic value with a time value)?
303

Add a count value into the time structure.

304Do we need NTP or is SNTP sufficient?
305
306
307
308

The TPM will not run the time protocol itself. What the TPM will do is accept a value
from outside software and a hash of the protocols that produced the value. This allows
the platform to use whatever they want to set the value from secure time to the local PC
clock.

309Can an owner destroy a TPM by issuing repeated CreateCounter commands?
310
311
312
313

A TPM may place a throttle on this command to avoid burn issues. It MUST not be
possible to burn out the TPM counter under normal operating conditions. The
CreateCounter
commandislimited
to
only
once
per
successful
TPM_Startup(ST_CLEAR).

314
315
316
317

This answer is now somewhat moot as the command to createcounter is now ownerauthorized. This allows the owner to decide when to authorize the counter creation. As
there are only 4 counters available it is not an issue with having the owner continue toauthorize counters.

318What happens to a transport session (log etc.) on an S3?
319
320
321
322

Should these be the same as the authorization sessions? The saving of a transportsession across S3 is not a security concern but is a memory concern. The TPM MUST
clear the transport session on TPM_Startup(CLEAR) and MAY clear the session on
TPM_Startup(any).

323While you can’t increment or create a new counter after startup can you read a counter
324other than the active one?
325

You may read other counters

326When we audit a command that is not authorized should we hash the parameters and327provide that as part of the audit event, currently they are set to null.
328

We should hash parameters of non-authorized commands

329There is a fundamental problem with the encryption of commands in the transport and
330auditing. If we cover a command we have no way to audit, if we show the command then it
331isn’t protected. Can we expose the command (ordinal) and not the parameters?
332
333

If the owner has requested that a function be audited then the execute transport return
will include sufficient information to produce the audit entry.

334How to set the time in the audit structure and tell the log what is going on.
335
336

The time in the audit structure is set to nulls except when audit occurs as part of atransport session. In that case the audit command is set from the time value in the TPM.

337Is there a limit to the number of locality modifiers?
66Revision 116 1 Marchy 201167

TCG Published
TCG Published3

68Copyright © TCG
69

338
339

TPM Main Part 1 Design Principles
Specification Version 1.2

Yes, the TPM need only support a maximum of 4 modifiers. The definition of themodifiers is always a platform specific issue.

340How do we evict various resources?
341
342

There are numerous eviction routines in the current spec. We will deprecate the various
types and move to TPM_Flushxxx for all resource types.

343Can you flush a saved context?
344
345

Yes, you must be able to invalidate saved contexts. This would be done by making surethat the TPM could not load any saved context.

346What is the value of maintaining the clock value when the time is not incrementing? Can
347this be due to the fact that the time is now known to be at least after the indicated time?
348

Moot point now as we don’t keep the clock value at

349Should we change the current structures and add the tag?
350

TODO

351Can we have a bank of bits (change bit locality) for each of the 4 levels of locality?
352

Now

353How do we find out what sessions are active? Do we care?
354
355

I would say yes we care and we should use the same mechanism that we do for the keys.
A GetCap that will return the handles.

356Can we limit the transport sessions to only one?
357
358

No, we should have as a minimum 2 sessions. One gets into deadlocks and such so theminimum should be 2.

359

Changed: The deadlock is with authorization sessions, not transport.

360Does the TPM need to keep the audit structure or can it simply keep a hash?
361

The TPM just keeps the audit digest and no other information.

362What happens to an OSAP session if the key associated with it is taken off chip with a363"SaveContext"? What happens if the key saveContext occurs after an OSAP auth context
364that is already off chip? How do you later connect the key to the auth session (without
365having to store all sorts of things on chip)? Are we really honestly convinced that we've
366thought of all the possible ramifications of saving and restoring auth sessions? And is it
367really true that all the things we say about a saved auth session do/should apply to a saved
368key (which is to say is there really a single loadContext command and a single context
369structure)?
370
371
372

Saved context a reliable indication of the linkage between the OSAP and the key. Whensaving save auth then key, on load key then auth. Auth session checks for the key and if
not found fails.

373Why is addNonce an output of 16.5 loadContext?
374
375
376

70
71

If it's wrong, it's a little late to find out now - why not have it as an input and have the
TPM return an error if the encrypted addNonce doesn't match the input? The thought
was that the nonce area might not be a nonce but was information that the caller could

4

TCG Published
TCG Published

Revision 116 1 Marchy 2011

72TPM Main Part 1 Design Principles

TCG © Copyright

73Specification Version 1.2

74
377
378

put in. If they use it as a nonce fine, but they could also use it as a label or sequencenumber or … any value the caller wanted

379Is there a memory endurance problem with contextNonceSession?
380
381

contextNonceSession does not have to be saved across S3 states so there is noendurance problem.

382Is there a memory endurance problem with contextNonceKey?
383
384

contextNonceKey only changes on TPM_Startup(ST_Clear) so it’s endurance is the sameas a PCR.

385The debate continues about restoring a resource’s handle during TPM_LoadContext.
386
387
388

Debate ends by having the load context be informed of what the loaders opinion is about
the handle. The requestor can indicate that it wishes the same handle and if the TPM
can perform that task it does, if it cannot then the load fails.

389Interesting attack is now available with the new audit close flag on get audit signed. Anyone
390with access to a signing key can close the audit log. The only requirement on the command
391is that the key be authorized. While there is no loss of information (as the attacker can
392always destroy the external log) does the closing of a log make things look different. This
393does enable a burn out attack. The ability to closeAudit enables a new DenialOfService
394attack.
395
396
397
398
399

Resolution: The TPM Owner owns the audit process, so the TPM Owner should haveexclusive control over closeAudit. Hence the signing key used to closeAudit must be an
AIK. Note that the owner can choose to give this AIK’s AuthData value to the OS, so that
the OS can automatically close an audit session during platform power down. But suchoperations are outside this specification.

400Should we keep the E function in the tick counter?
401
402
403
404

From Graeme, I would prefer to see these calculations deleted. The calculation starts
with one assertion and derives a contradictory assertion. Generally, there seems little
value in trying to derive an equality relationship when nothing is known about the pathto and from the Time Authority.

405What is the difference between DIR_Quote and DirReadSigned?
406

Appears to be none so DIR_Quote deleted

407The tickRate parameter associates tick with seconds and has no way to indicate that the
408rate is greater than one second. Is this OK?
409
410

Do we need to allow for tick rates that are slower than once per second. We report innanoseconds.

411The TPM MUST support a minimum of 2 authorization sessions. Where do we put this412requirement in the spec?
413Can we find a use for the DIR and BIT areas for locality 0?
414
415

They have no protections so in many ways they are just extra. We leave this as it is as
locality 0 may mean something else on a platform other than a PC.

416How do we send back the transport log information on each execute transport?

75Revision 116 1 Marchy 201176

TCG Published
TCG Published5

77Copyright © TCG
78

417
418
419

TPM Main Part 1 Design Principles
Specification Version 1.2

It is 64 byes in length and would make things very difficult to include on every
command. Change wrappedaudit to be input params, add output parms and the caller
has all information necessary to create the structure to add into the digest.

420The transport log structure is a single structure used both for input and output with the421only difference being the setting of ticks to 0 on input and a real value on output, do we
422need two structures.
423

I believe that a single structure is fine

424For TPM_Startup(ST_Clear) I added that all keys would be flushed. Is this right?
425

Yes

426Why have 2 auths for release transport signed? It is an easy attack to simply kill the427session.
428
429
430

The reason is that an attacker can close the session and get a signature of the session
log. We are currently not sure of the level of this attack but by having the creator of thesession authorize the signing of the log it is completely avoided.

43119.3 Action 3 (startup/state) doesn't reference the situation where there is no saved state.
432My presumption is that you can still run startup/clear, but maybe you have to do a
433hardware reset?
434
435
436

DWG I don't think so. This could be an attack and a way to get the wrong PCR values
into the system. The BIOS is taking one path and may not set PCR values. Hence theresponse is to go into failed selftest mode.

437What happens to a transport session if a command clears the TPM like revokeTrust
438
439
440

This is fine. The transport session is not complete but the session protected theinformation till the command that changed the TPM. It is impossible to get a log fromthe session or to sign the session but that is what the caller wanted.

441End of informative comment
4422.2.1

Delegation Questions

443Start of informative comment
444Is loading the table by untrusted process ok? Does this cause a problem when the new table
445is loaded and permissions change?
446
447

Yes, the fill table can be done by any process. A TPM Owner wishing to validate the table
can perform the operations necessary to gain assurance of the table entries.

448Are the permissions for a table row sensitive?
449
450
451
452
453

Currently we believe not but there are some attack models that knowing the permissions
makes the start of the attack easier. It does not make the success of the attack any
easier. Example if I know that a single process is the only process in the table that has
the CreateAIK capability then the attacker only attempts to break into the single process
and not all others.

454What software is in use to modify the table?

79
80

6

TCG Published
TCG Published

Revision 116 1 Marchy 2011

81TPM Main Part 1 Design Principles

TCG © Copyright

82Specification Version 1.2

83
455
456
457

The table can be updated by any software or process given the capability to manage thetable. Three likely sources of the software would be a BIOS process, an applet of atrusted process and a standalone self-booting (from CD-ROM) management application.

458Who holds the TPM Owner password?
459
460
461

There is no change to the holding of the TPM Owner token. The permissions do allow thecreation of an application that sets the TPM Owner token to a random value and thenseals the value to the application.

462How are these changes created such that there is minimal change to the current TPM?
463
464

This works by using the current authorization process and only making changes in theauthorization and not for each and every command.

465What about S3 and other events?
466

Permissions, once granted, are non-volatile.

467The permission bit to changeOwnerAuth (bit 11) gives rise to the functionality that the SW
468that has this bit can control the TPM completely. This includes removing control from the469TPM Owner as the TPM Owner value will now be a random value only known to SW. There
470are use models where this is good and bad, do we want this functionality?
471Pros and cons of physical enable table when TPM Owner is present – Pro physically present
472user can make SW play fair. Con – physically present user can override the desires of a TPM
473Owner.
474Do we need to reset TPM_PERMISSION_KEY at some time?
475

We know that the key is NOT reset on TPM_ClearOwner.

476What is the meaning of using permission table in an OIAP and OSAP mode?
477

Delegate table can be used in either OIAP or OSAP mode.

478Can you grant permissions without assigning the permissions to a specific process?
479
480

Yes, do a SetRow with a PCR_SELECTION of null and the permissions are available toany process.

481Do we need a ClearTableOwner?
482
483
484

I would assert that we do not need this command. The TPM Owner can perform SetRowwith NULLS four times and creates the exact same thing. Not having this command
lowers the number of ordinals the TPM is required to support.

485There are some issues with the currently defined behavior of familyID and the486verificationCount.
487
488

Talked to David for 30 mins. We decided that maxFamilyID is set to zero at
manufacture, and incremented for every FamTable_SetRow489

It is the responsibility of DelTable_SetRow to set the appropriate familyID

490
491

DelTable_SetRow fails if the provided familyID is not active and present somewhere in
the FamTable

492
493
494

FillTable works differently. It effectively resets the family table (invalidating all activerows) and sets up as many rows as are needed based on the number of families specified
in FillTable

84Revision 116 1 Marchy 201185

TCG Published
TCG Published7

86Copyright © TCG
87

495
496

TPM Main Part 1 Design Principles
Specification Version 1.2

This still needs a bit of work. Presumably the caller of FillTable uses a “fake” familyID,
and this is changed to the actual familyID when the fill happens

497There are some issues with the verificationCount.
498
499

Uber-issue. If none of the rows in the table are allowed to create other rows and export
them, then the “sign” of the table is meaningful

500
501

If one of the rows is allowed to create and export new rows, is there any real meaning to“the current set of exported rows?” (i.e. SW can just up and make new rows).

502Should section 4.4, TPM_DelTable_ClearTable), section 4.5 (TPM_DelTable_SetEnable), and503section 4.7 (TPM_DelTable_Set_Admin) all say “there must be UNAMBIGUOUS evidence of504the presence of physical access…” Is this okay?
505
506

Answer: No, group agreed to change UNAMBIGUOUS to BEST EFFORT in all three
sections.

507Is FamilyID a sensitive value?
508

If so, why? Agreement: FamilyID is not a sensitive value.

509Should TPM_TakeOwnership be included in permissions bits (see bit 12 in section 3.1)?
510
511

Enables a better administrative monitor and may enable user to take ownership easier.
Agreement leave it in and change informative comments to reflect the reasons.

512[From the TPM_DelTable_SetRow command informative comments]: Note that there are two
513types of rights: family rights (you can either edit your family’s rows or grab new rows) and
514administrative rights.
515This is really just an editor’s note, not a question to be resolved.

516[From the TPM_DelTable_ExportRow command informational comments]:
517

Does not effect content of exported row left behind in the table;

518

Valid for all rows in the table;

519

Does not need to be OwnerAuth’d;

520
521
522
523

Family Rights are that family can only export a row from rows 0-3 if row belongs to thefamily, but rows 4 and upwards can be exported by any Trusted Process, without any
family checking being done. This is really just an editor’s note, not a question to beresolved.

524When a Family Table row is set, the verificationCount is set to 1, make sure that is
525consistently used in all other command actions.
526

Done.

527SetEnable and SetEnableOwner enable and disable all rows in a table, not just the rows
528belong to the family of the process that used the SetEnable and/or SetEnableOwner
529commands. This is also true for SetAdmin and SetAdminOwner. Can anybody come up with
530a use scenario where that causes any problems?
531In command actions where the TPM must walk the delegation table looking for a
532configuration that matches the command input parameters (PCRinfo and/or authValues)
533and there are rows in the table with duplicate values, what does the TPM do? Is there any

88
89

8

TCG Published
TCG Published

Revision 116 1 Marchy 2011

90TPM Main Part 1 Design Principles

TCG © Copyright

91Specification Version 1.2

92534reason not to use the rule “the TPM starts walking the table starting with the first row and535use the first row it finds with matching values”?
536
537
538

Answer to this question may mean change to pseudo code in section 2.3, Using the
AuthData Value, which currently shows the TPM walking the delegation table, startingwith the first row, and using the first row it finds with matching values.

539What familyID value signals a family table row that is not in use/contains invalid values?
540
541
542

To get consistency in all the command Actions that use this, that FamilyID value has
been edited in all places to be NULL, instead of 0. Yes, FamilyID value of NULL signals afamily table row that is not in use or contains invalid values.

543From section 2.4, Delegate Table Fill and Enablement: “The changing of a TPM Owner does
544not automatically clear the delegate table. Changing a TPM Owner does disable all current
545delegations, including exported rows, and requires the new TPM Owner to re-enable the546delegations in the table. The table entry values like trusted process identification and547delegations to that process are not effected by a change in owner. THE AUTHDATA VALUES
548DO NOT SURVIVE THE OWNERSHIP CHANGE.” Question: If this is true, no delegations
549work after a change of owner. How does the new owner set new AuthData values?
550
551
552
553
554

The simple way of handling this is to get AdminMonitor to own backing up delegations at
first owner install and then be run by new owner, and AdminMonitor uses FillTable, tohandle “Owner migration.” Or, for another use option, is for second owner to pick-up
PCR-ID’s and delegations bits from previous owner – what is the most straight-forward
way to do this?

555In section 3.1 (Delegate Definitions bit map table), several commands that do not require
556owner authorization are in the table and can be delegated: TPM_SetTempDeactivated (bit55715), TPM_ReadPubek (bit 7), and TPM_LoadManuMaintPub (bit 3), Why?
558In section 3.3 it is stated, “The Family ID resets to NULL on each change of TPM Owner.”
559This invalidates all delegations. Is this what we want?
560
561

You don’t have to blow away FamilyID to blow away the blobs, because key is gone. So
this is not required – can eliminate these actions.

562In section 3.12, why is TPM_DELEGATE_LABEL included in the table?
563In section 4.2 (TPM_DelTable_FillTable), is it okay to delete requirement that delegate table
564be empty? Also, in Action 14, now that we have both persistent and volatile tableAdmin
565flags, should this command set volatile tableAdmin flag to FALSE upon completion?
566
567
568
569
570

The delegate table does not need to be empty to use the TPM_DelTable_FillTablecommand, Also, a paragraph has been added to Informative comment for
TPM_DelTable_FillTable that points out usefulness of immediately following
TPM_DelTable_FillTable with TPM_Delegate_TempSetAdmin, to stop table administrationin the current boot cycle.

571In section 4.15 (TPM_FamTable_IncrementCount), why does this command require
572TPMOwner authorization, as currently documented in section 4.15?
573
574

IncrementCount is gated by tableAdmin, which seems sufficient, and use of ownerauth
makes it difficult to automatically verify a table using a CDROM.

575In section 4.3 (TPM_DelTable_FillTableOwner), in the Action 3d, use OTP[80] = MFG(x1) in
576place of oneTimePad[n] = SHA1(x1 || seed[n]))?,
93Revision 116 1 Marchy 201194

TCG Published
TCG Published995Copyright © TCG
96577

TPM Main Part 1 Design Principles
Specification Version 1.2

yes.

578In section 4.9 (TPM_DelTable_SetRow), is invalidateRow input parameter really needed?
579

It is only used in action 5. Couldn’t action 5 simply read “Set N1 -> familyID = NULL”?

580There is no easy way to generate a blob that can be used to delegate migration authority for
581a user key.
582
583
584
585

This is because the TPM does not store the migration authority on the chip as the
migration command involves an encrypted key, not a loaded one. One could invent a‘CreateMigrationDelegationBlob’ that took the encrypted key as input and generated theencrypted delegation blob as output, but it would not be pretty. Sorry Dave.

586If a delegate row in NV memory (nominally 4 rows) is to refer to a user key (instead of owner
587auth), then it needs to include a hash of the public key. It could be that the NV table is588restricted to owner auth delegations, this would save 80 bytes of NV store and also simplify
589the LoadBlob command.
590
591

Maybe would simplify other things. I would definitely NOT permit user keys in the table
to be run with the legacy OSAP and OIAP ordinals.

592A few more GetCapability values are also required, the usual constants that we discussed
593and also the two readTable caps.
594TBD Verify that Delegate Table Management commands (see section 2.8) cover all the
595functionality of obsolete or updated commands.
596Redefine bits 16 and above in Delegation Definitions table (section 3.1). In particular, can597new command set (with TPM_FAMILY_OPERATION options as defined in section 3.20) be
598delegated individually and appropriately. Also, how many user key authorized commands
599will be delegated?
600Is new TPM_FAMILY_FLAGS field of family table (defined in section 3.5) sensitive data?
601DSAP informative comment needs to be completed (section 4.1). In particular, does the
602statement “The DSAP command works like OSAP except it takes an encrypted blob – an603encrypted delegate table row -- as input” sufficient? Or do some particular differences
604between DSAP and OSAP have to be pointed out in this informative comment??
605The TPM_Delegate_LoadBlob[Owner] commands cannot be used to load key delegation blobs
606into the TPM. Is another ordinal required to do that?
607Is it okay for TPM_Delegate_LoadBlob[Owner] commands to ignore enable/disable
608use/admin flags in family table rows?
609Is it wise to delegate TPM_DelTable_ConvertBlob command (defined in section 4.11)? Does
610current definition of this command support section 2.7 scenarios?
611Is there a privacy problem with DelTable_ReadRow since the contents may not be identical
612from TPM to TPM?
613Are DSAP sessions being pooled with the other sessions? if so, can one save\load them by
614context functions? if not, then there should be a restriction in saveContext.
615DSAP are "normal" authorization sessions and would save/load with OIAP and OSAP
616sessions
617End of informative comment
97
98

10

TCG Published
TCG Published

Revision 116 1 Marchy 2011

99TPM Main Part 1 Design Principles
100Specification Version 1.2

1016182.2.2

TCG © Copyright

NV Questions

619Start of informative comment
620You would set this by using a new ordinal that is unauthorized and only turns the flag on to621lock everything. Yet another ordinal? Do we need it? Is this an important functionality for
622the uses we see?
623
624
625
626
627
628

Yes this allows us to have "close" to write once functionality. What the functionality
would be is that the RTM would assure that the proper information is present in the
TPM and then "lock" the area. One could create this functionality by having the RTM
change the authorization each time but then you would need to eat more NV store sosave the sealed AuthData value. I think that is easier to have an ordinal than eat the NV
space and require a much more complex programming model.

629Is it OK to have an element partially written?
630

Given that we have chunks there has to be a mechanism to allow partial writes.

631If an element is partially written, how does a caller know that more needs to be written?
632
633

I would say the use model that provides the ability to write – read, in a loop is just notsupported. Get it all written and then do the read.

634Usage of the lock bit: as you wrote, the RTM would assure that the proper information is635present in the TPM and then "lock" the area. so why in action #4 we should also check636bWritten when the lock bit is set? should be as action #3b of TPM_NV_DefineSpace, if lock
637is set - return error
638
639
640
641
642

[Grawrock, David] Not quite, the use model I was trying to create was the one where the
TPM was locked and the user was attempting to add a new area. If the locked bit doesn'tallow for writing once to a new area, one must reboot to perform the write and also tellthe RTM what the value to write must be. So this allows the creator of an area to write it
once and then it flows with the locked bit.

643Can you delete a NV value with only physical presence?
644
645[Grawrock, David] You can't delete with physical presence, you must use ownerauthorization. This I think is a reasonable restriction to avoid burn problems.

646Why is there no check on the writes for a TPM Owner?
647
648
649

The check for an owner occurred during the TPM_NV_DefineSpace. It is imperative that
the TPM_NV_DefineSpace set in place the appropriate restrictions to limit the potential
for attacks on the NV storage area.

650Description of maxNVBufSize is confusing to me. Why is this value related to the input size?
651And since there is no longer any 'written' bits, why is there a maximum area size at all?
652
653
654
655
656

[Grawrock, David] This is a fixed size and set by the TPM manufacturer. I would see
values like the input buffer, transport sessions etc all coming up with the max size the
TPM can handle. This does NOT indicate what is available on the TPM right now. The
TPM could have 4k of space but max size would be 782 and would always report that
number. If the available space fell to 20 bytes this value would still be 782.

657If the storage area is an opaque area to the TPM (as described), then how does the TPM
658know what PCR registers have been used to seal a blob?

102Revision 116 1 Marchy 2011
103

TCG Published
TCG Published11104Copyright © TCG
105

659
660
661
662

TPM Main Part 1 Design Principles
Specification Version 1.2

The VALUES of the area are opaque, the attributes to control access are not. So if theattributes indicate that PCR restrictions are in place the TPM keeps those PCR values aspart of the index attributes. This in reality seals the value as there is no need for
tpmProof since the value never leaves the TPM.

663End of informative comment

106
107

12

TCG Published
TCG Published

Revision 116 1 Marchy 2011

108TPM Main Part 1 Design Principles

TCG © Copyright

109Specification Version 1.2

1106643. Protection
6653.1Introduction

666Start of informative comment
667The Protection Profile in the Conformance part of the specification defines the threats that
668are resisted by a platform. This section, “Protection,” describes the properties of selected669capabilities and selected data locations within a TPM that has a Protection Profile and has
670not been modified by physical means.
671This section introduces the concept of protected capabilities and the concept of shielded
672locations for data. The ordinal set defined in part II and III is the set of protected673capabilities. The data structures in part II define the shielded locations.
674• A protected capability is one whose correct operation is necessary in order for the675operation of the TCG Subsystem to be trusted.
676• A shielded location is an area where data is protected against interference and prying,
677independent of its form.
678This specification uses the concept of protected capabilities so as to distinguish platform
679capabilities that must be trustworthy. Trust in the TPM depends critically on the protected
680capabilities. Platform capabilities that are not protected capabilities must (of course) work
681properly if the TCG Subsystem is to function properly.
682This specification uses the concept of shielded locations, rather than the concept of
683“shielded data.” While the concept of shielded data is intuitive, it is extraordinarily difficult
684to define because of the imprecise meaning of the word “data.” For example, consider data
685that is produced in a safe location and then moved into ordinary storage. It is the same data
686in both locations, but in one it is shielded data and in the other it is not. Also, data may not
687always exist in the same form. For example, it may exist as vulnerable plaintext, but also
688may sometimes be transformed into a logically protected form. This data continues to exist,
689but doesn't always need to be shielded data - the vulnerable form needs to be shielded data,
690but the logically protected form does not. If a specific form of data requires protection
691against interference or prying, it is therefore necessary to say “if the data-D exists, it must
692exist only in a shielded location.” A more concise expression is “the data-D must be extant
693only in a shielded location.”
694Hence, if trust in the TCG Subsystem depends critically on access to certain data, that data
695should be extant only in a shielded location and accessible only to protected capabilities.
696When not in use, such data could be erased after conversion (using a protected capability)
697into another data structure. Unless the other data structure was defined as one that must
698be held in a shielded location, it need not be held in a shielded location.
699End of informative comment
7001. The data structures described in part II of the TPM specifications MUST NOT be
701
instantiated in a TPM, except as data in TPM-shielded-locations.
7022. The ordinal set defined in part II and III of the TPM specifications MUST NOT be703
instantiated in a TPM, except as TPM-protected-capabilities.

111Revision 116 1 Marchy 2011112

TCG Published
TCG Published13

113Copyright © TCG
114

TPM Main Part 1 Design Principles
Specification Version 1.2

7043. Functions MUST NOT be instantiated in a TPM as TPM-protected-capabilities if they do
705
not appear in the ordinal set defined in part II and III of the TPM specifications.
7063.2Threat707Start of informative comment
708This section, “Threat,” defines the scope of the threats that must be considered when
709considering whether a platform facilitates subversion of capabilities and data in a platform.
710The design and implementation of a platform determines the extent to which the platform
711facilitates subversion of capabilities and data within that platform. It is necessary to define
712the attacks that must be resisted by TPM-shielded locations and TPM-protected capabilities
713in that platform.
714The TCG specifications define all attacks that are resisted by the TPM. These attacks must
715be considered when determining whether the integrity of TPM-protected capabilities and716data in TPM-shielded locations can be damaged. These attacks must be considered when
717determining whether there is a backdoor method of obtaining access to TPM-protected718capabilities and data in TPM-shielded locations. These attacks must be considered when
719determining whether TPM-protected capabilities have undesirable side effects.
720End of informative comment
7211. For the purposes of the “Protection” section of the specification, the threats that MUST722
be considered when determining whether the TPM facilitates subversion of TPM723
protected-capabilities or data in TPM-shielded-locations SHALL include724
725

a. The methods inherent in physical attacks that fail if the TPM complies with the“physical protection” requirements specified by TCG

726
727

b. All methods that require execution of instructions in a computing engine in theplatform

7283.3

Protection of functions

729Start of informative comment
730A TPM-protected-capability must be used to modify TPM-protected capabilities. Other
731methods must not be allowed to modify TPM-protected capabilities. Otherwise, the integrity
732of TPM-protected capabilities is unknown.
733End of informative comment
7341. A TPM SHALL NOT facilitate the alteration of TPM-protected-capabilities, except by TPM735
protected capabilities.
7363.4

Protection of information

737Start of informative comment
738TPM-protected capabilities must provide the only means from outside the TPM to access739information represented by data in TPM-shielded-locations. Otherwise, a rogue can reveal
740data in TPM-shielded-locations, or create a derivative of data from TPM-shielded-locations
741(in a way that maintains some or all of the information content of the data) and reveal the742derivative.
115
116

14

TCG Published
TCG Published

Revision 116 1 Marchy 2011

117TPM Main Part 1 Design Principles

TCG © Copyright

118Specification Version 1.2

119743End of informative comment
7441. A TPM SHALL NOT export data that is dependent upon data structures described in part745
II of the TPM specifications, other than via a TPM-Protected-Capability.
7463.5

Side effects

747Start of informative comment
748An implementation of a TPM-protected capability must not disclose the contents of TPM749shielded locations. The only exceptions are when such disclosure is inherent in the
750definition of the capability or in the methods used by the capability. For example, a751capability might be designed specifically to reveal hidden data or might use cryptography
752and hence always be vulnerable to cryptanalysis. In such cases, some disclosure or risk of753disclosure is inherent and cannot be avoided. Other forms of disclosure (by side effects, for754example) must always be avoided.
755End of informative comment
7561. The implementation of a TPM-protected-capability in a TPM SHALL NOT facilitate the757
disclosure or the exposure of information represented by data in TPM-shielded–
758
locations, except by means unavoidably inherent in the TPM definition.
7593.6

Exceptions and clarifications

760Start of informative comment
761These exceptions to the blanket statements in the generic “protection” requirements (above)
762are fully compatible with the intended effect of those statements. These exceptions affect
763TCG-data that is available as plain-text outside the TPM and TCG-data that can be used
764without violating security or privacy. These exceptions are valuable because they approve765use of TPM resources by vendor-specific commands in particular circumstances.
766These clarifications to the blanket statements of the generic “protection” requirements
767(above) do not materially change the effect of those statements, but serve to approve specific768legitimate interpretations of the requirements.
769End of informative comment
7701. A Shielded Location is a place (memory, register, etc.) where data is protected against
771
interference and exposure, independent of its form
7722. A TPM-Protected-Capability is an operation defined in and restricted to those identified773
in part II and III of the TPM specifications.
7743. A vendor specific command or capability MAY use the standard TCG owner/operator
775
authorization mechanism
7764. A vendor specific command or capability MAY utilize a TPM_PUBKEY structure stored on
777
the TPM so long as the usage of that TPM_PUBKEY structure is authorized using the778
standard TCG authorization mechanism.
7795. A vendor specific command or capability MAY use a sequence of standard TCG
780
commands. The command MUST propagate the locality used for the call to the used781
TCG commands or capabilities, or set locality to 0.

120Revision 116 1 Marchy 2011
121

TCG Published
TCG Published15

122Copyright © TCG
123

TPM Main Part 1 Design Principles
Specification Version 1.2

7826. A vendor specific command or capability that takes advantage of exceptions and783
clarifications to the “protection” requirements MUST be defined as part of the security
784
target of the TPM. Such a vendor specific command or capability MUST be evaluated to785
meet the Platform Specific TPM and System Security Targets.
7867. If a TPM employs vendor-specific cipher-text that is protected against subversion to the787same or greater extent as internal TPM-resources stored outside the TPM with TCG788
defined methods, that vendor-specific cipher-text does not necessarily require protection
789
from physical attack. If a TPM location stores only vendor-specific cipher-text that does790
not require protection from physical attack, that location can be ignored when
791
determining whether the TPM complies with the "physical protection" requirements
792
specified by TCG.

124
125

16

TCG Published
TCG Published

Revision 116 1 Marchy 2011

126TPM Main Part 1 Design Principles

TCG © Copyright

127Specification Version 1.2

1287934. TPM Architecture
794

4.1

Interoperability

795Start of informative comment
796The TPM must support a minimum set of algorithms and operations to meet TCG
797specifications.
798Algorithms
799RSA, SHA-1, HMAC
800The algorithms and protocols are the minimum that the TPM must support. Additional
801algorithms and protocols may be available to the TPM. All algorithms and protocols
802available in the TPM must be included in the TPM and platform credential.
803The reason to specify these algorithms is two fold. The first is to know and understand the
804security properties of selected algorithms; identify appropriate key sizes and ensure
805appropriate use in protocols. The second reason is to define a base level of algorithms for
806interoperability.
807End of informative comment
808

4.2

Components

809Start of informative comment
810The following is a block diagram Figure 4:a shows the major components of a TPM.
811
Communication Bus
I/O

Cryptographic Co-Processor

C0
C1

C2

Key Generation

C4

RNG

C6

Power Detection

C8

Execution Engine

C10

Volatile Memory

HMAC Engine
C3
SHA-1 Engine
C5
Opt-InC7
Non-Volatile Memory
C9

Rev 0.3

812Figure 4:a - TPM Component Architecture
129Revision 116 1 Marchy 2011
130

TCG Published
TCG Published17

131Copyright © TCG
132

TPM Main Part 1 Design Principles
Specification Version 1.2

813End of informative comment
814

4.2.1

Input and Output

815Start of informative comment
816The I/O component, Figure 4:a C0, manages information flow over the communications
817bus. It performs protocol encoding/decoding suitable for communication over external and818internal buses. It routes messages to appropriate components. The I/O component enforces
819access policies associated with the Opt-In component as well as other TPM functions
820requiring access control.
821The main specification does not require a specific I/O bus. Issues around a particular I/O
822bus are the purview of a platform specific specification.
823End of informative comment
824
825
826

1. The number of incoming operand parameter bytes must exactly match therequirements of the command ordinal. If the command contains more or fewer bytes
than required, the TPM MUST return TPM_BAD_PARAMETER.

827

4.2.2

Cryptographic Co-Processor

828Start of informative comment
829The cryptographic co-processor, Figure 4:a C1, implements cryptographic operations within
830the TPM. The TPM employs conventional cryptographic operations in conventional ways.
831Those operations include the following:
832Asymmetric key generation (RSA)
833Asymmetric encryption/decryption (RSA)
834Hashing (SHA-1)
835Random number generation (RNG)
836The TPM uses these capabilities to perform generation of random data, generation of
837asymmetric keys, signing and confidentiality of stored data.
838The TPM may symmetric encryption for internal TPM use but does not expose any
839symmetric algorithm functions to general users of the TPM.
840The TPM may implement additional asymmetric algorithms. TPM devices that implement
841different algorithms may have different algorithms perform the signing and wrapping.
842If the TPM uses RSA with the required key length (2048 bits for storage keys), the output of
843all commands for key or data blob generation (e.g., TPM_CreateWrapKey, TPM_Seal,
844TPM_Sealx, TPM_MakeIdentity) consists of only one block. However, if the TPM uses other845asymmetric algorithms that result in more than one output block for these commands, the846integrity of the blobs must be protected by the TPM (by means of appropriate chaining
847mechanisms).
848End of informative comment
8491. The TPM MAY implement other asymmetric algorithms such as DSA or elliptic curve.

133
134

18

TCG Published
TCG Published

Revision 116 1 Marchy 2011

135TPM Main Part 1 Design Principles

TCG © Copyright

136Specification Version 1.2

137
850
851
852

a. These algorithms may be in use for wrapping, signatures and other operations. Thereis no guarantee that these keys can migrate to other TPM devices or that other TPM
devices will accept signatures from these additional algorithms.

853
854
855

b. If the output key or data blob generated with a storage key consists of more than one
block, the TPM MUST protect the integrity of the blob by means of appropriate
chaining mechanisms.

8562. All storage keys MUST be of strength equivalent to a 2048 bits RSA key or greater. The
857
TPM SHALL NOT load a storage key whose strength less than that of a 2048 bits RSA858
key.
8593. All AIK MUST be of strength equivalent to a 2048 bits RSA key, or greater.
860

4.2.2.1 RSA Engine

861Start of informative comment
862The RSA asymmetric algorithm is used for digital signatures and for encryption.
863For RSA keys the PKCS #1 standard provides the implementation details for digital
864signature, encryption and data formats.
865There is no requirement concerning how the RSA algorithm is to be implemented. TPM
866manufacturers may use Chinese Remainder Theorem (CRT) implementations or any other867method. Designers should review P1363 for guidance on RSA implementations.
868For keys that are required to be 2048-bit RSA keys, the default 216+1 exponent will be
869required. This guarantees the strength of the key without walking a hierarchy that cannot
870necessarily be walked reliably.
871End of informative comment
8721. The TPM MUST support RSA.
8732. The TPM MUST use the RSA algorithm for encryption and digital signatures.
8743. The TPM MUST support key sizes of 512, 1024, and 2048 bits. The TPM MAY support875
other key sizes.
876

a. The minimum RECOMMENDED key size is 2048 bits.

877

b. In FIPS mode, the minimum key size MUST be 1024.

8784. The TPM MUST support an RSA public exponent of 2 16+1. The TPM MAY support other879
exponent values.
8805. TPM devices that use CRT as the RSA implementation MUST provide protection and881
detection of failures during the CRT process to avoid attacks on the private key.
882

4.2.2.2 Signature Operations

883Start of informative comment
884The TPM performs signatures on both internal items and on requested external blobs. The
885rules for signatures apply to both operations.
886End of informative comment

138Revision 116 1 Marchy 2011
139

TCG Published
TCG Published19

140Copyright © TCG
141

TPM Main Part 1 Design Principles
Specification Version 1.2

8871. The TPM MUST use the RSA algorithm for signature operations where signed data is888
verified by entities other than the TPM that performed the sign operation.
8892. The TPM MAY use other asymmetric algorithms for signatures; however, there is no890
requirement that other TPM devices either accept or verify those signatures.
8913. The TPM MUST use P1363 for the format and design of the signature output.
892

4.2.2.3 Symmetric Encryption Engine

893Start of informative comment
894The TPM uses symmetric encryption to encrypt authentication information, provide
895confidentiality in transport sessions and provide internal encryption of blobs stored off the896TPM.
897For authentication and transport sessions, the mandatory mechanism is a Vernam one898time-pad with XOR. The mechanism to generate the one-time-pad is MGF1 and the nonces
899from the session protocol. When encrypting authorization data, the authorization data and900the nonces are the same size, 20 bytes, so a direct XOR is possible.
901For transport sessions the size of data is larger than the nonces so there needs to be a902mechanism to expand the entropy to the size of the data. The mechanism to expand the903entropy is the MGF1 function from PKCS#1. This function provides a known mechanism
904that does not lower the entropy of the nonces.
905AES may be supported as an alternate symmetric key encryption algorithm.
906Internal protection of information can use any symmetric algorithm that the TPM designer
907feels provides the proper level of protection.
908The TPM does not expose any of the symmetric operations for general message encryption.
909End of informative comment
910

4.2.2.4 Using Keys

911Start of Informative comments:
912Keys can be symmetric or asymmetric.
913As the TPM does not have an exposed symmetric algorithm, the TPM is only a generator,
914storage device and protector of symmetric keys. Generation of the symmetric key would use
915the TPM RNG. Storage and protection would be provided by the BIND and SEAL capabilities
916of the TPM. If the caller wants to ensure that the release of a symmetric key is not exposed
917after UNBIND/UNSEAL on delivery to the caller, the caller should use a transport session
918with confidentiality set.
919For asymmetric algorithms, the TPM generates and operates on RSA keys. The keys can be
920held only by the TPM or in conjunction with the caller of the TPM. If the private portion of a
921key is in use outside of the TPM it is the responsibility of the caller and user of that key to922ensure the protections of the key.
923The TPM has provisions to indicate if a key is held exclusively for the TPM or can be shared
924with entities off of the TPM.
925End of informative comments.

142
143

20

TCG Published
TCG Published

Revision 116 1 Marchy 2011

144TPM Main Part 1 Design Principles

TCG © Copyright

145Specification Version 1.2

1469261. A secret key is a key that is a private asymmetric key or a symmetric key.
9272. Data SHOULD NOT be used as a secret key by a TCG protected capability unless that928
data has been extant only in a shielded location.
9293. A key generated by a TCG protected capability SHALL NOT be used as a secret key
930
unless that key has been extant only in a shielded location.
9314. A secret key obtained by a TCG protected capability from a Protected Storage blob
932
SHALL be extant only in a shielded location.
933

4.2.3

Key Generation

934Start of informative comment
935The Key Generation component, Figure 4:a C2, creates RSA key pairs and symmetric keys.
936TCG places no minimum requirements on key generation times for asymmetric or
937symmetric keys.
938End of informative comment
939

4.2.3.1 Asymmetric – RSA

940The TPM MUST generate asymmetric key pairs. The generate function is a protected941capability and the private key is held in a shielded location. The implementation of the
942generate function MUST be in accordance with P1363.
943The prime-number testing for the RSA algorithm MUST use the definitions of P1363. If
944additional asymmetric algorithms are available, they MUST use the definitions from P1363
945for the underlying basis of the asymmetric key (for example, elliptic curve fitting).
946

4.2.3.2 Nonce Creation

947The creation of all nonce values MUST use the next n bits from the TPM RNG.
948

4.2.4

HMAC Engine

949Start of informative comment
950The HMAC engine, Figure 4:a C3, provides two pieces of information to the TPM: proof of
951knowledge of the AuthData and proof that the request arriving is authorized and has no952modifications made to the command in transit.
953The HMAC definition is for the HMAC calculation only. It does not specify the order or
954mechanism that transports the data from caller to actual TPM.
955The creation of the HMAC is order dependent. Each command has specific items that are
956portions of the HMAC calculation. The actual calculation starts with the definition from957RFC 2104.
958RFC 2104 requires the selection of two parameters to properly define the HMAC in use.
959These values are the key length and the block size. This specification will use a key length
960of 20 bytes and a block size of 64 bytes. These values are known in the RFC as K for the key
961length and B as the block size.
962The basic construct is

147Revision 116 1 Marchy 2011
148

TCG Published
TCG Published21

149Copyright © TCG
150

963

TPM Main Part 1 Design Principles
Specification Version 1.2

H(K XOR opad, H(K XOR ipad, text))

964where
965H = the SHA1 hash operation
966K = the key or the AuthData
967XOR = the xor operation
968opad = the byte 0x5C repeated B times
969B = the block length
970ipad = the byte 0x36 repeated B times
971text = the message information and any parameters from the command
972End of informative comment
973The TPM MUST support the calculation of an HMAC according to RFC 2104.
974The size of the key (K in RFC 2104) MUST be 20 bytes. The block size (B in RFC 2104)
975MUST be 64 bytes.
976The order of the parameters is critical to the TPM’s ability to recreate the HMAC. Not all of
977the fields are sent on the wire for each command for instance only one of the nonce values
978travels on the wire. Each command interface definition indicates what parameters are
979involved in the HMAC calculation.
980

4.2.5

Random Number Generator

981Start of informative comment
982The Random Number Generator (RNG) component, Figure 6:a C4 is the source of983randomness in the TPM. The TPM uses these random values for nonces, key generation,
984and randomness in signatures.
985The RNG consists of a state-machine that accepts and mixes unpredictable data and a post986processor that has a one-way function (e.g. SHA-1). The idea behind the design is that a
987TPM can be good source of randomness without having to require a genuine source of
988hardware entropy.
989The state-machine can have a non-volatile state initialized with unpredictable random data
990during TPM manufacturing before delivery of the TPM to the customers. The state-machine
991can accept, at any time, further (unpredictable) data, or entropy, to salt the random
992number. Such data comes from hardware or software sources – for example; from thermal
993noise, or by monitoring random keyboard strokes or mouse movements. The RNG requires a
994reseeding after each reset of the TPM. A true hardware source of entropy is likely to supply
995entropy at a higher baud rate than a software source.
996When adding entropy to the state-machine, the process must ensure that after the addition,
997no outside source can gain any visibility into the new state of the state-machine. Neither
998the Owner of the TPM nor the manufacturer of the TPM can deduce the state of the state999machine after shipment of the TPM. The RNG post-processor condenses the output of the
1000state-machine into data that has sufficient and uniform entropy. The one-way function
1001should use more bits of input data than it produces as output.

151
152

22

TCG Published
TCG Published

Revision 116 1 Marchy 2011

153TPM Main Part 1 Design Principles

TCG © Copyright

154Specification Version 1.2

155
1002Our definition of the RNG allows implementation of a Pseudo Random Number Generator
1003(PRNG) algorithm. However, on devices where a hardware source of entropy is available, a1004PRNG need not be implemented. This specification refers to both RNG and PRNG
1005implementations as the RNG mechanism. There is no need to distinguish between the two
1006at the TCG specification level.
1007The TPM should be able to provide 32 bytes of randomness on each call. Larger requests
1008may fail with not enough randomness being available.
1009End of informative comment
10101. The RNG for the TPM will consist of the following components:
1011

a. Entropy source and collector

1012

b. State register1013

c. Mixing function

10142. The RNG capability is a TPM-protected capability with no access control.
10153. The RNG output may or may not be shielded data. When the data is for internal use by
1016
the TPM (e.g., generation of tpmProof or an asymmetric key), the data MUST be held in a1017
shielded location. The RNG output for internal use MUST not be known outside the1018
TPM. In particular, it MUST not be known by the TPM manufacturer. When the data is1019
for use by the TSS or another external caller, the data is not shielded.
10204. In FIPS mode, the RNG MUST be a NIST approved RNG. The NIST self-test requirements
1021
MUST be satisfied.
1022

4.2.5.1 Entropy Source and Collector

1023Start of informative comment
1024The entropy source is the process or processes that provide entropy. These types of sources
1025could include noise, clock variations, air movement, and other types of events.
1026The entropy collector is the process that collects the entropy, removes bias, and smoothes
1027the output. The collector differs from the mixing function in that the collector may have1028special code to handle any bias or skewing of the raw entropy data. For instance, if the1029entropy source has a bias of creating 60 percent 1s and only 40 percent 0s, then the1030collector design takes that bias into account before sending the information to the state1031register.
1032End of informative comment
10331. The entropy source MUST provide entropy to the state register in a manner that provides
1034
entropy that is not visible to an outside process.
1035
1036

a. For compliance purposes, the entropy source MAY be outside of the TPM; however,attention MUST be paid to the reporting mechanism.

10372. The entropy source MUST provide the information only to the state register.
1038
1039
1040
1041

a. The entropy source may provide information that has a bias, so the entropy collector
must remove the bias before updating the state register. The bias removal could use
the mixing function or a function specifically designed to handle the bias of theentropy source.

156Revision 116 1 Marchy 2011
157

TCG Published
TCG Published23

158Copyright © TCG
159

TPM Main Part 1 Design Principles
Specification Version 1.2

1042
1043
1044

b. The entropy source can be a single device (such as hardware noise) or a combinationof events (such as disk timings). It is the responsibility of the entropy collector to
update the state register whenever the collector has additional entropy.

1045

4.2.5.2 State Register1046Start of informative comment
1047The state register implementation may use two registers: a non-volatile register rngState
1048and a volatile register. The TPM loads the volatile register from the non-volatile register on
1049startup. Each subsequent change to the state register from either the entropy source or the
1050mixing function affects the volatile state register. The TPM saves the current value of the1051volatile state register to the non-volatile register on TPM power-down. The TPM may update
1052the non-volatile register at any other time. The reasons for using two registers are:1053To handle an implementation in which the non-volatile register is in a flash device;
1054To avoid overuse of the flash, as the number of writes to a flash device are limited.
1055End of informative comment
10561. The state register is in a TPM shielded-location.
1057

a. The state register MUST be non-volatile.

1058

b. The update function to the state register is a TPM protected-capability.

1059

c. The primary input to the update function SHOULD be the entropy collector.

10602. If the current value of the state register is unknown, calls made to the update function
1061
with known data MUST NOT result in the state register ending up in a state that an1062
attacker could know.
1063
1064

a. This requirement implies that the addition of known data MUST NOT result in adecrease in the entropy of the state register.

10653. The TPM MUST NOT export the state register.
1066

4.2.5.3 Mixing Function

1067Start of informative comment
1068The mixing function takes the state register and produces output. The mixing function is a
1069TPM protected-capability. The mixing function takes the value from a state register and1070creates the RNG output. If the entropy source has a bias, then the collector takes that bias
1071into account before sending the information to the state register.
1072End of informative comment
10731. Each use of the mixing function MUST affect the state register.
1074
1075

a. This requirement is to affect the volatile register and does not need to affect the nonvolatile state register.

1076

4.2.5.4 RNG Reset1077Start of informative comment
1078The resetting of the RNG occurs at least in response to a loss of power to the device.
160
161

24

TCG Published
TCG Published

Revision 116 1 Marchy 2011

162TPM Main Part 1 Design Principles

TCG © Copyright

163Specification Version 1.2

1641079These tests prove only that the RNG is still operating properly; they do not prove how much
1080entropy is in the state register. This is why the self-test checks only after the load of
1081previous state and may occur before the addition of more entropy.
1082End of informative comment
10831. The RNG MUST NOT output any bits after a system reset until the following occurs:
1084
1085

a. The entropy collector performs an update on the state register. This does not include
the adding of the previous state but requires at least one bit of entropy.

1086
1087
1088

b. The mixing function performs a self-test. This self-test MUST occur after the loadingof the previous state. It MAY occur before the entropy collector performs the first
update.

1089

4.2.6

SHA-1 Engine

1090Start of informative comment
1091The SHA-1, Figure 4:a C5, hash capability is primarily used by the TPM, as it is a trusted
1092implementation of a hash algorithm. The hash interfaces are exposed outside the TPM to1093support Measurement taking during platform boot phases and to allow environments that1094have limited capabilities access to a hash functions. The TPM is not a cryptographic
1095accelerator. TCG does not specify minimum throughput requirements for TPM hash1096services.
1097End of informative comment
10981. The TPM MUST implement the SHA-1 hash algorithm as defined by FIPS-180-1.
10992. The output of SHA-1 is 160 bits and all areas that expect a hash value are REQUIRED
1100
to support the full 160 bits.
11013. The only commands that SHALL be presented to the TPM in-between a TPM_SHA1Start
1102
command and a TPM_SHA1Complete command SHALL be a variable number (possibly
11030) of TPM_SHA1Update commands.
1104

a. The TPM_SHA1Update commands can occur in a transport session.

11054. Throughout all parts of the specification the characters x1 || x2 imply the1106
concatenation of x1 and x2
1107

4.2.7

Power Detection

1108Start of informative comment
1109The power detection component, Figure 4:a C6, manages the TPM power states in
1110conjunction with platform power states. TCG requires that the TPM be notified of all power
1111state changes.
1112Power detection also supports physical presence assertions. The TPM may restrict
1113command-execution during periods when the operation of the platform is physically
1114constrained. In a PC, operational constraints occur during the power-on self-test (POST)
1115and require Operator input via the keyboard. The TPM might allow access to certain
1116commands while in a constrained execution mode or boot state. At some critical point in the1117POST process, the TPM may be notified of state changes that affect TPM command
1118processing modes.
165Revision 116 1 Marchy 2011
166

TCG Published
TCG Published25

167Copyright © TCG
168

TPM Main Part 1 Design Principles
Specification Version 1.2

1119End of informative comment
1120

4.2.8

Opt-In1121Start of informative comment
1122The Opt-In component, Figure 4:a C7, provides mechanisms and protections to allow the1123TPM to be turned on/off, enabled/disabled, activated/deactivated. The Opt-In component
1124maintains the state of persistent and volatile flags and enforces the semantics associated1125with these flags.
1126The setting of flags requires either authorization by the TPM Owner or the assertion of
1127physical presence at the platform. The platform’s manufacturer determines the techniques
1128used to represent physical-presence. The guiding principle is that no remote entity should1129be able to change TPM status without either knowledge of the TPM Owner or the Operator is1130physically present at the platform. Physical presence may be asserted during a period when
1131platform operation is constrained such as power-up.
1132Non-Volatile Flags:
1133physicalPresenceLifetimeLock1134physicalPresenceHWEnable1135physicalPresenceCMDEnable1136Volatile Flags:
1137physicalPresenceLock1138physicalPresence
1139The notation physicalPresenceV indicates the physical presence state that ordinals refer to1140when they say, for example, “if physical presence is asserted”.

169
170

26

TCG Published
TCG Published

Revision 116 1 Marchy 2011

171TPM Main Part 1 Design Principles

TCG © Copyright

172Specification Version 1.2

173
1141

Persistent / Volatile

P

P

P

V

Control Flags

physicalPresenceLifetimeLockphysicalPresenceHWEnablephysicalPresenceCMDEnablephysicalPresenceLock

1142The following truth table explains the conditions in which the physicalPresenceV flag may
1143be altered:

Volatile Access
Semantics toPhysical Presence
Flag

-

F

F

-

-

F

-

T

-

-

T

F

Access to physicalPresenceV flag through TCS_PhysicalPresence command enabled.

-

T

-

-

Access to physicalPresenceV flag through hardware signal enabled.

-

T

T

F

Access to physicalPresenceV flag through hardware signal or TCS_PhysicalPresence command
enabled.

T

F

F

-

Access to physicalPresenceV flag permanently disabled.

T

F

T

T

Access to physicalPresenceV flag disabled until TPM_Startup(ST_CLEAR).

T

F

T

F

Exclusive access to physicalPresenceV flag through TCS_PhysicalPresence commandpermanently enabled.

T

T

F

-

Exclusive access to physicalPresenceV flag through hardware signal permanently enabled.

T

T

T

F

Access to physicalPresenceV flag through hardware signal or TCS_PhysicalPresence commandpermanently enabled.

Persistent Access
Semantics toPhysical Presence
Flag

No access to physicalPresenceV flag.

1144
1145Table 4:a - Physical Presence Semantics
1146TCG also recognizes the concept of unambiguous physical presence. Conceptually, the use
1147of dedicated electrical hardware providing a trusted path to the Operator has higher
1148precedence than the physicalPresenceV flag value. Unambiguous physical presence may be
1149used to override physicalPresenceV flag value under conditions specified by platform
1150specific design considerations.
1151Additional details relating to physical presence can be found in sections on Volatile and1152Non-volatile memory.
1153End of informative comment
1154

4.2.9

Execution Engine

1155Start of informative comment
1156The execution engine, Figure 4:a C8, runs program code to execute the TPM commands
1157received from the I/O port. The execution engine is a vital component in ensuring that
1158operations are properly segregated and shield locations are protected.
174Revision 116 1 Marchy 2011
175

TCG Published
TCG Published27

176Copyright © TCG
177

TPM Main Part 1 Design Principles
Specification Version 1.2

1159End of informative comment
1160

4.2.10

Non-Volatile Memory

1161Start of informative comment
1162Non-volatile memory component, Figure 4:a C9, is used to store persistent identity and1163state associated with the TPM. The NV area has set items (like the EK) and also is available
1164for allocation and use by entities authorized by the TPM Owner.
1165The TPM designer should consider the use model of the TPM and if the use of NV storage is1166a concern. NV storage does have a limited life and using the NV storage in a high volume1167use model may prematurely wear out the TPM.
1168There is no requirement for the TPM to protect against wear out by detecting that a write of
1169the same value need not be performed. Applications should avoid frequent writes of the1170same value. For example, precede a TPM_SetCapability with a TPM_GetCapability and skip
1171the write if the TPM already holds the desired value.
1172End of informative comment
11734.3

Data Integrity Register (DIR)

1174Start of informative comment
1175The DIR were a version 1.1 function. They provided a place to store information using the
1176TPM NV storage.
1177In 1.2 the DIR are deprecated and the use of the DIR should move to the general purpose
1178NV storage area.
1179The TPM must still support the functionality of the DIR register in the NV storage area.
1180End of informative comment
11811. A TPM MUST provide one Data Integrity Register (DIR)
1182

a. The TPM DIR commands are deprecated in 1.2

1183

b. The TPM MUST reserve the space for one DIR in the NV storage area

1184

c. The TPM MAY have more than 1 DIR.

11852. The DIR MUST be 160-bit values and MUST be held in TPM shielded-locations.
11863. The DIR MUST be non-volatile (values are maintained during the power-off state).
1187

a. A TPM implementation need not provide the same number of DIRs as PCRs.

11884.4

Platform Configuration Register (PCR)

1189Start of informative comment
1190A Platform Configuration Register (PCR) is a 160-bit storage location for discrete integrity
1191measurements. There are a minimum of 16 PCR registers. All PCR registers are shielded1192locations and are inside of the TPM. The decision of whether a PCR contains a standard
1193measurement or if the PCR is available for general use is deferred to the platform specific1194specification.

178
179

28

TCG Published
TCG Published

Revision 116 1 Marchy 2011

180TPM Main Part 1 Design Principles

TCG © Copyright

181Specification Version 1.2

1821195A large number of integrity metrics may be measured in a platform, and a particular
1196integrity metric may change with time and a new value may need to be stored. It is difficult
1197to authenticate the source of measurement of integrity metrics, and as a result a new value
1198of an integrity metric cannot be permitted to simply overwrite an existing value. (A rogue
1199could erase an existing value that indicates subversion and replace it with a benign value.)
1200Thus, if values of integrity metrics are individually stored, and updates of integrity metrics
1201must be individually stored, it is difficult to place an upper bound on the size of memory
1202that is required to store integrity metrics.
1203The PCR is designed to hold an unlimited number of measurements in the register. It does
1204this by using a cryptographic hash and hashing all updates to a PCR. The pseudo code for1205this is:1206

PCRi New = HASH ( PCRi Old value || value to add)

1207There are two salient properties of cryptographic hash that relate to PCR construction.
1208Ordering – meaning updates to PCRs are not commutative. For example, measuring (A then
1209B) is not the same as measuring (B then A).
1210The other hash property is one-way-ness. This property means it should be computationally
1211infeasible for an attacker to determine the input message given a PCR value. Furthermore,
1212subsequent updates to a PCR cannot be determined without knowledge of the previous PCR
1213values or all previous input messages provided to a PCR register since the last reset.
1214If the TPM is disabled or deactivated, commands that extend a PCR (e.g., TPM_Extend,
1215TPM_SHA1CompleteExtend) return a PCR value of all zeros, and commands that use the1216PCRs (e.g., TPM_PCRRead) are not available. However, the commands that extend a PCR
1217still update the PCR correctly and return success. For disabled, this is because the TPM
1218may become enabled later, and so must not miss a measurement. For deactivated, this is1219because resource limited code like the CRTM will perform extends and may not be able to1220handle a deactivated error case.
1221End of informative comment
12221. The PCR MUST be a 160-bit field that holds a cumulatively updated hash value
12232. The PCR MUST have a status field associated with it
12243. The PCR MUST be in the RTS and should be in volatile storage
12254. The PCR MUST allow for an unlimited number of measurements to be stored in the PCR
12265. The PCR MUST preserve the ordering of measurements presented to it
12276. A PCR MUST be set to the default value as specified by the PCRReset attribute
12287. A TPM implementation MUST provide 16 or more independent PCRs. These PCRs are
1229
identified by index and MUST be numbered from 0 (that is, PCR0 through PCR15 are1230
required for TCG compliance). Vendors MAY implement more registers for general1231
purpose use. Extra registers MUST be numbered contiguously from 16 up to max – 1,
1232
where max is the maximum offered by the TPM.
12338. The TCG-protected capabilities that expose and modify the PCRs use a 32-bit index,
1234
indicating the maximum usable PCR index. However, TCG reserves register indices 230
1235
and higher for later versions of the specification. A TPM implementation MUST NOT
1236
provide registers with indices greater than or equal to 230. In this specification, the1237following terminology is used (although this internal format is not mandated).
183Revision 116 1 Marchy 2011184

TCG Published
TCG Published29

185Copyright © TCG
186

TPM Main Part 1 Design Principles
Specification Version 1.2

12389. The PSS MUST define at least define one measurement that the RTM MUST make and1239
the PCR where the measurement is stored.
124010.A TCG measurement agent MAY discard a duplicate event instead of incorporating it in a
1241
PCR, provided that:
124211.A relevant TCG platform specification explicitly permits duplicates of this type of event to1243
be discarded
124412.The PCR already incorporates at least one event of this type124513.An event of this type previously incorporated into the PCR included a statement that1246
duplicate such events may be discarded. This option could be used where frequent
1247
recording of sleep states will adversely affect the lifetime of a TPM, for example.
124814.PCRs and the protected capabilities that operate upon them MAY NOT be used until
1249
power-on self-test (TPM POST) has completed. If TPM POST fails, the TPM_Extend
1250
operation will fail; and, of greater importance, the TPM_Quote operation and TPM_Seal
1251
operations that respectively report and examine the PCR contents MUST fail. At the1252
successful completion of TPM POST, all PCRs MUST be set to their default value (either
1253
0x00…00 or 0xFF…FF). Additionally, the UINT32 flags MUST be set to zero.

187
188

30

TCG Published
TCG Published

Revision 116 1 Marchy 2011

189TPM Main Part 1 Design Principles

TCG © Copyright

190Specification Version 1.2

19112545. Endorsement Key Creation
1255Start of informative comment
1256The TPM contains a 2048-bit RSA key pair called the endorsement key (EK). The public
1257portion of the key is the PUBEK and the private portion the PRIVEK. Due to the nature of
1258this key pair, both the PUBEK and the PRIVEK have privacy and security concerns.
1259The TPM has the EK generated before the end customer receives the platform. The Trusted
1260Platform Module Entity (TPME) that causes EK generation is also the entity that will create
1261and sign the EK credential attesting to the validity of the TPM and the EK. The TPME is1262typically the TPM manufacturer.
1263The TPM can generate the EK internally using the TPM_CreateEndorsementKey or by using
1264an outside key generator. The EK needs to indicate the genealogy of the EK generation.
1265Subsequent attempts to either generate an EK or insert an EK must fail.
1266If the data structure TPM_ENDORSEMENT_CREDENTIAL is stored on a platform after an
1267Owner has taken ownership of that platform, it SHALL exist only in storage to which access
1268is controlled and is available to authorized entities.
1269End of informative comment
12701. The EK MUST be a 2048-bit RSA key
1271

a. The public portion of the key is the PUBEK

1272

b. The private portion of the key is the PRIVEK

1273

c. The PRIVEK SHALL exist only in a TPM-shielded location.

12742. Access to the PRIVEK and PUBEK MUST only be via TPM protected capabilities
1275
1276

a. The protected capabilities MUST require TPM Owner authentication or operator
physical presence

12773. The generation of the EK may use a1278
TPM_CreateEndorsementKeyPair

process

external

to

the

TPM

and

1279
1280

a. The external generation MUST result in an EK that has the same properties as aninternally generated EK

1281
1282

b. The external generation process MUST protect the EK from exposure during thegeneration and insertion of the EK

1283
1284

c. After insertion of the EK the TPM state MUST be the same as the result of the
TPM_CreateEndorsementKeyPair execution

1285
1286

d. The process MUST guarantee correct generation, cryptographic
uniqueness, privacy, and installation into a genuine TPM, of the EK

1287
1288

e. The entity that signs the EK credential MUST be satisfied that the generation processproperly generated the EK and inserted it into the TPM

1289
1290

f. The process MUST be defined in the target of evaluation (TOE) of the security target
in use to evaluate the TPM

192Revision 116 1 Marchy 2011193

TCG Published
TCG Publishedstrength,31

194Copyright © TCG
195

12915.1

TPM Main Part 1 Design Principles
Specification Version 1.2

Controlling Access to PRIVEK

1292Start of informative comment
1293Exposure of the PRIVEK is a security concern.
1294The TPM must ensure that the PRIVEK is not exposed outside of the TPM
1295End of informative comment
12961. The PRIVEK MUST never be out of the control of a TPM shielded location
12975.2

Controlling Access to PUBEK

1298Start of informative comment
1299There are no security concerns with exposure or use of the PUBEK.
1300Privacy guidelines suggest that PUBEK could be considered personally identifiable
1301information (PII) if it were associated in some way with personal information (PI) or
1302associated with other PII, but PUBEK alone cannot be considered PII. Arbitrary random
1303numbers do not represent a threat to privacy unless further associated with PI or PII. The
1304PUBEK is an arbitrary random number that may be associated with aggregate platform
1305information, but not personally identifiable information.
1306An EK may become associated with personally identifiable information when an alias
1307platform identifier (AIK) is also associated with PI. The attestation service could include
1308personal information in the AIK credential, thereby making the AIK-PUBEK association PII –1309but not before.
1310The association of PUBEK with AIK therefore is important to protect via privacy guidelines.
1311The owner/user of the TPM should be able to control whether PUBEK is disclosed along
1312with AIK. The owner/user should be notified of personal information that might be added to1313an AIK credential, which could result in AIK being considered PII. The owner/user should1314be able to evaluate the mechanisms used by an attestation entity to protect PUBEK-AIK
1315associations before disclosure occurs. No other entity should be privy to owner/user
1316authorized disclosure besides the intended attestation entity.
1317Several commands may be used to negotiate the conditions of PUBEK-AIK disclosure.
1318TPM_MakeIdentity discloses PUBEK-AIK in the context of requesting an AIK credential.
1319TPM_ActivateIdentity ensures the owner/user has not been spoofed by an interloper. These
1320interfaces allow the owner/user to choose whether disclosure is acceptable and control the1321circumstances under which disclosure takes place. They do not allow the owner/user the1322ability to retain control of PUBEK-AIK subsequent to disclosure except by traditional means
1323of trusting the attestation entity to abide by an acceptable privacy policy. The owner/user is1324able to associate the accepted privacy policy with the disclosure operation (e.g.
1325TPM_MakeIdentity).
1326A persistent flag called readPubek can be set to TRUE to permit reading of PUBEK via
1327TPM_ReadPubek. Reporting the PUBEK value is not considered privacy sensitive because it
1328cannot be associated with any of the AIK keys managed by the TPM without using TPM
1329protected-capabilities. Keys are encrypted with a nonce when flushed from TPM shielded1330locations, Cryptanalysis of flushed keys will not reveal an association of EK to any AIK.
1331The command that manipulates the readPubek flag is TPM_DisablePubekRead.
1332End of informative comment
196
197

32

TCG Published
TCG Published

Revision 116 1 Marchy 2011

198TPM Main Part 1 Design Principles

TCG © Copyright

199Specification Version 1.2

20013336. Attestation Identity Keys
1334Start of informative comment
1335See 11.4 Attestation Identity Keys.
1336End of informative comment

201Revision 116 1 Marchy 2011202

TCG Published
TCG Published33

203Copyright © TCG
204

TPM Main Part 1 Design Principles
Specification Version 1.2

13377. TPM Ownership
1338Start of informative comment
1339Taking ownership of a TPM is the process of inserting a shared secret into a TPM shielded1340location. Any entity that knows the shared secret is a TPM Owner. Proof of ownership
1341occurs when an entity, in response to a challenge, proves knowledge of the shared secret.
1342Certain operations in the TPM require authentication from a TPM Owner.
1343Certain operations also allow the human, with physical possession of the platform, to assert
1344TPM Ownership rights. When asserting TPM Ownership, using physical presence, the1345operations must not expose any secrets protected by the TPM.
1346The platform owner controls insertion of the shared secret into the TPM. The platform
1347owner sets the NV persistent flag ownershipEnabled that allows the execution of the1348TPM_TakeOwnership command. The TPM_SetOwnerInstall, the command that controls the1349value ownershipEnabled, requires the assertion of physical presence.
1350Attempting to execute TPM_TakeOwnership fails when a TPM already has an owner. To
1351remove an owner when the current TPM Owner is unable to remove themselves, the human
1352that is in possession of the platform asserts physical presence and executes
1353TPM_ForceClear which removes the shared secret.
1354The insertion protocol that supplies the shared secret has the following requirements:
1355confidentiality, integrity, remoteness and verifiability.
1356To provide confidentiality the proposed TPM Owner encrypts the shared secret using the1357PUBEK. This requires the PRIVEK to decrypt the value. As the PRIVEK is only available in
1358the TPM the encrypted shared secret is only available to the intended TPM.
1359The integrity of the process occurs by the TPM providing proof of the value of the shared
1360secret inserted into the TPM.
1361By using the confidentiality and integrity, the protocol is useable by TPM Owners that are
1362remote to the platform.
1363The new TPM Owner validates the insertion of the shared secret by using integrity response.
1364End of informative comment
1365The TPM MUST ship with no Owner installed. The TPM MUST use the ownership-control
1366protocol (OIAP or OSAP)
1367

7.1

Platform Ownership and Root of Trust for Storage

1368Start of informative comment
1369The semantics of platform ownership are tied to the Root-of-trust-for-storage (RTS). The
1370TPM_TakeOwnership command creates a new Storage Root Key (SRK) and new tpmProof
1371value whenever a new owner is established. It follows that objects owned by a previous
1372owner will not be inherited by the new owner. Objects that should be inherited must be
1373transferred by deliberate data migration actions.
1374End of informative comment

205
206

34

TCG Published
TCG Published

Revision 116 1 Marchy 2011

207TPM Main Part 1 Design Principles

TCG © Copyright

208Specification Version 1.2

20913758. Authentication and Authorization Data
1376Start of informative comment
1377Using security vernacular the terms below apply to the TPM for this discussion:
1378
Authentication: The process of providing proof of claimed ownership of an object or a1379subject's claimed identity.
1380

Authorization: Granting a subject appropriate access to an object.

1381Each TPM object that does not allow "public" access contains a 160-bit shared secret. This1382shared secret is enveloped within the object itself. The TPM grants use of TPM objects based1383on the presentation of the matching 160-bits using protocols designed to provide protection
1384of the shared secret. This shared secret is called the AuthData.
1385Neither the TPM, nor its objects (such as keys), contain access controls for its objects (the1386exception to this is what is provided by the delegation mechanism). If an subject presents
1387the AuthData, that subject is granted full use of the object based on the object's
1388capabilities, not a set of rights or permissions of the subject. This apparent overloading of
1389the concepts of authentication and authorization has caused some confusion. This is1390caused by having two similarly rooted but distinct perspectives.
1391From the perspective of the TPM looking out, this AuthData is its sole mechanism for1392authenticating the owner of its objects, thus from its perspective it is authentication data.
1393However, from the application's perspective this data is typically the result of other1394functions that might perform authentications or authorizations of subjects using higher
1395level mechanisms such as OS login, file system access, etc. Here, AuthData is a result of
1396these functions so in this usage, it authorizes access to the TPM's objects. From this1397perspective, i.e., the application looking in on the TPM and its objects, the AuthData is1398authorization data. For this reason, and thanks to a common root within the English
1399language, the term for this data is chosen to be AuthData and is to be interpreted or
1400expanded as either authentication data or authorization data depending on context and
1401perspective.
1402The term AuthData refers to the 160-bit value used to either prove ownership of, or1403authorization to use, an object. This is also called the object's shared secret. The term
1404authorization will be used when referring the combined action of verifying the AuthData and1405allowing access to the object or function. The term authorization session applies to a state
1406where the AuthData has been authentication and a session handle established that is1407associated with that authentication.
1408A wide-range of objects use AuthData. It is used to establish platform ownership, key use
1409restrictions, object migration and to apply access control to opaque objects protected by the1410TPM.
1411AuthData is a 160-bit shared-secret plus high-entropy random number. The assumption is1412the shared-secret and random number are mixed using SHA-1 digesting, but no specific1413function for generating AuthData is specified by TCG.
1414TCG command processing sessions (e.g. OSAP, ADIP) may use AuthData as an initialization
1415vector when creating a one-time pad. Session encryption is used to encrypt portions of1416command messages exchanged between TPM and a caller.

210Revision 116 1 Marchy 2011211

TCG Published
TCG Published35

212Copyright © TCG
213

TPM Main Part 1 Design Principles
Specification Version 1.2

1417The TPM stores AuthData with TPM controlled-objects and in shielded-locations. AuthData1418is never in the clear, when managed by the TPM except in shielded-locations. Only TPM
1419protected-capabilities may access AuthData (contained in the TPM). AuthData objects may
1420not be used for any other purpose besides authentication and authorization of TPM
1421operations on controlled-objects.
1422Outside the TPM, a reference monitor of some kind is responsible for protecting AuthData.
1423AuthData should be regarded as a controlled data item (CDI) in the context of the security
1424model governing the reference monitor. TCG expects this entity to preserve the interests of
1425the platform Owner.
1426There is no requirement that instances of AuthData be unique.
1427End of informative comment
1428The TPM MUST reserve 160 bits for the AuthData. The TPM treats the AuthData as a blob.
1429The TPM MUST keep AuthData in a shielded-location.
1430The TPM MUST enforce that the only usage in the TPM of the AuthData is to perform
1431authorizations.
1432

8.1

Dictionary Attack Considerations

1433Start of informative comment
1434The decision to provide protections against dictionary attacks is due to the inability of the
1435TPM to guarantee that an authorization value has high entropy. While the creation and
1436authorization protocols could change to support the assurance of high entropy values, the1437changes would be drastic and would totally invalidate any 1.x TPM version.
1438Version 1.1 explicitly avoided any requirements for dictionary attack mitigation.
1439Version 1.2 adds the requirement that the TPM vendor provide some assistance against
1440dictionary attacks. The internal mechanism is vendor specific. The TPM designer should
1441review the requirements for dictionary attack mitigation in the Common Criteria.
1442The 1.2 specification does not provide any functions to turn on the dictionary attack
1443prevention. The specification does provide a way to reset from the TPM response to an
1444attack.
1445By way of example, the following is a way to implement the dictionary attack mitigation.
1446The TPM keeps a count of failed authorization attempts. The vendor allows the TPM Owner
1447to set a threshold of failed authorizations. When the count exceeds the threshold, the TPM
1448locks up and does not respond to any requests for a time out period. The time out period
1449doubles each time the count exceeds the threshold. If the TPM resets during a time out
1450period, the time out period starts over after TPM_Init, or TPM_Startup. To reset the count1451and the time out period the TPM Owner executes TPM_ResetLockValue. If the authorization
1452for TPM_ResetLockValue fails, the TPM must lock up for the entire time out period and no1453additional attempts at unlocking will be successful. Executing TPM_ResetLockValue when
1454outside of a time out period still results in the resetting of the count and time out period.
1455End of informative comment
1456The TPM SHALL incorporate mechanism(s) that will provide some protection against
1457exhaustive or dictionary attacks on the authorization values stored within the TPM.

214
215

36

TCG Published
TCG Published

Revision 116 1 Marchy 2011

216TPM Main Part 1 Design Principles

TCG © Copyright

217Specification Version 1.2

2181458This version of the TPM specification does NOT specify the particular strategy to be used.
1459Some examples might include locking out the TPM after a certain number of failures,
1460forcing a reboot under some combination of failures, or requiring specific actions on the1461part of some actors after an attack has been detected. The mechanisms to manage these1462strategies are vendor specific at this time.
1463If the TPM in response to the attacks locks up for some time period or requires a special
1464operation to restart, the TPM MUST prevent any authorized TPM command and MAY
1465prevent any TPM command from executing until the mitigation mechanism completes. The
1466TPM Owner can reset the mechanism using the TPM_ResetLockValue command.
1467TPM_ResetLockValue MUST be allowed to run exactly once while the TPM is locked up.

219Revision 116 1 Marchy 2011
220

TCG Published
TCG Published37

221Copyright © TCG
222

TPM Main Part 1 Design Principles
Specification Version 1.2

14689. TPM Operation
1469Start of informative comment
1470Through the course of TPM operation, it may enter several operational modes that include
1471power-up, self-test, administrative modes and full operation. This section describes TPM
1472operational states and state transition criteria. Where applicable, the TPM commands used
1473to facilitate state transition or function are included in diagrams and descriptions.
1474The TPM keeps the information relative to the TPM operational state in a combination of
1475persistent and volatile flags. For ease of reading the persistent flags are prefixed by pFlags
1476and the volatile flags prefixed by vFlags.
1477The following state diagram describes TPM operational states at a high level. Subsequent1478state diagrams drill-down to finer detail that describes fundamental operations, protections
1479on operations and the transitions between them.
1480The state diagrams use the following notation:
CompositeState1481- Signifies a state.

1482- Transitions between states are represented as a single headed arrows.

1483- Circular transitions indicate operations that don’t result in a transition to another1484state.
1485- Decision boxes split state flow based on a logical test. Decision conditions are called
1486Guards and are identified by bracketed text.
1487< [text] > Bracketed text indicates transitions that are gated. Text within the brackets
1488describes the pre-condition that must be met before state transition may occur.
1489< /name > Transitions may list the events that trigger state transition. The forward slash
1490demarcates event names.
1491- The starting point for reading state diagrams.

1492- The ending point for state diagrams. Perpetual state systems may not have an ending
1493indicator.
1494- The collection bar consolidates multiple identical transition events into a single
1495transition arrow.
1496

223
224

- The distribution bar splits transitions to flow into multiple states.

38

TCG Published
TCG Published

Revision 116 1 Marchy 2011

225TPM Main Part 1 Design Principles

TCG © Copyright

226Specification Version 1.2

2271497 H - The history indicator means state values are remembered across context switches or
1498power-cycles.
1499End of informative comment
1500

9.1

TPM Initialization & Operation State Flow

1501Start of informative comment

1502
1503Figure 9:b - TPM Operational States
1504End of informative comment
1505

9.1.1

Initialization

1506Start of informative comment
1507TPM_Init transitions the TPM from a power-off state to one where the TPM begins an
1508initialization process. TPM_Init could be the result of power being applied to the platform or1509a hard reset.
1510TPM_Init sets an internal flag to indicate that the TPM is undergoing initialization. The TPM
1511must complete initialization before it is operational. The completion of initialization requires
1512the receipt of the TPM_Startup command.
1513The TPM is not fully operational until all of the self-tests are complete. Successful
1514completion of the self-tests allows the TPM to enter fully operational mode.
228Revision 116 1 Marchy 2011229

TCG Published
TCG Published39

230Copyright © TCG
231

TPM Main Part 1 Design Principles
Specification Version 1.2

1515Fully operational does not imply that all functions of the TPM are available. The TPM needs
1516to have a TPM Owner and be enabled for all functions to be available.
1517The TPM transitions out of the operational mode by having power removed from the system.
1518Prior to the exiting operational mode, the TPM prepares for the transition by executing the
1519TPM_SaveState command. There is no requirement that TPM_SaveState execute before the
1520transition to power-off mode occurs.
1521End of informative comment
15221. After TPM_Init and until receipt of TPM_Startup the TPM MUST return
1523
TPM_INVALID_POSTINIT for all commands. Prior to receipt of TPM_Startup the TPM
1524
MAY enter shutdown or failure mode.

232
233

40

TCG Published
TCG Published

Revision 116 1 Marchy 2011

234TPM Main Part 1 Design Principles

TCG © Copyright

235Specification Version 1.2

236
1525

9.2

Self-Test Modes

1526Start of informative comment

237Revision 116 1 Marchy 2011
238

TCG Published
TCG Published

41

239Copyright © TCG
240

TPM Main Part 1 Design Principles
Specification Version 1.2

1527
1528Figure 9:c - Self-Test States
241
242

42

TCG Published
TCG Published

Revision 116 1 Marchy 2011

243TPM Main Part 1 Design Principles

TCG © Copyright

244Specification Version 1.2

245
1529After initialization the TPM performs a limited self-test. This test provides the assurance
1530that a selected subset of TPM commands will perform properly. The limited nature of the1531self-test allows the TPM to be functional in as short of time as possible. The commands
1532enabled by this self-test are:1533TPM_SHA1xxx – Enabling the SHA-1 commands allows the TPM to assist the platform
1534startup code. The startup code may execute in an extremely constrained memory
1535environment and having the TPM resources available to perform hash functions can allow
1536the measurement of code at an early time. While the hash is available, there are no speed
1537requirements on the I/O bus to the TPM or on the TPM itself so use of this functionality
1538may not meet platform startup requirements.
1539TPM_Extend – Enabling the extend, and by reference the PCR, allows the startup code to1540perform measurements. Extending could use the SHA-1 TPM commands or perform the1541hash using the main processor.
1542TPM_Startup – This command must be available as it is the transition command from the1543initial environment to the limited operational state.
1544TPM_ContinueSelfTest – This command causes the TPM to complete the self-tests on all
1545other TPM functions. If TPM receives a command, and the self-test for that command has
1546not been completed, the TPM may implicitly perform the actions of the1547TPM_ContinueSelfTest command.
1548TPM_SelfTestFull – A TPM MAY allow this command after initialization, but typically
1549TPM_ContinueSelfTest would be used to avoid repeating the limited self tests.
1550TPM_GetCapability – A subset of capabilities can be read in the limited operation state.
1551TSC_PhysicalPresence and TSC_ResetEstablishmentBit.
1552The complete self-test ensures that all TPM functionality is available and functioning
1553properly.
1554End of informative comment
15551. At startup, a TPM MUST self-test all internal functions that are necessary to do1556
TPM_SHA1Start, TPM_SHA1Update, TPM_SHA1Complete, TPM_SHA1CompleteExtend,
1557
TPM_Extend, TPM_Startup, TPM_ContinueSelfTest, a subset of TPM_GetCapability,
1558
TPM_GetTestResult, TSC_PhysicalPresence and TSC_ResetEstablishmentBit.
15592. The TPM MAY allow TPM_SelfTestFull to be used before completion of the actions of1560
TPM_ContinueSelfTest.
15613. The TPM MAY implicitly run the actions of TPM_ContinueSelfTest upon receipt of a
1562
command that requires untested resources.
15634. The platform specific specification MUST define the maximum startup self-test time.
1564

9.2.1

Operational Self-Test

1565Start of informative comment
1566The completion of self-test is initiated by TPM_ContinueSelfTest. The TPM MAY allow
1567TPM_SelfTestFull to be issued instead of TPM_ContinueSelfTest.
1568TPM_ContinueSelfTest is the command issued during platform initialization after the1569platform has made use of the early commands (perhaps for an early measurement), the246Revision 116 1 Marchy 2011
247

TCG Published
TCG Published43248Copyright © TCG
249

TPM Main Part 1 Design Principles
Specification Version 1.2

1570platform is now performing other initializations, and the TPM can be left alone to complete
1571the self-tests. Before any command other than the limited subset is executed, all self-tests
1572must be complete.
1573TPM_SelfTestFull is a request to have the TPM perform another complete self-test. This test
1574will take some time but provides an accurate assessment of the TPM’s ability to perform all
1575operations.
1576The original design of TPM_ContinueSelfTest was for the TPM to test those functions that
1577the original startup did not test. The FIPS-140 evaluation of the specification requested a
1578change such that TPM_ContinueSelfTest would perform a complete self-test. The rationale
1579is that the original tests are only part of the initialization of the TPM; if they fail, the TPM
1580does not complete initialization. Performing a complete test after initialization meets the
1581FIPS-140 requirements. The TPM may work differently in FIPS mode or the TPM may simply
1582write the TPM_ContinueSelfTest command such that it always performs the complete check.
1583TPM_ContinueSelfTest causes a test of the TPM internal functions. When
1584TPM_ContinueSelfTest is asynchronous, the TPM immediately returns a successful result
1585code before starting the tests. When testing is complete, the TPM does not return any
1586result. When TPM_ContinueSelfTest is synchronous, the TPM completes the self-tests and
1587then returns a success or failure result code.
1588The TPM may reject any command other than the limited subset if self test has not been
1589completed. Alternatively, the actions of TPM_ContinueSelfTest may start automatically if the
1590TPM receives a command and there has been no testing of the underlying functionality. If
1591the TPM implements this implicit self-test, it may immediately return a result code
1592indicating that it is doing self-test. Alternatively, it may do the self-test, then do the1593command, and return only the result code of the command.
1594Programmers of TPM drivers should take into account the time estimates for self-test and1595minimize the polling for self-test completion. While self-test is executing, the TPM may
1596return an out-of-band “busy” signal to prevent command from being issued. Alternatively,
1597the TPM may accept the command but delay execution until after the self-test completes.
1598Either of those alternatives may appear as if the TPM is blocking to upper software layers.
1599Alternatively, the TPM may return an indication that is doing a self-test.
1600Upon the completion of the self-tests, the result of the self-tests are held in the TPM such
1601that a subsequent call to TPM_GetTestResult returns the self-test result.
1602In version 1.1, there was a separate command to create a signed self-test,
1603TPM_CertifySelfTest. Version 1.2 deprecates the command. The new use model is to perform
1604TPM_GetTestResult
insideofatransportsession
and
then
use
1605TPM_ReleaseTransportSigned to obtain the signature.
1606If self-tests fail, the TPM goes into failure state and does not allow most other operations to1607continue. The TPM_GetTestResult will operate in failure mode so an outside observer can
1608obtain information as to the reason for the self-test failure.
1609A TPM may take three courses of action when presented with a command that requires an
1610untested resource.
16111. The TPM may return TPM_NEEDS_SELFTEST, indicating that the execution of the1612
command requires TPM_ContinueSelfTest.

250
251

44

TCG Published
TCG Published

Revision 116 1 Marchy 2011

252TPM Main Part 1 Design Principles

TCG © Copyright

253Specification Version 1.2

254
16132. The TPM may implicitly execute the self-test and return a TPM_DOING_SELFTEST
1614
return code, causing the external software to retry the command.
16153. The TPM may implicitly execute the self-test, execute the ordinal, and return the results1616
of the ordinal.
1617The following example shows how software can detect either mechanism with a single piece1618of code
16191. SW sends TPM_xxx command
16202. SW checks return code from TPM
16213. If return code is TPM_DOING_SELFTEST, SW attempts to resend
1622 a. If the TIS times out waiting for TPM ready, pause for self-test time then resend
1623 b. if TIS timeout, then error
16244. else if return code is TPM_NEEDS_SELFTEST
1625

a. Send TPM_ContinueSelfTest

16265. else
1627

a. Process the ordinal return code

1628End of informative comment
16291. The TPM MUST provide startup self-tests. The TPM MUST provide mechanisms to allow
1630
the self-tests to be run on demand. The response from the self-tests is pass or fail.
16312. The TPM MUST complete the startup self-tests in a manner and timeliness that allows
1632
the TPM to be of use to the BIOS during the collection of integrity metrics.
16333. The TPM MUST complete the required checks before a given feature is in use. If a1634
function self-test is not complete the TPM MUST return TPM_NEEDS_SELFTEST or
1635
TPM_DOING_SELFTEST, or do the self-test before using the feature.
16364. There are two sections of startup self-tests: required and recommended. The
1637
recommended tests are not a requirement due to time constraints. The TPM
1638
manufacturer should perform as many tests as possible within the time constraints.
16395. The TPM MUST report the result of the tests that it performs.
16406. The TPM MUST provide a mechanism to allow self-test to execute on request by any
1641
challenger.
16427. The TPM MUST provide for testing of some operations during each execution of the1643
operation.
16448. The TPM MUST check the following:
1645

a. RNG functionality

1646
1647

b. Reading and extending the integrity registers. The self-test for the integrity registers
will leave the integrity registers in a known state.

1648

c. Testing the EK integrity, if it exists

255Revision 116 1 Marchy 2011
256

TCG Published
TCG Published45

257Copyright © TCG
258

1649
1650
1651
1652

i.

This requirement specifies that the TPM will verify that the endorsement key paircan encrypt and decrypt a known value. This tests the RSA engine. If the EK has
not yet been generated the TPM action is manufacturer specific.

d. The integrity of the protected capabilities of the TPM

1653
1654
1655

TPM Main Part 1 Design Principles
Specification Version 1.2i.

This means that the TPM must ensure that its “microcode” has not changed, andnot that a test must be run on each function.

e. Any tamper-resistance markers

1656
1657
1658

i.

The tests on the tamper-resistance or tamper-evident markers are underprogrammable control. There is no requirement to check tamper-evident tape or
the status of epoxy surrounding the case.

16599. The TPM MUST check the following:1660

a. The hash functionality

1661
1662

i.

b. Any symmetric algorithms

1663
1664
1665

i.

This check MAY use known data with a random key to encrypt and decrypt thedatac. Any asymmetric algorithms

1666
1667

This check MAY hash a known value and compare it to an expected result.

i.

This check MAY use known data to encrypt and decrypt.

d. Any hardware crypto accelerators

166810.Self-Test Failure
1669
1670

a. When the TPM detects a failure during any self-test, the TPM MUST enter shutdown
mode. This shutdown mode will allow only the following operations to occur:

1671
1672

i.

1673
1674

ii. TPM_GetTestResult. This command can assist the TPM manufacturer indetermining the cause of the self-test failure.

1675

iii. TPM_GetCapability may return limited information as specified in the ordinal.

1676

iv. All other operations will return the error code TPM_FAILEDSELFTEST.

Update. The update function MAY replace invalid microcode, providing that theparts of the TPM that provide update functionality have passed self-test.

1677

b.

1678
1679

c. When the TPM detects a failure during any self-test, it SHOULD delete values
preserved by TPM_SaveState.

The TPM MUST leave failure mode only after receipt of TPM_Init.

168011.Prior to the completion of the actions of TPM_ContinueSelfTest the TPM MAY respond in
1681
two ways1682

a. The TPM MAY automatically invoke the actions of TPM_ContinueSelfTest.

1683

i.

1684
1685

ii. The TPM may complete the self-test, execute the command, and return thecommand result.

1686
259
260

The TPM MAY return TPM_DOING_SELFTEST.

b. The TPM MAY return the error code TPM_NEEDS_SELFTEST46

TCG Published
TCG Published

Revision 116 1 Marchy 2011

261TPM Main Part 1 Design Principles

TCG © Copyright

262Specification Version 1.2

263
1687

9.3

Startup

1688Start of informative comment
1689Startup transitions the TPM from the initialization state to an operational state. The
1690transition includes information from the platform to inform the TPM of the platform
1691operating state. TPM_Startup has three options: Clear, State and Deactivated.
1692The Clear option informs the TPM that the platform is starting in a “cleared” state or most1693likely a complete reboot. The TPM is to set itself to the default values and operational state
1694specified by the TPM Owner.
1695The State option informs the TPM that the platform is requesting the TPM to recover a saved
1696state and continue operation from the saved state. The platform previously made the1697TPM_SaveState request to the TPM such that the TPM prepares values to be recovered later.
1698If the TPM enters failure mode after TPM_SaveState, the saved state should be deleted. It is
1699then possible that the State option will fail.
1700The Deactivated state informs the TPM that it should not allow further operations and1701should fail all subsequent command requests. The Deactivated state can only be reset by
1702performing another TPM_Init.
1703End of informative comment
1704

9.4

Operational Mode

1705Start of informative comment
1706After the TPM completes both TPM_Startup and self-tests, the TPM is ready for operation.
1707There are three discrete states, enabled or disabled, active or inactive and owned or
1708unowned. These three states when combined form eight operational modes.

1709
1710Figure 9:d - Eight Modes of Operation
1711S1 is the fully operational state where all TPM functions are available. S8 represents a mode
1712where all TPM features (except those to change the state) are off.

264Revision 116 1 Marchy 2011
265

TCG Published
TCG Published47

266Copyright © TCG
267

TPM Main Part 1 Design Principles
Specification Version 1.2

1713Given the eight modes of operation, the TPM can be flexible in accommodating a wide range
1714of usage scenarios. The default delivery state for a TPM should be S8 (disabled, inactive and
1715unowned). In S8, the only mechanism available to move the TPM to S1 is having physical1716access to the platform.
1717Two examples illustrate the possibilities of shipping combinations.
1718Example 1
1719The customer does not want the TPM to attest to any information relative to the platform.
1720The customer does not want any remote entity to attempt to change the control options that
1721the platform owner is setting. For this customer the platform manufacturer sets the TPM in
1722S8 (disabled, deactivated and unowned).
1723To change the state of the platform the platform owner would assert physical presence and1724enable, activate and insert the TPM Owner shared secret. The details of how to change the1725various modes is in subsequent sections.
1726This particular sequence gives maximum control to the customer.
1727Example 2
1728A corporate customer wishes to have platforms shipped to their employees and the IT
1729department wishes to take control of the TPM remotely. To satisfy these needs the TPM
1730should be in S5 (enabled, active and unowned). When the platform connects to the1731corporate LAN the IT department would execute the TPM_TakeOwnership command
1732remotely.
1733This sequence allows the IT department to accept platforms into their network without
1734having to have physical access to each new machine.
1735End of informative comment
1736The TPM MUST have commands to perform the following:
17371. Enable and disable the TPM. These commands MUST work as TPM Owner authorized or
1738with the assertion of physical presence
17392. Activate and deactivate the TPM. These commands MUST work as TPM Owner
1740
authorized or with the assertion of physical presence
17413. Activate and deactivate the ability to take ownership of the TPM
17424. Assert ownership of the TPM.
1743

9.4.1

Enabling a TPM

1744Informative comment
1745A disabled TPM is not able to execute commands that use the resources of a TPM. While
1746some commands are available (SHA-1 for example) the TPM is not able to load keys and1747perform TPM_Seal and other such operations. These restrictions are the same as for an
1748inactive TPM. The difference between inactive and disabled is that a disabled TPM is unable
1749to execute the TPM_TakeOwnership command. A disabled TPM that has a TPM Owner is not
1750able to execute normal TPM commands.

268
269

48

TCG Published
TCG Published

Revision 116 1 Marchy 2011

270TPM Main Part 1 Design Principles

TCG © Copyright

271Specification Version 1.2

272

1751
1752pFlags.tpmDisabled contains the current enablement status. When set to TRUE the TPM is1753disabled, when FALSE the TPM is enabled.
1754Changing the setting pFlags.tpmDisabled has no effect on any secrets or other values held
1755by the TPM. No keys, monotonic counters or other resources are invalidated by changing
1756TPM enablement. There is no guarantee that session resources (like transport sessions)
1757survive the change in enablement, but there is no loss of secrets.
1758The TPM_OwnerSetDisable command can be used to transition in either Enabled or
1759Disabled states. The desired state is a parameter to TPM_OwnerSetDisable. This command
1760requires TPM Owner authentication to operate. It is suitable for post-boot and remote
1761invocation.
1762An unowned TPM requires the execution of TPM_PhysicalEnable to enable the TPM and
1763TPM_PhysicalDisable to disable the TPM. Operators of an owned TPM can also execute
1764these two commands. The use of the physical commands allows a platform operator to1765disable the TPM without TPM Owner authorization.
1766TPM_PhysicalEnable transitions the TPM from Disabled to Enabled state. This command is
1767guarded by a requirement of operator physical presence. Additionally, this command can be
1768invoked by a physical event at the platform, whether or not the TPM has an Owner or there
1769is a human physically present. This command is suitable for pre-boot invocation.
1770TPM_PhysicalDisable transitions the TPM from Enabled to Disabled state. It has the same
1771guard and invocation properties as TPM_PhysicalEnable.
1772The subset of commands the TPM is able to execute is defined in the structures document
1773in the persistent flag section.
1774Misuse of the disabled state can result in denial-of-service. Proper management of Owner
1775AuthData and physical access to the platform is a critical element in ensuring availability of
1776the system.
1777End of informative comment
17781. The TPM MUST provide an enable and disable command that is executed with TPM
1779
Owner authorization.
273Revision 116 1 Marchy 2011274

TCG Published
TCG Published49

275Copyright © TCG
276

TPM Main Part 1 Design Principles
Specification Version 1.2

17802. The TPM MUST provide an enable and disable command this is executed locally using
1781
physical presence.
1782

9.4.2

Activating a TPM

1783Informative comment
1784A deactivated TPM is not able to execute commands that use TPM resources. A major
1785difference between deactivated and disabled is that a deactivated TPM CAN execute the1786TPM_TakeOwnership command.
1787Deactivated may be used to prevent the (obscure) attack where a TPM is readied for
1788TPM_TakeOwnership but a remote rogue manages to take ownership of a platform just1789before the genuine owner, and immediately has use of the TPM’s facilities. To defeat this1790attack, a genuine owner should set disable==FALSE, ownership==TRUE, deactivate==TRUE,
1791execute TPM_takeOwnership, and then set deactivate==FALSE after verifying that the1792genuine owner is the actual TPM owner.
1793Activation control is with both persistent and volatile flags. The persistent flag is never
1794directly checked by the TPM, rather it is the source of the original setting for the volatile
1795flag. During TPM initialization the value of pFlags.tpmDeactivated is copied to1796vFlags.tpmDeactivated. When the TPM execution engine checks for TPM activation, it only
1797references vFlags.tpmDeactivated.
1798Toggling the state of pFlags.tpmDeactivated uses TPM_PhysicalSetDeactivated. This
1799command requires physical presence. There is no associated TPM Owner authenticated1800command as the TPM Owner can always execute TPM_OwnerSetDisabled which results in
1801the same TPM operations. The toggling of this flag does not affect the current operation of
1802the TPM but requires a reboot of the platform such that the persistent flag is again copied
1803to the volatile flag.
1804The volatile flag, vFlags.tpmDeactivated, is set during initialization by the value of
1805pFlags.tpmDeactivated. If vFlags.tpmDeactivated is TRUE the only way to reactivate the1806TPM is to reboot the platform and have pFlags reset the vFlags value.
1807If vFlags.tpmDeactivated is FALSE, running TPM_SetTempDeactivated will set
1808vFlags.tpmDeactivated to TRUE and then require a reboot of the platform to reactivate the1809platform.

277
278

50

TCG Published
TCG Published

Revision 116 1 Marchy 2011

279TPM Main Part 1 Design Principles

TCG © Copyright

280Specification Version 1.2

281

1810
1811Figure 9:e - Activated and Deactivated States
1812TPM activation is for Operator convenience. It allows the operator to deactivate the platform
1813(temporarily, using TPM_SetTempDeactivated) during a user session when the operator does
1814not want to disclose platform or attestation identity. This provides operator privacy, since
1815PCRs could provide cryptographic proof of an operation. PCRs are inaccessible when a TPM
1816is deactivated. They cannot be used for authorization, nor can they be read. The reboot
1817required to activate a TPM also resets the PCRs.
1818The subset of commands that are available when the TPM is deactivated is contained in the1819structures document. The TPM_TakeOwnership command is available when deactivated.
1820The TPM_Extend command is available when deactivated so that software (e.g. a BIOS) can
1821run the command without the need to handle an error. The PCR extend operation is
1822irrelevant, since the resulting PCR value cannot be used.
1823End of informative comment
18241. The TPM MUST maintain a non-volatile flag that indicates the activation state
18252. The TPM MUST provide for the setting of the non-volatile flag using a command that1826
requires physical presence
18273. The TPM MUST sets a volatile flag using the current setting of the non-volatile flag.
18284. The TPM MUST provide for a command that deactivates the TPM immediately
18295. The only mechanism to reactivate a TPM once deactivated is to power-cycle the system.
1830

9.4.3

Taking TPM Ownership

1831Start of informative comment
1832The owner of the TPM has ultimate control of the TPM. The owner of the TPM can enable or1833disable the TPM, create AIK and set policies for the TPM. The process of taking ownership
1834must be a tightly controlled process with numerous checks and balances.
1835The protections around the taking of ownership include the enablement status, specific
1836persistent flags and the assertion of physical presence.
282Revision 116 1 Marchy 2011
283

TCG Published
TCG Published51

284Copyright © TCG
285

TPM Main Part 1 Design Principles
Specification Version 1.2

1837Control of the TPM revolves around knowledge of the TPM Owner authentication value.
1838Proving knowledge of authentication value proves the calling entity is the TPM Owner. It is
1839possible for more than one entity to know the TPM Owner authentication value.
1840The TPM provides no mechanisms to recover a lost TPM Owner authentication value.
1841Recovery from a lost or forgotten TPM Owner authentication value involves removing the old
1842value and installing a new one. The removal of the old value invalidates all information
1843associated with the previous value. Insertion of a new value can occur after the removal of
1844the old value.
1845A disabled and inactive TPM that has no TPM Owner cannot install an owner.
1846To invalidate the TPM Owner authentication value use either TPM_OwnerClear or
1847TPM_ForceClear.
1848End of informative comment
18491. The TPM Owner authentication value MUST be a 160-bits
18502. The TPM Owner authentication value MUST be held in persistent storage
18513. The TPM MUST have no mechanisms to recover a lost TPM Owner authentication value
1852

9.4.3.1 Enabling Ownership

1853Informative comment
1854For the TPM_TakeOwnership command to succeed, pFlags.disable must be FALSE and1855pFlags.ownership must be TRUE.
1856The following diagram shows the states and the operational checks the TPM makes before
1857allowing the insertion of the TPM Ownership value.
1858

286
287

52

TCG Published
TCG Published

Revision 116 1 Marchy 2011

288TPM Main Part 1 Design Principles

TCG © Copyright289Specification Version 1.2

290

H[Disabled][Ownership Not Allowed][Enabled][Ownership Allowed][Owned][Unowned]

Operational

Take Ownership
DP P006 Rev 01

1859
1860
1861

1862The TPM checks pFlags.disable. If the TPM is enabled, the TPM checks for the existence of
1863a TPM Owner. If an Owner is not present, the TPM checks pFlags.ownership. If TRUE, the1864TPM_TakeOwnership command will execute.
1865While the TPM has no Owner but is enabled and active, a limited subset of commands will
1866successfully execute.
1867The TPM_SetOwnerInstall command toggles the state of the pFlags.ownership flag.
1868TPM_SetOwnerInstall requires the assertion of physical presence to execute.
1869End of informative comment
1870

9.4.4

Transitioning Between Operational States

1871Start of informative comment
1872The following table is a recap of the commands necessary to transition a TPM from one state
1873to another.
State

TPM Owner Auth

Physical Presence

Persistence

Disabled to Enabled

TPM_OwnerSetDisable

TPM_PhysicalEnable

permanent

Enabled to Disabled

TPM_OwnerSetDisable

TPM_PhysicalDisable

permanent

Inactive to Active

TPM_PhysicalSetDeactivatedpermanent

Active to Inactive

TPM_PhysicalSetDeactivatedpermanent

Active to Inactive

TPM_SetTempDeactivatedboot cycle

1874
291Revision 116 1 Marchy 2011292

TCG Published
TCG Published53

293Copyright © TCG
294

TPM Main Part 1 Design Principles
Specification Version 1.2

1875End of informative comment
1876

9.5

Clearing the TPM

1877Start of informative comment
1878Clearing the TPM is the process of returning the TPM to factory defaults. It is possible the1879platform owner will change when in this state.
1880The commands to clear a TPM require either TPM Owner authentication or the assertion of
1881physical presence.
1882The clear process performs the following tasks:
1883Invalidate the SRK. Once invalidated all information stored using the SRK is now
1884unavailable. The invalidation does not change the blobs using the SRK rather there is no1885way to decrypt the blobs after invalidation of the SRK.
1886Invalidate tpmProof. tpmProof is a value that provides the uniqueness to values stored off of
1887the TPM. By invalidating tpmProof all off TPM blobs will no longer load on the TPM.
1888Invalidate the TPM Owner authentication value. With the authentication value invalidated
1889there are no TPM Owner authenticated commands that will execute.
1890Reset volatile and non-volatile data to manufacturer defaults.
1891The clear must not affect the EK.
1892Once cleared the TPM will return TPM_NOSRK to commands that require authentication.
1893The PCR values are undefined after a clear operation. The TPM must go through TPM_Init to1894properly set the PCR values.
1895Clear authentication comes from either the TPM owner or the assertion of physical
1896presence. As the clear commands present a real opportunity for a denial of service attack
1897there are mechanisms in place disabling the clear commands.
1898Disabling TPM_OwnerClear uses the TPM_DisableOwnerClear command. The state of ability
1899to execute TPM_OwnerClear is then held as one of the non-volatile flags.
1900Enablement of TPM_ForceClear is held in the volatile disableForceClear flag.
1901disableForceClear is set to FALSE during TPM_Init. To disable the command software
1902should issue the TPM_DisableForceClear command.
1903During the TPM startup processing anyone with physical access to the machine can issue
1904the TPM_ForceClear command. This command performs the clear operations if it has not
1905been disabled by vFlags.DisabledForceClear being TRUE.
1906The TPM can be configured to block all forms of clear operations. It is advisable to block
1907clear operations to prevent an otherwise trivial denial-of-service attack. The assumption is
1908the system startup code will issue the TPM_DisableForceClear on each power-cycle after it
1909is determined the TPM_ForceClear command will not be necessary. The purpose of the
1910TPM_ForceClear command is to recover from the state where the Owner has lost or
1911forgotten the TPM Owner-authentication-data.
1912The TPM_ForceClear must only be possible when the issuer has physical access to the1913platform. The manufacturer of a platform determines the exact definition of physical access.

295
296

54

TCG Published
TCG Published

Revision 116 1 Marchy 2011

297TPM Main Part 1 Design Principles

TCG © Copyright

298Specification Version 1.2

299
1914The commands to clear a TPM require either TPM Owner authentication, TPM_OwnerClear,
1915or the assertion of physical presence, TPM_ForceClear.
1916End of informative comment
19171. The TPM MUST support the clear operations.
1918
1919

a. Clear operations MUST be authenticated by either the TPM Owner or physicalpresence

1920

b. The TPM MUST support mechanisms to disable the clear operations

19212. The clear operation MUST perform at least the following actions
1922

a. SRK invalidation

1923

b. tpmProof invalidation

1924

c. TPM Owner authentication value invalidation

1925

d. Resetting non-volatile values to defaults

1926

e. Invalidation of volatile values

1927

f. Invalidation of internal resources

19283. The clear operation must not affect the EK.

300Revision 116 1 Marchy 2011
301

TCG Published
TCG Published55

302Copyright © TCG
303

TPM Main Part 1 Design Principles
Specification Version 1.2

192910.
Physical Presence
1930Start of informative comment
1931This specification describes commands that require physical presence at the platform before
1932the command will operate. Physical presence implies direct interaction by a person – i.e.
1933Operator with the platform / TPM.
1934The type of controls that imply special privilege include:
1935•

Clearing an existing Owner from the TPM,

1936•

Temporarily deactivating a TPM,

1937•

Temporarily disabling a TPM.

1938Physical presence implies a level of control and authorization to perform basic
1939administrative tasks and to bootstrap management and access control mechanisms.
1940Protection of low-level administrative interfaces can be provided by physical and electrical
1941methods; or by software; or a combination of both. The guiding principle for designers is the
1942protection mechanism should be difficult or impossible to spoof by rogue software.
1943Designers should take advantage of restricted states inherent in platform operation. For
1944example, in a PC, software executed during the power-on self-test (POST) cannot be
1945disturbed without physical access to the platform. Alternatively, a hardware switch
1946indicating physical presence is very difficult to circumvent by rogue software or remote
1947attackers.
1948TPM and platform manufacturers will determine the actual implementation approach. The
1949strength of the protection mechanisms is determined by an evaluation of the platform.
1950Physical presence indication is implemented as a flag in volatile memory known as the
1951physicalPresenceV flag. When physical presence is established (TRUE) several TPM
1952commands are able to function. They include:
1953TPM_PhysicalEnable,
1954TPM_PhysicalDisable,
1955TPM_PhysicalSetDeactivated,
1956TPM_ForceClear,
1957TPM_SetOwnerInstall,
1958In order to execute these commands, the TPM must obtain unambiguous assurance that
1959the operation is authorized by physical-presence at the platform. The command processor
1960in the I/O component checks the physicalPresenceV flag before continuing processing of
1961TPM command blocks. The volatile physicalPresenceV flag is set only while the Operator is
1962indeed physically present.
1963TPM designers should take precautions to ensure testing of the physicalPresenceV flag
1964value is not mask-able. For example, a special bus cycle could be used or a dedicated line
1965implemented.
1966There is an exception to physical presence semantics that allows a remote entity the ability
1967to assert physical presence when that entity is not physically present.
The
1968TSC_PhysicalPresence command is used to change polarity of the physicalPresenceV flag.
304
305

56

TCG Published
TCG Published

Revision 116 1 Marchy 2011

306TPM Main Part 1 Design Principles

TCG © Copyright307Specification Version 1.2

308
1969Its use is heavily guarded. See sections describing the TPM Opt-In component; and Volatile
1970and Non-volatile memory components.
1971The following diagram illustrates the flow of logic controlling updates to the
1972physicalPresenceV flag:
HW pinANDphysicalPresenceHWEnableORphysicalPresenceCMDEnableV

PhysicalPresenceV

NOT

physicalPresenceCMDEnableAND
Rev 0.3

TSC_PhysicalPresence()

1973
1974Figure 10:f - Physical Presence Control Logic
1975This diagram shows that the physicalPresenceV flag may be updated either by a HW pin or
1976through the TSC_PhysicalPresence command, but gated by persistent control flags and a
1977temporal lock. Observe, the reverse logic surrounding the use of TSC_PhysicalPresence
1978command. When the physicalPresenceCMDEnable flag is set and the physicalPresenceLock
1979flag is not set, the TSC_PhysicalPresence command may set physicalPresenceV.
1980The physicalPresenceV flag may be overridden by unambiguous physical presence.
1981Conceptually, the use of dedicated electrical hardware providing a trusted path to the
1982Operator has higher precedence than the physicalPresenceV flag value. Implementers
1983should consider this when implementing physical presence indicators.
1984End of informative comment
19851. The requirement for physical presence MUST be met by the platform manufacturer
1986
using some physical mechanism.
19872. It SHALL be impossible to intercept or subvert indication of physical presence to the1988
TPM by the execution of software on the platform.

309Revision 116 1 Marchy 2011
310

TCG Published
TCG Published57

311Copyright © TCG
312

TPM Main Part 1 Design Principles
Specification Version 1.2

198911.
Root of Trust for Reporting (RTR)
1990Start of informative comment
1991The RTR is responsible for establishing platform identities, reporting platform
1992configurations, protecting reported values, and providing a function for attesting to reported
1993values. The RTR shares responsibility of protecting measurement digests with the RTS.
1994The interaction between the RTR and RTS is a critical component. The design and
1995implementation of the interaction between the RTR and RTS should mitigate observation
1996and tampering with the messages. It is strongly encouraged that the RTR and RTS
1997implementation occur in the same package such there are no external observation points.
1998For a silicon based TPM this would imply that the RTR and RTS are in the same silicon
1999package with no external busses.
2000End of informative comment
20011. An instantiation of the RTS and RTR SHALL do the following:
2002
2003

a. Be resistant to all forms of software attack and to the forms of physical attack
implied by the platform’s Protection Profile

2004

b. Supply an accurate digest of all sequences of presented integrity metrics

2005

11.1

Platform Identity

2006Start of informative comment
2007The RTR is a cryptographic identity used to distinguish and authenticate an individual
2008TPM. The TPM uses the RTR to answer an integrity challenge.
2009In the TPM, the Endorsement Key (EK) is the RTR. The EK is cryptographically unique and2010bound to the TPM.
2011Prior to any use of the TPM, the RTR must be instantiated. Instantiation may occur during
2012TPM manufacturing or platform manufacturing. The business issues and manufacturing
2013flow determines how a specific TPM and platform is initialized with the EK.
2014As the RTR is cryptographically unique, the use of the RTR must only occur in controlled
2015circumstances due to privacy concerns. The EK is only available for two operations:
2016establishing the TPM Owner and establishing Attestation Identity Key (AIK) values and2017credentials. There is a prohibition on the use of the EK for any other operation.
2018End of informative comment
20191. The RTR MUST have a cryptographic identity.
2020

a. The cryptographic identity of the RTR is the Endorsement Key (EK).

20212. The EK MUST be
2022

a. Statistically unique

2023
2024

i.

2025

ii. Difficult to forge or counterfeit

2026
313
314

When the TPM is in FIPS mode, the EK MUST be generated using a random
number generator that meets FIPS requirements.

b. Verifiable during the AIK creation process
58

TCG Published
TCG Published

Revision 116 1 Marchy 2011

315TPM Main Part 1 Design Principles

TCG © Copyright

316Specification Version 1.2

31720273. The EK SHALL only participate in2028

a. TPM Ownership insertion

2029

b. AIK creation and verification

2030

11.2

RTR to Platform Binding

2031Start of informative comment
2032When performing validation of the EK and the platform the challenger wishes to have
2033knowledge of the binding of RTR to platform. The RTR is bound to a TPM hence if the2034platform can show the binding of TPM to platform the challenger can reasonably believe the2035RTR and platform binding.
2036The TPM cannot provide all of the information necessary for the challenger to trust in the2037binding. That information comes from the manufacturing process and occurs outside the2038control of the TPM.
2039End of informative comment
20401. The EK is transitively bound to the Platform via the TPM as follows:
2041
2042

a. An EK is bound to one and only one TPM (i.e., there is a one to one correspondence
between an Endorsement Key and a TPM.)

2043
2044

b. A TPM is bound to one and only one Platform. (i.e., there is a one to one
correspondence between a TPM and a Platform.)

2045
2046

c. Therefore, an EK is bound to a Platform. (i.e., there is a one to one correspondence
between an Endorsement Key and a Platform.)

2047

11.3

Platform Identity and Privacy Considerations

2048Start of informative comment
2049The uniqueness property of cryptographic identities raises concerns that use of that identity
2050could result in aggregation of activity logs. Analysis of the aggregated activity could reveal
2051personal information that a user of a platform would not otherwise approve for distribution
2052to the aggregators. Both EK and AIK identities have this property.
2053To counter undesired aggregation, TCG encourages the use of domain specific AIK keys and2054restricts the use of the EK key. The platform owner controls generation and distribution of
2055AIK public keys.
2056If a digital signature was performed by the EK, then any entity could track the use of the2057EK. So use of the EK as a signature is cryptographically sound, but this does not ensure
2058privacy. Therefore, a mechanism to allow verifiers (human or machine) to determine that
2059the TPM really signed the message without using the EK is required.
2060End of informative comment
2061

11.4

Attestation Identity Keys

2062Start of informative comment
2063An Attestation Identity Key (AIK) is an alias for the Endorsement Key (EK). The EK cannot
2064perform signatures for security reasons and due to privacy concerns.
318Revision 116 1 Marchy 2011319

TCG Published
TCG Published59

320Copyright © TCG
321

TPM Main Part 1 Design Principles
Specification Version 1.2

2065Generation of an AIK can occur anytime after establishment of the TPM Owner. The TPM
2066can create a virtually unlimited number of AIK.
2067The TPM Owner controls all aspects of the generation and activation of an AIK. The TPM
2068Owner controls any data associated with the AIK. The AIK credential may contain
2069application specific information. The AIK must contain identification such that the TPM can
2070properly enforce the restrictions placed on an AIK.
2071The AIK is an asymmetric key pair. For interoperability, the AIK is an RSA 2048-bit key. The
2072TPM must protect the private portion of the asymmetric key and ensure that the value is2073never exposed. The user of an AIK must prove knowledge of the 160-bit AIK authorization
2074value to use the AIK.
2075An AIK is a signature key, and is never used for encryption. It only signs information
2076generated internally by the TPM. The data could include PCR, other keys and TPM status
2077information. The AIK must never sign arbitrary external data, since it would be possible for2078an attacker to create a block of data that appears to be a PCR value.
2079AIK creation involves two TPM commands.
2080The TPM_MakeIdentity command causes the TPM to generate the AIK key pair. The
2081command also discloses the EK-AIK binding to the service that will issue the AIK credential.
2082The TPM_ActivateIdentity command unwraps a session key that allows for the decryption of
2083the AIK credential. The session key was encrypted using the PUBEK and requires the
2084PRIVEK to perform the decryption.
2085Use of the AIK credential is outside of the control of the TPM.
2086End of informative comment
20871. The TPM MUST permanently mark an AIK such that, for all subsequent uses of the AIK,2088
the AIK restrictions are enforced.
20892. An AIK MUST be:
2090

a. Statistically unique

2091

b. Difficult to forge or counterfeit

2092

c. Verifiable to challengers

20933. For interoperability the AIK MUST be
2094

a. An RSA 2048-bit key

20954. The AIK MUST only sign data generated by the TPM
2096

11.4.1AIK Creation

2097Start of informative comment
2098As the AIK is an alias for the EK. The AIK creation process requires TPM Owner2099authorization. The process actually requires two TPM Owner authorizations; creation and2100credential activation.
2101The AIK credential creation process is outside the control of the TPM. However, the2102certification authority (CA) will attest (with the AIK credential) that the AIK is tied to valid
2103Endorsement, Platform and Conformance credentials.
322
323

60

TCG Published
TCG Published

Revision 116 1 Marchy 2011

324TPM Main Part 1 Design Principles

TCG © Copyright

325Specification Version 1.2

326
2104Without these credentials, the AIK cannot prove that PCR values belong to a TPM. An owner2105may decide to trust any key generated by TPM_MakeIdentity without activating the identity
2106(e.g., because he is an administrator in a controlled company environment). In this case,
2107the owner needs no credential. Another challenger can only trust that the AIK belongs to a
2108TPM by seeing the credential of a trustworthy CA.
2109End of informative comment
21101. The TPM Owner MUST authorize the AIK creation process.
21112. The TPM MUST use a protected function to perform the AIK creation.
21123. The TPM Owner MUST indicate the entity that will provide the AIK credential as part of2113
the AIK creation process.
21144. The TPM Owner MAY indicate that NO credential will ever be created. If the TPM Owner2115
does indicate that no credential will be provided the TPM MUST ensure that no2116
credential can be created.
21175. The TTP MAY apply policies to determine if the presented AIK should be granted a2118
credential.
21196. The credential request package MUST be useable by only the Privacy CA selected by the2120
TPM Owner.
21217. The AIK credential MUST be only obtainable by the TPM that created the AIK credential
2122
request.
2123

11.4.2AIK Storage

2124Start of informative comment
2125The AIK may be stored on some general-purpose storage device.
2126When held outside of the TPM the AIK sensitive data must be encrypted and integrity
2127protected.
2128End of informative comment
21291. When held outside of the TPM AIK encryption and integrity protection MUST protect the2130
AIK sensitive information
21312. The migration of AIK from one TPM to another MUST be prohibited

327Revision 116 1 Marchy 2011
328

TCG Published
TCG Published61

329Copyright © TCG
330

TPM Main Part 1 Design Principles
Specification Version 1.2

213212.
Root of Trust for Storage (RTS)
2133Start of informative comment
2134The RTS provides protection on data in use by the TPM but held in external storage devices.
2135The RTS provides confidentiality and integrity for the external blobs.
2136The RTS also provides the mechanism to ensure that the release of information only occurs
2137in a named environment. The naming of an environment uses the PCR selection to2138enumerate the values.
2139Data protected by the RTS can migrate to other TPM.
2140End of informative comment
21411. The number and size of values held by the RTS SHOULD be limited only by the volume2142
of storage available on the platform
21432. The TPM MUST ensure that TPM_PERMANENT_DATA -> tpmProof is only inserted into2144
TPM internally generated and non-migratable information.

12.1

2145

Loading and Unloading Blobs

2146Start of informative comment
2147The TPM provides several commands to store and load RTS controlled data.

331
332

Class

Command

AnalogComment

1

Data / Internal / TPM

TPM_MakeIdentity

TPM_ActivateIdentity

Special purpose data

2

Data / External / TPM

TSS_Bind

TPM_Unbind

3

Data / Internal / PCR

TPM_Seal

TPM_Unseal

4

Data / External / PCR

5

Key / Internal / TPM

TPM_CreateWrapKey

TPM_LoadKey

6

Key / External / TPM

TSS_WrapKey

TPM_LoadKey

7

Key / Internal / PCR

8

Key / External / PCR

TSS_WrapKeyToPcr

TPM_LoadKey

62

TCG Published
TCG Published

Revision 116 1 Marchy 2011

333TPM Main Part 1 Design Principles

TCG © Copyright

334Specification Version 1.2

335

214813.
Transport Sessions and Authorization Protocols
2149Start of informative comment
2150The purpose of the authorization protocols and mechanisms is to prove to the TPM that the2151requestor has permission to perform a function and use some object. The proof comes from
2152the knowledge of a shared secret.
2153AuthData is available for the TPM Owner and each entity (keys, for example) that the TPM
2154controls. The AuthData for the TPM Owner and the SRK are held within the TPM itself and
2155the AuthData for other entities are held with the entity.
2156The TPM Owner AuthData allows the Owner to prove ownership of the TPM. Proving
2157ownership of the TPM does not immediately allow all operations – the TPM Owner is not a2158“super user” and additional AuthData must be provided for each entity or operation that
2159has protection.
2160The TPM treats knowledge of the AuthData as complete proof of ownership of the entity. No
2161other checks are necessary. The requestor (any entity that wishes to execute a command on
2162the TPM or use a specific entity) may have additional protections and requirements where
2163he or she (or it) saves the AuthData; however, the TPM places no additional requirements.
2164There are three protocols to securely pass a proof of knowledge of AuthData from requestor
2165to TPM; the “Object-Independent Authorization Protocol” (OIAP), the “Object-Specific2166Authorization Protocol” (OSAP) and the “Delegate-Specific Authorization Protocol” (DSAP).
2167The OIAP supports multiple authorization sessions for arbitrary entities. The OSAP
2168supports an authentication session for a single entity and enables the confidential
2169transmission of new authorization information. The DSAP supports the delegation of owner
2170or entity authorization.
2171New authorization information is inserted by the “AuthData Insertion Protocol” (ADIP)
2172during the creation of an entity. The “AuthData Change Protocol” (ADCP) and the2173“Asymmetric Authorization Change Protocol” (AACP) allow the changing of the AuthData for
2174an entity. The protocol definitions allow expansion of protocol types to additional TCG
2175required protocols and vendor specific protocols.
2176The protocols use a “rolling nonce” paradigm. This requires that a nonce from one side be in
2177use only for a message and its reply. For instance, the TPM would create a nonce and send
2178that on a reply. The requestor would receive that nonce and then include it in the next
2179request. The TPM would validate that the correct nonce was in the request and then create
2180a new nonce for the reply. This mechanism is in place to prevent replay attacks and man2181in-the-middle attacks.
2182The basic protocols do not provide long-term protection of AuthData that is the hash of a2183password or other low-entropy entities. The TPM designer and application writer must
2184supply additional protocols if protection of these types of data is necessary.
2185The design criterion of the protocols is to allow for ownership authentication, command and2186parameter authentication and prevent replay and man-in-the-middle attacks.
2187The passing of the AuthData, nonces and other parameters must follow specific guidelines
2188so that commands coming from different computer architectures will interoperate properly.
2189End of informative comment
336Revision 116 1 Marchy 2011
337

TCG Published
TCG Published63

338Copyright © TCG
339

TPM Main Part 1 Design Principles
Specification Version 1.2

21901. AuthData MUST use one of the following protocols
2191

a. OIAP

2192

b. OSAP2193

c. DSAP21942. Entity creation MUST use one of the following protocols
2195

a. ADIP

21963. Changing AuthData MUST use one of the following protocols
2197

a. ADCP

2198

b. AACP

21994. The TPM MAY support additional protocols to authenticate, insert and change
2200
AuthData.
22015. When a command has more than one AuthData value2202

a. Each AuthData MUST use the same SHA-1 of the parameters22036. Keys MAY specify authDataUsage -> TPM_AUTH_NEVER
2204
2205

a. If
the
callerchanges
the
tag
from
TPM_TAG_RQU_AUTH1_xxx
TPM_TAG_RQU_XXX the TPM SHALL ignore the AuthData values

2206

b. If the caller leaves the tag as TPM_TAG_RQU_AUTH1

2207
2208

i.

to

The TPM will compute the AuthData based on the value store in the AuthData
location within the key, IGNORING the state of the AuthDataUsage flag.

2209
2210

c. Users may choose to use a well-known value for the AuthData when setting
AuthDataUsage to TPM_AUTH_NEVER.

2211
2212
2213

d. If a key has AuthDataUsage set to TPM_AUTH_ALWAYS but is received in acommand with the tag TPM_TAG_RQU_COMMAND, the command MUST return anerror code.

22147. For commands that normally have 2 authorization sessions, if the tag specifies only one
2215
in the parameter array, then the first session listed is ignored (authDataUsage must be
2216
TPM_AUTH_NEVER for this key) and the incoming session data is used for the second
2217
auth session in the list.
22188. Keys MAY specify AuthDataUsage -> TPM_NO_READ_PUBKEY_AUTH
2219
2220

a. If the key used in a command to read the public portion of the key (e.g.
TPM_CertifyKey, TPM_GetPubKey)

2221
2222

i.

2223
2224
2225

ii. If the caller leaves the tag as TPM_TAG_RQU_AUTH1, the TPM will compute the
AuthData based on the value store in the AuthData location within the key,
IGNORING the state of the AuthDataUsage flag

2226
2227

b. else if the key used in command to read/access the private portion of the key(e.g.
TPM_Sign)

340
341

64

If the caller changes the tag from TPM_TAG_RQU_AUTH1_xxx
TPM_TAG_RQU_XXX, the TPM SHALL ignore the AuthData values

TCG Published
TCG Published

Revision 116 1 Marchy 2011to

342TPM Main Part 1 Design Principles

TCG © Copyright

343Specification Version 1.2

344
2228
2229

i.

If the tag is TPM_TAG_RQU_COMMAND, the command MUST return an error
code.

345Revision 116 1 Marchy 2011
346

TCG Published
TCG Published65

347Copyright © TCG
348

TPM Main Part 1 Design Principles
Specification Version 1.2

2230
2231

13.1

Authorization Session Setup

2232Start of informative comment
2233The TPM provides two protocols for authorizing the use of entities without revealing the2234AuthData on the network or the connection to the TPM. In both cases, the protocol
2235exchanges nonce-data so that both sides of the transaction can compute a hash using
2236shared secrets and nonce-data. Each side generates the hash value and can compare to the2237value transmitted. Network listeners cannot directly infer the AuthData from the hashed
2238objects sent over the network.
2239The first protocol is the Object-Independent Authorization Protocol (OIAP), which allows the2240exchange of nonces with a specific TPM. Once an OIAP session is established, its nonces
2241can be used to authorize the use of any entity managed by the TPM. The session can live
2242indefinitely until either party requests the session termination. The TPM_OIAP function
2243starts the OIAP session.
2244The second protocol is the Object Specific Authorization Protocol (OSAP). The OSAP allows
2245establishment of an authentication session for a single entity. The session creates nonces
2246that can authorize multiple commands without additional session-establishment overhead,
2247but is bound to a specific entity. The TPM_OSAP command starts the OSAP session. The
2248TPM_OSAP specifies the entity to which the authorization is bound.
2249Most commands allow either form of authorization protocol. In general, however, the OIAP
2250is preferred – it is more generally useful because it allows usage of the same session to2251provide authorization for different entities. The OSAP is, however, necessary for operations
2252that set or reset AuthData.
2253OIAP sessions were designed for reasons of efficiency; only one setup process is required for2254potentially many authorizations.
2255An OSAP session is doubly efficient because only one setup process is required for2256potentially many authorization calculations and the entity AuthData secret is required only
2257once. This minimizes exposure of the AuthData secret and can minimize human interaction
2258in the case where a person supplies the AuthData information. The disadvantage of the
2259OSAP is that a distinct session needs to be setup for each entity that requires authorization.
2260The OSAP creates an ephemeral secret that is used throughout the session instead of the
2261entity AuthData secret. The ephemeral secret can be used to provide confidentiality for the
2262introduction of new AuthData during the creation of new entities. Termination of the OSAP
2263occurs in two ways. Either side can request session termination (as usual) but the TPM
2264forces the termination of an OSAP session after use of the ephemeral secret for the
2265introduction of new AuthData.
2266For both the OSAP and the OIAP, session setup is independent of the commands that are
2267authorized. In the case of OIAP, the requestor sends the TPM_OIAP command, and with the
2268response generated by the TPM, can immediately begin authorizing object actions. The
2269OSAP is very similar, and starts with the requestor sending a TPM_OSAP operation, naming
2270the entity to which the authorization session should be bound.
2271The DSAP session is to provide delegated authorization information.
2272All session types use a “rolling nonce” paradigm. This means that the TPM creates a new
2273nonce value each time the TPM receives a command using the session.
349
350

66

TCG Published
TCG Published

Revision 116 1 Marchy 2011

351TPM Main Part 1 Design Principles

TCG © Copyright352Specification Version 1.2

353
2274Example OIAP and OSAP sessions are used to illustrate session setup and use. The
2275fictitious command named TPM_Example occupies the place where an ordinary TPM
2276command might be used, but does not have command specific parameters. The session
2277connects to a key object within the TPM. The key contains AuthData that will be used to2278secure the session.
2279There could be as many as 2 authorization sessions applied to the execution of a single TPM
2280command or as few as 0. The number of sessions used is determined by TCG 1.2 Command
2281Specification and is indicated by the command ordinal parameter.
2282It is also possible to secure authorization sessions using ephemeral shared-secrets. Rather
2283than using AuthData contained in the stored object (e.g. key), the AuthData is supplied as a2284parameter to OSAP session creation. In the examples below the key.usageAuth parameter is2285replaced by the ephemeral secret.
2286End of informative comment
2287

13.2

Parameter Declarations for OIAP and OSAP Examples

2288Start of informative comment
2289To follow OIAP and OSAP protocol examples (Table 13:d and ), the reader should become
2290familiar with the parameters declared in Table 13:b and Table 13:c.
2291Several conventions are used in the parameter tables that may facilitate readability.
2292The Param column (Table 13:b) identifies the sequence in which parameters are packaged
2293into a command or response message as well as the size in bytes of the parameter value. If
2294this entry in the row is blank, that parameter is not included in the message. <> in the size
2295column means that the size of the element is variable. It is defined either explicitly by the2296preceding parameter, or implicitly by the parameter type.
2297The HMAC column similarly identifies the parameters that are included in HMAC
2298calculations. This column also indicates the default parameters that are included in the
2299audit log. Exceptions are noted under the specific ordinal, e.g. TPM_ExecuteTransport.
2300The HMAC # column details the parameters used in the HMAC calculation. Parameters 1S,
23012S, etc. are concatenated and hashed to inParamDigest or outParamDigest, implicitly called
23021H1 and possibly 1H2 if there are two authorization sessions. For the first session, 1H1,
23032H1, 3H1, and 4H1 are concatenated and HMAC’ed. For the second session, 1H2, 2H2,23043H2, and 4H2 are concatenated and HMAC’ed.
2305In general, key handles are not included in HMAC calculations. This allows a lower
2306software layer to map the physical handle value generated by the TPM to a logical value
2307used by an upper software layer. The upper layer generally holds the HMAC key and2308generates the HMAC. Excluding the key handle allows the mapping to occur without
2309breaking the HMAC. It is important to use a different authorization secret for each key to2310prevent a man-in-the-middle from altering the key handle.
2311The Type column identifies the TCG data type corresponding to the passed value. An
2312encapsulation of the parameter type is not part of the command message.
2313The Name column is a fictitious variable name that aids in following the examples and2314descriptions.

354Revision 116 1 Marchy 2011355

TCG Published
TCG Published67

356Copyright © TCG
357

TPM Main Part 1 Design Principles
Specification Version 1.2

2315The double-lined row separator distinguishes authorization session parameters from2316command parameters. In Table 13:b the TPM_Example command has three parameters;
2317keyHandle, inArgOne and inArgTwo. The tag, paramSize and ordinal parameters are
2318message header values describing contents of a command message. The parameters below
2319the double-lined row are OIAP / OSAP /DSAP or transport authorization session related. If
2320a second authorization session were used, the table would show a second authorization
2321section delineated by a second double-lined row. The authorization session parameters2322identify shared-secret values, session nonces, session digest and flags.
2323In this example, a single authorization
2324TPM_TAG_RQU_AUTH1_COMMAND tag.

sessionisusedsignaled

bythe2325For an OIAP or transport session, the TPM_AUTHDATA description column specifies the2326HMAC key.
2327For an OSAP or DSAP session, the HMAC key is the shared secret that was calculated
2328during the session setup, not the key specified in the description. The key specified in the2329description was previously used in the shared secret calculation.

358
359

68

TCG Published
TCG Published

Revision 116 1 Marchy 2011

360TPM Main Part 1 Design Principles

TCG © Copyright

361Specification Version 1.2

362
2330

Param

HMAC

#

Sz

#

1

2

TPM_TAGtag

TPM_TAG_RQU_AUTH1_COMMAND

2

4

UINT32paramSize

Total number of input bytes including paramSize and tag

3

4

TPM_COMMAND_CODE

ordinalCommand ordinal, fixed value of TPM_Example

44

TPM_KEY_HANDLE

keyHandle

Handle of a loaded key.

5

1

2S

1

BOOL

inArgOneThe first input argument

6

20

3S

20

UNIT32inArgTwo

The second input argument.

7

4

TPM_AUTHHANDLE

authHandle

The authorization handle used for keyHandle authorization.

Type

Sz

1S

4

Name

Description

2H1

20

TPM_NONCE

authLastNonceEven

Even nonce previously generated by TPM to cover inputs

8

20

3 H1

20

TPM_NONCE

nonceOdd

Nonce generated by system associated with authHandle

9

1

4 H1

1

BOOL

continueAuthSession

The continue use flag for the authorization handle

1
0

20

TPM_AUTHDATA

inAuthThe AuthData digest for inputs and keyHandle. HMAC key:
key.usageAuth.

2331

Table 13:b - Authorization Protocol Input Parameters

2332

2333

Param

HMAC

#

Sz

#

1

2

TPM_TAGTag

TPM_TAG_RSP_AUTH1_COMMAND

2

4

UINT32paramSize

Total number of output bytes including paramSize and tag

3

4

Type

Sz

Name

Description

1S

4

TPM_RESULT

returnCode

The return code of the operation. See section 4.3.

2S

4

TPM_COMMAND_CODE

ordinalCommand ordinal, fixed value of TPM_Example

4

4

3S

4

UINT32outArgOne

Output argument

5

20

2 H1

20

TPM_NONCE

nonceEven

Even nonce newly generated by TPM to cover outputs

3 H1

20

TPM_NONCE

nonceOdd

Nonce generated by system associated with authHandle

4 H1

1

BOOL

continueAuthSession

Continue use flag, TRUE if handle is still active

TPM_AUTHDATA

resAuthThe AuthData digest for the returned parameters. HMAC key:
key.usageAuth.

6

1

7

20

Table 13:c - Authorization Protocol Output Parameters

2334End of informative comment

363Revision 116 1 Marchy 2011364

TCG Published
TCG Published69

365Copyright © TCG
366

233513.2.1

TPM Main Part 1 Design Principles
Specification Version 1.2

Object-Independent Authorization Protocol (OIAP)

2336Start of informative comment
2337The purpose of this section is to describe the authorization-related actions of a TPM when it
2338receives a command that has been authorized with the OIAP protocol. OIAP uses the2339TPM_OIAP command to create the authorization session.
2340Many commands use OIAP authorization. The following description is therefore necessarily
2341abstract. A fictitious TPM command, TPM_Example is used to represent ordinary TPM
2342commands.
2343Assume that a TPM user wishes to send command TPM_Example. This is an authorized
2344command that uses the key denoted by keyHandle. The user must know the AuthData for2345keyHandle (key.usageAuth) as this is the entity that requires authorization and this secret
2346is used in the authorization calculation. Let us assume for this example that the caller of
2347TPM_Example does not need to authorize the use of keyHandle for more than one
2348command. This use model points to the selection of the OIAP as the authorization protocol.
2349For the TPM_Example command, the inAuth parameter provides the authorization to2350execute the command. The following table shows the commands executed, the parameters2351created and the wire formats of all of the information.
2352<inParamDigest> is the result of the following calculation: SHA1(ordinal, inArgOne,
2353inArgTwo). <outParamDigest> is the result of the following calculation: SHA1(returnCode,2354ordinal, outArgOne). inAuthSetupParams refers to the following parameters, in this order:
2355authLastNonceEven, nonceOdd, continueAuthSession. OutAuthSetupParams refers to the2356following parameters, in this order: nonceEven, nonceOdd, continueAuthSession
2357There are two even nonces used to execute TPM_Example, the one generated as part of the
2358TPM_OAIP command (labeled authLastNonceEven below) and the one generated with the2359output arguments of TPM_Example (labeled as nonceEven below).

367
368

70

TCG Published
TCG Published

Revision 116 1 Marchy 2011

369TPM Main Part 1 Design Principles

TCG © Copyright370Specification Version 1.2

371
2360

CallerOn the wire

Dir

TPM

Send TPM_OIAP

TPM_OIAP

Create session
Create authHandle
Associate session and authHandle
Generate authLastNonceEven
Save authLastNonceEven with authHandle

Save authHandle, authLastNonceEven

authHandle,
authLastNonceEven

Returnstag

TPM retrieves key.usageAuth (key must have been previously loaded)

Generate nonceOdd
Compute inAuth = HMAC
(key.usageAuth, inParamDigest,
inAuthSetupParams)
Save nonceOdd with authHandle
Send TPM_Example

paramSizeordinalVerify authHandle points to a valid session, mismatch returns
TPM_E_INVALIDAUTH

keyHandle

Retrieve authLastNonceEven from internal session storage

inArgOne

HM = HMAC (key.usageAuth, inParamDigest, inAuthSetupParams)

inArgTwo

Compare HM to inAuth. If they do not compare return with
TPM_E_INVALIDAUTH

authHandle

Execute TPM_Example and create returnCode

nonceOdd

Generate nonceEven to replace authLastNonceEven in session

continueAuthSession

Set resAuth = HMAC( key.usageAuth, outParamDigest,outAuthSetupParams)

inAuthSave nonceEven

tag

HM = HMAC( key.usageAuth,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOneReturn output parameters
If continueAuthSession is FALSE then destroy session

returnCode
nonceEven
continueAuthSession
resAuth2361
2362Suppose now that the TPM user wishes to send another command using the same session.
2363For the purposes of this example, we will assume that the same example command is used
2364(ordinal = TPM_Example). However, a different key (newKey) with its own secret2365(newKey.usageAuth) is to be operated on. To re-use the previous session, the2366continueAuthSession output boolean must be TRUE.
2367The previous example shows the command execution reusing an existing authorization
2368session. The parameters created and the wire formats of all of the information.
2369In this case, authLastNonceEven is the nonceEven value returned by the TPM with the
2370output parameters from the first protocol example.

372Revision 116 1 Marchy 2011
373

TCG Published
TCG Published71

374Copyright © TCG
375

TPM Main Part 1 Design Principles
Specification Version 1.2

2371
CallerOn the wire

Dir

TPM

tag



paramSize

TPM retrieves newKey.usageAuth (newKey must have beenpreviously loaded)ordinalRetrieve authLastNonceEven from internal session storage

keyHandle

HM = HMAC (newKey.usageAuth, inParamDigest,
inAuthSetupParams)

Generate nonceOdd
Compute inAuth = HMAC
(newKey.usageAuth, inParamDigest,
inAuthSetupParams)
Save nonceOdd with authHandle
Send TPM_Example

inArgOne

Compare HM to inAuth. If they do not compare return with
TPM_E_INVALIDAUTH

inArgTwononceOdd

Execute TPM_Example and create returnCode

continueAuthSession

Generate nonceEven to replace authLastNonceEven in session

inAuthSave nonceEven

tag

HM = HMAC( newKey.usageAuth,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOne

Set resAuth = HMAC(newKey.usageAuth, outParamDigest,outAuthSetupParams)
Return output parameters
If continueAuthSession is FALSE then destroy session

returnCode
nonceEven
continueAuthSession
resAuth

2372
2373The TPM user could then use the session for further authorization sessions. Suppose,
2374however, that the TPM user no longer requires the authorization session. There are three2375possibilities in this case:
2376The user issues a TPM_Terminate_Handle command to the TPM (section 5.3).
2377The input argument continueAuthSession can be set to FALSE for the last command. In
2378this case, the output continueAuthSession value will be FALSE.
2379In some cases, the TPM automatically terminates the authorization session regardless of the
2380input value of continueAuthSession. In this case as well, the output continueAuthSession
2381value will be FALSE.
2382When an authorization session is terminated for any reason, the TPM invalidates the2383session’s handle and terminates the session’s thread (releases all resources allocated to the
2384session).
2385End of informative comment
2386OIAP Actions
23871. The TPM MUST verify that the authorization handle (H, say) referenced in the command
2388
points to a valid session. If it does not, the TPM returns the error code
2389
TPM_INVALID_AUTHHANDLE
23902. The TPM SHALL retrieve the latest version of the caller’s nonce (nonceOdd) and2391
continueAuthSession flag from the input parameter list, and store it in internal TPM
2392
memory with the authSession ‘H’.
376
377

72

TCG Published
TCG Published

Revision 116 1 Marchy 2011

378TPM Main Part 1 Design Principles

TCG © Copyright379Specification Version 1.2

38023933. The TPM SHALL retrieve the latest version of the TPM’s nonce stored with the2394
authorization session H (authLastNonceEven) computed during the previously executed2395
command.
23964. The TPM MUST retrieve the secret AuthData (SecretE, say) of the target entity. The entity2397
and its secret must have been previously loaded into the TPM.
23985. The TPM SHALL perform a HMAC calculation using the entity secret data, ordinal, input
2399
command parameters and authorization parameters according to previously specified
2400
normative regarding HMAC calculation.
24016. The TPM SHALL compare HM to the AuthData value received in the input parameters. If
2402
they are different, the TPM returns the error code TPM_AUTHFAIL if the authorization
2403
session is the first session of a command, or TPM_AUTH2FAIL if the authorization
2404
session is the second session of a command. Otherwise, the TPM executes the command
2405
which (for this example) produces an output that requires authentication.
24067. The TPM SHALL generate a nonce (nonceEven).
24078. The TPM creates an HMAC digest to authenticate the return code, return values and2408
authorization parameters to the same entity secret according to previously specified
2409
normative regarding HMAC calculation.
24109. The TPM returns the return code, output parameters, authorization parameters and
2411
AuthData digest.
241210.If the output continueUse flag is FALSE, then the TPM SHALL terminate the session.
2413
Future references to H will return an error.

381Revision 116 1 Marchy 2011
382

TCG Published
TCG Published73

383Copyright © TCG
384

241413.2.2

TPM Main Part 1 Design Principles
Specification Version 1.2

Object-Specific Authorization Protocol (OSAP)

2415Start of informative comment
2416This section describes the actions of a TPM when it receives a TPM command via OSAP
2417session. Many TPM commands may be sent to the TPM via an OSAP session. Therefore, the2418following description is necessarily abstract.
2419The OSAP session is initialized through the creation of an ephemeral secret which is used to
2420protect session traffic. Sessions are created using the TPM_OSAP command. This section
2421illustrates OSAP using a fictitious command called TPM_Example.
2422Assume that a TPM user wishes to send the TPM_Example command to the TPM. The
2423keyHandle signifies that an OSAP session is being used and has the value “Auth1”. The
2424user must know the AuthData for keyHandle (key.usageAuth) as this is the entity that2425requires authorization and this secret is used in the authorization calculation.
2426Let us assume that the sender needs to use this key multiple times but does not wish to
2427obtain the key secret more than once. This might be the case if the usage AuthData were2428derived from a typed password. This use model points to the selection of the OSAP as the2429authorization protocol.
2430For the TPM_Example command, the inAuth parameter provides the authorization to2431execute the command. The following table shows the commands executed, the parameters2432created and the wire formats of all of the information.
2433<inParamDigest> is the result of the following calculation: SHA1(ordinal, inArgOne,
2434inArgTwo). <outParamDigest> is the result of the following calculation: SHA1(returnCode,
2435ordinal, outArgOne). inAuthSetupParams refers to the following parameters, in this order:
2436authLastNonceEven, nonceOdd, continueAuthSession. OutAuthSetupParams refers to the2437following parameters, in this order: nonceEven, nonceOdd, continueAuthSession
2438In addition to the two even nonces generated by the TPM (authLastNonceEven and
2439nonceEven) that are used for TPM_OIAP, there is a third, labeled nonceEvenOSAP that is
2440used to generate the shared secret. For every even nonce, there is also an odd nonce
2441generated by the system.

385
386

74

TCG Published
TCG Published

Revision 116 1 Marchy 2011

387TPM Main Part 1 Design Principles

TCG © Copyright

388Specification Version 1.2

389
2442

CallerOn the wire

Dir

TPM

Send TPM_OSAP

TPM_OSAPCreate session & authHandle

keyHandle

Generate authLastNonceEven

nonceOddOSAP

Save authLastNonceEven with authHandle
Save the ADIP encryption scheme with authHandle
Generate nonceEvenOSAP
Generate sharedSecret = HMAC(key.usageAuth, nonceEvenOSAP,
nonceOddOSAP)
Save keyHandle, sharedSecret with authHandle

Save authHandle, authLastNonceEven
Generate sharedSecret =HMAC(key.usageAuth, nonceEvenOSAP,
nonceOddOSAP)ReturnsparamSize

Verify authHandle points to a valid session, mismatch returns
TPM_AUTHFAIL

ordinalRetrieve authLastNonceEven from internal session storage

keyHandle

HM = HMAC (sharedSecret, inParamDigest, inAuthSetupParams)

inArgOne

Compare HM to inAuth. If they do not compare return with
TPM_AUTHFAIL

authHandle,
authLastNonceEven
nonceEvenOSAP

Save sharedSecretGenerate nonceOdd & save with
authHandle.
Compute inAuth = HMAC (sharedSecret,inParamDigest, inAuthSetupParams)
Send TPM_Example

tag

inArgTwononceOdd

Execute TPM_Example and create returnCode. If TPM_Example
requires ADIP encryption, use the algorithm indicated when the
OSAP session was set up.

continueAuthSession

Generate nonceEven to replace authLastNonceEven in session

inAuthSet resAuth = HMAC(sharedSecret, outParamDigest,outAuthSetupParams)

authHandle

Save nonceEven

tag

HM = HMAC( sharedSecret,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOneReturn output parameters
If continueAuthSession is FALSE then destroy session

returnCode
nonceEven
continueAuthSession
resAuth2443
2444Table 13:d - Example OSAP Session
2445Suppose now that the TPM user wishes to send another command using the same session
2446to operate on the same key. For the purposes of this example, we will assume that the same
2447ordinal is to be used (TPM_Example). To re-use the previous session, the2448continueAuthSession output boolean must be TRUE.
2449The following table shows the command execution, the parameters created and the wire
2450formats of all of the information.
2451In this case, authLastNonceEven is the nonceEven value returned by the TPM with the2452output parameters from the first execution of TPM_Example.
2453
390Revision 116 1 Marchy 2011
391

TCG Published
TCG Published75

392Copyright © TCG
393
Caller

TPM Main Part 1 Design Principles
Specification Version 1.2
On the wire

Dir

TPM

tag



Retrieve authLastNonceEven from internal session storage

Generate nonceOdd
Compute inAuth = HMAC (sharedSecret,inParamDigest, inAuthSetupParams)
Save nonceOdd with authHandle
Send TPM_Example

paramSize

HM = HMAC (sharedSecret, inParamDigest, inAuthSetupParams)

ordinalkeyHandle

Compare HM to inAuth. If they do not compare return with
TPM_AUTHFAIL

inArgOne

Execute TPM_Example and create returnCode

inArgTwo

Generate nonceEven to replace authLastNonceEven in session

nonceOdd

Set resAuth = HMAC(sharedSecret, outParamDigest,outAuthSetupParams)

continueAuthSession
inAuthSave nonceEven

tag

HM = HMAC( sharedSecret,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOneReturn output parameters
If continueAuthSession is FALSE then destroy session

returnCode
nonceEven
continueAuthSession
resAuth2454
2455Table 13:e - Example Re-used OSAP Session
2456The TPM user could then use the session for further authorization sessions or terminate it
2457in the ways that have been described above in TPM_OIAP. Note that termination of the
2458OSAP session causes the TPM to destroy the shared secret.
2459End of informative comment
2460OSAP Actions
24611. The TPM MUST have been able to retrieve the shared secret (Shared, say) of the target
2462
entity when the authorization session was established with TPM_OSAP. The entity and2463
its secret must have been previously loaded into the TPM.
24642. The TPM MUST verify that the authorization handle (H, say) referenced in the command
2465
points to a valid session. If it does not, the TPM returns the error code
2466
TPM_INVALID_AUTHHANDLE.
24673. The TPM MUST calculate the HMAC (HM1, say) of the command parameters according2468
to previously specified normative regarding HMAC calculation.
24694. The TPM SHALL compare HM1 to the AuthData value received in the command. If they2470
are different, the TPM returns the error code TPM_AUTHFAIL if the authorization session
2471
is the first session of a command, or TPM_AUTH2FAIL if the authorization session is the2472
second session of a command., the TPM executes command C1 which produces an
2473
output (O, say) that requires authentication and uses a particular return code (RC, say).
24745. The TPM SHALL generate the latest version of the even nonce (nonceEven).
24756. The TPM MUST calculate the HMAC (HM2) of the return parameters according to2476
previously specified normative regarding HMAC calculation.
394
395

76

TCG Published
TCG Published

Revision 116 1 Marchy 2011

396TPM Main Part 1 Design Principles

TCG © Copyright

397Specification Version 1.2

39824777. The TPM returns HM2 in the parameter list.
24788. The TPM SHALL retrieve the continue flag from the received command. If the flag is
2479
FALSE, the TPM SHALL terminate the session and destroy the thread associated with
2480
handle H.
24819. If the shared secret was used to provide confidentiality for data in the received
2482
command, the TPM SHALL terminate the session and destroy the thread associated with2483
handle H.
248410.Each time that access to an entity (key) is authorized using OSAP, the TPM MUST
2485
ensure that the OSAP shared secret is that derived from the entity using TPM_OSAP.

399Revision 116 1 Marchy 2011
400

TCG Published
TCG Published77

401Copyright © TCG
402

248613.3

TPM Main Part 1 Design Principles
Specification Version 1.2

Authorization Session Handles

2487Start of informative comment
2488The TPM generates authorization handles to allow for the tracking of information regarding
2489a specific authorization invocation.
2490The TPM saves information specific to the authorization, such as the nonce values,
2491ephemeral secrets and type of authentication in use.
2492The TPM may create any internal representation of the handle that is appropriate for the
2493TPM’s design. The requestor always uses the handle in the authorization structure to2494indicate authorization structure in use.
2495The TPM must support a minimum of two concurrent authorization handles. The use of
2496these handles is to allow the Owner to have an authorization active in addition to an active
2497authorization for an entity.
2498To ensure garbage collection and the proper removal of security information, the requestor
2499should terminate all handles. Termination of the handle uses the continue-use flag to2500indicate to the TPM that the handle should be terminated.
2501Termination of a handle instructs the TPM to perform garbage collection on all AuthData.
2502Garbage collection includes the deletion of the ephemeral secret.
2503End of informative comment
25041. The TPM MUST support authorization handles. See Section 23 Session pool.
25052. The TPM MUST support authorization handle termination. The termination includes
2506
secure deletion of all authorization session information.

403
404

78

TCG Published
TCG Published

Revision 116 1 Marchy 2011

405TPM Main Part 1 Design Principles

TCG © Copyright406Specification Version 1.2

407250713.4

Authorization-Data Insertion Protocol (ADIP)

2508Start of informative comment
2509The ADIP allows for the creation of new entities and the secure insertion of the new entity
2510AuthData. The transmission of the new AuthData uses encryption with the key based on
2511the shared secret of an OSAP session.
2512The creation of AuthData is the responsibility of the entity owner. He or she may use
2513whatever process he or she wishes. The transmission of the AuthData from the entity owner2514to the TPM requires confidentiality and integrity. Since these requirements are not always
2515met (e.g., because the insertion of the AuthData occurs over a network) additional measures
2516have to be taken. The ADIP protocol ensures confidentiality of the AuthData, while the2517OSAP session HMAC provides integrity.
2518When ADIP uses the parent key shared secret, care must be taken when that secret is a
2519well known value. In that case, it may be appropriate to wrap the ADIP command in a
2520transport session.
2521When the requestor is sending the AuthData to the TPM, the command requires the2522authorization of the entity parent. For example, to create a new TPM identity key and set its
2523AuthData requires the AuthData of the TPM Owner. To create a new wrapped key requires
2524the AuthData of the parent key.
2525The creation of a new entity requires the authorization of the entity owner. When the
2526requestor starts the creation process, the creator must establish an OSAP session using the2527parent of the new entity.
2528For the mandatory XOR encryption algorithm, the creator builds an encryption key using a
2529SHA-1 hash of the OSAP shared secret and a session nonce. The creator XOR encrypts the2530new AuthData using the encryption key as a one-time pad and sends this encrypted data
2531along with the creation request to the TPM. The TPM decrypts the AuthData using the2532same OSAP shared secret and session nonce.
2533The XOR encryption algorithm is sufficient for almost all use models. There may be
2534additional use models where a different encryption algorithm would be beneficial. The TPM
2535may support AES as an additional encryption algorithm. The key and IV or counter use the2536OSAP shared secret and session nonces.
2537The creator believes that the OSAP creates a shared secret known only to the creator and
2538the TPM. The TPM believes that the creator is the entity owner by their knowledge of the2539parent entity AuthData. The creator believes that the process completed correctly and that
2540the AuthData is correct because the HMAC will only verify with the OSAP shared secret.
2541In the following example, we want to send the previously described command
2542TPM_EXAMPLE to create a new entity. In the example, we assume there is a third input
2543parameter encAuth, and that one of the input parameters is named parentHandle to2544reference the parent for the new entity (e.g., the SRK and its children).

408Revision 116 1 Marchy 2011
409

TCG Published
TCG Published79

410Copyright © TCG
411

TPM Main Part 1 Design Principles
Specification Version 1.2

2545
CallerOn the wire

Dir

TPM

Send TPM_OSAP

TPM_OSAPCreate session & authHandle

parentHandle

Generate authLastNonceEven

nonceOddOSAP

Save authLastNonceEven with authHandle
Save the ADIP encryption scheme with authHandle
Generate nonceEvenOSAP
Generate sharedSecret = HMAC(parent.usageAuth,nonceEvenOSAP, nonceOddOSAP)
Save parentHandle, sharedSecret with authHandle

Save authHandle, authLastNonceEven
Generate sharedSecret =HMAC(parent.usageAuth,nonceEvenOSAP, nonceOddOSAP)ReturnsparamSize

Verify authHandle points to a valid session, mismatch returns
TPM_AUTHFAIL

ordinalRetrieve authLastNonceEven from internal session storage

parentHandle

HM = HMAC (sharedSecret, inParamDigest, inAuthSetupParams)

inArgOne

Compare HM to inAuth. If they do not compare return with
TPM_AUTHFAIL

authHandle,
authLastNonceEven
nonceEvenOSAP

Save sharedSecretGenerate nonceOdd & save with
authHandle.
Compute input parameter newAuth =XOR( entityAuthData, SHA1(sharedSecret,authLastNonceEven))
Compute inAuth = HMAC (sharedSecret,inParamDigest, inAuthSetupParams)
Send TPM_Example

tag

inArgTwo
authHandle

Execute TPM_Example: decrypt encAuth to entityAuth, create entityand build returnCode. Use the ADIP encryption scheme indicatedwhen the OSAP session was set up.

nonceOdd

Generate nonceEven to replace authLastNonceEven in session

continueAuthSession

Set resAuth = HMAC(sharedSecret, outParamDigest,outAuthSetupParams)

encAuthinAuthSave nonceEven

tag

HM = HMAC( sharedSecret,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOneReturn output parameters
Terminate the authorization session associated with authHandle

returnCode
nonceEven
continueAuthSession
resAuth

2546
2547Table 13:f - Example ADIP Session
2548End of informative comment

412
413

80

TCG Published
TCG Published

Revision 116 1 Marchy 2011

414TPM Main Part 1 Design Principles

TCG © Copyright

415Specification Version 1.2

41625491. The TPM MUST enable ADIP by using the OSAP or DSAP
2550
2551
2552

a. When an ordinal Action indicates that OSAP is required for the ADIP protocol (e.g.,
TPM_CreateWrapKey), DSAP shall satisfy that requirement.
b. The upper byte of the entity type indicates the encryption scheme.

2553
2554

c. The TPM internally stores the encryption scheme as part of the session and enforces
the encryption choice on the subsequent use of the session.

2555
2556
2557

d. When TPM_ENTITY_TYPE is used for ordinals other than TPM_OSAP or TPM_DSAP(i.e., for cases where there is no ADIP encryption action), the TPM_ENTITY_TYPE
upper byte MUST be 0x00.

25582. The TPM MUST destroy the session whenever a new entity AuthData is created.
25593. The TPM MUST encrypt the AuthData for the new entity.
2560

a. The TPM MUST support the XOR encryption scheme.

2561

b. The TPM MAY support AES symmetric key encryption schemes.

2562

i.

2563
2564

If TPM_PERMANENT_FLAGS -> FIPS is TRUE
(1) All encrypted authorizations MUST use a symmetric key encryption scheme.

a. Encrypted AuthData values occur in the following commands

2565

i.

2566

ii. TPM_ChangeAuth

2567

iii. TPM_ChangeAuthOwner

2568

iv. TPM_Seal

2569

v. TPM_Sealx

2570

vi. TPM_MakeIdentity

2571

vii. TPM_CreateCounter

2572

viii.

2573

ix. TPM_NV_DefineSpace

2574

TPM_CreateWrapKey

TPM_CMK_CreateKey(1) This ordinal contains a special case where no encryption is used.

2575

x. TPM_Delegate_CreateKeyDelegation

2576

xi. TPM_Delegate_CreateOwnerDelegation

25774. If the entity type indicates XOR encryption for the AuthData secret
2578
2579

a. Create X1 the SHA-1 of the concatenation of (authHandle -> sharedSecret ||authLastNonceEven).

2580

b. Create the decrypted AuthData the XOR of X1 and the encrypted AuthData.

2581
2582

c. If the command
ordinal
TPM_CreateWrapKey)

containsasecondAuthData2

secret

(e.g.

2583
2584

i.

2585

ii. Create the decrypted AuthData2 the XOR of X2 and the encrypted AuthData2.

Create X2 the SHA-1 of the concatenation of (authHandle -> sharedSecret ||nonceOdd).

417Revision 116 1 Marchy 2011
418

TCG Published
TCG Published81419Copyright © TCG
420

TPM Main Part 1 Design Principles
Specification Version 1.2

25865. If the entity type indicates symmetric key encryption
2587

a. The key for the encryption algorithm is the first bytes of the OSAP shared secret.

2588

i.

2589

ii. There is no support for AES keys greater than 128 bits.

2590

E.g., For AES128, the key is the first 16 bytes of the OSAP shared secret.

b. If the entity type indicates CTR mode

2591

i.

2592
2593

The initial counter value for AuthData is the first bytes of authLastNonceEven.
(1) E.g., For AES128, the initial counter value is the first 16 bytes ofauthLastNonceEven.

2594
2595

ii. If thecommand ordinal
TPM_CreateWrapKey)

2596

containsasecondAuthData2

secret(e.g.

(1) The initial counter value for AuthData2 is the first bytes of nonceOdd.

2597
2598

iii. Additional counter values as required are generated by incrementing the countervalue as described in 31.1.3 TPM_ES_SYM_CTR.

2599
2600Start of informative comment
2601The method of incrementing the counter value is different from that used by some standard
2602crypto libraries (e.g. openSSL, Java JCE) that increment the entire counter value. TPM
2603users should be aware of this to avoid errors when the counter wraps.
2604End of informative comment
2605

421
422

82

TCG Published
TCG Published

Revision 116 1 Marchy 2011

423TPM Main Part 1 Design Principles

TCG © Copyright

424Specification Version 1.2425260613.5

AuthData Change Protocol (ADCP)

2607Start of informative comment
2608All entities from the Owner to the SRK to individual keys and data blobs have AuthData.
2609This data may need to change at some point in time after the entity creation. The ADCP
2610allows the entity owner to change the AuthData. The entity owner of a wrapped key is the
2611owner of the parent key.
2612A requirement is that the owner must remember the old AuthData. The only mechanism to2613change the AuthData when the entity owner forgets the current value is to delete the entity
2614and then recreate it.
2615To protect the data from exposure to eavesdroppers or other attackers, the AuthData uses
2616the same encryption mechanism in use during the ADIP.
2617Changing AuthData requires opening two authentication handles. The first handle
2618authenticates the entity owner (or parent) and the right to load the entity. This first handle
2619is an OSAP and supplies the data to encrypt the new AuthData according to the ADIP
2620protocol. The second handle can be either an OIAP or an OSAP, it authorizes access to the2621entity for which the AuthData is to be changed.
2622The AuthData in use to generate the OSAP shared secret must be the AuthData of the2623parent of the entity to which the change will be made.
2624When changing the AuthData for the SRK, the first handle OSAP must be setup using the
2625TPM Owner AuthData. This is because the SRK does not have a parent, per se.
2626If the SRKAuth data is known to userA and userB, userA can snoop on userB while userB
2627is changing the AuthData for a child of the SRK, and deduce the child's newAuth.
2628Therefore, if SRKAuth is a well known value, TPM_ChangeAuthAsymStart and
2629TPM_ChangeAuthAsymFinish are preferred over TPM_ChangeAuth when changing
2630AuthData for children of the SRK.
2631This applies to all children of the SRK, including TPM identities.
2632End of informative comment
26331. Changing AuthData for the TPM SHALL require authorization of the current TPM Owner.
26342. Changing AuthData for the SRK SHALL require authorization of the TPM Owner.
26353. If SRKAuth is a well known value, TPM_ChangeAuth SHOULD NOT be used to change
2636
the AuthData value of a child of the SRK, including the TPM identities.
26374. All other entities SHALL require authorization of the parent entity.

426Revision 116 1 Marchy 2011
427

TCG Published
TCG Published83

428Copyright © TCG
429

263813.6

TPM Main Part 1 Design Principles
Specification Version 1.2

Asymmetric Authorization Change Protocol (AACP)

2639Start of informative comment
2640This is now deprecated. Use the normal change session inside of a transport session with
2641confidentiality.
2642This asymmetric change protocol allows the entity owner to change entity authorization,
2643under the parent’s execution authorization, to a value of which the parent has no2644knowledge.
2645In contrast, the TPM_ChangeAuth command uses the parent entity AuthData to create the2646shared secret that encrypts the new AuthData for an entity. This creates a situation where
2647the parent entity ALWAYS knows the AuthData for entities in the tree below the parent.
2648There may be instances where this knowledge is not a good policy.
2649This asymmetric change process requires two commands and the use of an authorization
2650session.
2651End of informative comment
26521. Changing AuthData for the SRK SHALL involve authorization by the TPM Owner.
26532. If SRKAuth is a well known value,
2654
2655

a. TPM_ChangeAuthAsymStart and TPM_ChangeAuthAsymFinish SHOULD be used tochange the AuthData value of a child of the SRK, including the TPM identities.

26563. All other entities SHALL involve authorization of the parent entity.

430
431

84

TCG Published
TCG Published

Revision 116 1 Marchy 2011

432TPM Main Part 1 Design Principles

TCG © Copyright

433Specification Version 1.2

434265714.
FIPS 140 Physical Protection
2658Start of informative comment
2659The FIPS 140-2 program provides assurance that a cryptographic device performs properly.
2660It is appropriate for TPM vendors to attempt to obtain FIPS 140-2 certification.
2661The TPM design should be such that the TPM vendor has the opportunity of obtaining FIPS
2662140-2 certification.
2663End of informative comment
266414.1

TPM Profile for FIPS Certification

2665Start of informative comment
2666The FIPS mode of the TPM does require some changes over the normal TPM. These changes
2667are listed here such that there is a central point of determining the necessary FIPS changes.
2668Key creation and use
2669TPM_LoadKey, TPM_CMK_CreateKey and TPM_CreateWrapKey changed to disallow the2670creation or loading of TPM_AUTH_NEVER, legacy and keys less than 1024 bits.
2671TPM_MakeIdentity changed to disallow TPM_AUTH_NEVER.
2672End of informative comment
26731. Each TPM Protected Capability MUST be designed such that some profile of the
2674
Capability is capable of obtaining FIPS 140-2 certification

435Revision 116 1 Marchy 2011
436

TCG Published
TCG Published85

437Copyright © TCG
438

TPM Main Part 1 Design Principles
Specification Version 1.2

267515.
Maintenance2676Start of informative comment
2677The maintenance feature is a vendor-specific feature, and its implementation is vendor2678specific. The implementation must, however, meet the minimum security requirements so
2679that implementations of the maintenance feature do not result in security weaknesses.
2680There is no requirement that the maintenance feature is available, but if it is implemented,
2681then the requirements must be met.
2682The maintenance feature described in the specification is an example only, and not the only
2683mechanism that a manufacturer could implement that meets these requirements.
2684Maintenance is different from backup/migration, because maintenance provides for the
2685migration of both migratory and non-migratory data. Maintenance is an optional TPM
2686function, but if a TPM enables maintenance, the maintenance capabilities in this2687specification are mandatory – no other migration capabilities shall be used. Maintenance2688necessarily involves the manufacturer of a Subsystem.
2689When maintaining computer systems, it is sometimes the case that a manufacturer or its
2690representative needs to replace a Subsystem containing a TPM. Some manufacturers
2691consider it a requirement that there be a means of doing this replacement without the loss
2692of the non-migrational keys held by the original TPM.
2693The owner and users of TCG platforms need assurance that the data within protected
2694storage is adequately protected against interception by third parties or the manufacturer.
2695This process MUST only be performed between two platforms of the same manufacturer and2696model. If the maintenance feature is supported, this section defines the required functions
2697defined at a high level. The final function definitions and entire maintenance process is left
2698to the manufacturer to define within the constraints of these high level functions.
2699Any maintenance process must have certain properties. Specifically, any migration to a
2700replacement Subsystem must require collaboration between the Owner of the existing
2701Subsystem and the manufacturer of the existing Subsystem. Further, the procedure must
2702have adequate safeguards to prevent a non-migrational key being transferred to multiple
2703Subsystems.
2704Themaintenancecapabilities
TPM_CreateMaintenanceArchive
and2705TPM_LoadMaintenanceArchive enable the transfer of all Protected Storage data from a
2706Subsystem containing a first TPM (TPM1) to a Subsystem containing a second TPM (TPM2):
2707A manufacturer places a public key in non-volatile storage into its TPMs at manufacture
2708time.
2709The Owner of TPM1 uses TPM_CreateMaintenanceArchive to create a maintenance archive
2710that enables the migration of all data held in Protected Storage by TPM 1. The Owner of TPM1
2711must provide his or her authorization to the Subsystem. The TPM then creates the
2712TPM_MIGRATE_ASYMKEY structure and follows the process defined.
2713The XOR process prevents the manufacturer from ever obtaining plaintext TPM 1 data.
2714The additional random data provides a means to assure that a maintenance process cannot
2715subvert archive data and hide such subversion.

439
440

86

TCG Published
TCG Published

Revision 116 1 Marchy 2011

441TPM Main Part 1 Design Principles

TCG © Copyright

442Specification Version 1.2

443
2716The random mask can be generated by two methods, either using the TPM RNG or MGF1 on
2717the TPM Owners AuthData.
2718The manufacturer takes the maintenance blob, decrypts it with its private key, and satisfies
2719itself that the data bundle represents data from that Subsystem manufactured by that
2720manufacturer. Then the manufacturer checks the endorsement certificate of TPM 2 and2721verifies that it represents a platform to which data from TPM 1 may be moved.
2722The manufacturer dispatches two messages.
2723The first message is made available to CAs, and is a revocation of the TPM 1 endorsement2724certificate.
2725The second message is sent to the Owner of TPM 2, which will communicate the SRK,
2726tpmProof and the manufacturer’s permission to install the maintenance blob only on TPM 2
2727The Owner uses TPM_LoadMaintenanceArchive to install the archive copy into TPM 2, and2728overwrite the existing TPM2-SRK and TPM2-tpmProof in TPM2. TPM2 overwrites TPM2-SRK
2729with TPM1-SRK, and overwrites TPM2-tpmProof with TPM1-tpmProof.
2730Note that the command TPM_KillMaintenanceFeature prevents the operation of
2731TPM_CreateMaintenanceArchive and TPM_LoadMaintenanceArchive. This enables an Owner
2732to block maintenance (and hence the migration of non-migratory data) either to or from a2733TPM.
2734It is required that a manufacturer takes steps that prevent further access of migrated data
2735by TPM1. This may be achieved by deleting the existing Owner from TPM1, for example.
2736For the manufacturer to validate that the maintenance blob is coming from a valid TPM, the2737manufacturer can require that a TPM identity sign the maintenance blob. The identity
2738would be from a CA under the control of the manufacturer and hence the manufacturer
2739would be satisfied that the blob is from a valid TPM.
2740End of informative comment
27411. The maintenance feature MUST ensure that the information can be on only one TPM at2742
a time. Maintenance MUST ensure that at no time the process will expose a shielded2743
location. Maintenance MUST require the active participation of the Owner.
27442. Any migration of non-migratory data protected by a Subsystem SHALL require the2745
cooperation of both the Owner of that non-migratory data and the manufacturer of that
2746
Subsystem. That manufacturer SHALL NOT cooperate in a maintenance process unless2747
the manufacturer is satisfied that non-migratory data will exist in exactly one
2748
Subsystem. A TPM SHALL NOT provide capabilities that support migration of non2749
migratory data unless those capabilities are described in the TCG specification.
27503. The maintenance feature MUST move the following
27514. TPM_KEY for SRK. The maintenance process will reset the SRK AuthData to match the2752
TPM Owners AuthData27535. TPM_PERMANENT_DATA -> tpmProof
27546. TPM Owner’s authorization
2755

15.1

Field Upgrade

2756Start of informative comment
444Revision 116 1 Marchy 2011
445

TCG Published
TCG Published87

446Copyright © TCG
447

TPM Main Part 1 Design Principles
Specification Version 1.2

2757A TPM, once in the field, may need to update the protected capabilities. This command,
2758which is optional, provides the mechanism to perform the update.
2759The goal is that field upgrade should only affect protected capabilities and not shielded2760location, so that a patch can be applied without loss of user data. It is understood that this2761goal may not be achievable in all cases.
2762End of informative comment
2763The TPM SHOULD have provisions for upgrading the subsystem after shipment from the2764manufacturer. If provided the mechanism MUST implement the following guidelines:
27651. The upgrade mechanisms in the TPM MUST not require the TPM to hold a global secret.
2766
The definition of global secret is a secret value shared by more than one TPM.
27672. The TPM is not allowed to pre-store or use unique identifiers in the TPM for the purpose
2768
of field upgrade. The TPM MUST NOT use the endorsement key for identification or
2769
encryption in the upgrade process. The upgrade process MAY use a TPM Identity (AIK) to
2770
deliver upgrade information to specific TPM devices.
27713. The upgrade process SHOULD only change protected capabilities. The upgrade process
2772
SHOULD NOT change shielded locations.
27734. The upgrade process SHOULD only access data in shielded locations where this data is2774
necessary to validate the TPM Owner, validate the TPME and manipulate the blob27755. The TPM MUST conform to the TCG specification, protection profiles and security targets
2776
after the upgrade. The upgrade MAY NOT decrease the security values from the original
2777
security target.
27786. The security target used to evaluate this TPM MUST include this command in the TOE.

448
449

88

TCG Published
TCG Published

Revision 116 1 Marchy 2011

450TPM Main Part 1 Design Principles

TCG © Copyright

451Specification Version 1.2

452

277916.
Proof of Locality
2780Start of informative comment
2781When a platform is designed with a trusted process, the trusted process may wish to2782communicate with the TPM and indicate that the command is coming from the trusted
2783process. The definition of a trusted process is a platform specific issue.
2784The commands that the trusted process sends to the TPM are the normal TPM commands
2785with a modifier that indicates that the trusted process initiated the command. The TPM
2786accepts the command as coming from the trusted process merely because the modifier is2787set. The TPM itself is not responsible for how the signal is asserted; only that it honors the2788assertions. The TPM cannot verify the validity of the modifier.
2789The definition of the modifier is a platform specific issue. Depending on the platform, the2790modifier could be a special bus cycle or additional input pins on the TPM. The assumption
2791is that spoofing the modifier to the TPM requires more than just a simple hardware attack,2792but would require expertise and possibly special hardware. One example would be special
2793cycles on the LPC bus that inform the TPM it is under the control of a process on the PC
2794platform.
2795To allow for multiple mechanisms and for finer grained reporting, the TPM will include 42796locality modifiers. These four modifiers allow the platform specific specification to properly
2797indicate exactly what is occurring and for TPM’s to properly respond to locality.
2798End of informative comment
27991. The TPM modifies the receipt of a command and indicates that the trusted process sent2800
the command when the TPM determines that the modifier is on. The modifier MUST only2801
affect the individual command just received and MUST NOT affect any other commands.
2802
However, TPM_ExecuteTransport MUST propagate the modifier to the wrapped2803
command.
28042. A TPM platform specific specification MAY indicate the presence of a maximum of 4 local
2805
modifiers. The modifier indication uses the TPM_MODIFIER_INDICATOR data type.
28063. The received modifier MUST indicate a single level.
28074. The definition of the trusted source is in the platform specific specification.
28085. For ease in reading this specification the indication that the TPM has received any
2809
modifier will be LOCAL_MOD = TRUE.

453Revision 116 1 Marchy 2011454

TCG Published
TCG Published89

455Copyright © TCG
456

TPM Main Part 1 Design Principles
Specification Version 1.2

281017.
Monotonic Counter
2811Start of informative comment
2812The monotonic counter provides an ever-increasing incremental value. The TPM must
2813support at least 4 concurrent counters. Implementations inside the TPM may create 42814unique counters or there may be one counter with pointers to keep track of the pointers2815current value. A naming convention to allow for unambiguous reference to the various
2816components the following terms are in use:
2817Internal Base – This is the main counter. It is in use internally by the TPM and is not
2818directly accessible by any outside process.
2819External Counter – A counter in use by external processes. This could be related to the
2820main counter via pointers and difference values or it could be a totally unique value. The
2821value of an external counter is not affected by any use, increment or deletion of any other2822external counter.
2823Max Value – The max count value of all counters (internal and external). So if there were 32824external counters having values of 10, 15 and 201 and the internal base having a value of2825201 then Max Value is 201. In the same example if the internal base was 502 then Max
2826Value would be 502.
2827The external counter must allow for 7 years of increments every 5 seconds without causing
2828a hardware failure. The TPM may create a throttling mechanism that limits the ability to
2829increment an external counter within a certain time range. The output of the counter is a283032-bit value.
2831To create an external counter requires TPM Owner authorization. To increment an external2832counter the command must pass authorization to use the counter.
2833External counters can be tagged with a short text string to facilitate counter administration.
2834Manufacturers are free to implement the monotonic counter using any mechanism.
2835To illustrate the counters and base the following example is in use. This mechanism uses
2836two saving values (diff and start), however this is only an example and not meant to indicate
2837any specific implementation.

2838
457
458

90

TCG Published
TCG Published

Revision 116 1 Marchy 2011

459TPM Main Part 1 Design Principles

TCG © Copyright

460Specification Version 1.2

461
2839The internal base (IB) always moves forward and can never be reset. IB drives all external
2840counters on the machine.
2841The purpose of the following example is to show the two external counters always moving
2842forward independent of the other and how the IB moves forward also.
2843Starting condition is that IB is at 22 and no other external counters are active.
2844Start external counter A
2845

Increment IB (set new Max Value) IB = 23

2846

Assign start value of A to 23 (or Max Value)

2847

Assign difference of A to 23 (we always start at current value of IB)

2848

Assign a handle for A

2849Increment A 5 times
2850

IB is now 28

2851Request current A value
2852

Return 28 = 28 (IB) + 23 (difference) – 23 (start value)

2853

Counter A has gone from the start of 23 to 28 incremented 5 times.

2854TPM_Startup(ST_CLEAR)
2855Start Counter B
2856

Save A difference 28 = 23 (old difference) + 28 (IB) – 23 (start value)

2857

Increment IB (set new Max Value) IB = 292858

Set start value of B to 29 (or Max Value)

2859

Assign difference of B to 29

2860

Assign handle for B

2861Increment B 8 times
2862

IB is now 37

2863Request B value
2864

Return 37 = 37 (IB) + 29 (difference) – 29 (start value)

2865TPM_Startup(ST_CLEAR)
2866Increment A
2867

Store B difference (37)2868

Load A start value of 37

2869

Increment IB to 38

2870Return A value
2871

Return 29 = 38 (IB) + 28 (difference) – 37 (start value)

2872

462Revision 116 1 Marchy 2011
463

TCG Published
TCG Published91

464Copyright © TCG
465

TPM Main Part 1 Design Principles
Specification Version 1.2

2873Notice that A has gone from 28 to 29 which is correct, while B is at 37. Depending on the2874order of increments A may pass B or it may always be less than B.
2875End of informative comment
28761. The counter MUST be designed to not wear out in the first 7 years of operation. The
2877
counter MUST be able to increment at least once every 5 seconds. The TPM, in response
2878
to operations that would violate these counter requirements, MAY throttle the counter
2879
usage (cause a delay in the use of the counter) or return an error.
28802. The TPM MUST support at least 4 concurrent counters.
28813. The establishment of a new counter MUST prevent the reuse of any previous counter
2882
value. I.E. if the TPM has 3 counters and the max value of a current counter is at 36
2883
then the establishment of a new counter would start at 37.
28844. After a successful TPM_Startup(ST_CLEAR) the first successful TPM_IncrementCounter
2885
sets the counter handle. Any attempt to issue TPM_IncrementCounter with a different
2886
handle MUST fail.
28875. TPM_CreateCounter does NOT set the counter handle.

466
467

92

TCG Published
TCG Published

Revision 116 1 Marchy 2011

468TPM Main Part 1 Design Principles

TCG © Copyright469Specification Version 1.2

470288818.
Transport Protection
2889Start of informative comment
2890The creation of sessions allows for the grouping of a set of commands into a session. The
2891session provides a log of all commands and can provide confidentiality of the commands
2892using the session.
2893Session establishment creates a shared secret and then uses the shared secret to authorize
2894and protect commands sent to the TPM using the session. The shared secret is passed to
2895the TPM using an asymmetric encryption key. For best security, the caller should certify
2896that the key is never available outside the TPM.
2897After establishing the session, the caller uses the session to wrap a command to execute.
2898The user of the transport session can wrap any command except for commands that would
2899create nested transport sessions.
2900The log of executed commands uses a structure that includes the parameters and current
2901tick count. The session log provides a record of each command using the session.
2902The transport session uses the same rolling nonce protocol that authorization sessions use.
2903This protocol defines two nonces for each command sent to the TPM; nonceOdd provided by
2904the caller and nonceEven generated by the TPM.
2905For confidentiality, the caller can use the MGF1 function to create an XOR string the same
2906size as the command to execute. The inputs to the MGF1 function are the shared secret,2907nonceOdd and nonceEven. A symmetric key encryption algorithm can also be specified.
2908There is no explicit close session as the caller can use the continueSession flag set to false
2909to end a session. The caller can also call the sign session log, which also ends the session. If
2910the caller losses track of which sessions are active the caller should use the flush
2911commands to regain control of the TPM resources.
2912For an attacker to successfully break the encryption the attacker must be able to determine
2913from a few bits what an entire SHA-1 output was. This is equivalent to breaking SHA-1. The
2914reason that the attacker will know some bits is that the commands are in a known format.
2915This then allows the attacker to determine what the XOR bits were. Knowledge of 159 bits of
2916the XOR stream does not provide any greater that 50% probability of knowing the 160 th bit.

471Revision 116 1 Marchy 2011
472

TCG Published
TCG Published93

473Copyright © TCG
474

TPM Main Part 1 Design Principles
Specification Version 1.2

2917
2918This picture shows the protection of a TPM_Quote command. Previously executed was
2919session establishment. The nonces in use for the TPM_Quote have no relationship with the
2920nonces that are in use for the TPM_ExecuteTransport command.
2921End of informative comment
29221. The TPM MUST support a minimum of one transport session.
29232. The TPM MUST NOT support the nesting of transport sessions. The definition of nesting2924
is attempting to execute a wrapped command that is a transport session command. So
2925
for example when executing TPM_ExecuteTransport the wrapped command MUST not be
2926
TPM_ExecuteTransport.
29273. The TPM MUST ensure that if transport logging is active that the inclusion of the tick2928
count in the session log does not provide information that would make a timing attack2929
on the operations using the session more successful.
29304. The transport session MAY be exclusive. Any command executed outside of the exclusive
2931
transport session MUST cause the invalidation of the exclusive transport session.
2932
2933

a. The TPM_ExecuteTransport command specifying the exclusive transport session is
the only command that does not terminate the exclusive session.

29345. It MAY be ineffective to wrap TPM_SaveState in a transport session. Since the TPM MAY
2935
include transport sessions in the saved state, the saved state MAY be invalidated by the2936
wrapping TPM_ExecuteTransport.

475
476

94

TCG Published
TCG Published

Revision 116 1 Marchy 2011

477TPM Main Part 1 Design Principles

TCG © Copyright478Specification Version 1.2

479
293718.1

Transport encryption and authorization

2938Start of informative comment
2939The confidentially of the transport protection is provided by a encrypting the wrapped
2940command. Encryption of various items in the wrapped command makes resource
2941management of a TPM impossible. For this reason, encryption of the entire command is not
2942possible. In addition to the encryption issue, there are difficulties with creating the HMAC
2943for the TPM_ExecuteTransport authorization.
2944The solution to these problems is to provide limited encryption and HMAC information.
2945The HMAC will only include two areas from the wrapped command, the command header
2946information up to the handles, and the data after the handles. The format of all TPM
2947commands is such that all handles are in the data stream prior to the payload or data. After
2948the data comes the authorization information. To enable resource management, the HMAC
2949for TPM_ExecuteTransport only includes the ordinal, header information and the data. The
2950HMAC does not include handles and the authorization handles and nonces.
2951The exception is TPM_OwnerReadInternalPub, which uses fixed value key handles that are
2952included in the encryption and HMAC calculation.
2953

2954
2955A more exact representation of the execute transport command would be the following
480Revision 116 1 Marchy 2011
481

TCG Published
TCG Published95

482Copyright © TCG
483

TPM Main Part 1 Design Principles
Specification Version 1.2

2956****************************************************************
2957* TAGet | LENet | ORDet | wrappedCmdSize | wrappedCmd | AUTHet *2958****************************************************************
2959
2960wrappedCmd looks like2961**********************************************************************
2962* TAGw | LENw | ORDw | HANDLESw(o) | DATAw | AUTH1w (o) | AUTH2w (o) *2963**********************************************************************
2964A more exact representation of the execute transport response would be the following
2965*******************************************************************
2966* TAGet | LENet | RCet | … | wrappedRspSize | wrappedRsp | AUTHet *2967*******************************************************************
2968
2969wrappedRsp looks like
2970*********************************************************************
2971* TAGw | LENw | RCw | HANDLESw(o) | DATAw | AUTH1w (o) | AUTH2w (o) *2972*********************************************************************
2973
2974The calculation for AUTHet takes as the data component of the HMAC calculation the2975concatenation of ORDw and DATAw. A normal HMAC calculation would have taken the2976entire wrappedCmd value but for the executeTransport calculation only the above two
2977values are active. This does require the executeTransport command to parse the2978wrappedCmd to find the appropriate values.
2979The data for the command HMAC calculation is the following:
2980H1 = SHA-1 (ORDw || DATAw)
2981inParamDigest = SHA-1 (ORDet || wrappedCmdSize || H1)
2982AUTHet = HMAC (inParamDigest || lastNonceEven(et) || nonceOdd(et) || continue(et))
2983The data for the response HMAC calculation is the following:
2984H2 = SHA-1 (RCw || ORDw || DATAw)
2985outParamDigest = SHA-1 (RCet || ORDet || currentTicks || locality || wrappedRspSize ||2986H1)
2987AUTHet = HMAC (outParamDigest || nonceEven(et) || nonceOdd(et) || continue(et))
2988DATAw is the unencrypted data. wrappedCmdSize and wrappedRspSize ares the actual size
2989of the DATAw area and not the size of H1 or H2.
2990End of informative comment
2991The TPM MUST release a transport session and all information related to the session when:
29921. TPM_ReleaseTransportSigned is executed
29932. TPM_ExecuteTransport is executed with continueTransSession set to FALSE
29943. Any failure of the integrity check during execution of TPM_ExecuteTransport
29954. If the session has TPM_TRANSPORT_LOG set and the TPM tick session is interrupted for2996
any reason. This is due to the return of tick values without the nonces associated with2997
the session.
484
485

96

TCG Published
TCG Published

Revision 116 1 Marchy 2011

486TPM Main Part 1 Design Principles

TCG © Copyright487Specification Version 1.2

488
29985. The TPM executes some command that deactivates the TPM or removes the TPM Owner
2999
or EK.
300018.1.1

MGF1 parameters

3001Start of informative comment
3002MGF1 provides the confidentiality for the transport session. MGF1 is a function from PKCS
30031 version 2.0. This function provides a mechanism to distribute entropy over a large
3004sequence. The sequence provides a value to XOR over the message. This in effect creates a
3005stream cipher but not one that is available for bulk encryption.
3006Transport confidentiality uses MGF1 as a stream cipher and obtains the entropy for each
3007message from the following three parameters; nonceOdd, nonceEven and session authData.
3008It is imperative that the stream cipher not use the same XOR sequence at any time. The
3009following illustrates how the sequence changes for each message (both input and output).
3010M1Input – N2, N1, sessionSecret)3011M1Output – N4, N1, sessionSecret)3012M2Input – N4, N3, sessionSecret)3013M2Output – N6, N3, sessionSecret)3014There is an issue with this sequence. If the caller does not change N1 to N3 between
3015M1Output and M2Input then the same sequence will be generated. The TPM does not
3016enforce the requirement to change this value so it is possible to leak information.
3017The fix for this is to add one more parameter, the direction. So the sequence is now this:3018M1Input – N2, N1, “in”, sessionSecret)3019M1Output – N4, N1, “out”, sessionSecret)3020M2Input – N4, N3, “in”, sessionSecret)3021M2Output – N6, N3, “out”, sessionSecret)3022Where “in” indicates the in direction and “out” indicates the out direction.
3023Notice the calculation for M1Output uses “out” and M2Input uses “in”, so if the caller
3024makes a mistake and does not change nonceOdd, the sequence will still be different.
3025nonceEven is under control of the TPM and is always changing, so there is no need to worry
3026about nonceEven not changing.
3027End of informative comment
302818.1.2

HMAC calculation

3029Start of informative comment
3030The HMAC calculation for transports presents some issues with what should and should
3031not be in the calculation. The idea is to create a calculation for the wrapped command and3032add that to the wrapper.
3033So the data area for a wrapped command is not entirely HMAC’d like a normal command
3034would be.
489Revision 116 1 Marchy 2011
490

TCG Published
TCG Published97

491Copyright © TCG
492

TPM Main Part 1 Design Principles
Specification Version 1.2

3035The process is to calculate the inParamDigest of the unencrypted wrapped command
3036according to the normal rules of command HMAC calculations. Then use that value as the30373S parameter in the calculation. 2S is the actual wrapped command size, and not the size
3038of inParamDigest.
3039Example using a wrapped TPM_LoadKey command
3040Calculate the SHA-1 value for the TPM_LoadKey command (ordinal and data) as per the
3041normal HMAC rules. Take the digest and use that value as 3S for the
3042TPM_ExecuteTransport HMAC calculation.
3043End of informative comment
304418.1.3

Transport log creation

3045Start of informative comment
3046The log of information that a transport session creates needs a mechanism to tie any keys
3047in use during the session to the session. As the HMAC and encryption for the command
3048specifically exclude handles, there is no direct way to create the binding.
3049When creating the transport input log, if the handle(s) points to a key or keys, the public
3050keys are digested into the log. The session owner knows the value of any keys in use and3051hence can still create a log that shows the values used by the log and can validate the3052session.
3053End of informative comment
305418.1.4

Additional Encryption Mechanisms

3055Start of informative comment
3056The TPM can optionally implement alternate algorithms for the encryption of commands
3057sent to the TPM_ExecuteTransport command. The designation of the algorithm uses the
3058TPM_ALGORITHM_ID and TPM_ENC_SCHEME elements of the TPM_TRANSPORT_PUBLIC
3059parameter of the TPM_EstablishTransport command.
3060The anticipation is that AES will be supported by various TPM’s. Symmetric algorithms
3061have options available to them like key size, block size and operating mode. When using an
3062algorithm other than MGF1 the algorithm and scheme must specify these options.
3063End of informative comment
30641. The TPM MAY support other symmetric algorithms for the confidentiality requirement in
3065
TPM_EstablishTransport
306618.2

Transport Error Handling

3067Start of informative comment
3068With the transport hiding the actual execution of commands and the transport capable of
3069generating errors, rules must be established to allow for the errors and the results of
3070commands to be properly passed to TPM callers.
3071End of informative comment
30721. There are 3 error cases:
493
494

98

TCG Published
TCG Published

Revision 116 1 Marchy 2011

495TPM Main Part 1 Design Principles

TCG © Copyright

496Specification Version 1.2

49730732. C1 is the case where an error occurs during the processing of the transport package at3074
the TPM. In this case, the wrapped command has not been sent to the command
3075
decoder. Errors occurring during C1 are sent back to the caller as a response to the3076
TPM_ExecuteTransport command. The error response does not have confidentiality.
30773. C2 is the case where an error occurs during the processing of the wrapped command.
3078
This results in an error response from the command. The session returns the error
3079
response according to the attributes of the session.
30804. C3 is the case where an error occurs after the wrapped command has completed
3081
processing and the TPM is preparing the response to the TPM_ExecuteTransport
3082
command. In this case, where the TPM does have an internal error, the TPM has no3083
choice but to return the error as in C1. This however hides the results of the wrapped
3084
command. If the wrapped command completed successfully then there are session
3085
nonces that are being returned to the caller that are lost. The loss of these nonces
3086
causes the caller to be unsure of the state of the TPM and requires the reestablishment3087
of sessions and keys.
308818.3

Exclusive Transport Sessions

3089Start of informative comment
3090The caller may establish an exclusive session with the TPM. When an exclusive session is3091running, execution of any command other then TPM_ExecuteTransport or
3092TPM_ReleaseTransportSigned targeting the exclusive session causes the abnormal
3093invalidation of the exclusive transport session. Invalidation means that the handle is no3094longer valid and all subsequent attempts to use the handle return an error.
3095The design for the exclusive session provides an assurance that no other command
3096executed on the TPM. It is not a lock to prevent other operations from occurring. Therefore,
3097the caller is responsible for ensuring no interruption of the sequence of commands using
3098the TPM.
3099One exclusive session
3100The TPM only supports one exclusive session at a time. There is no nesting or other3101commands possible. The TPM maintains an internal flag that indicates the existence of an
3102exclusive session.
3103TSS responsibilities
3104It is the responsibility of the TSS (or other controlling software) to ensure that only
3105commands using the session reach the TPM. As the purpose of the session is to show that
3106nothing else occurred on the TPM during the session, the TSS should control access to the
3107TPM and prevent any other uses of the TPM. The TSS design must take into account the3108possibility of exclusive session handle invalidation.
3109Sleep states
3110Exclusive sessions as defined here do not work across TPM_SaveState and
3111TPM_Startup(ST_STATE) invocations. To have this sequence work properly there would
3112needtobeexceptions
toallowing
only
TPM_ExecuteTranport
and3113TPM_ReleaseTransportSigned in an exclusive session. The requirement for these exceptions
3114would come from the attempt of the TSS to understand the current state of the TPM.
3115Commands like TPM_GetCapability and others would have to execute to inform the TSS as
498Revision 116 1 Marchy 2011
499

TCG Published
TCG Published99

500Copyright © TCG
501

TPM Main Part 1 Design Principles
Specification Version 1.2

3116to the internal state of the TPM. For this reason, there are no exceptions to the rule and the3117exclusive session does not remain active across a TPM_SaveState command.
3118End of informative comment
31191. The TPM MUST support only one exclusive transport session
31202. The TPM MUST invalidate the exclusive transport session upon the receipt of any
3121
command other than TPM_ExecuteTransport or TPM_ReleaseTransportSigned targeting3122
the exclusive session.
3123

a. Invalidation includes the release of any resources assigned to the session

312418.4

Transport Audit Handling

3125Start of informative comment
3126Auditing of TPM_ExecuteTransport occurs as any other command that may require
3127auditing. There are two entries in the log, one for input one for output. The execution of the3128wrapped command can create an anomaly in the log.
3129Assume that both TPM_ExecuteTransport and the wrapped commands require auditing, the3130audit flow would look like the following:
3131

TPM_ExecuteTransport input parameters

3132

wrapped command input parameters

3133

wrapped command output parameters

3134

TPM_ExecuteTransport output parameters

3135End of informative comment
31361. Audit failures are reported using the AUTHFAIL error commands and reflect the success
3137
or failure of the wrapped command.
313818.4.1

Auditing of wrapped commands

3139Start of informative comment
3140Auditing provides information to allow an auditor to recreate the operations performed.
3141Confidentiality on the transport channel is to hide what operations occur. These two
3142features are in conflict. According to the TPM design philosophy, the TPM Owner takes
3143precedence.
3144For a command sent on a transport session, with the session using confidentiality and the3145command requiring auditing, the TPM will execute the command however the input and3146output parameters for the command are ignored.
3147End of informative comment
31481. When the wrapped command requires auditing and the transport session specifies
3149
encryption, the TPM MUST perform the audit. However, when computing the audit
3150
digest:3151

a. For input, only the ordinal is audited.

3152

b. For output, only the ordinal and return code are audited.

502
503

100

TCG Published
TCG Published

Revision 116 1 Marchy 2011

504TPM Main Part 1 Design Principles

TCG © Copyright

505Specification Version 1.2506

315319.
Audit Commands
3154Start of informative comment
3155To allow the TPM Owner the ability to determine that certain operations on the TPM have3156been executed, auditing of commands is possible. The audit value is a digest held internally3157to the TPM and externally as a log of all audited commands. With the log held externally to
3158the TPM, the internal digest must allow the log auditor to determine the presence of attacks
3159against the log. The evidence of tampering may not provide evidence of the type of attack
3160mounted against the log.
3161The TPM cannot enforce any protections on the external log. It is the responsibility of the
3162external log owner to properly maintain and protect the log.
3163The TPM provides mechanisms for the external log maintainer to resynchronize the internal
3164digest and external logs.
3165The Owner has the ability to set which functions generate an audit event and to change
3166which functions generate the event at any time.
3167The status of the audit generation is not sensitive information and so the command to
3168determine the status of the audit generation is not an owner authorized command.
3169It is important to note the difference between auditing and the logging of transport sessions.
3170The audit log provides information on the execution of specific commands. There will be a
3171very limited number of audited commands, most likely those commands that provide
3172identities and control of the TPM. Commands such as TPM_Unseal would not be audited.
3173They would use the logging functions of a transport session.
3174The auditing of an ordinal happens in a two-step process. The first step involves auditing
3175the receipt of the command and the input parameters; the second step involves auditing the3176response to the command and the output parameters.
3177There is a requirement to enable verification of the external audit log both during a power
3178session and across power sessions and to enable detection of partial or inconsistent audit
3179logs throughout the lifetime of a TPM.
3180A TPM will hold an internal record consisting of a non-volatile counter (that increments
3181once per session, when the first audit event of that session occurs) and a digest (that holds
3182the digest of the current session). Most probably, the audit digest will be volatile. Note,
3183however, that nothing in this specification prevents the use of a non-volatile audit digest.
3184This arrangement of counter and digest is advantageous because it is easier to build a high3185endurance non-volatile counter than a high endurance non-volatile digest. This
3186arrangement is insufficient, however, because the truncation of an audit log of any session
3187is possible without trace. It is therefore necessary to perform an explicit close on the audit
3188session. If there is no record of a close-audit event in an audit session, anything could have3189happened after the last audit event in the audit log. The essence of a typical TPM audit
3190recording mechanism is therefore:
3191The TPM contains a volatile digest used like a PCR, where the “integrity metrics” are digests
3192of command parameters in the current audit session.
3193An audit session opens when the volatile “PCR” digest is “extended” from its NULL state.
3194This occurs whenever an audited command is executed AND no audit session currently
507Revision 116 1 Marchy 2011
508

TCG Published
TCG Published101

509Copyright © TCG
510

TPM Main Part 1 Design Principles
Specification Version 1.23195exists, and in no other circumstances. When an audit session opens, a non-volatile counter
3196is automatically incremented.
3197An audit session closes when a TPM receives TPM_GetAuditDigestSigned with a closeAudit
3198parameter asserted. An audit session must be considered closed if the value in the volatile
3199digest is invalid (for whatever reason).
3200TPM_GetCapability should report the effect of TPM_Startup on the volatile digest. (TPMs
3201may initialize the volatile digest on the first audit command after TPM_Startup(ST_CLEAR),
3202or on the first audit command after any version of TPM_Startup, or may be independent of
3203TPM_Startup.)
3204When the TPM signs its audit digest, it signs the concatenation of the non-volatile counter
3205and the volatile digest, and exports the value of the non-volatile counter, plus the value of
3206the volatile digest, plus the value of the signature.
3207If the audit digest is initialized by TPM_Startup(ST_STATE), then it may be useless to audit
3208the TPM_SaveState ordinal. Any command after TPM_SaveState MAY invalidate the saved
3209state. If authorization sessions are part of the saved state, TPM_GetAuditDigestSigned will
3210most likely invalidate the state as it changes the preserved authorization session nonce. It
3211may therefore be impossible to get the audit results.
3212The system designer needs to ensure that the selected TPM can handle the specific3213environment and avoid burnout of the audit monotonic counter.
3214End of informative comment
32151. Audit functionality is optional
3216
3217

a. If the platform specific specification requires auditing, the specification SHALL
indicate how the TPM implements audit

32182. The TPM MUST maintain an audit monotonic count that is only available for audit
3219
purposes.
3220
3221

a. The increment of this audit counter is under the sole control of the TPM and is not
usable for other count purposes.

3222
3223

b. This monotonic count MUST BE incremented by one whenever the audit digest is“extended” from a NULL state.

32243. The TPM MUST maintain an audit digest.
3225
3226
3227

a. Thisdigest
MUST
be
set
to
all
zeros
upon
the
executionof
TPM_GetAuditDigestSigned with a TRUE value of closeAudit provided that thesigning key is an identity key.

3228
3229

b. This digest MAY be
TPM_Startup[ST_STATE].

3230
3231

c. When an audited command is executed, this register MUST be extended with thedigest of that command.

set

to

all

zeros

on

TPM_Startup[ST_CLEAR]

or

32324. Each command ordinal has an indicator in non-volatile TPM memory that indicates if
3233
execution of the command will generate an audit event. The setting of the ordinal3234
indicator MUST be under control of the TPM Owner.

511
512

102

TCG Published
TCG Published

Revision 116 1 Marchy 2011

513TPM Main Part 1 Design Principles

TCG © Copyright

514Specification Version 1.2515323519.1

Audit Monotonic Counter

3236Start of informative comment
3237The audit monotonic counter (AMC) performs the task of sequencing audit logs across audit
3238sessions. The AMC must have no other uses other than the audit log.
3239The TPM and platform should be matched such that the expected AMC endurance matches
3240the expected platform audit sessions and sleep cycles.
3241Given the size of the AMC it is not anticipated that the AMC would roll over. If the AMC
3242were to roll over, and the storage of the AMC still allowed updates, the AMC could cycle and3243start at 0 again.
3244End of informative comment
32451. The AMC is a TPM_COUNTER_VALUE.
32462. The AMC MUST last for 7 years or at least 1,000,000 audit sessions, whichever occurs
3247
first. After this amount of usage, there is no guarantee that the TPM will continue to3248
properly increment the monotonic counter.

516Revision 116 1 Marchy 2011
517

TCG Published
TCG Published103

518Copyright © TCG
519

TPM Main Part 1 Design Principles
Specification Version 1.2

324920.
Design Section on Time Stamping
3250Start of informative comment
3251The TPM provides a service to apply a time stamp to various blobs. The time stamp provided
3252by the TPM is not an actual universal time clock (UTC) value but is the number of timer
3253ticks the TPM has counted. It is the responsibility of the caller to associate the ticks to an
3254actual UTC time.
3255The TPM counts ticks from the start of a timing session. Timing sessions are platform
3256dependent events that may or may not coincide with TPM_Init and TPM_Startup sessions.
3257The reason for this difference is the availability of power to the TPM. In a PC desktop, for3258instance power could be continually available to the TPM by using power from the wall
3259socket. For a PC mobile platform, power may not be available when only using the internal
3260battery. It is a platform designer’s decision as to when and how they supply power to the
3261TPM to maintain the timing ticks.
3262The TPM can provide a time stamping service. The TPM does not maintain an internal3263secure source of time rather the TPM maintains a count of the number of ticks that have
3264occurred since the start of a timing session.
3265On a PC, the TPM may use the timing source of the LPC bus or it may have a separate clock
3266circuit. The anticipation is that availability of the TPM timing ticks and the tick resolution is3267an area of differentiation available to TPM manufactures and platform providers.
3268End of informative comment
32691. This specification makes no requirement on the mechanism required to implement the3270
tick counter in the TPM.
32712. This specification makes no requirement on the ability for the TPM to maintain the3272
ability to increment the tick counter across power cycles or in different power modes on
3273
a platform.
327420.1

Tick Components

3275Start of informative comment
3276The TPM maintains for each tick session the following values:
3277Tick Count Value (TCV) – The count of ticks for the session.
3278Tick Increment Rate (TIR) – The rate at which the TCV is incremented. There is a set
3279relationship between TIR and seconds, the relationship is set during manufacturing of the
3280TPM and platform. This is the TPM_CURRENT_TICKS -> tickRate parameter.
3281Tick Session Nonce (TSN) – The session nonce is set at the start of each tick session.
3282End of informative comment
32831. The TCV MUST be set to 0 at the start of each tick session. The TPM MUST start a new
3284
tick session if the TPM loses the ability to increment the TCV according to the TIR.
32852. The TSN MUST be set to the next value from the TPM RNG at the start of each new tick3286
session. When the TPM loses the ability to increment the TCV according to the TIR the3287
TSN MUST be set to all zeros.

520
521

104

TCG Published
TCG Published

Revision 116 1 Marchy 2011

522TPM Main Part 1 Design Principles

TCG © Copyright

523Specification Version 1.2

52432883. If the TPM discovers tampering with the tick count (through timing changes etc) the TPM
3289
MUST treat this as an attack and shut down further TPM processing as if a self-test had
3290
failed.
329120.2

Basic Tick Stamp

3292Start of informative comment
3293The TPM does not provide a secure time source, nor does it provide a signature over some
3294time value. The TPM does provide a signature over some current tick counter. The signature
3295covers a hash of the blob to stamp, the current counter value, the tick session nonce and3296some fixed text.
3297The Tick Stamp Result (TSR) is the result of the tick stamp operation that associates the3298TCV, TSN and the blob. There is no association with the TCV or TSR with any UTC value at
3299this point.
3300End of informative comment
330120.3

Associating a TCV with UTC

3302Start of informative comment
3303An outside observer would like to associate a TCV with a relevant time value. The following
3304shows how to accomplish this task. This protocol is not required but shows how to3305accomplish the job.
3306EntityA wants to have BlobA time stamped. EntityA performs TPM_TickStamp on BlobA.
3307This creates TSRB (TickStampResult for Blob). TSRB records TSRBTCV, the current value of
3308the TCV, and associates TSRBTCV with the TSN.
3309Now EntityA needs to associate a TCV with a real time value. EntityA creates blob TS which
3310contains some known text like “Tick Stamp”. EntityA performs TPM_TickStamp on blob TS
3311creating TSR1. This records TSR1TCV, the current value of the TCV, and associates
3312TSR1TCV with the TSN.
3313EntityA sends TSR1 to a Time Authority (TA). TA creates TA1 which associates TSR1 with
3314UTC1.
3315EntityA now performs TPM_TickStamp on TA1. This creates TSR2. TSR2 records TSR2TCV,
3316the current values of the TCV, and associates TSR2TCV with the TSN.
3317Analyzing the associations
3318EntityA has three TSR’s; TSRB the TSR of the blob that we wanted to time stamp, TSR1 the
3319TSR associated with the TS blob and TSR2 the TSR associated with the information from
3320the TA. EntityA wants to show an association between the various TSR such that there is a
3321connection between the UTC and BlobA.
3322From TSR1 EntityA knows that TSR1TCV is less than the UTC. This is true since the TA is3323signing TSR1 and the creation of TSR1 has to occur before the signature of TSR1. Stated
3324mathematically:
3325

TSR1TCV < UTC1

3326From TSR2 EntityA knows that TSR2TCV is greater than the UTC. This is true since the3327TPM is signing TA1 which must be created before it was signed. Stated mathematically:
525Revision 116 1 Marchy 2011
526

TCG Published
TCG Published105

527Copyright © TCG
528

3328

TPM Main Part 1 Design Principles
Specification Version 1.2

TSR2TCV > UTC1

3329EntityA now knows TSR1TCV and TSR2TCV bound UTC1. Stated mathematically:
3330

TSR1TCV < UTC1 < TSR2TCV

3331This association holds true if the TSN for TSR1 matches the TSN for TSR2. If some event
3332occurs that causes the TPM to create a new TSN and restart the TCV then EntityA must
3333start the process all over again.
3334EntityA does not know when UTC1 occurred in the interval between TSR1TCV and
3335TSR2TCV. In fact, the value TSR2TCV minus TSR1TCV (TSRDELTA) is the amount of
3336uncertainty to which a TCV value should be associated with UTC1. Stated mathematically:
3337

TSRDELTA = TSR2TCV – TSR1TCV iff TSR1TSN = TSR2TSN

3338EntityA can obtains k1 the relationship between ticks and seconds using the3339TPM_GetCapability command. EntityA also obtains k2 the possible errors per tick. EntityA
3340now calculate DeltaTime which is the conversion of ticks to seconds and the TSRDELTA.
3341State mathematically:
3342

DeltaTime = (k1 * TSRDELTA) + (k2 * TSRDELTA)

3343
3344To make the association between DeltaTime, UTC and TSRB note the following:
3345

DeltaTime = (k1*TSRDelta) + Drift = TimeChange + Drift

3346

Where ABSOLUTEVALUE(Drift)<k2*TSRDelta

3347(1) TSR1TCV < UTC1 < TSR2TCV
3348

True since you cannot sign something before it exists

3349(2) TSR1TCV < UTC1 < TSR1TCV + TSR2TCV-TSR1TCV <= TSR1TCV + DeltaTime (=3350TSR1TCV +TimeChange +Drift)
3351 True because TSR1 and TSR2 are in the same tick session proved by the same TSN. (Note3352TimeChange is positive!)3353(3) 0 < UTC1-TSR1TCV < DeltaTime3354 (Subtract TSR1TCV from all sides)3355(4) 0 > TSR1TCV - UTC1 > -DeltaTime = -TimeChange - Drift
3356 (Multiply through by -1)
3357(5) TimeChange/2 > [ TSR1TCV - (UTC1-TimeChange/2)] > -TimeChange/2 - Drift
3358 (add TimeChange/2 to all sides)3359(6) TimeChange/2 + ABSOLUTEVALUE(Drift) > [ TSR1TCV - (UTC1-TimeChange/2)]
3360> -TimeChange/2 - ABSOLUTEVALUE(Drift)
3361 Making the large side of an equality bigger, and potentially making the small side smaller.
3362(7) ABSOLUTEVALUE[ TSR1TCV - (UTC1-TimeChange/2)] < TimeChange/2 +3363ABSOLUTEVALUE(Drift)
3364 (Definition of Absolute Value, and TimeChange is positive)
529
530

106

TCG Published
TCG Published

Revision 116 1 Marchy 2011

531TPM Main Part 1 Design Principles

TCG © Copyright

532Specification Version 1.2

533
3365

3366From which we see that TSR1TCV is approximately UTC1-TimeChange/2 with a symmetric
3367possible error of TimeChange/2 + AbsoluteValue(Drift)
3368We can calculate this error as being less than k1*TSRDelta/2 + k2*TSRDelta.
3369
3370EntityA now has the ability to associate UTC1 with TSBTSV and by allow others to know
3371that BlobA was signed at a certain time. First TSBTSN must equal TSR1TSN. This
3372relationship allows EntityA to assert that TSRB occurs during the same session as TSR1
3373and TSR2.
3374EntityA calculates HashTimeDelta which is the difference between TSR1TCV and TSRBTCV
3375and the conversion of ticks to seconds. HashTimeDelta includes the same k1 and k2 as
3376calculated above. Stated mathematically:3377

E = k2(TSR1TCV – TSRBTCV)

3378

HashTimeDelta = k1(TSR1TCV – TSRBTCV) + E

3379Now the following relationships hold:3380(1) UTC1 – DeltaTime < TSRBTCV – (TSRBTCV – TSR1TCV) < UTC1
3381(2) UTC1 – DeltaTime < TSRBTCV + HashTimeDelta + E < UTC1
3382(3) UTC1 – HashTimeDelta – DeltaTime – E < TSRBTCV < UTC1 – HashTimeDelta + E
3383(4) TSRBTCV = (UTC1 – HashTimeDelta – DeltaTime/2) + (E + DeltaTime/2)
3384This has the correct properties
3385As DeltaTime grows so does the error bar (or the uncertainty of the time association)
3386As the difference between the time of the measurement and the time of the time stamp
3387grows, so does the E as a function of E is HashTimeDelta
3388End of informative comment
338920.4

Additional Comments and Questions

3390Start of informative comment
3391Time Difference
3392If two things are time stamped, say at TCVs and TCVe (for TCV at start, TCV at end) then3393any entity can calculate the time difference between the two events and will get:
3394

TimeDiff = k1*|TCVe – TCVs| + k2*|TCVe – TCVs|

3395This TimeDiff does not indicate what time the two events occurred at it merely gives the3396time between the events. This time difference doesn’t require a Time Authority.
3397Why is TSN (tick session nonce) required?
3398Without it, there is no way to associate a Time Authority stamp with any TSV, as the TSV
3399resets at the start of every tick session. The TSN proves that the concatenation of TSV and
3400TSN is unique.
3401How does the protocol prevent replay attacks?
534Revision 116 1 Marchy 2011
535

TCG Published
TCG Published107

536Copyright © TCG
537

TPM Main Part 1 Design Principles
Specification Version 1.2

3402The TPM signs the TSR sent to the TA. This TSR contains the unique combination of TSV
3403and TSN. Since the TSN is unique to a tick session and the TSV continues to increment any
3404attempt to recreate the same TSR will fail. If the TPM is reset such that the TSV is at the3405same value, the TSN will be a new value. If the TPM is not reset then the TSV continues to3406increment and will not repeat.
3407How does EntityA know that the TSR1 that the TA signs is recent?
3408It doesn't. EntityA checks however to ensure that the TSN is the same in all TSR. This
3409ensures that the values are all related. If TSR1 is an old value then the HashTimeDelta will
3410be a large value and the uncertainty of the relation of the signing to the UTC will be large.
3411Why does associating a UTC time with a TSV take two steps?
3412This is because it takes some time between when a request goes to a time authority and3413when the response comes. The protocol measures this time and uses it to create the time
3414deltas. The relationship of TSV to UTC is somewhere between the request and response.
3415Affect of power on the tick counter
3416As the TPM is not required to maintain an internal clock and battery, how the platform
3417provides power to the TPM affects the ability to maintain the tick counter. The original
3418mechanism had the TPM maintaining an indication of how the platform provided the power.
3419Previous performance does not predict what might occur in the future, as the platform may
3420be unable to continue to provide the power (dead battery, pulled plug from wall etc). With
3421the knowledge that the TPM cannot accurately report the future, the specification deleted
3422tick type from the TPM.
3423The information relative to what the platform is doing to provide power to the TPM is now a3424responsibility of the TSS. The TSS should first determine how the platform was built, using
3425the platform credential. The TSS should also attempt to determine the actual performance
3426of the TPM in regards to maintaining the tick count. The TSS can help in this determination
3427by keeping track of the tick nonce. The tick nonce changes each time the tick count is lost.
3428By comparing the tick nonce across system events the TSS can obtain a heuristic that3429represents how the platform provides power to the TPM.
3430The TSS must define a standard set of values as to when the tick nonce continues to3431increment across system events.
3432The following are some PC implementations that give the flavor of what is possible regarding
3433the clock on a specific platform.
3434TICK_INC - No TPM power battery. Clock comes from PCI clock, may stop from time to time
3435due to clock stopping protocols such as CLKRUN.
3436TICK_POWER - No TPM power battery. Clock source comes from PCI clock, always runs
3437except in S3+.
3438TICK_STSTATE - External power (might be battery) consumed by TPM during S3 only. Clock3439source comes either from a system clock that runs during S3 or from crystal/internal TPM
3440source.
3441TICK_STCLEAR - Standby power used to drive counter. In desktop, may be related to when3442system is plugged into wall. Clock source comes either from a system clock that runs when3443standby power is available or from crystal/internal TPM source.

538
539

108

TCG Published
TCG Published

Revision 116 1 Marchy 2011

540TPM Main Part 1 Design Principles

TCG © Copyright

541Specification Version 1.2

542
3444TICK_ALWAYS - TPM power battery. Clock source comes either from a battery powered3445system clock that crystal/internal TPM source.
3446End of informative comment

543Revision 116 1 Marchy 2011
544

TCG Published
TCG Published109

545Copyright © TCG
546

TPM Main Part 1 Design Principles
Specification Version 1.2

344721.
Context Management
3448Start of informative comment
3449The TPM is a device that contains limited resources. Caching of the resources may occur
3450without knowledge or assistance from the application that loaded the resource. In version
34511.1 there were two types of resources that had need of this support keys and authorization
3452sessions. Each type had a separate load and restore operation. In version 1.2 there is the3453addition of transport sessions. To handle these situations generically 1.2 is defining a single
3454context manager that all types of resources may use.
3455The concept is simple, a resource manager requests that wrapping of a resource in a
3456manner that securely protects the resource and only allows the restoring of the resource on
3457the same TPM and during the same operational cycle.
3458Consider a key successfully loaded on the TPM. The parent keys that loaded the key may
3459have required a different set of PCR registers than are currently set on the TPM. For
3460example, the end result is to have key5 loaded. Key3 is protected by key2, which is3461protected by key1, which is protected by the SRK. Key1 requires PCR1 to be in a certain
3462state, key2 requires PCR2 to load and key3 requires PCR3. Now at some point in time after
3463key1 loaded key2, PCR1 was extended with additional information. If key3 is evicted then
3464there is no way to reload key3 until the platform is rebooted. To avoid this type of problem
3465the TPM can execute context management routines. The context management routines save
3466key3 in its current state and allow the TPM to restore the state without having to use the3467parent keys (key1 and key2).
3468There are numerous issues with performing context management on sessions. These issues
3469revolve around the use of the nonces in the session. If an attacker can successfully store,
3470attack, fail and then reload the session the attacker can repeat the attack many times.
3471The key that the TPM uses to encrypt blobs may be a volatile or non-volatile key. One
3472mechanism would be for the TPM to generate a new key on each TPM_Startup command.
3473Another would be for the TPM to generate the key and store it persistently in the
3474TPM_PERMANENT_DATA area.
3475The symmetric key should be relatively the same strength as a 2048-bit RSA key. 128-bit
3476AES would be appropriate.
3477End of informative comment
34781. Context management is a required function.
34792. Execution of the context commands MUST NOT cause the exposure of any TPM shielded
3480
location.
34813. The TPM MUST NOT allow the context saving of the EK or the SRK.
34824. The TPM MAY use either symmetric or asymmetric encryption. For asymmetric3483
encryption the TPM MUST use a 2048 RSA key.
34845. A wrapped session blob MUST only be loadable once. A wrapped key blob MAY be
3485
reloadable.
34866. The TPM MUST support a minimum of 16 concurrent saved contexts other than keys.
3487
There is no minimum or maximum number of concurrent saved key contexts.

547
548

110

TCG Published
TCG Published

Revision 116 1 Marchy 2011

549TPM Main Part 1 Design Principles

TCG © Copyright

550Specification Version 1.2

551
34887. All external session blobs (of type TPM_RT_TRANS or TPM_RT_AUTH) can be invalidated
3489
upon specific request (via TPM_FlushXXX using TPM_RT_CONTEXT as resource type).
3490
This does not include saved context blobs of type TPM_RT_KEY.
34918. External session blobs are invalidated on TPM_Startup(ST_CLEAR)
3492
TPM_Startup(any) based on the startup effects settings
3493
3494

or

on

a. Saved context blobs of type TPM_RT_KEY with the attributes of parentPCRStatus =FALSE and isVolatile = FALSE SHOULD not invalidated on TPM_Startup(any)34959. All external session invalidate automatically upon installation of a new owner due to the3496
setting of a new tpmProof.
349710.If the TPM enters failure mode ALL session blobs (including keys) MUST be invalidated
3498
3499

a. Invalidation includes ensuring that contextNonceKey and contextNonceSession willchange when the TPM recovers from the failure.

350011.Attempts to restore a wrapped blob after the successful completion of3501
TPM_Startup(ST_CLEAR) MUST fail. The exception is a wrapped key blob which may be
3502
long-term and which MAY restore after a TPM_Startup(ST_CLEAR).
350312.The save and load context commands are the generic equivalent to the context
3504
commands in 1.1. Version 1.2 deprecates the following commands:
3505

a. TPM_AuthSaveContext

3506

b. TPM_AuthLoadContext

3507

c. TPM_KeySaveContext

3508

d. TPM_KeyLoadContext

552Revision 116 1 Marchy 2011
553

TCG Published
TCG Published111

554Copyright © TCG
555

TPM Main Part 1 Design Principles
Specification Version 1.2

350922.
Eviction
3510Start of informative comment
3511The TPM has numerous resources held inside of the TPM that may need eviction. The need
3512for eviction occurs when the number or resources in use by the TPM exceed the available
3513space. For resources that are hard to reload (i.e. keys tied to PCR values) the outside entity
3514should first perform a context save before evicting items.
3515In version 1.1 there were separate commands to evict separate resource types. This new
3516command set uses the resource types defined for context saving and creates a generic3517command that will evict all resource types.
3518End of informative comment
35191. The TPM MUST NOT flush the EK or SRK using this command.
35202. Version 1.2 deprecates the following commands:
3521

a. TPM_Terminate_Handle3522

b. TPM_EvictKey3523

c. TPM_Reset

556
557

112

TCG Published
TCG Published

Revision 116 1 Marchy 2011

558TPM Main Part 1 Design Principles

TCG © Copyright

559Specification Version 1.2

560

352423.
Session pool
3525Start of informative comment
3526The TPM supports two types of sessions that use the rolling nonce protocol, authorization
3527and transport. These sessions require much of the same handling and internal storage by
3528the TPM. To allow more flexibility the internal storage for these sessions will be defined as3529coming from the same pool (or area).
3530The pool requires that three (3) sessions be available. The entities using the TPM can
3531determine the usage models of what sessions are active. This allows a TPM to have 33532authorization sessions or 3 transport sessions at one time.
3533Using all available pool resources for transport sessions is not a very usable model. If all
3534resources are in use by transport, there are no resources available for authorization
3535sessions and hence no ability to execute any commands requiring authorization. A more
3536realistic model would be to have two transport sessions and one authorization session.
3537While this is an unrealistic model for actual execution there will be no requirement that the3538TPM prevent this from happening. A model of how it could occur would be when there are
3539two applications running, both using 2 transport sessions and one authorization session.
3540When switching between the applications, if the requirement was that only 2 transport
3541sessions could be active the TSS that would provide the context switch would have to3542ensure that the transport sessions were context saved first.
3543Sessions can be virtualized, so while the TPM may only have 3 loaded sessions, there may
3544be an unlimited number of context saved sessions stored outside the TPM.
3545End of informative comment
35461. The TPM MUST support a minimum of three (3) concurrent sessions. The sessions MAY
3547
be any mix of authentication and transport sessions.

561Revision 116 1 Marchy 2011
562

TCG Published
TCG Published113

563Copyright © TCG
564

TPM Main Part 1 Design Principles
Specification Version 1.2

354824.
Initialization Operations
3549Start of informative comment
3550Initialization is the process where the TPM establishes an operating environment from a no3551power state. Initialization occurs in many different flavors with PCR, keys, handles, sessions
3552and context blobs all initialized, reloaded or unloaded according to the rules and platform
3553environment.
3554Initialization does not affect the operational characteristics of the TPM (like TPM
3555Ownership).
3556Clear is the process of returning the TPM to factory defaults. The clear commands need
3557protection from unauthorized use and must allow for the possibility of changing Owners.
3558The clear process requires authorization to execute and locks to prevent unauthorized
3559operation.
3560The clear functionality performs the following tasks:
3561Invalidate SRK. Invalidating the SRK invalidates all protected storage areas below the SRK
3562in the hierarchy. The areas below are not destroyed they just have no mechanism to be
3563loaded anymore.
3564All TPM volatile and non-volatile data is set to default value except the endorsement key
3565pair. The clear includes the Owner-AuthData, so after performing the clear, the TPM has no3566Owner. The PCR values are undefined after a clear operation.
3567The TPM shall return TPM_NOSRK until an Owner is set. After the execution of the clear
3568command, the TPM must go through a power cycle to properly set the PCR values.
3569The Owner has ultimate control of when a clear occurs.
3570The Owner can perform the TPM_OwnerClear command using the TPM Owner
3571authorization. If the Owner wishes to disable this clear command and require physical3572access to perform the clear, the Owner can issue the TPM_DisableOwnerClear command.
3573During the TPM startup processing anyone with physical access to the machine can issue
3574the
TPM_ForceClear
command.
Thiscommandperforms
theclear.
The
3575TPM_DisableForceClear disables the TPM_ForceClear command for the duration of the3576power cycle. TSS startup code that does not issue the TPM_DisableForceClear leaves the3577TPM vulnerable to a denial of service attack. The assumption is that the TSS startup code
3578will issue the TPM_DisableForceClear on each power cycle after the TSS determines that it
3579will not be necessary to issue the TPM_ForceClear command. The purpose of the
3580TPM_ForceClear command is to recover from the state where the Owner has lost or
3581forgotten the TPM Ownership token.
3582The TPM_ForceClear must only be possible when the issuer has physical access to the3583platform. The manufacturer of a platform determines the exact definition of physical access.
3584End of informative comment
35851. The TPM MUST support proper initialization. Initialization MUST properly configure the3586
TPM to execute in the platform environment.
35872. Initialization MUST ensure that handles, keys, sessions, context blobs and PCR are
3588
properly initialized, reloaded or invalidated according to the platform environment.
565
566

114

TCG Published
TCG Published

Revision 116 1 Marchy 2011

567TPM Main Part 1 Design Principles

TCG © Copyright

568Specification Version 1.2

56935893. The description of the platform environment arrives at the TPM in a combination of3590
TPM_Init and TPM_Startup.

570Revision 116 1 Marchy 2011
571

TCG Published
TCG Published115

572Copyright © TCG
573

TPM Main Part 1 Design Principles
Specification Version 1.2

359125.
HMAC digest rules
3592Start of informative comment
3593The order of calculation of the HMAC is critical to being able to validate the authorization
3594and parameters of a command. All commands use the same order and format for the3595calculation.
3596A more exact representation of a command would be the following
3597*****************************************************************
3598* TAG | LEN | ORD | HANDLES | DATA | AUTH1 (o) | AUTH2 (o) *3599*****************************************************************
3600The text area for the HMAC calculation would be the concatenation of the following:
3601ORD || DATA
3602End of informative comment
3603The HMAC digest of parameters uses the following order36041. Skip tag and length36052. Include ordinal. This is the 1S parameter in the HMAC column for each command
36063. Skip handle(s). This includes key and other session handles
36074. Include data and other parameters for the command. This starts with the 2S parameter3608
in the HMAC column for each command.
36095. Skip all AuthData values.

574
575

116

TCG Published
TCG Published

Revision 116 1 Marchy 2011

576TPM Main Part 1 Design Principles

TCG © Copyright

577Specification Version 1.2

578

361026.
Generic authorization session termination rules
3611Start of informative comment
3612These rules are the generic rules that govern all authorization sessions, a specific session
3613type may have additional rules or modifications of the generic rules
3614End of informative comment
36151. A TPM SHALL unilaterally perform the actions of TPM_FlushSpecific for a session upon3616
any of the following events
3617

a. “continueUse” flag in the authorization session is FALSE

3618
3619
3620
3621

b. Shared secret of the session in use to create the exclusive-or for confidentiality ofdata. Example is TPM_ChangeAuth terminates the authorization session.
TPM_ExecuteTransport does not terminate the session due to protections inherent intransport sessions.

3622

c. When the associated entity is invalidated

3623
3624
3625

d. When the command returns a fatal error. This is due to error returns not setting a
nonceEven. Without a new nonceEven the rolling nonces sequence is broken hence
the TPM MUST terminate the session.

3626

e. Failure of an authorization check at the start of the command

3627

f. Execution of TPM_Startup(ST_CLEAR)

36282. The TPM MAY perform the actions of TPM_FlushSpecific for a session upon the following
3629
events3630

a. Execution of TPM_Startup(ST_STATE)

579Revision 116 1 Marchy 2011
580

TCG Published
TCG Published117

581Copyright © TCG
582

TPM Main Part 1 Design Principles
Specification Version 1.2

363127.
PCR Grand Unification Theory
3632Start of informative comment
3633This section discusses the unification of PCR definition and use with locality.
3634The PCR allow the definition of a platform configuration. With the addition of locality, the3635meaning of a configuration is somewhat larger. This section defines how the two combine to3636provide the TPM user information relative to the platform configuration.
3637These are the issues regarding PCR and locality at this time
3638Definition of configuration
3639A configuration is the combination of PCR, PCR attributes and the locality.
3640Passing the creators configuration to the user of data
3641For many reasons, from the creator’s viewpoint and the user’s viewpoint, the configuration
3642in use by the creator is important information. This information needs transmitting to the3643user with the data and with integrity.
3644The configuration must include the locality and may not be the same configuration that will3645use the data. This allows one configuration to seal a value for future use and the end user
3646to know the genealogy of where the data comes from.
3647Definition of “Use”
3648See the definition of TPM_PCR_ATTRIBUTES for the attributes and the normative
3649statements regarding the use of the attributes. The use of a configuration is when the TPM
3650needs to ensure that the proper platform configuration is present. The first example is for
3651Unseal, the TPM must only release the information sealed if the platform configuration
3652matches the configuration specified by the seal creator. Here the use of locality is implicit in
3653the PCR attributes, if PCR8 requires locality 2 to be present then the seal creator ensures
3654that locality 2 is asserted by defining a configuration that uses PCR8.
3655The creation of a blob that specifies a configuration for use is not a “use” itself. So the SEAL
3656command does is not a use for specifying the use of a PCR configuration.
3657

583
584

118

TCG Published
TCG Published

Revision 116 1 Marchy 2011

585TPM Main Part 1 Design Principles

TCG © Copyright

586Specification Version 1.2

587

3658
3659By using the “new style” or TPM_PCR_INFO_LONG structure the user can determine that
3660Blob2 is different that Blob3.

588Revision 116 1 Marchy 2011
589

TCG Published
TCG Published119590Copyright © TCG
591

TPM Main Part 1 Design Principles
Specification Version 1.236613662Case B is the only failure and this shows the use of the locality modifier and PCR locality
3663attribute.
3664Additional attempts are obvious failures, config3 and config4 are unable to unseal any of
3665the 4 blobs.
3666One example is illustrative of the problems of just specifying locality without an3667accompanying PCR. Assume Blob5 which specifies a dar of config1 and a locality 4 modifier.
3668Now either config2 or config4 can unseal Blob5. In fact there is no way to restrict ANY
3669process that gains access to locality 4 from performing the unseal. As many platforms will
3670have no restrictions as to which process can load in locality 4 there is no additional benefit
3671of specifying a locality modifier. If the sealer wants protections, they need to specify a PCR
3672that requires a locality modifier.
3673Defining locality modifiers dynamically
3674This feature would enable the platform to specify how and when a locality modifier applies
3675to a PCR. The current definition of PCR attributes has the values set in TPM manufacturing3676and static for all TPM in a specific platform type (like a PC).
3677Defining dynamic attributes would make the use of a PCR very difficult. The sealer would
3678have to have some way of ensuring that their wishes were enforced and challengers would
3679have to pay close attention to the current PCR attributes. For these reasons the setting of
3680the PCR attributes is defined as a static operation made during the platform specific3681specification.
592
593

120

TCG Published
TCG Published

Revision 116 1 Marchy 2011

594TPM Main Part 1 Design Principles

TCG © Copyright

595Specification Version 1.2

5963682End of informative comment
368327.1

Validate Key for use

3684Start of informative comment
3685The following shows the order and checks done before the use of a key that has PCR or
3686locality restrictions.
3687Note that there is no check for the PCR registers on the DSAP session. This is due to the3688fact that DSAP checks for the continued validity of the PCR that are attached to the DSAP
3689and any change causes the invalidation of the DSAP session.
3690The checks must validate the locality of the DSAP session as the PCR registers in use could
3691have locality restrictions.
3692End of informative comment
36931. If the authorization session is DSAP
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706

a. If the DSAP -> localityAtRelease is not 0x1F (or in other words some localities are notallowed)i.

Validate that TPM_STANY_FLAGS -> localityModifier is matched by DSAP ->pcrInfo -> localityAtRelease, on mismatch return TPM_BAD_LOCALITY

b. If DSAP -> digestAtRelease is not 0i.

Calculate the current digest
TPM_BAD_PCR on mismatchandcomparetodigestAtRelease,

returnc. If the DSAP points to an ordinal delegationi.

Check that the DSAP authorizes the use of the intended ordinald. If the DSAP points to a key delegationi.

Check that the DSAP authorizes the use of the key

e. If the key delegated is a CMK key
i.

The TPM MUST check the CMK_DELEGATE restrictions

37072. Set LK to the loaded key that is being used
37083. If LK -> pcrInfoSize is not 03709

a. If LK -> pcrInfo -> releasePCRSelection identifies the use of one or more PCR

3710
3711

i.

3712
3713

ii. Compare H1 to LK -> pcrInfo -> digestAtRelease on mismatch return
TPM_WRONGPCRVAL

3714
3715
3716

Calculate H1 a TPM_COMPOSITE_HASH of the PCR selected by LK -> pcrInfo ->releasePCRSelection

b. If localityAtRelease is NOT 0x1F
i.

Validate that TPM_STANY_FLAGS -> localityModifier is matched by LK -> pcrInfo-> localityAtRelease on mismatch return TPM_BAD_LOCALITY

37174. Allow use of the key

597Revision 116 1 Marchy 2011
598

TCG Published
TCG Published121

599Copyright © TCG
600

TPM Main Part 1 Design Principles
Specification Version 1.2

371828.
Non Volatile Storage
3719Start of informative comment
3720The TPM contains protected non-volatile storage. There are many uses of this type of area;
3721however, a TPM needs to have a defined set of operations that touch any protected area.
3722The idea behind these instructions is to provide an area that the manufacturers and owner3723can use for storing information in the TPM.
3724The TCG will define a limited set of information that it sees a need of storing in the TPM.
3725The TPM and platform manufacturer may add additional areas.
3726The NV storage area has a limited use before it will no longer operate Hence the NV
3727commands are under TPM Owner control.
3728Controls exist to allow a manufacturer to define and write NV indexes during3729manufacturing before an owner exists. This is strictly a manufacturing mode, as it allows a
3730manufacturer to bypass security.
3731To locate if an index is available, use TPM_GetCapability to return the index and the size of
3732the area in use by the index.
3733The area may not be larger than the TPM input buffer. The TPM will report the maximum
3734size available to allocate.
3735The storage area is an opaque area to the TPM. The TPM, other than providing the storage,
3736does not review the internals of the area.
3737To SEAL a blob, the creator of the area specifies the use of PCR registers to read the value.
3738This is the exact property of SEAL.
3739To obtain a signed indication of what is in a NV store area the caller would setup a
3740transport session with logging on and then get the signed log. The log shows the parameters3741so the caller can validate that the TPM holds the value.
3742There is an attribute, for each index, that defines the expected write scheme for the index.
3743The TPM may handle data storage differently based on the write scheme attribute that3744defines the expected for the index. Whenever possible the NV memory should be allocated3745with the write scheme attribute set to update as one block and not as individual bytes.
3746The non-volatile storage described here is defined by TPM_NV_DefineSpace. Other
3747structures that a manufacturer might decide to store in non-volatile memory (e.g., PCRs,
3748keys, the audit digest) are logically separate and do not affect the space available for the NV
3749indexed storage described here. An exception is a key that is moved from volatile to NV
3750memory when set as “owner evict”. This NV memory may come from a pool shared with NV
3751define space.
3752End of informative comment
37531. The TPM MUST support the NV commands. The TPM MUST support the NV area as3754
defined by the TPM_NV_INDEX values.
37552. The TPM MAY manage the storage area using any allocation and garbage collection
3756
scheme.

601
602

122

TCG Published
TCG Published

Revision 116 1 Marchy 2011

603TPM Main Part 1 Design Principles

TCG © Copyright

604Specification Version 1.2

60537573. To remove an area from the NV store the TPM owner would use the3758
TPM_NV_DefineSpace command with a size of 0. Any authorized user can change the3759
value written in the NV store.
37604. The TPM MUST treat the NV area as a shielded location.
3761
3762

a. The TPM does not provide any additional protections (like additional encryption) to
the NV area.

37635. If a write operation is interrupted, then the TPM makes no guarantees about the data
3764
stored at the specified index. It MAY be the previous value, MAY be the new value or
3765
MAY be undefined or unpredictable. After the interruption the TPM MAY indicate that3766
the index contains unpredictable information.
3767
3768

a. The TPM MUST ensure that in case of interruption of a write to an index that allother indexes are not affected37696. Minimum size of NV area is platform specific. The maximum area is TPM vendor specific.
37707. A TPM MUST NOT use the NV area to store any data dependent on data structures3771
defined in Part II of the TPM specifications, except for the NV Storage structures implied
3772
by required index values or reserved index values.
377328.1

NV storage design principles

3774Start of informative comment
3775This section lists the design principles that motivate the NV area in the TPM. There was the3776realization that the current design made use of NV storage but not necessarily efficiently.
3777The DIR, BIT and other commands placed demands on the TPM designer and required
3778areas that while allowing for flexible use reserved space most likely never used (like DIR for
3779locality 1).
3780The following are the design principles that drive the function definitions.
37811. Provide efficient use of NV area on the TPM. NV storage is a very limited resource and3782data stored in the NV area should be as small as possible.
37832. The TPM does not control, edit, validate or manipulate in any manner the information in
3784the NV store. The TPM is merely a storage device. The TPM does enforce the access rules as
3785set by the TPM Owner.
37863. Allocation of the NV area for a specific use must be under control of the TPM Owner.
37874. The TPM Owner, when defining the area to use, will set the access and use policy for the3788area. The TPM Owner can set AuthData values, delegations, PCR values and other controls
3789on the access allowed to the area.
37905. There must be a capability to allow TPM and platform manufacturers to use this area
3791without a TPM Owner being present. This allows the manufacturer to place information into
3792the TPM without an onerous manufacturing flow. Information in this category would
3793include EK credential and platform credential.
37946. The management and use of the NV area should not require a large number of ordinals.
37957. The management and use of the NV area should not introduce new operating strategies
3796into the TPM and should be easy to implement.

606Revision 116 1 Marchy 2011
607

TCG Published
TCG Published123608Copyright © TCG
609

TPM Main Part 1 Design Principles
Specification Version 1.2

3797End of informative comment
379828.1.1

NV Storage use models

3799Start of informative comment
3800This informative section describes some of the anticipated use models and the attributes a
3801user of the storage area would need to set.
3802
3803Owner authorized for all access
3804TPM_NV_DefineSpace: attributes = PER_OWERREAD || PER_OWNERWRITE
3805WriteValue(TPM Owner Auth, data)
3806ReadValue(TPM Owner Auth, data)
3807
3808Set AuthData value
3809TPM_NV_DefineSpace: attributes = PER_AUTHREAD || PER_AUTHWRITE, auth =3810authValue
3811WriteValue( authValue, data)
3812ReadValue( authValue, data)
3813
3814Write once, only way to change is to delete and redefine
3815TPM_NV_DefineSpace: attributes = PER_WRITEDEFINE
3816WriteValue( size = x, data) // successful
3817WriteValue(size = 0) // locks
3818WriteValue(size = x) // fails
3819…
3820TPM_Startup(ST_Clear) // Does not affect lock3821WriteValue(size = x, data) // fails
3822
3823Write until specific index is locked, lock reset on Startup(ST_Clear)
3824TPM_NV_DefineSpace: index = 3, attributes = PER_WRITE_STCLEAR
3825TPM_NV_DefineSpace: index = 5, attributes = PER_WRITE_STCLEAR
3826WriteValue( index = 3, size = x, data) // successful
3827WriteValue( index = 5, size = x, data) // successful
3828WriteValue(index = 3, size = 0) // locks
3829WriteValue( index = 3, size = x, data) // fails
3830WriteValue( index = 5, size = x, data) // successful
610
611

124

TCG Published
TCG Published

Revision 116 1 Marchy 2011

612TPM Main Part 1 Design Principles

TCG © Copyright

613Specification Version 1.2

614
3831…

3832TPM_Startup(ST_Clear) // clears lock3833WriteValue( index = 3, size = x, data) // successful
3834WriteValue( index = 5, size = x, data) // successful
3835
3836Write until index 0 is locked, lock reset by Startup(ST_Clear)
3837TPM_NV_DefineSpace: attributes = PER_GLOBALLOCK, index = 5
3838TPM_NV_DefineSpace: attributes = PER_GLOBALLOCK, index = 3
3839WriteValue( index = 3, size = x, data) // successful
3840WriteValue( index = 5, size = x, data) // successful
3841
3842WriteValue(index = 0) // sets SV -> bGlobalLock to TRUE
3843WriteValue( index = 3, size = x, data) // fails
3844WriteValue( index = 5, size = x, data) // fails
3845…
3846TPM_Startup(ST_Clear) // clears lock
3847WriteValue( index = 3, size = x, data) // successful
3848WriteValue( index = 5, size = x, data) // successful
3849End of informative comment
385028.2

Use of NV storage during manufacturing

3851Start of informative comment
3852The TPM needs the ability to write values to the NV store during manufacturing. It is3853possible that the values written at this time would require authorization during normal TPM
3854use. The actual enforcement of these authorizations during manufacturing would cause
3855numerous problems for the manufacturer.
3856The TPM will not enforce the NV authorization restrictions until the execution of a
3857TPM_NV_DefineSpace with the handle of TPM_NV_INDEX_LOCK.
3858The 'D' bit indicates an NV index defined (typically) during manufacturing and then locked.
3859While nvLocked is FALSE, indices with the 'D' set can be defined, deleted, or redefined as
3860desired. Once nvLocked is set TRUE, the 'D' bit indices are locked. They cannot be defined,
3861deleted or redefined.
3862nvLocked has the lifetime of the endorsement key.
3863End of informative comment
38641. The TPM MUST NOT enforce the NV authorizations (auth values, PCR etc.) prior to the
3865
execution of TPM_NV_DefineSpace with an index of TPM_NV_INDEX_LOCK

615Revision 116 1 Marchy 2011
616

TCG Published
TCG Published

125617Copyright © TCG
618

3866
3867

619
620

TPM Main Part 1 Design Principles
Specification Version 1.2

a. While the TPM is not enforcing NV authorizations, the TPM SHALL allow the use of
TPM_NV_DefineSpace in any operational state (disabled, deactivated)

126

TCG Published
TCG Published

Revision 116 1 Marchy 2011

621TPM Main Part 1 Design Principles

TCG © Copyright

622Specification Version 1.2

623

386829.
Delegation Model
3869Start of informative comment
3870The TPM Owner is an entity with a single “super user” privilege to control TPM operation.
3871Thus if any aspect of a TPM requires management, the TPM Owner must perform that task
3872himself or reveal his privilege information to another entity. This other entity thereby
3873obtains the privilege to operate all TPM controls, not just those intended by the Owner.
3874Therefore the Owner often must have greater trust in the other entity than is strictly
3875necessary to perform an arbitrary task.
3876This delegation model addresses this issue by allowing delegation of individual TPM Owner
3877privileges (the right to use individual Owner authorized TPM commands) to individual
3878entities, which may be trusted processes.
3879Basic requirements:
3880Consumer user does not need to enter or remember a TPM Owner password. This is an3881ease of use and security issue. Not remembering the password may lead to bad security
3882practices, increased tech support calls and lost data.
3883Role based administration and separation of duty. It should be possible to delegate just3884enough Owner privileges to perform some administration task or carry out some duty,
3885without delegating all Owner privileges.
3886TPM should support multiple trusted processes. When a platform has the ability to load
3887and execute multiple trusted processes then the TPM should be able to participate in the
3888protection of secrets and proper management of the processes and their secrets. In fact, the3889TPM most likely is the root of storage for these values. The TPM should enable the proper
3890management, protection and distribution of values held for the various trusted processes
3891that reside on the same platform.
3892Trusted processes may require restrictions. A fundamental security tenet is the principle
3893of least privilege, that is, to limit process functionality to only the functions necessary to
3894accomplish the task. This delegation model provides a building block that allows a system
3895designer to create single purpose processes and then ensure that the process only has
3896access to the functions that it requires to complete the task.
3897Maintain the current authorization structure and protocols. There is no desire to3898remove the current TPM Owner and the protocols that authorize and manage the TPM
3899Owner. The capabilities are a delegation of TPM Owner responsibilities. The delegation
3900allows the TPM Owner to delegate some or all of the actions that a TPM Owner can perform.
3901The TPM Owner has complete control as to when and if the capability delegation is in use.
3902End of informative comment
390329.1

Table Requirements

3904Start of informative comment
3905No ocean front property in table – We want the table to be virtually unlimited in size.
3906While we need some storage, we do not want to pick just one number and have that be the3907min and max. This drives the need for the ability to save, off the TPM, delegation elements.

624Revision 116 1 Marchy 2011
625

TCG Published
TCG Published127626Copyright © TCG
627

TPM Main Part 1 Design Principles
Specification Version 1.2

3908Revoking a delegation, does not affect other delegations – The TPM Owner may, at any
3909time, determine that a delegation is no longer appropriate. The TPM Owner needs to be able
3910to ensure the revocation of all delegations in the same family. The TPM Owner also wants to3911ensure that revocation done in one family does not affect any other family of delegations.
3912Table seeded by OEM – The OEM should do the seeding of the table during manufacturing.
3913This allows the OEM to ship the platform and make it easy for the platform owner to3914startup the first time. The definition of manufacturing in this context includes any time
3915prior to or including the time the user first turns on the platform.
3916Table not tied to a TPM owner – The table is not tied to the existence of a TPM owner. This
3917facilitates the seeding of the table by the OEM.
3918External delegations need authorization and assurance of revocation – When a3919delegation is held external to the TPM, the TPM must ensure authorization of the delegation
3920when loading the delegation. Upon revocation of a family or other family changes the TPM
3921must ensure that prior valid delegations are not successfully loaded.
392290% case, no need for external store – The normal case should be that the platform does
3923not need to worry about having external delegations. This drives the need for some NV
3924storage to hold a minimum number of table rows.
3925End of informative comment
392629.2

How this works

3927Start of informative comment
3928The existing TPM owner authorization model is that certain TPM commands require the3929authorization of the TPM Owner to operate. The authorization value is the TPM Owners
3930token. Using the token to authorize the command is proof of TPM Ownership. There is only
3931one token and knowledge of this token allows all operations that require proof of TPM
3932Ownership.
3933This extension allows the TPM Owner to create a new AuthData value and to delegate some3934of the TPM Ownership rights to the new AuthData value.
3935The use model of the delegation is to create an authorization session (DSAP) using the3936delegated AuthData value instead of the TPM Owner token. This allows delegation to work
3937without change to any current command.
3938The intent is to permit delegation of selected Owner privileges to selected entities, be they3939local or remote, separate from the current software environment or integrated into the
3940current software environment. Thus Owner privileges may be delegated to entities on other3941platforms, to entities (trusted processes) that are part of the normal software environment
3942on the Owner’s platform, or to a minimalist software environment on the Owner’s platform
3943(created by booting from a CDROM, or special disk partition), for example.
3944Privileges may be delegated to a particular entity via definition of a particular process on the
3945Owner’s platform (by dictating PCR values), and/or by stipulating a particular AuthData3946value. The resultant TPM_DELEGATE_OWNER_BLOB and any AuthData value must be
3947passed by the Owner to the chosen entity.
3948Delegation to an external entity (not on the Owner’s platform) probably requires an
3949AuthData value and a NULL PCR selection. (But the AuthData value might be sealed to a
3950desired set of PCRs in that remote platform.)
628
629

128

TCG Published
TCG Published

Revision 116 1 Marchy 2011

630TPM Main Part 1 Design Principles

TCG © Copyright

631Specification Version 1.2

632
3951Delegation to a trusted process provided by the local OS requires a PCR that indicates the3952trusted process. The authorization token should be a fixed value (any well known value),
3953since the OS has no means to safely store the authorization token without sealing that
3954token to the PCR that indicates the trusted process. It is suggested that the value 0x111…
3955111 be used.
3956Delegation to a specially booted entity requires either a PCR or an authorization token, and3957preferably both, to recognize both the process and the fact that the Owner wishes that3958process to execute.
3959The central delegation data structure is a set of tables. These tables indicate the command
3960ordinals delegated by the TPM Owner to a particular defined environment. The tables allow
3961the distinction of delegations belonging to different environments.
3962The TPM is capable of storing internally a few table elements to enable the passing of the3963delegation information from an entity that has no access to memory or storage of the3964defined environment.
3965The number of delegations that the tables can hold is a dynamic number with the
3966possibility of adding or deleting entries at any time. As the total number is dynamic, and3967possibly large, the TPM provides a mechanism to cache the delegations. The cache of a
3968delegation must include integrity and confidentiality. The term for the encrypted cached3969entity is blob. The blob contains a counter (verificationCount) validated when the TPM loads
3970the blob.
3971An Owner uses the counter mechanism to prevent the use of undesirable blobs; they3972increment verificationCount inside the TPM and insert the current value of
3973verificationCount into selected table elements, including temporarily loaded blobs. (This is3974the reason why a TPM must still load a blob that has an incorrect verificationCount.) An
3975Owner can verify the delegation state of his platform (immediately after updating
3976verificationCount) by keeping copies of the elements that have just been given the current
3977value of verificationCount, signing those copies, and sending them to a third party.
3978Verification probably requires interaction with a third party because acceptable table
3979profiles will change with time and the most important reason for verification is suspicion of
3980the state of a TOS in a platform. Such suspicion implies that the verification check must be
3981done by a trusted security monitor (perhaps separate trusted software on another platform
3982or separate trusted software on CDROM, for example). The signature sent to the third party
3983must include a freshness value, to prevent replay attacks, and the security monitor must
3984verify that a response from the third party includes that freshness value. In situations
3985where the highest confidence is required, the third party could provide the response by an
3986out-of-band mechanism, such as an automated telephone service with spoken confirmation
3987of acceptability of platform state and freshness value.
3988A challenger can verify an entire family using a single transport session with logging, that3989increments the verification count, updates the verification count in selected blobs, reads the
3990tables and obtains a single transport session signature over all of the blobs in a family.
3991If no Owner is installed, the delegation mechanisms are inoperative and third party
3992verification of the tables is impossible, but tables can still be administered and corrected.
3993(See later for more details.)
3994To perform an operation using the delegation the entity establishes an authorization session
3995and uses the delegated AuthData value for all HMAC calculations. The TPM validates the633Revision 116 1 Marchy 2011
634

TCG Published
TCG Published129

635Copyright © TCG
636

TPM Main Part 1 Design Principles
Specification Version 1.2

3996AuthData value, and in the case of defined environments checks the PCR values. If the3997validation is successful, the TPM then validates that the delegation allows the intended
3998operation.
3999There can be at least two delegation rows stored in non-volatile storage inside a TPM, and4000these may be changed using Owner privilege or delegated Owner privilege. Each delegation
4001table row is a member of a family, and there can be at least eight family rows stored in non4002volatile storage inside a TPM. An entity belonging to one family can be delegated the4003privilege to create a new family and edit the rows in its own family, but no other family.
4004In addition to tying together delegations, the family concept and the family table also
4005provides the mechanism for validation and revocation of exported delegate table rows, as
4006well as the mechanism for the platform user to perform validation of all delegations in a
4007family.
4008End of informative comment
400929.3

Family Table

4010Start of informative comment
4011The family table has three main purposes.
40121 - To provide for the grouping of rows in the TPM_DELEGATE_TABLE; entities identified in
4013delegate table rows as belonging to the same family can edit information in the other4014delegate table rows with the same family ID. This allows a family to manage itself and
4015provides an easier mechanism during upgrades.
40162 - To provide the validation and revocation mechanism for
4017TPM_DELEGATE_ROWS and those stored on the TPM in the delegation table

exported

40183 - To provide the ability to perform validation of all delegations in a family
4019The family table must have eight rows, and may have more. The maximum number of rows
4020is TPM vendor-defined and is available using the TPM_GetCapability command.
4021As the family table has a limited number of rows, there is the possibility that this number
4022could be insufficient. However, the ability to create a virtual amount of rows, like done for4023the TPM_DELEGATE_TABLE would create the need to have all of the validation and4024revocation mechanisms that the family table provides for the delegate table. This could
4025become a recursive process, so for this version of the specification, the recursion stops at
4026the family table.
4027The family table contains four pieces of information: the family ID, the family label, the4028family verification count, and the family flags.
4029The family ID is a 32-bit value that provides a sequence number of the families in use.
4030The family label is a one-byte field that family table manager software would use to help
4031identify the information associated with the family. Software must be able to map the4032numeric value associated with each family to the ASCII-string family name displayable in
4033the user interface.
4034The family verification count is a 32-bit sequence number that identifies the last outside
4035verification and attestation of the family information.

637
638

130

TCG Published
TCG Published

Revision 116 1 Marchy 2011

639TPM Main Part 1 Design Principles

TCG © Copyright

640Specification Version 1.2

641
4036Initialization of the family table occurs by using the TPM_Delegate_Manage command with
4037the TPM_FAMILY_CREATE option.
4038The verificationCount parameter enables a TPM to check that all rows of a family in the4039delegate table are approved (by an external verification process), even if rows have been
4040stored off-TPM.
4041The family flags allow the use and administration of the family table row, and its associated4042delegate table rows.
4043Row contents
4044Family ID – 32-bits
4045Row label – One byte
4046Family verification count – 32-bits
4047Family enable/disable use/admin flags – 32-bits
4048End of informative comment
404929.4

Delegate Table

4050Start of informative comment
4051The delegate table has three main purposes, from the point of view of the TPM. This table
4052holds:
4053The list of ordinals allowable for use by the delegate
4054The identity of a process that can use the ordinal list
4055The AuthData value to use the ordinal list
4056The delegate table has a minimum of two (2) rows; the maximum number of rows is TPM
4057vendor-defined and is available using the TPM_GetCapability command. Each row
4058represents a delegation and, optionally, an assignment of that delegation to an identified
4059trusted process.
4060The non-volatile delegate rows permit an entity to pass delegation rows to a software
4061environment without regard to shared memory between the entity and the software
4062environment. The size of the delegate table does not restrict the number of delegations
4063because TPM_Delegate_CreateOwnerDelegation can create blobs for use in a DSAP session,
4064bypassing the delegate table.
4065The TPM Owner controls the tables that control the delegations, but (recursively) the TPM
4066Owner can delegate the management of the tables to delegated entities. Entities belonging
4067to a particular group (family) of delegation processes may edit delegate table entries that4068belong to that family.
4069After creation of a delegation entry there is no restriction on the use of the delegation in a
4070properly authorized session. The TPM Owner has properly authorized the creation of the4071delegation so the use of the delegation occurs whenever the delegate wishes to use it.
4072The rows of the delegate table held in non-volatile storage are only changeable under TPM
4073Owner authorization.
4074The delegate table contains six pieces of information: PCR information, the AuthData value4075for the delegated capabilities, the delegation label, the family ID, the verification count, and642Revision 116 1 Marchy 2011
643

TCG Published
TCG Published131

644Copyright © TCG
645

TPM Main Part 1 Design Principles
Specification Version 1.2

4076a profile of the capabilities that are delegated to the trusted process identified by the PCR
4077information.
4078Row Elements
4079ASCII label – Label that provides information regarding the row. This is not a sensitive item.
4080Family ID – The family that the delegation belongs to; this is not a sensitive item.
4081Verification count – Specifies the version, or generation, of this row; version validity
4082information is in the family table. This is not a sensitive value.
4083Delegated capabilities – The capabilities granted, by the TPM Owner, to the identified
4084process. This is not a sensitive item.
4085Authorization and Identity
4086The creator of the delegation sets the AuthData value and the PCR selection. The creator is4087responsible for the protection and dissemination of the AuthData value. This is a sensitive
4088value.
4089End of informative comment
40901. The TPM_DELEGATE_TABLE MUST have at least two (2) rows; the maximum number of4091
table rows is TPM-vendor defined and MUST be reported in response to a
4092
TPM_GetCapability command
40932. The AuthData value and the PCR selection must be set by the creator of the delegation
409429.5

Delegation Administration Control

4095Start of informative comment
4096The delegate tables (both family and delegation) present some control problems. The tables
4097must be initialized by the platform OEM, administered and controlled by the TPM Owner,
4098and reset on changes of TPM Ownership. To provide this level of control there are three
4099phases of administration with different functions available in the phases.
4100The three phases of table administration are; manufacturing (P1), no-owner (P2) and owner4101present (P3). These three phases allow different types of administration of the delegation
4102tables.
4103Manufacturing (P1)4104A more accurate definition of this phase is open, un-initialized and un-owned. It occurs
4105after TPM manufacturing and as a result of TPM_OwnerClear or TPM_ForceClear.
4106In P1 TPM_Delegate_Manage can initialize and manage non-volatile family rows in the TPM.
4107TPM_Delegate_LoadOwnerDelegation can load non-volatile delegation rows in the TPM.
4108Attacks that attempt to burnout the TPM’s NV storage are frustrated by the NV store’s own
4109limits on the number of writes when no Owner is installed.
4110No-Owner (P2)4111This phase occurs after the platform has been properly setup. The setup can occur in the
4112platform manufacturing flow, during the first boot of the platform or at any time when the4113platform owner wants to lock the table settings down. There is no TPM Owner at this time.

646
647

132

TCG Published
TCG Published

Revision 116 1 Marchy 2011

648TPM Main Part 1 Design Principles

TCG © Copyright

649Specification Version 1.2

6504114TPM_Delegate_Manage locks both the family and delegation rows. This lock can be opened
4115only by the Owner (after the Owner has been installed, obviously) or by the act of removing
4116the Owner (even if no Owner is installed). Thus locked tables can be unlocked by asserting
4117Physical Presence and executing TPM_ForceClear, without having to install an Owner.
4118In P2, the relevant TPM_Delegate_xxx commands all return the error
4119TPM_DELEGATE_LOCKED. This is not an issue as there is no TPM Owner to delegate
4120commands, so the inability to change the tables or create delegations does not affect the
4121use of the TPM.
4122Owned (P3)4123In this phase, the TPM has a TPM Owner and the TPM Owner manages the table as the
4124Owner sees fit. This phase continues until the removal of the TPM Owner.
4125Moving from P2 to P3 is automatic upon establishment of a TPM Owner. Removal of the4126TPM Owner automatically moves back to P1.
4127The TPM Owner always has the ability to administer any table. The TPM Owner may
4128delegate the ability to manipulate a single family or all families. Such delegations are
4129operative only if delegations are enabled.
4130End of informative comment
41311. When DelegateAdminLock is TRUE the TPM MUST disallow any changes to the delegate
4132
tables41332. With a TPM Owner installed, the TPM Owner MUST authorize all delegate table changes
413429.5.1

Control in Phase 1

4135Start of informative comment
4136The TPM starts life in P1. The TPM has no owner and the tables are empty. It is desirable
4137for the OEM to initialize the tables to allow delegation to start immediately after the Owner
4138decides to enable delegation. As the setup may require changes and validation, a simple
4139mechanism of writing to the area once is not a valid option.
4140TPM_Delegate_Manage and TPM_Delegate_LoadOwnerDelegation allow the OEM to fill the
4141table, read the public parts of the table, perform reboots, reset the table and when finally4142satisfied as to the state of the platform, lock the table.
4143Alternatively, the OEM can leave the tables NULL and turn off table administration leaving
4144the TPM in an unloaded state waiting for the eventual TPM Owner to fill the tables, as they
4145need.
4146Flow to load tables
4147Default values of DelegateAdminLock are set either during manufacturing or are the result
4148of TPM_OwnerClear or TPM_ForceClear.
4149TPM_Delegate_Manage verifies that DelegateAdminLock is FALSE and that there is no TPM
4150Owner. The command will therefore load or manipulate the family tables as specified in the
4151command.
4152TPM_Delegate_LoadOwnerDelegation verifies that DelegateAdminLock is FALSE and no TPM
4153owner is present. The command loads the delegate information specified in the command.

651Revision 116 1 Marchy 2011
652

TCG Published
TCG Published133653Copyright © TCG
654

TPM Main Part 1 Design Principles
Specification Version 1.2

4154End of informative comment
415529.5.2

Control in Phase 24156Start of informative comment
4157In phase 2, no changes are possible to the delegate tables. The platform owner must install
4158a TPM Owner and then manage the tables, or use TPM_ForceClear to revert to phase 1.
4159End of informative comment
416029.5.3

Control in Phase 3

4161Start of informative comment
4162The TPM_DELEGATE_TABLE requires commands that manage the table. These commands
4163include filling the table, turning use of the table on or off, turning administration of the
4164table on or off, and using the table.
4165The commands are:
4166TPM_Delegate_Manage – Manages the family table on a row-by-row basis: creates a new
4167family, enables/disables use of a family table row and delegate table rows that share the4168same family ID, enables/disables administration of a family’s rows in both the family table
4169and the delegate table, and invalidates an existing family.
4170TPM_Delegate_CreateOwnerDelegation increments the family verification count (if4171desired) and delegates the Owner’s privilege to use a set of command ordinals, by creating a
4172blob.
Such
blobs
can
be
used
as
input
data
for
TPM_DSAP
or
4173TPM_Delegate_LoadOwnerDelegation. Incrementing the verification count and creating a
4174delegation must be an atomic operation. Otherwise no delegations are operative after
4175incrementing the verification count.
4176TPM_Delegate_LoadOwnerDelegation loads a delegate blob into a non-volatile delegate
4177table row, inside the TPM.
4178TPM_Delegate_ReadTable is used to read from the TPM the public contents of the family
4179and delegate tables that are stored on the TPM.
4180TPM_Delegate_UpdateVerification sets the verificationCount in an entity (a blob or a
4181delegation row) to the current family value, in order that the delegations represented by that4182entity will continue to be accepted by the TPM.
4183TPM_Delegate_VerifyDelegation loads a delegate blob into the TPM, and returns success4184or failure, depending on whether the blob is currently valid.
4185TPM_DSAP – opens a deferred authorization session, using either an input blob (created by
4186TPM_Delegate_CreateOwnerDelegation)oracachedblob(loadedby
4187TPM_Delegate_LoadOwnerDelegation into one of the TPM’s non-volatile delegation rows).
4188End of informative comment
418929.6

Family Verification

4190Start of informative comment
4191The platform user may wish to have confirmation that the delegations in use provide a
4192coherent set of delegations. This process would require some evaluation of the processes
655
656

134

TCG Published
TCG Published

Revision 116 1 Marchy 2011

657TPM Main Part 1 Design Principles

TCG © Copyright

658Specification Version 1.2

6594193granted delegations. To assist in this confirmation the TPM provides a mechanism to group4194all delegations of a family into a signed blob. The signed blob allows the verification agent to4195look at the delegations, the processes involved and make an assessment as the validity of
4196the delegations. The third party then sends back to the platform owner the results of the
4197assessment.
4198To perform the creation of the signed blob the platform owner needs the ability to group all
4199of the delegations of a single family into a transport session. The platform owner also wants
4200an assurance that no management of the table is possible during the verification.
4201This verification does not prove to a third party that the platform owner is not cheating.
4202There is nothing to prevent the platform owner from performing the validation and then4203adding an additional delegation to the family.
4204Here is one example protocol that retrieves the information necessary to validate the rows
4205belonging to a particular family. Note that the local method of executing the protocol must
4206prevent a man-in-the-middle attack using the nonce supplied by the user.
4207The TPM Owner can increment the family verification count or use the current family
4208verification count. Using the current family verification count carries the risk that
4209unexamined delegation blobs permit undesirable delegations. Using an incremented
4210verification count eliminates that risk. The entity gathering the verification data requires
4211Owner authorization or access to a delegation that grants access to transport session
4212commands, plus other commands depending on whether verificationCount is to be
4213incremented. This delegation could be a trusted process that can use the delegations
4214because of its PCR measurements, a remote entity that can use the delegations because the4215Owner has sent it a TPM_DELEGATE_OWNER_BLOB and AuthData value, or the host
4216platform booted from a CDROM that can use the delegations because of its PCR
4217measurements, and TPM_DELEGATE_OWNER_BLOB and AuthData value submitted by the
4218Owner, for example.
4219Verification using the current verificationCount
4220The gathering entity requires access to a delegation that grants access to at least the
4221ordinals to perform a transport session, plus TPM_Delegate_ReadTable and4222TPM_Delegate_VerifyDelegation.
4223The TPM Owner creates a transport session with the “no other activity” attribute set. This4224ensures notification if other operations occur on the TPM during the validation process. (If4225other operations do occur, the validation processes may have been subverted.) All
4226subsequent commands listed are performed using the transport session.
4227TPM_Delegate_ReadTable displays all public values (including the permissions and PCR
4228values) in the TPM.
4229TPM_Delegate_VerifyDelegation loads each cached blob, with all public values (including the4230permissions and PCR values) in plain text.
4231After verifying all blobs, TPM_ReleaseTransportSigned signs the list of transactions.
4232The gathering entity sends the log of the transport session plus any supporting information
4233to the validation entity, which evaluates the signed transport session log and informs the4234platform owner of the result of the evaluation. This could be an out-of-band process.
4235Verification using an incremented verificationCount

660Revision 116 1 Marchy 2011
661

TCG Published
TCG Published135

662Copyright © TCG
663

TPM Main Part 1 Design Principles
Specification Version 1.2

4236The gathering entity requires Owner authorization or access to a delegation that grants
4237access to at least the ordinals to perform a transport session, plus
4238TPM_Delegate_CreateOwnerDelegation,
TPM_Delegate_ReadTable,
and4239TPM_Delegate_UpdateVerification.
4240The TPM Owner creates a transport session with the “no other activity” attribute set.
4241To increment the count the TPM Owner (or a delegate) must use
4242TPM_Delegate_CreateOwnerDelegation with increment == TRUE. That blob permits creation
4243of new delegations or approval of existing tables and blobs. That delegation must set the4244PCRs of the desired (local) process and the desired AuthData value of the process. As noted
4245previously, AuthData values should be a fixed value if the gathering entity is a trusted
4246process that is part of the normal software environment.
4247If new delegations are to be created, TPM_Delegate_CreateOwnerDelegation must be used
4248with increment == FALSE.
4249Ifexisting
blobs
anddelegation
rows
are
to
be
reapproved,
4250TPM_Delegate_UpdateVerification must be used to install the new value of verificationCount4251into those existing blobs and non-volatile rows. This exposes the blobs’ public information
4252(including the permissions and PCR values) in plain text to the transport session.
4253TPM_Delegate_ReadTable then exposes all public values (including the permissions and4254PCR values) of tables to the transport session.
4255Again, after verifying all blobs, TPM_ReleaseTransportSigned signs the list of transactions.
4256 End of informative comment
425729.7

Use of commands for different states of TPM

4258Start of informative comment
4259Use the ordinal table to determine when the various commands are available for use
4260End of informative comment
426129.8

Delegation Authorization Values

4262Start of informative comment
4263This section describes why, when a PCR selection is set, the AuthData value may be a fixed
4264value, and, when the PCR selection is null, the delegation creator must select an AuthData4265value.
4266A PCR value is an indication of a particular (software) environment in the local platform.
4267Either that PCR value indicates a trusted process or not. If the trusted process is to execute4268automatically, there is no point in allocating a meaningful AuthData value. (The only way
4269the trusted process could store the AuthData value is to seal it to the process’s PCR values,
4270but the delegation mechanism is already checking the process’s PCR values.) If execution of
4271the trusted process is dependent upon the wishes of another entity (such as the Owner), the4272AuthData value should be a meaningful (private) value known only to the TPM, the Owner,
4273and that other entity. Otherwise the AuthData value should be a fixed, well known, value.
4274If the delegation is to be controlled from a remote platform, these simple delegation
4275mechanisms provide no means for the platform to verify the PCRs of that remote platform,
664
665

136

TCG Published
TCG Published

Revision 116 1 Marchy 2011

666TPM Main Part 1 Design Principles

TCG © Copyright

667Specification Version 1.2

6684276and hence access to the delegation must be based solely upon knowledge of the AuthData4277value.
4278End of informative comment
427929.8.1

Using the authorization value

4280Start of informative comment
4281To use a delegation the TPM will enforce any PCR selection on use. The use definition is any
4282command that uses the delegation authorization value to take the place of the TPM Owner
4283authorization.
4284PCR Selection defined
4285In this case, the delegation has a PCR selection structure defined. Each time the TPM uses
4286the delegation authorization value instead of the TPM Owner value the TPM would validate
4287that the current PCR settings match the settings held in the delegation structure. The PCR
4288selection includes the definition of localities and checks of locality occur with the checking
4289of the PCR values. The TPM enforces use of the correct authorization value, which may or
4290may not be a meaningful (private) value.
4291PCR selection NULL
4292In this case, the delegation has no PCR selection structure defined. The TPM does not
4293enforce any particular environment before using the authorization value. Mere knowledge of
4294the value is sufficient.
4295End of informative comment
429629.9

DSAP description

4297Start of informative comment
4298The DSAP opens a deferred auth session, using either a TPM_DELEGATE_BLOB as input
4299parameter or a reference to the TPM_DELEGATE_TABLE_ROW, stored inside the TPM. The
4300DSAP command creates an ephemeral secret to authenticate a session. The purpose of this4301section is to illustrate the delegation of user keys or TPM Owner authorization by creating
4302and using a DSAP session without regard to a specific command.
4303A key defined for a certain usage (e.g. TPM_KEY_IDENTITY) can be applied to different
4304functions within the use model (e.g. TPM_Quote or TPM_CertifiyKey). If an entity knows the4305AuthData for the key (key.usageAuth) it can perform all the functions, allowed for that use
4306model of that particular key. This entity is also defined as delegation creation entity, since it
4307can initiate the delegation process. Assume that a restricted usage entity should only be
4308allowed to execute a subset or a single functions denoted as TPM_Example, within the4309specific use model of a key. (e.g. Allow the usage of a TPM_IDENTITY_KEY only for
4310Certifying Keys, but no other function). This use model points to the selection of the DSAP
4311as the authorization protocol to execute the TPM_Example command.
4312To perform this scenario the delegation creation entity must know the AuthData for the key
4313(key.usageAuth). It then has to initiate the delegation by creating a
4314TPM_DELEGATE_KEY_BLOB via the TPM_Delegate_CreateKeyDelegation command. As a
4315next step the delegation creation entity has to pass the TPM_DELEGATE_KEY_BLOB and
4316the delegation AuthData (TPM_DELEGATE_SENSITIVE.authValue) to the restricted usage
669Revision 116 1 Marchy 2011
670

TCG Published
TCG Published137671Copyright © TCG
672

TPM Main Part 1 Design Principles
Specification Version 1.2

4317entity. The specification offers the TPM_DelTable_ReadAuth mechanism to perform this4318function. Other mechanisms may be used.
4319The restricted usage entity can now start an TPM_DSAP session by using the
4320TPM_DELEGATE_KEY_BLOB as input.
4321For the TPM_Example command, the inAuth parameter provides the authorization to4322execute the command. The following table shows the commands executed, the parameters4323created and the wire formats of all of the information.
4324<inParamDigest> is the result of the following calculation: SHA1(ordinal, inArgOne,
4325inArgTwo). <outParamDigest> is the result of the following calculation: SHA1(returnCode,4326ordinal, outArgOne). inAuthSetupParams refers to the following parameters, in this order:
4327authLastNonceEven, nonceOdd, continueAuthSession. OutAuthSetupParams refers to the4328following parameters, in this order: nonceEven, nonceOdd, continueAuthSession
4329In addition to the two even nonces generated by the TPM (authLastNonceEven and
4330nonceEven) that are used for TPM_OIAP, there is a third, labeled nonceEvenOSAP that is4331used to generate the shared secret. For every even nonce, there is also an odd nonce
4332generated by the system.

673
674

138

TCG Published
TCG Published

Revision 116 1 Marchy 2011

675TPM Main Part 1 Design Principles

TCG © Copyright

676Specification Version 1.2

677
4333

CallerOn the wire

Dir

TPM

Send TPM_DSAP

TPM_DSAP

Decrypt sensitiveArea of entityValue

keyHandle

If entityValue==TPM_ET_DEL_BLOB verify the integrity of the blob,and if a TPM_DELEGATE_KEY_BLOB is input verify that KeyHandle
and entityValue match

nonceOddOSAP
entityType

Create session & authHandle

entityValue

Generate authLastNonceEven
Save authLastNonceEven with authHandle
Generate nonceEvenOSAP
Generate sharedSecret = HMAC(sensitiveArea.authValue.,nonceEvenOSAP, nonceOddOSAP)
Save keyHandle, sharedSecret with authHandle and permissions

Save authHandle, authLastNonceEven
Generate sharedSecret =HMAC(sensitiveArea.authValue,
nonceEvenOSAP, nonceOddOSAP)ReturnsparamSize

Verify authHandle points to a valid session, mismatch returns
TPM_AUTHFAIL

ordinalRetrieve authLastNonceEven from internal session storage

inArgOne

HM = HMAC (sharedSecret, inParamDigest, inAuthSetupParams)

inArgTwo

Compare HM to inAuth. If they do not compare return with
TPM_AUTHFAIL

authHandle,
authLastNonceEven
nonceEvenOSAP

Save sharedSecretGenerate nonceOdd & save with
authHandle.
Compute inAuth = HMAC (sharedSecret,inParamDigest, inAuthSetupParams)
Send TPM_Example

tag

authHandle

Check if command ordinal of TPM_Example is allowed inpermissions. If not return TPM_DISABLED_CMD

nonceOdd
continueAuthSession

Execute TPM_Example and create returnCode

inAuthGenerate nonceEven to replace authLastNonceEven in session
Set resAuth = HMAC(sharedSecret, outParamDigest,outAuthSetupParams)

Save nonceEven

tag

HM = HMAC( sharedSecret,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOneReturn output parameters
If continueAuthSession is FALSE then destroy session

returnCode
nonceEven
continueAuthSession
resAuth4334

678Revision 116 1 Marchy 2011
679

TCG Published
TCG Published139680Copyright © TCG
681

TPM Main Part 1 Design Principles
Specification Version 1.2

4335
4336Suppose now that the TPM user wishes to send another command using the same session
4337to operate on the same key. For the purposes of this example, we will assume that the same4338ordinal is to be used (TPM_Example). To re-use the previous session, the4339continueAuthSession output boolean must be TRUE.
4340The following table shows the command execution, the parameters created and the wire
4341formats of all of the information.
4342In this case, authLastNonceEven is the nonceEven value returned by the TPM with the4343output parameters from the first execution of TPM_Example.
CallerOn the wire

Dir

TPM

tag



Retrieve authLastNonceEven from internal session storage

Generate nonceOdd
Compute inAuth = HMAC (sharedSecret,inParamDigest, inAuthSetupParams)
Save nonceOdd with authHandle
Send TPM_Example

paramSize

HM = HMAC (sharedSecret, inParamDigest, inAuthSetupParams)

ordinalinArgOne

Compare HM to inAuth. If they do not compare return with
TPM_AUTHFAIL

inArgTwo

Execute TPM_Example and create returnCode

nonceOdd

Generate nonceEven to replace authLastNonceEven in session

continueAuthSession

Set resAuth = HMAC(sharedSecret, outParamDigest,outAuthSetupParams)

inAuthSave nonceEven

tag

HM = HMAC( sharedSecret,outParamDigest, outAuthSetupParams)

paramSize

Compare HM to resAuth. This verifies
returnCode and output parameters.

outArgOneReturn output parameters
If continueAuthSession is FALSE then destroy session

returnCode
nonceEven
continueAuthSession
resAuth

4344
4345The TPM user could then use the session for further authorization sessions or terminate it
4346in the ways that have been described above in TPM_OIAP. Note that termination of the4347DSAP session causes the TPM to destroy the shared secret.
4348End of informative comment
43491. The DSAP session MUST enforce any PCR selection on use. The use definition is any
4350
command that uses the delegation authorization value to take the place of the TPM
4351
Owner authorization.

682
683

140

TCG Published
TCG Published

Revision 116 1 Marchy 2011

684TPM Main Part 1 Design Principles

TCG © Copyright

685Specification Version 1.2

686435230.
Physical Presence
4353Start of informative comment
4354Physical presence is a signal from the platform to the TPM that indicates the operator
4355manipulated the hardware of the platform. Manipulation would include depressing a
4356switch, setting a jumper, depressing a key on the keyboard or some other such action.
4357TCG does not specify an implementation technique. The guideline is the physical presence
4358technique should make it difficult or impossible for rogue software to assert the physical
4359presence signal.
4360A PC-specific physical presence mechanism might be an electrical connection from a switch,
4361or a program that loads during power on self-test.
4362End of informative comment
4363The TPM MUST support a signal from the platform for the assertion of physical presence. A
4364TCG platform specific specification MAY specify what mechanisms assert the physical
4365presence signal.
4366The platform manufacturer MUST provide for the physical presence assertion by some
4367physical mechanism.
436830.1

Use of Physical Presence

4369Start of informative comment
4370For control purposes there are numerous commands on the TPM that require TPM Owner
4371authorization. Included in this group of commands are those that turn the TPM on or off
4372and those that define the operating modes of the TPM. The TPM Owner always has complete
4373control of the TPM. What happens in two conditions: there is no TPM Owner or the TPM
4374Owner forgets the TPM Owner AuthData value. Physical presence allows for an
4375authorization to change the state in these two conditions.
4376No TPM Owner
4377This state occurs when the TPM ships from manufacturing (it can occur at other times
4378also). There is no TPM Owner. It is imperative to protect the TPM from remote software
4379processes that would attempt to gain control of the TPM. To indicate to the TPM that the
4380TPM operating state can change (allow for the creation of the TPM Owner) the human
4381asserts physical presence. The physical presence assertion than indicates to the TPM that4382changing the operating state of the TPM is authorized.
4383Lost TPM Owner authorization
4384In the case of lost, or forgotten, authorization there is a TPM Owner but no way to manage
4385the TPM. If the TPM will only operate with the TPM Owner authorization then the TPM is no4386longer controllable. Here the operator of the machine asserts physical presence and4387removes the current TPM Owner. The assumption is that the operator will then immediately
4388take ownership of the TPM and insert a new TPM Owner AuthData value.
4389Operator disabling

687Revision 116 1 Marchy 2011
688

TCG Published
TCG Published141

689Copyright © TCG
690

TPM Main Part 1 Design Principles
Specification Version 1.2

4390Another use of physical presence is to indicate that the operator wants to disable the use of
4391the TPM. This allows the operator to temporarily turn off the TPM but not change the4392permanent operating mode of the TPM as set by the TPM Owner.
4393End of informative comment

691
692

142

TCG Published
TCG Published

Revision 116 1 Marchy 2011

693TPM Main Part 1 Design Principles

TCG © Copyright

694Specification Version 1.2

695

439431.
TPM Internal Asymmetric Encryption
4395Start of Informative comment
4396For asymmetric encryption schemes, the TPM is not required to perform the blocking of
4397information where that information cannot be encrypted in a single cryptographic
4398operation. The schemes TPM_ES_RSAESOAEP_SHA1_MGF1 and TPM_ES_RSAESPKCSV154399allow only single block encryption. When using these schemes, the caller to the TPM must
4400perform any blocking and unblocking outside the TPM. It is the responsibility of the caller
4401to ensure that multiple blocks are properly protected using a chaining mechanism.
4402Note that there are inherent dangers associated with splitting information so that it can be4403encrypted in multiple blocks with an asymmetric key, and then chaining together these4404blocks together. For example, if an integrity check mechanism is not used, an attacker can
4405encrypt his own data using the public key, and substitute this rogue block for one of the4406original blocks in the message, thus forcing the TPM to replace part of the message upon
4407decryption.
4408There is also a more subtle attack to discover the data encrypted in low-entropy blocks. The
4409attacker makes a guess at the plaintext data, encrypts it, and substitutes the encrypted
4410guess for the original block. When the TPM decrypts the complete message, a successful
4411decryption will indicate that his guess was correct.
4412There are a number of solutions which could be considered for this problem – One such
4413solution for TPMs supporting symmetric encryption is specified in PKCS#7, section 10, and4414involves using the public key to encrypt a symmetric key, then using that symmetric key to4415encrypt the long message.
4416For TPMs without symmetric encryption capabilities, an alternative solution may be to add
4417random padding to each message block, thus increasing the block’s entropy.
4418This normative was deleted, since it contradicted Part 3: “For a TPM_UNBIND command
4419where the parent key has pubKey.algorithmId equal to TPM_ALG_RSA and4420pubKey.encScheme set to TPM_ES_RSAESPKCSv15 the TPM SHALL NOT expect a
4421PAYLOAD_TYPE structure to prepend the decrypted data.” The contradiction was the case4422of a TPM_ES_RSAESPKCSv15 binding key, which does have a payload.
4423End of informative comment
44241. The TPM MUST perform the encryption or decryption in accordance with the4425
specification of the encryption scheme, as described below.
44262. When a null terminated string is included in a calculation, the terminating null SHALL
4427
NOT be included in the calculation.
442831.1.1

TPM_ES_RSAESOAEP_SHA1_MGF1

44291. The encryption and decryption MUST be performed using the scheme RSA_ES_OAEP
4430
defined in [PKCS #1v2.0: 7.1] using SHA1 as the hash algorithm for the encoding
4431
operation.
44322. Encryption
4433

a. The OAEP encoding P parameter MUST be the 4 character string “TCPA”.

696Revision 116 1 Marchy 2011
697

TCG Published
TCG Published143

698Copyright © TCG
699

TPM Main Part 1 Design Principles
Specification Version 1.2

4434
4435

b. While the TCG now controls this specification the string value will NOT change toallow for interoperability and backward compatibility with TCPA 1.1 TPM’s

4436
4437

c. If there is an error with the encryption, the TPM must return the error
TPM_ENCRYPT_ERROR.

44383. Decryption
4439

a. The OAEP decoding P parameter MUST be the 4 character string “TCPA”.

4440
4441

b. While the TCG now controls this specification the string value will NOT change toallow for interoperability and backward compatibility with TCPA 1.1 TPM’s

4442
4443

c. If there is an error with the decryption, the TPM must return the error
TPM_DECRYPT_ERROR.

444431.1.2

TPM_ES_RSAESPKCSV1544451. The encryption MUST be performed using the scheme RSA_ES_PKCSV15 defined in
4446[PKCS #1v2.0: 7.2].
44472. Encryption
4448

a. If there is an error with the encryption, return the error TPM_ENCRYPT_ERROR.

44493. Decryption
4450

a. If there is an error with the decryption, return the error TPM_DECRYPT_ERROR.

445131.1.3

TPM_ES_SYM_CTR

4452Start of informative comment
4453This defines an encryption mode in use with symmetric algorithms. The actual definition is4454at4455http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
4456The underlying symmetric algorithm may be AES128, AES192, or AES256. The definition
4457for these algorithms is in the NIST document Appendix E.
4458The method of incrementing the counter value is different from that used by some standard
4459crypto libraries (e.g. openSSL, Java JCE) that increment the entire counter value. TPM
4460users should be aware of this to avoid errors when the counter wraps.
4461End of informative comment
44621. Given a current counter value, the next counter value is obtained by treating the lower
4463
32 bits of the current counter value as an unsigned 32-bit integer x, then replacing the4464
lower 32 bits of the current counter value with the bits of the incremented integer (x + 1)
4465
mod 2^32. This method is described in Appendix B.1 of the NIST document (m=32).
446631.1.4

TPM_ES_SYM_OFB

4467Start of informative comment
4468This defines an encryption mode in use with symmetric algorithms. The actual definition is4469at4470http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
700
701

144

TCG Published
TCG Published

Revision 116 1 Marchy 2011

702TPM Main Part 1 Design Principles

TCG © Copyright

703Specification Version 1.2

704
4471The underlying symmetric algorithm may be AES128, AES192, or AES256. The definition
4472for these algorithms is in the NIST document Appendix E.
4473End of informative comment
447431.2

TPM Internal Digital Signatures

4475Start of informative comment
4476These values indicate the approved schemes in use by the TPM to generate digital
4477signatures.
4478TPM 1.1 included only _SHA1 keys. These allowed the TPM_Sign command to sign a hash4479with no structure. This signature scheme is retained for backward compatibility.
4480TPM 1.2 added _INFO keys to ensure that a structure, rather than a plain hash, is always
4481signed. For TPM_Sign, this signature scheme signs a new TPM_SIGN_INFO structure.
4482Other ordinals, such as (e.g., TPM_GetAuditDigestSigned, TPM_CertifyKey, TPM_Quote, etc.)
4483inherently sign a structure, so the _SHA1 and _INFO signature schemes produce an
4484identical result.
4485End of informative comment
4486The TPM MUST perform the signature or verification in accordance with the specification of
4487the signature scheme, as described below.
448831.2.1

TPM_SS_RSASSAPKCS1v15_SHA1

4489Start of informative comment
4490This signature scheme prepends an OID to a SHA-1 digest. The OID, as specified in the4491normative, is as follows:
4492PKCS#1 v2.0: 8.1 says to encode the message per PKCS#1 v2.0: 9.2.1.
4493PKCS#1 v2.0: 9.2.1 says to apply the digest and then add the algorithm ID per Section 11.
4494PKCS#1 v2.0: Section 11.2.3 for SHA-1 says4495

{iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 26 }4496and also
4497
For each OID, the parameters field associated with this OID in an
4498shall have type NULL.

AlgorithmIdentifier

4499The DER/BER Guide says that the first sub-identifiers are coded as 40 * value1 + value2.
4500Thus, the OID becomes (with comments):
45010x30 SEQUENCE
45020x21 33 bytes
4503 0x30 SEQUENCE
4504 0x09 9 bytes
4505 0x06 OID
4506 0x05 5 bytes
4507 0x2b 43 = 40 * 1 (iso) + 3 (identified-organization)
4508 0x0e 14 from 11.2.3
4509 0x03 3 from 11.2.3
705Revision 116 1 Marchy 2011
706

TCG Published
TCG Published145

707Copyright © TCG
708

TPM Main Part 1 Design Principles
Specification Version 1.2

4510 0x02 2 from 11.2.3
4511 0x1a 26 from 11.2.3
4512 0x05 NULL (parameters)
4513 0x00 0 bytes
4514 0x04 OCTET
4515 0x14 20 bytes (the SHA-1 digest to follow)
4516End of informative comment
45171. The signature MUST be performed using the scheme RSASSA-PKCS1-v1.5 defined in
4518[PKCS #1v2.0: 8.1] using SHA1 as the hash algorithm for the encoding operation.
451931.2.2

TPM_SS_RSASSAPKCS1v15_DER

4520Start of informative comment
4521This signature scheme is designed to permit inclusion of DER coded information before
4522signing, which is inappropriate for most TPM capabilities
4523End of informative comment
45241. The signature MUST be performed using the scheme RSASSA-PKCS1-v1.5 defined in
4525[PKCS #1v2.0: 8.1]. The caller must properly format the area to sign using the DER
4526
rules. The provided area maximum size is k-11 octets.
45272. TPM_Sign SHALL be the only TPM capability that is permitted to use this signature
4528
scheme. If a capability other than TPM_Sign is requested to use this signature scheme,4529
it SHALL fail with the error code TPM_INAPPROPRIATE_SIG
453031.2.3

TPM_SS_RSASSAPKCS1v15_INFO

4531Start of informative comment
4532This signature scheme is designed to permit signatures on arbitrary information but also
4533protect the signature mechanism from being misused.
4534End of informative comment
45351. The scheme MUST work just as TPM_SS_RSASSAPKCS1v15_SHA1 except in the4536
TPM_Sign command
4537
4538

a. In the TPM_Sign command the scheme MUST use a properly constructed
TPM_SIGN_INFO structure, and hash it before signing453931.2.4

Use of Signature Schemes

4540Start of informative comment
4541The TPM_SS_RSASSAPKCS1v15_INFO scheme is a new addition for 1.2. It causes a new
4542functioning for 1.1 and 1.2 keys. The following details the use of the new scheme and how
4543the TPM handles signatures and hashing
4544End of informative comment
45451. For
commands
that
sign
a
TPM_SIGN_INFO
structure4546(TPM_GetAuditDigestSigned, TPM_TickStampBlob, TPM_ReleaseTransportSigned)

709
710

146

TCG Published
TCG Published(e.g.,

Revision 116 1 Marchy 2011

711TPM Main Part 1 Design Principles

TCG © Copyright

712Specification Version 1.2

713
4547
4548

a. TheTPM
MUSTcreatea
TPM_SIGN_INFO
and
sign
using
TPM_SS_RSASSAPKCS1v15_SHA1 scheme for either _SHA1 or _INFO keys.

the45492. For commands that sign a structure defined by the command (e.g.,
4550(TPM_CMK_CreateTicket,
TPM_CertifyKey,
TPM_CertifyKey2,
TPM_MakeIdentity,
4551
TPM_Quote, TPM_Quote2, TPM_CertifySelfTest, TPM_GetCapabilitySigned)
4552
4553

a. Create the structure as defined by the command and sign using
TPM_SS_RSASSAPKCS1v15_SHA1 scheme for either _SHA1 or _INFO keys.

the45543. For TPM_Sign:
4555

a. Create the structure as defined by the command and key scheme

4556

b. If key->sigScheme is TPM_SS_RSASSAPKCS1v15_SHA1, sign the 20 byte parameter

4557

c. If key->sigScheme is TPM_SS_RSASSAPKCS1v15_DER, sign the DER value.

4558
4559

d. If key->sigScheme is TPM_SS_RSASSAPKCS1v15_INFO, sign any value using the
TPM_SIGN_INFO structure.

45604. When data is signed and the data comes from INSIDE the TPM, the TPM MUST do the4561
hash, and prepend the DER encoding correctly before performing the padding and4562
private key operation.
45635. When data is signed and the data comes from OUTSIDE the TPM, the software, not the4564
TPM, MUST do the hash.
45656. When the TPM knows, or is told by implication, that the hash used is SHA-1, the TPM
4566
MUST prepend the DER encoding correctly before performing the padding and private
4567
key operation
45687. When the TPM does not know, or told by implication, that the hash used is SHA-1, the4569
software, not the TPM) MUST provide the DER encoding to be prepended.
45708. The TPM MUST perform the padding and private key operation in any signing operations
4571
it does.

714Revision 116 1 Marchy 2011
715

TCG Published
TCG Published147

716Copyright © TCG
717

TPM Main Part 1 Design Principles
Specification Version 1.2

457232.
Key Usage Table
4573Start of informative comment
4574Asymmetric keys (e.g., RSA keys) can do two basic functions: sign/verify and4575encrypt/decrypt.
4576TPM_KEY_SIGNING and TPM_KEY_IDENTITY do signature functions.
4577TPM_KEY_STORAGE, TPM_KEY_BIND, TPM_KEY_MIGRATE, and TPM_KEY_AUTHCHANGE
4578do encryption functions.
4579End of informative comment
4580This table summarizes the types of keys associated with a given TPM command.
4581It is the responsibility of each command to check the key usage prior to executing the4582command

IDENTITYxx

x

certKeyinKeyx

TPM_CertifyKey2 (Note 3)

inKey

certKeyx

TPM_CertifySelfTest

key

TPM_ChangeAuth

parentblobx

TPM_ChangeAuthAsymFinish

parentephemeralx

TPM_ChangeAuthAsymStart

idKey

ephemeral

TPM_CMK_ConvertMigration

parentx

TPM_CMK_CreateBlob

parentx

TPM_CMK_CreateKey

parentx

TPM_ConvertMigrationBlob

parentx

TPM_CreateMigrationBlob

parent

TPM_CreateWrapKey

parent

TPM_Delegate_CreateKeyDelegation

key

x

x

x

x

x

x

TPM_DSAP

entity

x

x

x

x

x

x

TPM_EstablishTransport

key

TPM_GetAuditDigestSigned

certKeyx

TPM_GetAuditEventSigned

certKeyx

TPM_GetCapabilitySigned

key

x

148

BIND

TPM_CertifyKey

LEGACY

STORAGE
x

idKey

BIND

SIGNINGx

TPM_ActivateIdentity

718
719

AUTHCHGLEEGACYAUTHCHG

IDENTITY

STORAGExFirst KeySIGNING

Second Key

Name

Second Key

First Key

x

x

x
x
x

x

x

x

x

x

x
2

2

2

2

2

2

2

2

x
x

blob

x

x

x

2

2

2

2

x

x

x
x

x
x

x

TCG Published
TCG Publishedx

Revision 116 1 Marchy 2011

720TPM Main Part 1 Design Principles

TCG © Copyright

721Specification Version 1.2

722

TPM_GetPubKey

key

x

x

x

x

x

x

TPM_KeyControlOwner

key

x

x

x

x

x

TPM_LoadKey2

parent

inKey

x

x

x

x

x

x

TPM_LoadKey

parent

inKey

x

x

x

x

x

x

TPM_MigrateKeymaKey

TPM_OSAP

entityx

TPM_Quote

key

x

x

x

TPM_Quote2

key

x

x

x

TPM_Seal

keyx

TPM_Sealx

keyx

TPM_Sign

key

TPM_UnBind

key

TPM_Unseal

parent

TPM_ReleaseTransportSigned

keyx

TPM_TickStampBlob

key

x

1
x

x

x

x

x

x

x
x

x

x

x

x

4583Notes
45841 – Key is not a storage key but TPM_MIGRATE_KEY
45852 – TPM unable to determine key type
45863 – The order is correct; the reason is to support a single auth version.

723Revision 116 1 Marchy 2011
724

TCG Published
TCG Published149

725Copyright © TCG
726

TPM Main Part 1 Design Principles
Specification Version 1.2

458733.
Direct Anonymous Attestation
4588Start of informative comment
4589TPM_DAA_Join and TPM_DAA_Sign are highly resource intensive commands. They require
4590most of the internal TPM resources to accomplish the complete set of operations. A TPM
4591may specify that no other commands are possible during the join or sign operations. To
4592allow other operations to occur, the TPM does allow the TPM_SaveContext command to save
4593off the current join or sign operation.
4594Operations that occur during a join or sign result in the loss of the join or sign session in
4595favor of the interrupting command.
4596End of informative comment
45971. The TPM MUST support one concurrent TPM_DAA_Join or TPM_DAA_Sign session. The
4598
TPM MAY support additional sessions
45992. The TPM MAY invalidate a join or sign session upon the receipt of any additional
4600
command other than the join/sign or TPM_SaveContext
460133.1

TPM_DAA_JOIN

4602Start of informative comment
4603TPM_DAA_Join creates new JOIN data. If a TPM supports only one JOIN/SIGN operation,
4604TPM_DAA_Join invalidates any previous DAA attestation information inside a TPM. The
4605JOIN phase of a DAA context requires a TPM to communicate with an issuer.
4606TPM_DAA_Join outputs data to be sent to an issuing authority and receives data from that
4607issuing authority. The operation potentially requires several seconds to complete, but is4608done in a series of atomic stages and TPM_SaveContext/TPM_LoadContext can be used to4609cache data off-TPM in between atomic stages.
4610The JOIN process is designed so a TPM will normally receive exactly the same DAA
4611credentials from a given issuer, no matter how many times the JOIN process is executed
4612and no matter whether the issuer changes his keys. This property is necessary because an
4613issuer must give DAA credentials to a platform after verifying that the platform has the4614architecture of a trusted platform. Unless the issuer repeats the verification process, there
4615is no justification for giving different DAA credentials to the same platform. Even after
4616repeating the verification process, the issuer should give replacement (different) DAA
4617credentials only when it is necessary to retire the old DAA credentials. Replacement DAA
4618credentials erase the previous DAA history of the platform, at least as far as the DAA
4619credentials from that issuer are concerned. Replacement might be desirable, as when a
4620platform changes hands, for example, in order to eliminate any association via DAA between
4621the seller and the buyer. On the other hand, replacement might be undesirable, since it
4622enables a rogue to rejoin a community from which he has been barred. Replacement is done4623by submitting a different “count” value to the TPM during a JOIN process. A platform may
4624use any value of “count” at any time, in any order, but only “counts” accepted by the issuer
4625will elicit DAA credentials from that issuer.
4626The TPM is forced to verify an issuer’s public parameters before using an issuer’s public
4627parameters. This verification provides proof that the public parameters (which include a4628public key) were approved by an entity that knows the private key corresponding to that4629public key; in other words that the JOIN has previously been approved by the issuer. This
727
728

150

TCG Published
TCG Published

Revision 116 1 Marchy 2011

729TPM Main Part 1 Design Principles

TCG © Copyright

730Specification Version 1.2

731
4630verification is necessary to prevent an attack by a rogue using a genuine issuer’s public
4631parameters, which could reveal the secret created by the TPM using those public
4632parameters. Verification uses a signature (provided by the issuer) over the public
4633parameters.
4634The exponent of the issuer’s key is fixed at 2^16+1, because this is the only size of exponent
4635that a TPM is required to support. The modulus of the issuer’s public key is used to create
4636the pseudonym with which the TPM contacts the issuer. Hence, the TPM cannot produce
4637the same pseudonym for different issuers (who have different keys). The pseudonym is4638always created using the issuer’s first key, even if the issuer changes keys, in order to4639produce the property described earlier. The issuer proves to the TPM that he has the right
4640to use that first key to create a pseudonym by creating a chain of signatures from the first4641key to the current key, and submitting those signatures to the TPM. The method has the4642desirable property that only signatures and the most recent private key need be retained by
4643the issuer: once the latest link in the signature chain has been created, previous private
4644keys can be discarded.
4645The use of atomic operations minimizes the contiguous time that a TPM is busy with
4646TPM_DAA_Join and hence unavailable for other commands. JOIN can therefore be done as
4647a background activity without inconveniencing a user. The use of atomic operations also
4648minimizes the peak value of TPM resources consumed by the JOIN phase.
4649The use of atomic operations introduces a need for consistency checks, to ensure that the
4650same parameters are used in all atomic operations of the same JOIN process.
4651DAA_tpmSpecific therefore contains a digest of the associated DAA_issuerSettings
4652structure, and DAA_session contains a digest of associated DAA_tpmSpecific and4653DAA_joinSession structures. Each atomic operation verifies digests to ensure use of
4654mutually consistent sets of DAA_issuerSettings, DAA_tpmSpecific, DAA_session, and
4655DAA_joinSession data.
4656JOIN operations and data structures are designed to minimize the amount of data that
4657must be stored on a TPM in between atomic operations, while ensuring use of mutually4658consistent sets of data. Digests of public data are held in the TPM between atomic
4659operations, instead of the actual public data (if a digest is smaller than the actual data). In
4660each atomic operation, consistency checks verify that any public data loaded and used in
4661that operation matches the stored digest. Thus non-secret DAA_generic_X parameters
4662(loaded into the TPM only when required), are checked using digests DAA_digest_X4663(preloaded into the TPM in the structure DAA_issuerSettings).
4664JOIN includes a challenge from the issuer, in order to defeat simple Denial of Service4665attacks on the issuer’s server by rogues pretending to be arbitrary TPMs.
4666A first group of atomic operations generate all TPM-data that must be sent to the issuer.
4667The platform performs other operations (that do not need to be trusted) using the TPM-data,
4668and sends the resultant data to the issuer. The issuer sends values u2 and u3 back to the4669TPM. A second group of atomic operations accepts this data from the issuer and completes
4670the protocol.
4671The TPM outputs encrypted forms of DAA_tpmSpecific, v0 and v1. These encrypted data are
4672later interpreted by the same TPM and not by any other entity, so any manufacturer4673specific wrapping can be used. It is suggested, however, that enc(DAA_tpmSpecific) or
4674enc(v0) or enc(v1) data should be created by adapting a TPM_CONTEXT_BLOB structure.

732Revision 116 1 Marchy 2011
733

TCG Published
TCG Published151

734Copyright © TCG
735

TPM Main Part 1 Design Principles
Specification Version 1.2

4675After executing TPM_DAA_Join, it is prudent to perform TPM_DAA_Sign, to verify that the
4676JOIN process completed correctly. A host platform may choose to verify JOIN by performing
4677TPM_DAA_Sign as both the target and the verifier (or could, of course, use an external
4678verifier).
4679End of informative comment
468033.2

TPM_DAA_Sign

4681Start of informative comment
4682TPM_DAA_Sign responds to a challenge and proves the attestation held by a TPM without
4683revealing the attestation held by that TPM. The operation is done in a series of atomic
4684stages to minimize the contiguous time that a TPM is busy and hence unavailable for other4685commands. TPM_SaveContext can be used to save a DAA context in between atomic stages.
4686This enables the response to the challenge to be done as a background activity without
4687inconveniencing a user, and also minimizes the peak value of TPM resources consumed by
4688the process.
4689The use of atomic operations introduces a need for consistency checks, to ensure that the
4690same parameters are used in all atomic operations of the same SIGN process.
4691DAA_tpmSpecific therefore contains a digest of the associated DAA_issuerSettings
4692structure, and DAA_session contains a digest of associated DAA_tpmSpecific structure.
4693Each atomic operation verifies these digests and hence ensures use of mutually consistent4694sets of DAA_issuerSettings, DAA_tpmSpecific, and DAA_session data.
4695SIGN operations and data structures are designed to minimise the amount of data that
4696must be stored on a TPM in between atomic operations, while ensuring use of mutually
4697consistent sets of data. Digests of public and private data are held in the TPM between
4698atomic operations, instead of the actual public or private data (if a digest is smaller than the
4699actual data). At each atomic operation, consistency checks verify that any data loaded and
4700used in that operation matches the stored digest. Thus parameters DAA_digest_X are
4701digests (preloaded into the TPM in the structure DAA_issuerSettings) of non-secret
4702DAA_generic_X parameters (loaded into the TPM only when required), for example.
4703The design enables the use of any number of issuer DAA-data, private DAA-data, and so on.
4704Strictly, the design is that the *TPM* puts no limit on the number of sets of issuer DAA-data
4705or sets of private DAA-data, or restricts what set is in the TPM at any time, but supports
4706only one DAA-context in the TPM at any instant. Any number of DAA-contexts can, of
4707course, be swapped in and out of the TPM using TPM_SaveContext/TPM_LoadContext, so
4708applications do not perceive a limit on the number of DAA contexts.
4709TPM_DAA_Sign accepts a freshness challenge from the verifier and generates all TPM-data
4710that must be sent to the verifier. The platform performs other operations (that do not need
4711to be trusted) using the TPM-data, and sends the resultant data to the verifier. At one stage,
4712the TPM incorporates a loaded public (non-migratable) key into the protocol. This is4713intended to permit the setup of a session, for any specific purpose, including doing the4714same job in TPM_ActivateIdentity as the EK.
4715End of informative comment
471633.3

DAA Command summary

4717Start of informative comment
736
737

152

TCG Published
TCG Published

Revision 116 1 Marchy 2011

738TPM Main Part 1 Design Principles

TCG © Copyright

739Specification Version 1.2

740
4718The following is a conceptual summary of the operations that are necessary to setup a TPM
4719for DAA, execute the JOIN process, and execute the SIGN process.
4720The summary is partitioned according to the “stages” of the actual TPM commands. Thus,
4721the operations listed in JOIN under stage-2 briefly describe the operation of TPM_DAA_Join
4722at stage-2, for example.
4723This summary is in place to help in the connection between the mathematical definition of
4724DAA and this implementation in a TPM.
4725End of informative comment
472633.3.1

TPM setup47271. A TPM generates a TPM-specific secret S (160-bit) from the RNG and stores S in
4728
nonvolatile store on the TPM. This value will never be disclosed and changed by the
4729
TPM.
473033.3.2

JOIN

4731Start of informative comment
4732This entire section is informative
47331. When the following is performed, this process does not increment the stage counter.
4734a. TPM imports a non-secret values n0 (2048-bit).
4735b. TPM computes a non-secret value N0 (160-bit) = H(n0).
4736c. TPM computes a TPM-specific secret DAA_rekey (160-bit) = H(S, H(n0)).
4737d. TPM stores a self-consistent set of (N0, DAA_rekey)
47382. The following is performed 0 or several times: (Note: If the stage mechanism is being
4739used, then this branch does not increment the stage counter.)
4740a. TPM imports
4741i. a self consistent set of (N0, DAA_rekey)
4742ii. a non-secret value DAA_SEED_KEY (2048-bit)
4743iii. a non-secret value DEPENDENT_SEED_KEY (2048-bit)
4744iv. a non-secret value SIG_DSK (2048-bit)
4745b. TPM computes DIGEST (160-bit) = H(DAA_SEED_KEY)
4746c. If DIGEST != N0, TPM refuses to continue
4747d. If DIGEST == N0, TPM verifies validity of signature SIG_DSK on
4748DEPENDENT_SEED_KEY with key (DAA_SEED_KEY, e0 (= 2^16 + 1)) by using
4749TPM_Sign_Verify (based on PKCS#1 2.0). If check fails, TPM refuses to continue.
4750e. TPM sets N0 = H(DEPENDENT_SEED_KEY)
4751f. TPM stores a self consistent set of (N0, DAA_JOIN)
47523. Stage 24753a. TPM imports a set of values, including
741Revision 116 1 Marchy 2011
742

TCG Published
TCG Published153

743Copyright © TCG
744

TPM Main Part 1 Design Principles
Specification Version 1.2

4754i. a non-secret value n0 (2048-bit),
4755ii. a non-secret value R0 (2048-bit),
4756iii. a non-secret value R1 (2048-bit),
4757iv. a non-secret value S0 (2048-bit),
4758v. a non-secret value S1 (2048-bit),
4759vi. a non-secret value n (2048-bit),
4760vii. a non-secret value n1 (1024-bit),
4761viii.

a non-secret value gamma (2048-bit),

4762ix. a non-secret value q (208-bit),
4763x. a non-secret value COUNT (8-bit),
4764xi. a self consistent set of (N0, DAA_rekey).
4765xii. TPM saves them as part of a new set A.
4766b. TPM computes DIGEST (160-bit) = H(n0)4767c. If DIGEST != N0, TPM refuses to continue.
4768d. If DIGEST == N0, TPM computes DIGEST (160-bit) = H(R0, R1, S0, S1, n, n1, Γ, q)4769e. TPM imports a non-secret value SIG_ISSUER_KEY (2048-bit).
4770f. TPM verifies validity of signature SIG_ISSUER_KEY (2048-bit) on DIGEST with key (n0,4771e0) by using TPM_Sign_Verify (based on PKCS#1 2.0). If check fails, TPM refuses to4772continue.
4773g. TPM computes a TPM-specific secret f (208-bit) = H(DAA_rekey, COUNT, 0)||4774H(DAA_rekey, COUNT, 1) mod q.
4775h. TPM computes a TPM-specific secret f0 (104-bit) = f mod 2104.
4776i. TPM computes a TPM-specific secret f1 (104-bit) = f >> 104.
4777j. TPM save f, f0 and f1 as part of set A.
47784. Stage 34779a. TPM generates a TPM-specific secret u0 (1024-bit) from the RNG.
4780b. TPM generates a TPM-specific secret u'1 (1104-bit) from the RNG.
4781c. TPM computes u1 (1024-bit) = u'1 mod n1.
4782d. TPM stores u0 and u1 as part of set A.
47835. Stage 44784a. TPM computes a non-secret value P1 (2048-bit) = (R0^f0) mod n and stores P1 as part of4785set A.
47866. Stage 54787a. TPM computes a non-secret value P2 (2048-bit) = P1*(R1^f1) mod n, stores P2 as part of4788set A and erases P1 from set A.
47897. Stage 6
745
746

154

TCG Published
TCG Published

Revision 116 1 Marchy 2011

747TPM Main Part 1 Design Principles

TCG © Copyright

748Specification Version 1.2

749
4790a. TPM computes a non-secret value P3 (2048-bit) = P2*(S0^u0) mod n, stores P3 as part of4791set A and erases P2 from set A.
47928. Stage 74793a. TPM computes a non-secret value U (2048-bit) = P3*(S1^u1) mod n.
4794b. TPM erases P3 from set A
4795c. TPM computes and saves U1 (160-bit) = H(U||COUNT||N0) as part of set A.
4796d. TPM exports U.
47979. Stage 84798a. TPM imports ENC_NE (2048-bit).
4799b. TPM decrypts NE (160-bit) from ENC_NE (2048-bit) by using privEK: NE =4800decrypt(privEK, ENC_NE).
4801c. TPM computes U2 (160-bit) = H(U1||NE).
4802d. TPM erases U1 from set A.
4803e. TPM exports U2.
480410.Stage 94805a. TPM generates a TPM-specific secret r0 (344-bit) from the RNG.
4806b. TPM generates a TPM-specific secret r1 (344-bit) from the RNG.
4807c. TPM generates a TPM-specific secret r2 (1024-bit) from the RNG.
4808d. TPM generates a TPM-specific secret r3 (1264-bit) from the RNG.
4809e. TPM stores r0, r1, r2, r3 as part of set A.
4810f. TPM computes a non-secret value P1 (2048-bit) = (R0^r0) mod n and stores P1 as part of
4811set A.
481211.Stage 104813a. TPM computes a non-secret value P2 (2048-bit) = P1*(R1^r1) mod n, stores P2 as part of
4814set A and erases P1 from set A.
481512.Stage 114816a. TPM computes a non-secret value P3 (2048-bit) = P2*(S0^r2) mod n, stores P3 as part of
4817set A and erases P2 from set A.
481813.Stage 124819a. TPM computes a non-secret value P4 (2048-bit) = P3*(S1^r3) mod n, stores P4 as part of
4820set A and erases P3 from set A.
4821b. TPM exports P4.
482214.Stage 134823a. TPM imports w (2048-bit).
4824b. TPM computes w1 = w^q mod Γ.
4825c. TPM verifies if w1 = 1 holds. If it doesn’t hold, TPM refuses to continue.
750Revision 116 1 Marchy 2011751

TCG Published
TCG Published155

752Copyright © TCG
753

TPM Main Part 1 Design Principles
Specification Version 1.2

4826d. If it does hold, TPM saves w as part of set A.
482715.Stage 144828a. TPM computes a non-secret value E (2048-bit) = w^f mod Γ.
4829b. TPM exports E.
483016.Stage 15
4831a. TPM computes a TPM-specific secret r (208-bit) = r0 + 2^104*r1 mod q.
4832b. TPM computes a non-secret value E1 (2048-bit) = w^r mod Γ.
4833c. TPM exports E1 and erases w from set A.
483417.Stage 164835a. TPM imports a non-secret value c1 (160-bit).
4836b. TPM generates a non-secret value NT (160-bit) from the RNG.
4837c. TPM computes a non-secret value c (160-bit) = H(c1||NT).
4838d. TPM save c as part of set A.
4839e. TPM exports NT
484018.Stage 174841a. TPM computes a non-secret value s0 (352-bit) = r0 + c*f0 over the integers.
4842b. TPM exports s0.
484319.Stage 184844a. TPM computes a non-secret value s1 (352-bit) = r1 + c*f1 over the integers.
4845b. TPM exports s1.
484620.Stage 194847a. TPM computes a non-secret value s2 (1024-bit) = r2 + c*u0 mod 21024.
4848b. TPM exports s2.
484921.Stage 204850a. TPM computes a non-secret value s'2 (1024-bit) = (r2 + c*u0) >> 1024 over the integers.
4851b. TPM saves s'2 as part of set A.
4852c. TPM exports c
485322.Stage 214854a. TPM computes a non-secret value s3 (1272-bit) = r3 + cu1 + s'2 over the integers.
4855b. TPM exports s3 and erases s'2 from set A.
485623.Stage 224857a. TPM imports a non-secret value u2 (1024-bit).
4858b. TPM computes a TPM-specific secret v0 (1024-bit) = u2 + u0 mod 21024.
4859c. TPM stores v0 as part of A.
754
755

156

TCG Published
TCG Published

Revision 116 1 Marchy 2011

756TPM Main Part 1 Design Principles

TCG © Copyright

757Specification Version 1.2

758
4860d. TPM computes a TPM-specific secret v'0 (1024-bit) = (u2 + u0) >> 1024 over the integers.
4861e. TPM saves v'0 as part of set A.
486224.Stage 234863a. TPM imports a non-secret value u3 (1512-bit).
4864b. TPM computes a TPM-specific secret v1 (1520-bit) = u3 + u1 + v'0 over the integers.
4865c. TPM stores v1 as part of A.
4866d. TPM erases v'0 from set A.
486725.Stage 244868a. TPM makes self-consistent set of all the data (n0, COUNT, R0, R1, S0, S1, n, Γ, q, v0,4869v1), where the values v0, v1 are secret – they need to be stored safely with the consistent
4870set, and the remaining is non-secret.
4871b. TPM erases set A.
4872End of informative comment
487333.3.3

SIGN

4874Start of informative comment
4875This entire section is informative
48761. Stage 0 & 1
4877a. TPM imports and verifies a self-consistent set of all the data including:
4878i. a non-secret value n0 (2048-bit),
4879ii. a non-secret value COUNT (8-bit),
4880iii. a non-secret value R0 (2048-bit),
4881iv. a non-secret value R1 (2048-bit),
4882v. a non-secret value S0 (2048-bit),
4883vi. a non-secret value S1 (2048-bit),
4884vii. a non-secret value n (2048-bit),
4885viii.

a non-secret value gamma (2048-bit),

4886ix. a non-secret value q (208-bit),
4887x. v0 (1024-bit),
4888xi. v1 (1520-bit).
4889xii. If the verification does not succeed, TPM refuses to continue.
4890b. TPM stores the above values as part of a new set A.
4891c. TPM computes a TPM-specific secret f0 (104-bit) = f mod 2104.
4892d. TPM computes a TPM-specific secret f1 (104-bit) = f >> 104.
4893e. TPM stores f0 and f1 as part of set A.
759Revision 116 1 Marchy 2011
760

TCG Published
TCG Published157

761Copyright © TCG
762

TPM Main Part 1 Design Principles
Specification Version 1.2

4894f. TPM generates a TPM-specific secret r0 (344-bit) from the RNG.
4895g. TPM generates a TPM-specific secret r1 (344-bit) from the RNG.
4896h. TPM generates a TPM-specific secret r2 (1024-bit) from the RNG.
4897i. TPM generates a TPM-specific secret r4 (1752-bit) from the RNG.
4898j. TPM stores r0, r1, r2, r4, as part of set A.
48992. Stage 2
4900a. TPM computes a non-secret value P1 (2048-bit) = (R0^r0) mod n and stores P1 as part of4901set A.
49023. Stage 34903a. TPM computes a non-secret value P2 (2048-bit) = P1*(R1^r1) mod n, stores P2 as part of
4904set A and erases P1 from set A.
49054. Stage 44906a. TPM computes a non-secret value P3 (2048-bit) = P2*(S0^r2) mod n, stores P3 as part of
4907set A and erases P2 from set A.
49085. Stage 54909a. TPM computes a non-secret value T (2048-bit) = P3*(S1^r4) mod n.
4910b. TPM erases P3 from set A.
4911c. TPM exports T.
49126. Stage 6
4913a. TPM imports a non-secret value w (2048-bit).
4914b. TPM computes w1 = w^q mod Γ.
4915c. TPM verifies if w1 = 1 holds. If it doesn’t hold, TPM refuses to continue.
4916d. If it does hold, TPM saves w as part of set A.
49177. Stage 74918a. TPM computes a non-secret value E (2048-bit) = w^f mod Γ.
4919b. TPM exports E and erases f from set A.
49208. Stage 84921a. TPM computes a TPM-specific secret r (208-bit) = r0 + 2^104*r1 mod q.
4922b. TPM computes a non-secret value E1 (2048-bit) = w^r mod Γ.
4923c. TPM exports E1 and erases w and E1 from set A.
49249. Stage 94925a. TPM imports a non-secret value c1 (160-bit).
4926b. TPM generates a non-secret value NT (160-bit) from the RNG.
4927c. TPM computes a non-secret value c2 (160-bit) = H(c1||NT) and erases c1 from set A.
4928d. TPM saves c2 as part of set A.
763
764

158

TCG Published
TCG Published

Revision 116 1 Marchy 2011

765TPM Main Part 1 Design Principles

TCG © Copyright

766Specification Version 1.2

767
4929e. TPM exports NT.
493010.Stage 104931a. TPM imports a non-secret value b (1-bit).
4932b. If b = = 1, TPM imports a non-secret value m (160-bit).
4933c. TPM computes a non-secret value c (160-bit) = H(c2||b||m) and erases c2 from set A.
4934d. If b = = 0, TPM imports an RSA public key, eAIK (= 2^16 + 1) and nAIK (2048-bit).
4935e. TPM computes a non-secret value c (160-bit) = H(c2||b||nAIK) and erases c2 from set
4936A.
4937f. TPM exports c.
493811.Stage 114939a. TPM computes a non-secret value s0 (352-bit) = r0 + c*f0 over the integers.
4940b. TPM exports s0.
494112.Stage 124942a. TPM computes a non-secret value s1 (352-bit) = r1 + c*f1 over the integers.
4943b. TPM exports s1.
494413.Stage 134945a. TPM computes a non-secret value s2 (1024-bit) = r2 + c*v0 mod 21024.
4946b. TPM exports s2.
494714.Stage 144948a. TPM computes a non-secret value s'2 (1024-bit) = (r2 + c*v0) >> 1024 over the integers.
4949b. TPM saves s'2 as part of set A.
495015.Stage 154951a. TPM computes a non-secret value s3 (1760-bit) = r4 + cv1 + s'2 over the integers.
4952b. TPM exports s3 and erases s'2 from set A.
4953c. TPM erases set A.
4954End of informative comment

768Revision 116 1 Marchy 2011
769

TCG Published
TCG Published

159

770Copyright © TCG
771

TPM Main Part 1 Design Principles
Specification Version 1.2

495534.
General Purpose IO
4956Start of informative comment
4957The GPIO capability allows an outside entity to output a signal on a GPIO pin, or read the4958status of a GPIO pin. The solution is for a single pin, with no timing information. There is4959no support for sending information on specific busses like SMBus or RS232. The design
4960does support the designation of more than one GPIO pin.
4961There is no requirement as to the layout of the GPIO pin, or the routing of the wire from the
4962GPIO pin on the platform. A platform specific specification can add those requirements.
4963To avoid the designation of additional command ordinals, the architecture uses the NV
4964Storage commands. A set of GPIO NV indexes map to individual GPIO pins.
4965TPM_NV_INDEX_GPIO_00 maps to the first GPIO pin. The platform specific specification
4966indicates the mapping of GPIO zero to a specific package pin.
4967The TPM does not reserve any NV storage for the indicated pin; rather the TPM uses the4968authorization mechanisms for NV storage to allow a rich set of controls on the use of the4969GPIO pin. The TPM owner can specify when and how the platform can use the GPIO pin.
4970While there is no NV storage for the pin value, TRUE or FALSE, there is NV storage for the4971authorization requirements for the pin.
4972Using the NV attributes the GPIO pin may be either an input pin or an output pin.
4973End of informative comment
49741. The TPM MAY support the use of a GPIO pin defined by the NV storage mechanisms.
49752. The GPIO pin MAY be either an input or an output pin.

772
773

160

TCG Published
TCG Published

Revision 116 1 Marchy 2011

774TPM Main Part 1 Design Principles

TCG © Copyright

775Specification Version 1.2

776

497635.
Redirection
4977 Informative comment
4978Redirection allows the TPM to output the results of operations to hardware other than the4979normal TPM communication bus. The redirection can occur to areas internal or external to4980the TPM. Redirection is only available to key operations (such as TPM_UnBind,
4981TPM_Unseal, and TPM_GetPubKey). To use redirection the key must be created specifying
4982redirection as one of the keys attributes.
4983When redirecting the output the TPM will not interpret any of the data and will pass the4984data on without any modifications.
4985The TPM_SetRedirection command connects a destination location or port to a loaded key.
4986This connection remains so long as the key is loaded, and is saved along with other key
4987information on a saveContext(key), loadContext(key). If the key is reloaded using
4988TPM_LoadKey, then TPM_SetRedirection must be run again.
4989Any use of TPM_SetRedirection with a key that does not have the redirect attribute must
4990return an error. Use of key that has the redirect attribute without TPM_SetRedirection being
4991set must return an error.
4992End of informative comments
49931. The TPM MAY support redirection
49942. If supported, the TPM MUST only use redirection on keys that have the redirect attribute
4995
set
49963. A key that is tagged as a “redirect” key MUST be a leaf key in the TPM Protected Storage
4997
blob hierarchy. A key that is tagged as a “redirect” key CAN NEVER be a parent key.
49984. Output data that is the result of a cryptographic operation using the private portion of a4999
“redirect” key:
5000

a. MUST be passed to an alternate output channel

5001

b. MUST NOT be passed to the normal output channel

5002

c. MUST NOT be interpreted by the TPM

50035. When command input or output is redirected the TPM MUST respond to the command5004
as soon as the ordinal finishes processing
5005
5006

a. The TPM MUST indicate to any subsequent commands that the TPM is busy andunable to accept additional command until the redirection is complete

5007

b. The TPM MUST allow for the resetting of the redirection channel

50086. Redirection MUST be available for the following commands:
5009

a. TPM_Unseal

5010

b. TPM_UnBind

5011

c. TPM_GetPubKey5012

d. TPM_Seal

5013

e. TPM_Quote

777Revision 116 1 Marchy 2011
778

TCG Published
TCG Published161

779Copyright © TCG
780

TPM Main Part 1 Design Principles
Specification Version 1.2

501436.
Structure Versioning
5015Start of informative comment
5016In version 1.1 some structures also contained a version indicator. The TPM set the indicator
5017to indicate the version of the TPM that was creating the structure. This was incorrect5018behavior. The functionality of determining the version of a structure is radically different in
50191.2.
5020Most structures will contain a TPM_STRUCTURE_TAG. All future structures must contain
5021the tag, the only structures that do not contain the tag are 1.1 structures that are not
5022modified in 1.2. This restriction keeps backwards compatibility with 1.1.
5023Any 1.2 structure must not contain a 1.1 tagged structure. For instance the TPM_KEY
5024complex, if set at 1.2, must not contain a PCR_INFO structure. The TPM_KEY 1.2 structure
5025must contain a PCR_INFO_LONG structure. The converse is also true 1.1 structures must
5026not contain any 1.2 structures.
5027The TPM must not allow the creation of any mixed structures. This implies that a command
5028that deals with keys, for instance, must ensure that a complete 1.1 or 1.2 structure is5029properly built and validated on the creation and use of the key.
5030The tag structure is set as a UINT16. This allows for a reasonable number of structures
5031without wasting space in the buffers.
5032To obtain the current TPM version the caller must use the TPM_GetCapability command.
5033The tag is not a complete validation of the validity of a structure. The tag provides a
5034reference for the structure and the TPM or caller is responsible for determining the validity
5035of any remaining fields. For instance, in the TPM_KEY structure, the tag would indicate
5036TPM_KEY but the TPM would still use tpmProof and the various digests to ensure the5037structure integrity.
50387. Compatibility and notification
5039In 1.1 TPM_CAP_VERSION (index 19) returned a version structure with 1.1.x.x. The x.x was
5040for manufacturer information and the x.x also was set version structures. In 1.2
5041TPM_CAP_VERSION will return 1.1.0.0. Any 1.2 structure that uses the version information
5042will set the x.x to 0.0 in the structure. TPM_CAP_MANUFACTURER_VER (index 21) will5043return 1.2.x.x. The 1.2 structures do not contain the version structure. The rationale
5044behind this is that the structure tag will indicate the version of the structure. So changing a
5045correct structure will result in a new tag and there is no need for a separate version
5046structure.
5047For further compatibility, the quote function always returns 1.1.0.0 in the version
5048information regardless of the size of the incoming structure. All other functions may regard
5049a 2 byte sizeofselect structure as indicative of a 1.1 structure. The TPM handles all of the
5050structures according to the input, the only exception being TPM_CertifyKey where the TPM
5051does not need to keep the input version of the structure.
5052End of informative comment
50531. The TPM MUST support 1.1 and 1.2 defined structures
50542. The TPM MUST ensure that 1.1 and 1.2 structures are not mixed in the same overall
5055
structure
781
782

162

TCG Published
TCG Published

Revision 116 1 Marchy 2011

783TPM Main Part 1 Design Principles

TCG © Copyright784Specification Version 1.2

785
5056
5057

a. For instance in the TPM_KEY structure if the structure is 1.1 then PCR_INFO MUST
be set and if 1.2 the PCR_INFO_LONG structure must be set

50583. On input the TPM MUST ignore the lower two bytes of the version structure50594. On output the TPM MUST set the lower two bytes to 0 of the version structure

786Revision 116 1 Marchy 2011
787

TCG Published
TCG Published163

788Copyright © TCG
789

TPM Main Part 1 Design Principles
Specification Version 1.2

506037.
Certified Migration Key Type
5061Start of informative comment
5062In version 1.1 there were two key types, non-migration and migration keys. The TPM would
5063only certify non-migrating keys. There is a need for a key that allows migration but allows
5064for certification. This proposal is to create a key that allows for migration but still has
5065properties that the TPM can certify.
5066These new keys are “certifiable migratable keys” or CMK. This designation is to separate the5067keys from either the normal migration or non-migration types of keys. The TPM Owner is5068not required to use these keys.
5069Two entities may participate in the CMK process. The first is the Migration-Selection
5070Authority and the second is the Migration Authority (MA).
5071Migration Selection Authority (MSA)
5072The MSA controls the migration of the key but does not handle the migrated itself.
5073Migration Authority (MA)5074A Migration Authority actually handles the migrated key.
5075Use of MSA and MA
5076Migration of a CMK occurs using TPM_CMK_CreateBlob (TPM_CreateMigrationBlob cannot
5077be used). The TPM Owner authorizes the migration destination (as usual), and the key
5078owner authorizes the migration transformation (as usual). An MSA authorizes the migration
5079destination as well. If the MSA is the migration destination, no MSA authorization is5080required.
5081End of informative comment
508237.1

Certified Migration Requirements

5083Start of informative comment
5084The following list details the design requirements for the controlled migration keys
5085Key Protections
5086The key must be protected by hardware and an entity trusted by the key user.
5087Key Certification
5088The TPM must provide a mechanism to provide certification of the key protections (both5089hardware and trusted entity)
5090Owner Control
5091The TPM Owner must control the selection of the trusted entity
5092Control Delegation
5093The TPM Owner may delegate the ability to create the keys but the decision must be explicit
5094Linkage
5095The architecture must not require linking the trusted entity and the key user
790
791

164

TCG Published
TCG Published

Revision 116 1 Marchy 2011

792TPM Main Part 1 Design Principles

TCG © Copyright

793Specification Version 1.2

7945096Key Type

5097The key may be any type of migratable key (storage or signing)
5098Interaction
5099There must be no required interaction between the trusted entity and the TPM during the5100key creation process
5101End of informative comment
510237.2

Key Creation

5103Start of informative comment
5104The command TPM_CMK_CreateKey creates a CMK where control of the migration is by a
5105MSA or MA. The process uses the MSA public key (actually a digest of the MA public key) as
5106input to TPM_CMK_CreateKey. The key creation process establishes a migrationAuth that is
5107SHA-1(tpmProof || SHA-1(MA pubkey) || SHA-1(source pubkey)).
5108The use of tpmProof is essential to prove that CMK creation occurs on a TPM. The use of5109“source pubkey” explicitly links a migration AuthData value to a particular public key, to5110simplify verification that a specific key is being migrated.
5111End of informative comment
511237.3

Migrate CMK to a MA

5113Start of informative comment
5114Migration of a CMK to a destination other than the MSA:
5115TPM_MIGRATIONKEYAUTH Creation
5116The TPM Owner authorizes the creation of a TPM_MIGRATIONKEYAUTH structure using
5117TPM_AuthorizeMigrationKey command. The structure contains the destination
5118migrationKey, the migrationScheme (which must be set to TPM_MS_RESTRICT_MIGRATE
5119or TPM_MS_RESTRICT_APPROVE) and a digest of tpmProof.
5120MA Approval
5121The MA signs a TPM_CMK_AUTH structure, which contains the digest of the MA public key,
5122the digest of the destination (or parent) public key and a digest of the public portion of the
5123key to be migrated
5124TPM Owner Authorization
5125The TPM Owner authorizes the MA approval using TPM_CMK_CreateTicket and produces a
5126signature ticket
5127Key Owner Authorization
5128The CMK owner passes the TPM Owner MA authorization, the MSA Approval and the5129signature ticket to the TPM_CMK_CreateBlob using the key owners authorization.
5130Thus the TPM owner, the key’s owner, and the MSA, all cooperate to migrate a key
5131produced by TPM_CMK_CreateBlob.
5132End of informative comment

795Revision 116 1 Marchy 2011
796

TCG Published
TCG Published165

797Copyright © TCG
798

513337.4

TPM Main Part 1 Design Principles
Specification Version 1.2

Migrate CMK to a MSA

5134Start of informative comment
5135Migrate CMK directly to a MSA
5136TPM_MIGRATIONKEYAUTH Creation
5137The TPM Owner authorizes the creation of a TPM_MIGRATIONKEYAUTH structure using
5138TPM_AuthorizeMigrationKey command. The structure contains the destination
5139migrationKey (which must be the MSA public key), the migrationScheme (which must be set
5140to TPM_MS_RESTRICT_MIGRATE) and a digest of tpmProof.
5141Key Owner Authorization
5142The CMK owner passes the TPM_MIGRATIONKEYAUTH
5143TPM_CMK_CreateBlob using the CMK owner authorization.

to

the

TPM

in

a

5144Double Wrap
5145If specified, through the MS_MIGRATE scheme, the TPM double wraps the CMK information
5146such that the only way a recipient can unwrap the key is with the cooperation of the CMK
5147owner.
5148Proof of Control
5149To prove to the MA and to a third party that migration of a key is under MSA control, a
5150caller passes the MA’s public key (actually its digest) to TPM_CertifyKey, to create a
5151TPM_CERTIFY_INFO structure. This now contains a digest of the MA’s public key.
5152A CMK be produced without cooperation from the MA: the caller merely provides the MSA’s
5153public key. When the restricted key is to be migrated, the public key of the intended
5154destination, plus the CERTIFY_INFO structure are sent to the MSA. The MSA extracts the
5155migrationAuthority digest from the CERTIFY_INFO structure, verifies that
5156migrationAuthority corresponds to the MSA’s public key, creates and signs a
5157TPM_RESTRICTEDKEYAUTH structure, and sends that signature back to the caller. Thus
5158the MSA never needs to touch the actual migrated data.
5159End of informative comment

799
800

166

TCG Published
TCG Published

Revision 116 1 Marchy 2011

801TPM Main Part 1 Design Principles

TCG © Copyright802Specification Version 1.2803

516038.
Revoke Trust
5161Start of informative comment
5162There are circumstances where clearing all keys and values within the TPM is either
5163desirable or necessary. These circumstances may involve both security and privacy
5164concerns.
5165Platform trust is demonstrated using the EK Credential, Platform Credential and the
5166Conformance Credentials. There is a direct and cryptograph relationship between the EK
5167and the EK Credential and the Platform Credential. The EK and Platform credentials can
5168only demonstrate platform trust when they can be validated by the Endorsement Key.
5169This command is called revoke trust because, by deleting the EK, the EK Credential and the
5170Platform Credential are dissociated from the platform, therefore invalidating them and5171resulting in the revocation of the trust in the platform. From a trust perspective, the5172platform associated with these specific credentials no longer exists. However, any
5173transaction that occurred prior to invoking this command will remain valid and trusted to
5174the same extent they would be valid and trusted if the platform were physically destroyed.
5175This is a non-reversible function. Also, along with the EK, the Owner is also deleted,
5176removing all non-migratable keys and owner-specified state.
5177It is possible to establish new trust in the platform by creating a new EK using the5178TPM_CreateRevocableEK command. Establishing trust in the platform, however, is more
5179than just creating the EK. The EK Credential and the Platform Credential must also be
5180created and associated with the new EK as described above. (The conformance credentials
5181may be obtained from the TPM and Platform manufacturer.) These credentials must be
5182created by an entity that is trusted by those entities interested in the trust of the platform.
5183This may not be a trivial task. For example, an entity willing to create these credentials my
5184want to examine the platform and require physical access during the new EK generation
5185process.
5186Besides calling one of the two EK creation functions to create the EK, the EK may be5187"squirted" into the TPM by an external source. If this method is used, tight controls must be
5188placed on the process used to perform this function to prevent exposure or intentional
5189duplication of the EK. Since the revocation and re-creation of the EK are functions intended
5190to be performed after the TPM leaves the trusted manufacturing process, squirting of the EK
5191must be disallowed after the manufacturing process if the revoke trust command is5192executed.
5193End of informative comment
51941. If TPM_CreateRevokableEK and TPM_RevokeTrust are implemented, one can do an
5195
unrestricted number of TPM_CreateRevokableEK / TPM_RevokeTrust pairs until
5196
TPM_CreateEndorsementKeyPair is called. After TPM_CreateEndorsementKeyPair is
5197
called, the EK becomes irrevocable.
51982. After an EK is created the TPM MUST NOT allow a new EK to be "squirted" for the
5199
lifetime of the TPM.
52003. The EK Credential MUST provide an indication within the EK Credential as to how the5201
EK was created. The valid permutations are:5202

a. Squirted, non-revocable

804Revision 116 1 Marchy 2011805

TCG Published
TCG Published167

806Copyright © TCG
807

TPM Main Part 1 Design Principles
Specification Version 1.2

5203

b. Squirted, revocable5204

c. Internally generated, non-revocable5205

d. Internally generated, revocable

52064. If the method for creating the EK during manufacturing is squirting, the EK may be
5207
either non-revocable or revocable. If it is revocable, the method must provide the5208
insertion or extraction of the EKreset value.

808
809

168

TCG Published
TCG Published

Revision 116 1 Marchy 2011

810TPM Main Part 1 Design Principles

TCG © Copyright811Specification Version 1.2

812

520939.
Mandatory and Optional Functional Blocks
5210Start of informative comment
5211This section lists the main functional blocks of a TPM (in arbitrary order), states whether
5212that block is mandatory or optional in the main TPM specification, and provides brief
5213justification for that choice.
5214Important notes:
52151. The default classification of a TPM function block is “mandatory”, since reclassification
5216from mandatory to optional enables the removal of a function from existing
5217implementations, while reclassification from optional to mandatory may require the addition
5218of functionality to existing implementations.
52192. Mandatory functions will be reclassified as optional functions if those functions are not
5220required in some particular type of TCG trusted platform.
52213. If a functional block is mandatory in the main specification, the functionality must be
5222present in all TCG trusted platforms.
52234. If a functional block is optional in the main specification, each individual platform5224specific specification must declare the status of that functionality as either (1) “mandatory5225specific” (the functionality must be present in all platforms of that type), or (2) “optional5226specific” (the functionality is optional in that type of platform), or (3) “excluded-specific” (the5227functionality must not be present in that type of platform).
5228End of informative comment
5229Classification of TPM functional blocks
52301. Legacy (v1.1b) features
5231
5232

a. Anything that was mandatory in v1.1b continues to be mandatory in v1.2. Anythingthat was optional in v1.1b continues to be optional in v1.2.

5233
5234
5235

b. V1.2 must be backwards compatible with v1.1b. All TPM features in v1.1b werediscussed in depth when v1.1b was written, and anything that wasn't thought
strictly necessary was tagged as "optional".

52362. Number of PCRs
5237
5238
5239
5240
5241
5242
5243
5244

a. The platform specific specification controls the number of PCR on a platform. The
TPM MUST implement the mandatory number of PCR specified for a particular
platformi.

TPMs designed to work on multiple platforms MUST provide the appropriate
number of TPM for all intended platforms. I.e. if one platform requires 16 PCR
and the other platform 24 the TPM would have to supply 24 PCR.

b. For TPMs providing backwards compatibility with 1.1 TPM on the PC platform, there
MUST be 16 static PCR.

52453. Sessions
5246
5247

a. The TPM MUST support a minimum of 3 active sessionsi.

Active means currently loaded and addressable inside the TPM

813Revision 116 1 Marchy 2011
814

TCG Published
TCG Published169

815Copyright © TCG
816

5248
5249

TPM Main Part 1 Design Principles
Specification Version 1.2

ii. Without 3 active sessions many TPM commands cannot function
b. The TPM MUST support a minimum of 16 concurrent sessions

5250

i.

5251
5252

ii. Providing for more concurrent sessions allows the resource manager additional
flexibility and speed

The contextList of currently available session has a minimum size of 16

52534. NVRAM
5254
5255

a. There are 20 bytes mandatory of NVRAM in v1.2 as specified by the main
specification. A platform specific specification can require a larger amount of NVRAM

5256
5257
5258

b. Cost is important. The mandatory amount of NVRAM must be as small as possible,
because different platforms will require different amounts of NVRAM. 20 bytes are
required for (DIR) backwards compatibility with v1.1b.

52595. Keys
5260

a. The new signing keys are mandatory in v1.2 because they plug a security hole.

5261

b. The TPM must support a minimum of 2 key slots.

52626. Direct Anonymous Attestation
5263

a. This is optional in v1.2

5264
5265
5266

b. Cost is important. The DAA function consumes more TPM resources than any other
TPM function, but some platform specific specifications (some servers, for example)
may have no need for the anonymity and pseudonymity provided by DAA.

52677. Transport sessions
5268

a. These are mandatory in v1.2.

5269

b. Transport sessions

5270

i.

5271

ii. Enable proof of the TPM commands executed during an arbitrary session.

Enable protection of data submitted to a TPM and produced by a TPM

52728. Resettable Endorsement Key
5273

a. This is optional in v1.2

5274
5275
5276

b. Cost is important. Resettable EKs are valuable in some markets segments, but cause
more complexity than non-resettable EKs, which are expected to be the dominant
type of EK

52779. Monotonic Counter
5278

a. This is mandatory in v1.2

5279
5280

b. A monotonic counter is essential to enable software to defeat certain types of attack,by enabling it to determine the version (revision) of dynamic data.

528110.Time Ticks
5282

a. This is mandatory in v1.2

5283
5284

b. Time stamping is a function that is potentially beneficial to both a user and system
software.

817
818

170

TCG Published
TCG Published

Revision 116 1 Marchy 2011

819TPM Main Part 1 Design Principles

TCG © Copyright

820Specification Version 1.2

821528511.Delegation (includes DSAP)
5286

a. This is mandatory in v1.2

5287
5288

b. Delegation enables the well-established principle of least privilege to be applied to
Owner authorized commands.

528912.GPIO
5290

a. This is optional in v1.2

5291
5292

b. Cost is important. Not all types of platform will require a secure intra-platform
method of key distribution

529313.Locality
5294

a. The use of locality is optional in v1.2

5295

b. The structures that define locality are mandatory

5296
5297
5298

c. Locality is an essential part of many (new) TPM commands, but the definition of
locality varies widely from platform to platform, and may not be required by some
types of platforms.

5299
5300
5301

d. It is mandatory that a platform specific specification indicate the definitions oflocality on the platform. It is perfectly reasonable to only define one locality andignore all other uses of locality on a platform

530214.TPM-audit
5303

a. This is optional in v1.2

5304
5305
5306
5307
5308
5309

b. Proper TPM-audit requires support to reliably store logs and control access to the
TPM, and any mechanism (an OS, for example) that could provide such support ispotentially capable of providing an audit log without using TPM-audit. Nevertheless,
TPM-audit might be useful to verify operation of any and all software, including an
OS. TPM-audit is believed to be of no practical use in a client, but might be valuable
in a server, for example.

531015.Certified Migration
5311

a. This is optional in v1.2

5312
5313

b. Cost is important. Certified Migration enables a business model that may be
nonsense for some platforms.

822Revision 116 1 Marchy 2011
823

TCG Published
TCG Published171

824Copyright © TCG
825

TPM Main Part 1 Design Principles
Specification Version 1.2

531440.
1.1a and 1.2 Differences
5315Start of informative comment
5316All 1.2 TPM commands are completely compliant with 1.1b commands with the following
5317known exceptions.
53181. TSC_PhysicalPresence does not support configuration and usage in a single step.
53192. TPM_GetPubKey is unable to read the SRK unless TPM_PERMANENT_FLAGS ->5320readSRKPub is TRUE
53213. TPM_SetTempDeactivated now requires either physical presence or TPM Operator
5322authorization to execute53234. TPM_OwnerClear does not modify TPM_PERMANENT_DATA -> authDIR[0].
5324End of informative comment

826
827

172

TCG Published
TCG Published

Revision 116 1 Marchy 2011