PDF Trusted Platform Modules Why When and How to Use Them Ariel Segall download
PDF Trusted Platform Modules Why When and How to Use Them Ariel Segall download
com
https://textbookfull.com/product/trusted-platform-modules-
why-when-and-how-to-use-them-ariel-segall/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/the-herbal-alchemist-s-handbook-a-
complete-guide-to-magickal-herbs-and-how-to-use-them-karen-harrison/
textboxfull.com
https://textbookfull.com/product/marketing-plans-how-to-prepare-them-
how-to-profit-from-them-8th-edition-malcolm-mcdonald/
textboxfull.com
https://textbookfull.com/product/the-illustrated-guide-to-pigs-how-to-
choose-them-how-to-keep-them-1st-edition-celia-lewis/
textboxfull.com
https://textbookfull.com/product/philosophy-for-life-teach-yourself-
the-ideas-that-shape-our-world-and-how-to-use-them-mel-thompson/
textboxfull.com
The Wealth Dragon Way: The Why, the When and the How to
Become Infinitely Wealthy John Lee
https://textbookfull.com/product/the-wealth-dragon-way-the-why-the-
when-and-the-how-to-become-infinitely-wealthy-john-lee/
textboxfull.com
https://textbookfull.com/product/project-management-a-z-a-compendium-
of-project-management-techniques-and-how-to-use-them-1st-edition-alan-
wren/
textboxfull.com
Next Stop Mars The Why How and When of Human Missions 1st
Edition Giancarlo Genta (Auth.)
https://textbookfull.com/product/next-stop-mars-the-why-how-and-when-
of-human-missions-1st-edition-giancarlo-genta-auth/
textboxfull.com
https://textbookfull.com/product/pruning-and-training-what-when-and-
how-to-prune-christopher-brickell/
textboxfull.com
IET PROFESSIONAL APPLICATIONS OF COMPUTING SERIES 13
Trusted Platform
Modules
Other volumes in this series:
Ariel Segall
This publication is copyright under the Berne Convention and the Universal Copyright
Convention. All rights reserved. Apart from any fair dealing for the purposes of research
or private study, or criticism or review, as permitted under the Copyright, Designs and
Patents Act 1988, this publication may be reproduced, stored or transmitted, in any
form or by any means, only with the prior permission in writing of the publishers, or in
the case of reprographic reproduction in accordance with the terms of licences issued
by the Copyright Licensing Agency. Enquiries concerning reproduction outside those
terms should be sent to the publisher at the undermentioned address:
www.theiet.org
While the author and publisher believe that the information and guidance given in this
work are correct, all parties must rely upon their own skill and judgement when making
use of them. Neither the author nor publisher assumes any liability to anyone for any
loss or damage caused by any error or omission in the work, whether such an error or
omission is the result of negligence or any other cause. Any and all such liability
is disclaimed.
The moral rights of the author to be identified as author of this work have been
asserted by him in accordance with the Copyright, Designs and Patents Act 1988.
Acknowledgments xiii
Glossary and acronym expansions xv
1 Introduction 1
1.1 About this book 1
1.1.1 The enterprise approach 1
1.1.2 User stories 2
1.2 What is trusted computing? 2
1.2.1 What do we mean by ‘trusted’? 3
1.2.2 A brief history of trusted computing 4
1.2.3 The Trusted Computing Group 4
1.3 TPMs at a high level 5
1.3.1 Roots of Trust 5
1.3.2 Chains of trust 7
1.3.3 The TPM threat model 7
1.3.4 What TPMs are good for 9
1.3.5 What TPMs aren’t good for 9
1.3.6 TPM versions 10
1.3.7 Common TPM myths 11
1.4 Where to find TPMs 14
1.5 TPM software options 15
9 Attestation 193
9.1 Machine state and the TPM 193
9.1.1 Measurement chains of trust 193
9.1.2 The Static Root of Trust for Measurement 194
9.1.3 The Dynamic Root of Trust for Measurement 195
9.2 Using the PCRs 200
9.2.1 Essential PCR operations 200
9.2.2 Measurement and PCRs 202
9.2.3 Beyond measurements: creative uses of PCRs 204
9.2.4 1.2 PCR design 206
9.2.5 2.0 PCR design 207
9.2.6 Choosing PCRs to use 209
9.2.7 PCRs beyond the PC 210
9.3 Basic attestation techniques 211
9.3.1 Quotes 211
9.3.2 Verifying quotes 214
9.3.3 Constrained key attestation 216
9.3.4 Direct anonymous attestation 216
9.4 Machine state measurement in theory and reality 221
9.5 Attestation user stories 221
9.6 TSS 1.2 attestation code examples 225
9.6.1 Reading PCR contents 225
9.6.2 Extending PCRs 225
9.6.3 Resetting PCRs 226
9.6.4 Creating and verifying a quote 227
9.7 TSS 2.0 attestation code examples 232
9.7.1 Creating a PCR selection 232
9.7.2 Reading PCR contents 233
9.7.3 Extending PCRs 233
9.7.4 Resetting PCRs 234
9.7.5 Creating and verifying quotes 235
x Trusted platform modules: why, when and how to use them
12 Troubleshooting 291
12.1 When all else fails 291
12.2 There’s no TPM in the BIOS menu 291
12.3 Trouble getting any software working 292
12.3.1 Linux-specific tips 292
12.4 TPM returning errors 292
12.5 TSS 1.2 code returning errors 293
12.6 Problems using TPM data structures 294
This book would not have happened without the help of a vast number of people, to
whom I am eternally grateful: Xeno Kovah, who first asked me whether I’d consid-
ered teaching a class on TPMs; my many wonderful former colleagues at MITRE,
particularly Amy Herzog, Joshua Guttman, John Ramsdell, Paul Rowe, Justin Sheehy,
and Brian Sniffen; it’s amazing what you can learn in ten years of being steeped in a
subject while surrounded by smart people. Then there are also the great folks from
the IAD, particularly Grant Wagner, George Coker, and Pete Loscocco, who never
stopped asking really challenging questions; I’d never have figured half of this stuff
out without you. There are all of my test readers, in particular the exceptionally patient
Kevin Riggle and John Mainzer, who waded through multiple versions and sent exten-
sive commentary. And above all, my amazingly patient spouse, Andrew Menard, who
put up with a ridiculous amount of hassle and still never stopped telling me I could
do this.
Glossary and acronym expansions
AIK Attestation Identity Key. Often simply called an identity key. A key that acts as
a certifiable pseudonym for a TPM.
AMD A company that manufactures CPUs and other low-level hardware.
API Application program interface. A set of function definitions for building software
applications.
Attestation The presentation of verifiable evidence about a system to another party
(the verifier, sometimes called the appraiser). Usually, the verifier is off-system:
we call this remote attestation. The attestation target is sometimes called the
attester.
Authorization value Password, although usually with many fewer constraints about
the contents than the sort of passwords users generally create. In a TPM context,
sometimes used to imply a value that’s been pre-hashed before transmission,
versus a password transmitted in its entirety to the TPM.
BIOS Basic Input/Output system, though the expansion is almost never used.
BIOS refers to the firmware which initially sets up a PC’s hardware during
boot. Although technically, BIOS and UEFI refer to entirely different firmware
approaches that perform similar functions, because they serve the same purpose
they are often lumped together under the BIOS umbrella. Most mentions of BIOS
in this book actually refer to either BIOS or UEFI.
Blob A TPM-produced data structure whose contents the user is not expected to make
individual use of; a black box.
Boot Loader Software that loads an operating system kernel as part of the boot
process.
CA Certificate Authority. A trusted party participating in a public key infrastructure
who certifies that certain keys can be trusted by anyone who trusts the authority.
Chain of Trust A trusted computing concept in which every component establishes
trust in the next component before handing over control, usually rooted in a Root
of Trust. Often comes up when discussing how measurements of a system state
are created, although other chains of trust exist.
Clear An operation that removes most of the data from the TPM. Intended for use
when a machine is sold or transferred to a new owner, so that old secrets are no
longer accessible.
CMK Certifiable Migration Key. A 1.2 key that can be migrated between machines
with the approval of a trusted authority, and can be certified for external verifiers.
CPU Central processing unit. The core of a modern computer.
CRTM Core Root of Trust for Measurement. Same as SRTM.
xvi Trusted platform modules: why, when and how to use them
MAC Media Access Control, although almost no one uses the expansion. MAC
addresses are used to identify individual network interface hardware devices on
a network.
NV storage Non-volatile storage. Storage areas whose contents are not erased on a
reboot. Sometimes called NVRAM.
NVRAM Non-volatile Random-Access Memory. Sometimes called NV Storage.
OAEP Optimal Asymmetric Encryption Padding. A padding scheme often used with
TSA, to create safe input to the encryption function.
OIAP Object-Independent Authorization Protocol. An authorization session proto-
col used to securely transmit authorization data to the TPM.
OS Operating System.
OSAP Object-Specific Authorization Protocol. An authorization session protocol
used to securely transmit authorization data to the TPM.
Owner The person who is the local authority on how the TPM should be used (or
not used). Usually, the literal owner of the machine, either an individual or IT
department.
PC Although this stands for Personal Computer, in this context it actually refers to
the x86 family of computer architectures, including both desktops and servers.
PCA Privacy Certificate Authority. A CA that participates in the TCG-designed AIK
certification protocol.
PCRs Platform Configuration Registers. A set of registers in the TPM with highly
controlled behaviour, used to contain system measurements or user data. The
contents can be used to constrain access toTPM resources, or certified for external
verification with a quote.
PKCS One of the Public Key Cryptography Standards. Defines a programming
interface for using cryptographic hardware.
PKI Public Key Infrastructure. A distributed architecture for establishing trust in
public keys. Usually involves at least one CA.
PPS Platform Primary Seed. The primary seed associated with the platform
hierarchy.
Primary Seed A hidden value used to generate keys in 2.0 platforms. Each hierarchy
has its own primary seed. Serves the same trust role as the root keys in 1.2 TPMs.
Root Key A key that acts as a root of trust on a given platform with a 1.2 TPM.
RoT Root of Trust. A component which is inherently trusted, and which is used to
establish trust in other components.
RTM Root of Trust for Measurement. The system component that is trusted to take
an initial measurement of a system, allowing a chain of trust to be started.
RTR Root of Trust for Reporting. The key that all external trust in a given TPM (and
therefore system) is eventually rooted in. In 1.2 TPMs, the EK; in 2.0 TPMs,
manufacturer-certified primary keys based on the Endorsement Primary Seed.
RTS Root of Trust for Storage. The key that is trusted to protect secrets in a system,
directly or indirectly. In 1.2 TPMs, the SRK; in 2.0 TPMs, primary keys based
on the Storage Primary Seed.
RSA A widely used public key cryptosystem based on the difficulty of factoring the
products of two large prime numbers.
xviii Trusted platform modules: why, when and how to use them
cases for machine authentication and attestation, for example, require that there be a
mechanism for one machine to recognize the keys belonging to another; a large public
key infrastructure (PKI) makes this feasible and scalable, but few individuals and no
existing trusted third parties want to bother with the overhead required. Additionally,
large enterprises – be they companies, government agencies, or other organizations –
are far more likely than most individuals to need to track machine identity and state
over a network. Therefore, this book has been written with a focus on enterprise use
cases and support infrastructure.
Of course, this isn’t to say that the book can’t be useful if you’re not in an enterprise
Information Technology (IT) department. Whether you’re a student, a hobbyist, or a
professional, this book should give you a solid grounding in what TPMs are capable
of, what they’re good for, and what they’re not. Just keep in mind while you’re reading
that if you’re not working in an enterprise context, you may have to think a little beyond
the printed use cases to see how they apply to your own scenarios.
Secure CPU Modes: These include Intel’s TXT and SGX, as well as AMD’s SVM,
and provide functionality such as software measurement, code signature check-
ing, and secure execution, all in a remotely verifiable fashion.
Trusted Network Connect: A suite of networking protocols capable of integrating
information from platform-level trusted computing into network access decision-
making, but which can also be used without any secure hardware.
Multilevel Computing: In the government world, different classification levels of
information must be kept carefully segregated, often on distinct machines or net-
works. Multilevel computing systems combine hardware and software to create
a trustworthy whole capable of securely handling information at multiple, highly
separated, classification levels simultaneously.
You may notice that I’ve included here both hardware components and the sys-
tems which use that hardware. That’s because the various definitions of ‘trusted
computing’ vary so widely. However, it’s very common to see ‘trusted computing’
used as an alternative term for TPMs and systems which use them.
Why do I introduce a definition that’s so very hard to pin down? I do it simply to
familiarize you with a term you’ll encounter often in this field, used by people who
may not agree with each other. You may not always know exactly what it means, but
at least you’ll know to dig in a little further and find out what’s actually behind it in
a particular instance. And if a vendor tries to sell you something that uses ‘trusted
computing’ without providing details, that can be a warning sign that they don’t
understand the technology well enough to build a useful product.1
Why do we use predictable, rather than good, as our baseline? On the face of
it, this seems nonsensical. A virus can be a trusted component according to this
definition, if I know what its attack pattern is and what files it will corrupt. A well-
known commercial OS may not be, despite a reputable manufacturer and good coding
practices, if its behaviour is so complex that I can’t determine what it may do in any
given situation.
The reason we take this approach is twofold. First, anything that is predictable
is much easier to evaluate. Either I can predict a component’s behavior in response
to certain stimuli, or I can’t; and if I can, I can make useful judgments about its
performance. Secondly, it’s universal. ‘Good’ means something very different on
a power station control panel (where the requirement of remaining in operation no
1
For example, I’ve seen vendors try to claim that their product should have the ‘trusted’ label because it
contained a TPM…which had never even been turned on, and was not being used in any way.
4 Trusted platform modules: why, when and how to use them
Figure 1.1 shows a high-level diagram of the TPM subcomponents which support
these features, although individual implementations vary.
TPM
component which I’m using to verify it, then that second component is really the root
of trust, and the originally proposed root is above2 it in the trust hierarchy.
Now, this inherent trust can (and should!) be based on out-of-band assumptions.
I may not be able to verify that this chip is actually correct, but I can (hopefully) verify
that it came from a reliable vendor, which I can reasonably assume means that it was
built according to a standard which I can evaluate. But it’s important to remember
that that chain of logic is built on a set of assumptions: that the chip really came from
the vendor I think it came from, that the vendor really did implement the standard,
that there aren’t any bugs in the implementation or weaknesses in the standard, and
so forth; and to remember that if this chip we are identifying as a root of trust has a
problem, we’re going to have problems trusting anything built on top of it. This is one
reason that enterprises with very strict security needs should pay careful attention
to their supply chain when purchasing root of trust components; if your roots are
good, you’ll have a good chance of noticing problems above them, but if your root is
compromised, the rest of the system can’t be trusted.
Another important point is that trust is not generic! I trust my electrician to repair
the wires in my house, but not to access my bank account; I trust my bank to keep my
money secure, but not to keep my house from burning down. Similarly, I trust my TPM
to keep my keys secure, but not to keep my antivirus up to date. Therefore, whenever
we talk about a root of trust, we need to specify what kind of trust we’re talking about.
In PCs, we commonly run into the following roots of trust:
● Root of Trust for Storage (RTS): A component that protects secrets. Responsible
for maintaining both secrecy and integrity of those secrets. Some trusted systems
break this down into separate roots for confidentiality and integrity.
● Root of Trust for Reporting (RTR): A component that provides accurate report-
ing on data stored inside it. In the PC context, this more specifically applies to
accurate reporting of stored system state data. Note that the RTR is not responsible
2
Because of the root metaphor, trust hierarchies are sometimes presented in the opposite orientation to
other hierarchies, where ‘below’ is usually indicative of less power.
Introduction 7
for creating the data, just for honestly informing the rest of the world about the
data’s content.
● Root of Trust for Measurement (RTM): A component that measures other soft-
ware and stores those measurements in a secure location. In the PC context, the
RTM is normally part of the boot process – see Section 9.1.1 for details – which
stores measurements in the TPM.
Other trusted computing systems, which I won’t be discussing in this book, but
which you may encounter if you’re working with phones, cars, or in other non-PC
scenarios, may contain different roots of trust, such as:
● Root of Trust for Verification: A component that verifies an integrity measure-
ment against a policy. Normally found in systems such as some embedded or
mobile devices, where the device manufacturer also defines some approved
software.
● Root of Trust for Update: A component that verifies the legitimacy of an update,
usually by checking an authorized signature. Most commonly used for firmware
updates.
Measure Launch
Trusted component A
Measure Launch
Trusted component B
Measure Launch
Figure 1.2 An abstract measurement chain of trust. Each component in the chain
measures the next component before handing off control to it, placing
those measurements into the TPM. We can trust the measurement of
component A because we trust the root. If the measurement of
component A corresponds to a piece of software we trust, we can then
trust the measurement of component B, and so on until all trusted
components have been measured and launched. The TPM provides us
with a safe place to store these measurements
Figure 1.3 A 1.2 storage chain of trust. The Storage Root Key encrypts the secret
data of several other keys, including another storage key. That storage
key, in turn, can be used to encrypt the secret data of more keys. Our
trust in the security of all of the keys relies, in the end, on our trust in
the Storage Root Key
Introduction 9
complex limitations on the use of keys or commands act as safeguards against poten-
tially dangerous actions. For example, the limitations in 1.2 TPMs against the same
key being used for both signing and decryption operations directly prevent an entire
class of attacks which can result in unintentionally signed data, accidentally decrypted
secrets, or the loss of key material. Without those constraints, it would be easy for
an uninformed user or software bug to take actions with very severe unnoticed and
unintended consequences. It is important to note, however, that many actions which
would be limited in an ideal perfect-security world are essential for the smooth oper-
ation of real-world systems. TPMs therefore have plenty of compromises in their
design; places where they will allow common (but dangerous) operations, or where
they will inconveniently prevent such an operation even if that makes compatibility
difficult. Some of the biggest differences in TPM versions (see Section 1.3.6) result
from changing opinions about which compromises are necessary.
Et maintenant ?…
Maintenant, M. Adolphe appartient à la justice.
Elle peut le frapper ou l’absoudre, qu’importe !
Privé de son Antigone, jamais il ne rentrera au 17 où, pendant
plus de cent ans, les siens ont si rudement peiné pour acquérir une
honnête aisance, où il était fondé à espérer que, grâce à la guerre
longue, il aurait l’orgueil, lui, premier de sa race, d’asservir la fortune,
où, enfin, un fils né de sa chair lui aurait succédé.
Les Rabier ont cessé de régner sur la Maison…
FIN
ACHEVÉ D’IMPRIMER
POUR LA COLLECTION « ÉCHANTILLONS »
LE DIX SEPTEMBRE MIL NEUF CENT VINGT-CINQ
SUR LES PRESSES
DE L’IMPRIMERIE BUSSIÈRE
SAINT-AMAND (CHER)
*** END OF THE PROJECT GUTENBERG EBOOK MIREILLE DES
TROIS RAISINS ***
Updated editions will replace the previous one—the old editions will
be renamed.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com