TPM Info
TPM Info
TPM Info
0 and some
more
Federico Mancini
AFSecurity Seminar, 30.11.2015
The trusted platform module - TPM
• The TPM implementation can be secure, but not the platform on which it is
attached
• The platform will be trusted to report certain values in a correct way,
because it uses the TPM to do so
• I can take a decision about whether to further trust the platform with other
tasks based on the TPM supported funcionalities
I can trust that a system is running Windows because the TPM says so. That
does not make it secure.
Inside a TPM
I/O
NVRAM
CRYPTO Endorsment Key
(EK)
RNG
Storage Root Key
(SRK)
RSA Engine
Certificates
Key Generation
PCRs
1 17
OTHER
8 21
Program Code
16 24
Exec Engine
Opt-In
Platform Configuration Registers - PCR
I/O
• 20 bytes registers to store NVRAM
CRYPTO NVRAM
SHA-1 hashes. CRYPTO Endorsment Key
(EK)
RNG
• Cannot be written directly, only Storage Root Key
(SRK)
extended: PCR = SHA- RSA Engine
Certificates
1(Current value || new hash)
SHA-1 Engine Policies/AuthData
• 1-8 reserved. At least 24 must
be present. Key Generation
• They are always reset at boot PCRs
PCRs
time and only then. 1 17
OTHER
8 21
Program Code
16 24
Exec Engine
Opt-In
TPM main functionalities
• New functionalities:
– Platform integrity protection (Trusted Boot)
– Platform Attestation
– Sealing
– Anonimity
Trusted Boot
PCRs
324HIAS23408ADFI
INR89403UE83FOQ
N356SDDW654SD
DS654SD97PHJD
Integrity protection
Log file
PCRs
324HIAS23408ADFI
INR89403UE83FOQ
N356SDDW654SD
DS654SD97PHJD
PCR values can be used to verify the integrity of the log file
CORRECT
IMPLEMENTATION
TPM PROTECTION
ASSURANCE Lv 4
TEMPER PROOF
CORRECT FILE
?
MEASUREMENTS
PCRs
324HIAS23408ADFI
INR89403UE83FOQ
N356SDDW654SD
DS654SD97PHJD
Root of Trust for Measurement
POTENTIALLY COMPROMISED
• Secure boot:
PCRs
special PCR with
good
324HIAS23408ADFI
configuration
INR89403UE83FOQ value
• Verified boot:
N356SDDW654SD signatures of
components
……
• Measured boot:
pretty much the
same
Guarantee that there is always a component that will measure the malware
S-CRTM Problems
• TPM 2.0 tries to address this problem allowing more flexible policies
about the PCR values
Attestation protocol: Root of trust for Reporting
SML
SML
SML
DB with valid
configurations
• Each TPM has a unique RSA key pair called Endorsment Key (EK)
and a certificate certifying that the EK belongs to a genuine TPM
• This to allow third parties to verify that they are talking to a real TPM
and that the compromise of one TPM does not affect all the other
(otherwise one global TPM key could have been used)
• However, this also means that each TPM is identifiable.
• That is why the EK cannot be used for signing, but only encrypting
and decrypting, and a TPM can create as many Attestation Identity
Keys (AIK) as it wishes to be used to sign TPM generated content
instead.
• But how to certify that these AIKs also are generated and protected
in a genuine TPM?
Privacy CA (PCA)
Direct Anonymous Attestation
CA ISSUER
(PK)CA
(PK’)PK
EK
(DAAcert)PK’ VERIFIER 1
Verify message by
using PK’ and PK
VERIFIER 2
TPM 2.0 has a standard ECC-DAA
functionality
Sealing/Binding
TRUSTED BOOT
NVRAM PCR[1,2,3…]
DATA
ENCRYPTION
USER DATA
SOFTWARE
TPM 2.0 has many
more authentication
methods
TPM 1.2 Key Hierarchy
Problems
OS/BIOS/V
M….
CPU
Execute SENTER
ILP=BSP MLE execution
SINIT AC MLE
Intel SGX (Secure Guard Extensions) is coming next to add flexibility. Reminds of Flicker.
TPM 2.0
• Platform hierarchy
– For platform firmware BIOS/UEFI
– When the platform boots, the platform hierarchy is enabled and platformAuth is
set to a new value
• Allows use of the TPM to ensure the integrity of the firmware
• This is not a capability that should be under control of the user, so it isn’t
– PlatformAuth can be used to:
• Allocate NonVolatile memory resources
• Initialize the TPM
• Control the enables of the other hierarchies
– Before platform firmware turns control of system to OS, phEnable can be turned
off or platformAuth can be randomized
• PlatformAuth would be placed in secure location (SMM) so that only platform
firmware would be able to access it
TPM 2.0 – Endorsement Hierarchy
• Endorsement hierarchy
– For privacy administrator
• Endorsment keys
– As many as one wish
– Created from a secret seed
– Can be used to sign
– Can be used with different algorithms
– Belongs to its own key hierarchy
– Examples:
• One can create a signing EK to sign a CSR and get a Device ID
directly from the certificate autorithy that has a list of valid EK
• If EK comes with EK credentials, it should not be allowed to sign to
preserve privacy
TPM 2.0 - One seed to rule them all
TPM 2.0 – Keys
• You can lock not just to a certain set of PCRs equals a certain value
• You can also lock to: “Any set of PCRs / values signed by an authority,
as represented by this public key”
Examples:
– You can lock to “PCR 0 (the BIOS) as signed by DELL”
• Thereafter upgrading your BIOS to a signed DELL BIOS won’t
cause problems!
IdP
Access control
IS, communication protected with PK
decisions based on IS
1. Send an IS Request
New Solution with TPM support
ADMIN
Certify TPM Generate AIK certificate
and Platform and store it on CA
configuration
1. Activate TPM
Login to CA
2. Generate AIK
and approve
3. Quote PCRs
the issuing of a
Generate and store
AIK certificate AIK certificate
indexed by a random
handle hashed
Deployment scenario
1. Hash AIK handle
2. Fetch AIK certificate
3. Fetch User certificate
4. Send them to the IdP
1. Check LK Signature
2. Compare pre and post deployment configuration
3. Fetch attributes
4. Issue an IS with degree of integrity/trust
5. Encrypt it with LK and send it
Access control
IS, communication protected with LK
decisions based on IS