From 7acdf1cb9ab4c404742a41e49feb25cfcb339474 Mon Sep 17 00:00:00 2001 From: Sven Vermeulen Date: Tue, 14 Aug 2012 22:00:57 +0200 Subject: Add info on TPM --- xml/integrity/concepts.xml | 165 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 163 insertions(+), 2 deletions(-) diff --git a/xml/integrity/concepts.xml b/xml/integrity/concepts.xml index c8859f9..c9f6313 100644 --- a/xml/integrity/concepts.xml +++ b/xml/integrity/concepts.xml @@ -20,8 +20,8 @@ more secure environment to work in. -1 -2012-07-30 +2 +2012-08-14 It is about trust @@ -517,6 +517,167 @@ it took before. Trusted Platform Module +

+Years ago, a non-profit organization called the Trusted Computing Group was +formed to work on and promote open standards for hardware-enabled trusted +computing and security technologies, including hardware blocks and software +interfaces across multiple platforms. +

+ +

+One of its deliverables is the Trusted Platform Module, abbreviated to +TPM, to help achieve these goals. But what are these goals exactly (especially +in light of our integrity project)? +

+ +
    +
  • + Support hardware-assisted record (measuring) of what software is (or was) + running on the system since it booted in a way that modifications to this + record (or the presentation of a different, fake record) can be easily + detected +
  • +
  • + Support the secure reporting to a third party of this state (measurement) so + that the third party can attest that the system is indeed in a sane state +
  • +
+ +

+The idea of providing a hardware-assisted method is to prevent software-based +attacks or malpractices that would circumvent security measures. By running some +basic (but important) functions in a protected, tamper-resistant hardware module +(the TPM) even rooted devices cannot work around some of the measures taken to +"trust" a system. +

+ +

+The TPM chip itself does not influence the execution of a system. It is, in +fact, a simple request/reply service and needs to be called by software +functions. However, it provides a few services that make it a good candidate to +set up a trusted platform (next to its hardware-based protection measures to +prevent tampering of the TPM hardware itself): +

+ +
    +
  • + Asymmetric crypto engine, supporting the generation of asymmetric keys (RSA + with a keylength of 2048 bits) and standard operations with those keys +
  • +
  • + A random noise generator +
  • +
  • + A SHA-1 hashing engine +
  • +
  • + Protected (and encrypted) memory for user data and key storage +
  • +
  • + Specific registers (called PCRs) to which a system can "add" data to +
  • +
+ + + +
+Platform Configuration Registers, Reporting and Storage + + +

+PCR registers are made available to support securely recording the state of +(specific parts of) the system. Unlike processor registers that software can +reset as needed, PCR registers can only be "extended": the previous value in the +register is taken together with the new provided value, hashed and +stored again. This has the advantage that a value stores both the knowledge of +the data presented to it as well as its order (providing values AAA and BBB +gives a different end result than providing values BBB and AAA), and that the +PCR can be extended an unlimited number of times. +

+ +

+A system that wants to securely "record" each command executed can take the hash +of each command (before it executes it), send that to the PCR, record the event +and then execute the command. The system (kernel or program) is responsible for +recording the values sent to the PCR, but at the end, the value inside +the PCR has to be the same as the one calculated from the record. If it differs, +then the list is incorrect and the "secure" state of the system cannot be proven. +

+ +

+To support secure reporting of this value to a "third party" (be it a local +software agent or a remote service) the TPM supports secure reporting of the PCR +values: an RSA signature is made on the PCR value as well as on a random +number (often called the "nonce") given by the third party (proving there is no +man-in-the-middle or replay attack). Because the private key of this signature +is securely stored on the TPM this signature cannot be forged. +

+ +

+The TPM chip has (at least) 24 PCR registers available. These registers will +contain the extended values for +

+ +
    +
  • + BIOS, ROM and memory block data (PCR 0-4) +
  • +
  • + OS loaders (PCR 5-7) +
  • +
  • + Operating System-provided data (PCR 8-15) +
  • +
  • + Debugging data (PCR 16) +
  • +
  • + Localities and Trusted Operating System data (PCR 17-22) +
  • +
  • + Application-specific data (PCR 23) +
  • +
+ +

+The idea of using PCRs is to first measure the data a component is about +to execute (or transfer control to), then extend the appropriate PCR, +then log this event in a measurement log and finally transfer +control to the measured component. This provides a trust "chain". +

+ + +
+
+Trusting the TPM + + +

+In order to trust the TPM, the TCG basis its model on asymmetric keys. Each TPM chip +has a 2048-bit private RSA key securely stored in the chip. This key, called the +Endorsement Key, is typically generated by the TPM manufacturer during +the creation of the TPM chip, and is backed by an Endorsement Key certificate +issued by the TPM manufacturer. This EK certificate guarantees that the EK is in +fact an Endorsement Key for a given TPM (similar to how an SSL certificate is +"signed" by a Root CA). The private key cannot leave the TPM chip. +

+ +

+A second key, called the Storage Root Key, is generated by the TPM chip +when someone takes "ownership" of the TPM. Although the key cannot leave the TPM +chip, it can be removed (when someone else takes ownership). This key is used to +encrypt data and other keys (user Storage Keys and Signature +Keys). +

+ +

+The other keys (storage and signature keys) can leave the TPM chip, but always +in an encrypted state that only the TPM can decrypt. That way, the system can +generate specific user storage keys securely and extract them, storing them on +non-protected storage and reload them when needed in a secure manner). +

+
-- cgit v1.2.3-65-gdbad