HARDWARE & DEVICE SECURITY

DICE: Why Another Approach When TPM Already Exists?

Twelve bilingual comic plates follow warehouse devices, distinguish TPM modules from DICE mechanisms, and trace protected secrets, measured derivation, updates and verification, with two interactive labs.

24 min read

A warehouse is preparing to connect new sensors to its management service. The service needs to establish their origin and what software they booted. MY and the robot first place TPM and DICE on the system diagram, then follow one device through an update, copied labels and a replayed answer. The scenario is fictional; the concrete DICE flow uses the named Open Profile attestation path.

Previous lesson: TPM · Measured Boot & Attestation

01 · Are TPM and DICE two kinds of security chip?

Commands, implementation forms and an in-chip flow distinguish the TPM module from the DICE mechanism.
1/12 — Commands, implementation forms and an in-chip flow distinguish the TPM module from the DICE mechanism.

MY is planning how devices will connect to a warehouse service. The management laptop, gateway and sensors will all use that service, which needs to establish where they come from and what they booted. The system diagram mentions both TPM and DICE. The robot starts drawing them as interchangeable security chips. Before placing either name, the team needs to understand what each one describes. This is the fictional teaching scenario used in this lesson.

TPM stands for Trusted Platform Module. It is a security module with standardized commands and behavior. Software can ask it to perform operations with protected keys, or send it measurements recorded during boot. The TPM carries out operations under its commands and authorization conditions, then returns results. The platform still has to arrange which code is measured and how those measurements reach the TPM.[S8]

A security module does not have to be a separate chip. A TPM can be a discrete component on a motherboard or a function integrated into another chip. A firmware TPM runs within a protected execution environment provided by hardware. The three drawings show different ways of implementing TPM functions. A device may therefore provide TPM functions even when there is no separate package marked TPM.[S8]

DICE stands for Device Identifier Composition Engine. It describes a mechanism for building trust. The process starts with a protected device secret. Trusted boot code uses it to derive secrets tied to measured software state, then passes the appropriate material to later stages. Hardware restricts access to secrets, while trusted code carries out the derivation and handoff rules. Both are needed. The drawing places the process inside a chip so readers can see how they cooperate.[S3][S4]

Both TPM and DICE have specifications, and a system can use both. MY therefore draws the TPM as a security module that accepts commands, and DICE as a path through hardware protection and boot code. With those categories clear, the team can ask the next question: if the host already has a TPM, can it reliably account for the origin and firmware of every component inside it?[S9]

02 · The host has a TPM. Who attests its components?

Warehouse hosts and components supply evidence whose provenance, state and policy are checked by the verifier.
2/12 — Warehouse hosts and components supply evidence whose provenance, state and policy are checked by the verifier.

The management laptop can use a TPM to protect keys for login or disk unlocking and to provide boot-state evidence. The warehouse service also wants to know where a gateway component came from and which firmware it booted. These questions concern different objects. A host TPM does not automatically give every peripheral an independently verifiable identity. The design still needs trusted measurement and evidence paths that tie the evidence to the component’s actual origin.[S7][S9]

This lesson uses one division of work: the host uses TPM services, while a component with a protected hardware secret and trusted boot process uses DICE. Its evidence lets a verifier check the component’s identity and measured firmware before applying service policy. The host may collect component evidence into broader platform evidence. Its coverage depends on the actual measurement and evidence relationships.[S9]

DICE is used beyond small sensors. Caliptra’s design scope includes datacenter CPUs, GPUs, network interfaces and storage components. Android Automotive SDV uses DICE certificate chains to establish the identities of communicating virtual machines. The first describes a named design scope; the second is a particular automotive architecture. They illustrate larger-system and isolated-environment uses, rather than deployment in every server or Android device.[S10][S11]

Our warehouse sensor already has a protected device secret and trusted starting stage. The team can evaluate DICE using those capabilities, or consider integrating TPM services. The choice depends on protection requirements, hardware and maintenance. Neither approach owns an exclusive whole-system, component or device-size category. Next, change one condition: update this same sensor from firmware v1 to different v2 code and follow the evidence.

03 · Firmware changed. How does each proof change?

One firmware update contrasts TPM recording/signing with DICE derivation/certification while preserving a trusted origin.
3/12 — One firmware update contrasts TPM recording/signing with DICE derivation/certification while preserving a trusted origin.

First, calculate a short fingerprint from the firmware code. That is the measurement used in this lesson. Different v1 and v2 code is expected to produce different measurements. Both paths need trusted code to obtain and handle this information. Receiving a number labelled v2 is not enough to trust its origin. We hold the device, trusted starting stage and other conditions fixed to compare this update.[S3][S7]

In the TPM example, the platform calculates measurements and sends them to TPM records. On request, the TPM can use the same protected attestation key to sign evidence containing a new measurement digest. The signed state changes without necessarily replacing that key. This describes a common path. TPM supports other key and policy arrangements, so fixed keys are not a definition of all TPM behavior.[S7]

The DICE example uses the attestation path in Open Profile for DICE. Trusted code applies cryptographic rules to a secret and a code fingerprint, producing another secret. This is derivation, designed to make recovering the input secret from its result difficult. Changed measurements alter the affected stage’s attestation key and later keys. With earlier secrets and handoff protected, different measured firmware cannot obtain the original key through normal derivation. Later code need not access the root secret.[S3]

A changed attestation key can still belong to the same device. Here, the root secret, derivation rules and trusted earlier stage remain unchanged. The public key is the shareable half used to verify signatures. The earlier stage certifies the new public key and measurement, connecting the new branch to the established trust anchor. A certificate records a signed key-and-state relationship; page 8 explains it. Both paths still require service policy checks. A key change is not a security score.[S3]

Engineer extension: limit the comparison to the selected paths

The comparison selects common TPM measurement recording/signing and Open Profile attestation derivation. TPM supports other key and policy relationships, while DICE profiles may separate attestation from sealing material. One update with other inputs held fixed does not define every behavior of either technology.[S3][S7]

04 · Labels and fingerprints can be copied. Which device is genuine?

Two same-label requests copy public serials and fingerprints; the protected UDS supplies a different proof origin.
4/12 — Two same-label requests copy public serials and fingerprints; the protected UDS supplies a different proof origin.

On deployment day, the service receives two requests claiming to be SN-0042. They report the same serial number and firmware fingerprint. Those fields alone do not establish that the requests came from the same chip. A serial number is a public label that can be copied. Firmware may also be publicly downloadable, so two devices can contain identical code and fingerprints.

A hash function reduces data to a fixed-length value, which we call a code fingerprint. It helps compare content against an expected value, but does not itself establish which device produced it. Copying the correct hash differs from obtaining it through a trusted measurement process. The service needs a verifiable relationship connecting the public information to a protected source.[S3][S9]

This example starts from a root secret unique to each device: the Unique Device Secret, or UDS. Hardware protects it for use by the trusted starting stage. Another device that copies the serial and public fingerprint does not thereby obtain the same root secret. For that difference to matter, later software must not be free to read it. Restricted use and access are part of the design.[S3][S4]

The UDS is not the service’s complete reason for admission. Public keys, certificates and trusted enrollment must connect the proof to its origin, and policy must approve the reported state. We will follow those steps later. For now, the missing starting point is clear: public information describes a device, while its protected secret gives subsequent proof a basis that cannot simply be copied from a label.[S3]

05 · How does the secret bind to this firmware?

A device secret and code fingerprint jointly enter derivation, followed by device, code and identical-input comparisons.
5/12 — A device secret and code fingerprint jointly enter derivation, followed by device, code and identical-input comparisons.

A different secret in every chip does not yet describe its software. The trusted starting stage therefore measures the next program and supplies its fingerprint and the UDS to specified cryptographic derivation rules. The result depends on both the hardware secret and the measured code. Changing that code changes the material produced through normal derivation.[S3][S4]

The derived value is called the Compound Device Identifier, or CDI. Despite the word identifier, we draw it as a protected secret, not a public serial number. It can be used to derive an attestation key pair. The private key signs; the public key allows external verification. This separates the information a service receives from the material the device must protect.[S3]

Hold the other inputs fixed and change one condition. Different measured firmware on the same chip is expected to change the result. The same firmware on a chip with a different UDS is also expected to change it. The same device and complete inputs preserve the same derivation relationship. Configuration, such as normal or recovery mode, may also contribute. A version label alone does not establish identical inputs.[S3]

This calculation explains how proof material depends on device and software state. Secure Boot and other authorization mechanisms decide what may execute; service policy later decides admission. The interactive model lets you change the device or code and trace where the effects begin. A real implementation also has to protect what came before: later software must not inherit unrestricted access to earlier secrets.[S3][S4]

Engineer extension: complete inputs and teaching labels

Open Profile defines config, authority, mode and hidden inputs as well as code. The main example uses device, code and normal/recovery configuration to explain dependencies. A, B, v1 and v2 are public teaching labels. The lab calculates no real KDF or CDI and does not model manufacturing secrets. Implementation requires the profile’s complete input definitions and encodings.[S3]

06 · Can earlier secrets remain after handoff?

Before/after access boundaries protect earlier secrets and signing capability at handoff.
6/12 — Before/after access boundaries protect earlier secrets and signing capability at handoff.

Suppose the starting stage derives a CDI but also copies the UDS into memory readable by later code. A later compromise of sensor firmware may expose the root secret and let an attacker rebuild the same derivation origin. The two same-label requests on page 4 would then be harder to distinguish using the original proof relationship. Protection in hardware must extend to preventing unprotected software copies.[S4]

Before passing control to more complex code, the trusted starting stage must block later access to the UDS. Hardware locking is one possible protection in this example; the implementation determines the method. Temporary secret copies also need attention. Clearing, locking or isolation must correspond to real memory and permission boundaries. Deleting a variable name does not establish that its contents are inaccessible.[S3][S4]

The same rule applies across boot layers. The next stage receives the derived material it needs, while earlier CDIs, private keys and signing capabilities remain protected. Hiding an earlier private key is insufficient if later code can freely ask that stage to sign arbitrary data. That could still undermine the intended attestation relationship. The protected boundary includes both secret storage and the ability to use it.[S3]

These restrictions separate each stage’s capabilities and limit the material exposed to compromised later code. Actual hardware, boot code and isolation must enforce them. The diagram does not substitute for a product’s physical-attack assessment. Next, extend this single handoff into a complete boot process and trace which later results change when an earlier input changes.

Engineer extension: enforce the handoff boundary

Open Profile requires a later stage neither to obtain nor use earlier CDIs. Protection may involve hardware access locks, secret destruction and isolation. Compiler behavior, caches, shared memory and service interfaces require product-specific analysis. For example, compact ROM code can work with hardware protection to provide the trusted starting stage. The architecture and product threat model determine the appropriate implementation.[S3][S4]

07 · How does trust continue through boot stages?

Layered measurements and derivation propagate forward; later changes do not rewrite earlier results.
7/12 — Layered measurements and derivation propagate forward; later changes do not rewrite earlier results.

Boot usually involves more than one program. Our example starts with a trusted stage, then a bootloader, then sensor firmware. Before passing control, each stage obtains the next stage’s measurement and combines it with its current secret to derive the next material. This carries the relationship between device and measured boot stages into later proof.[S3]

The dependency has a direction. If the trusted starting stage and bootloader remain unchanged, replacing only sensor firmware does not rewrite earlier derivations. It affects the corresponding stage and any later material. Changing an earlier input instead changes the secret on which later stages depend, so the effect propagates forward.[S3]

Every handoff retains page 6’s protection requirements. Additional layers must not let later code read the UDS or earlier private material. A diagram with many layers provides little separation if all its code can read one common root secret. The implementation must identify who performs each measurement and derivation, and who enforces each access restriction.[S3][S4]

The interactive model’s unchanged/changed indicators describe dependencies in this selected process. They neither calculate real keys nor classify changed code as malicious. Legitimate updates also change inputs. The next question concerns the outside service: if secrets stay inside the device, what information can the cloud use to check its claims?

08 · How can the cloud verify without receiving secrets?

Private material stays in the device; public certificates and signatures connect to trusted enrollment and state policy.
8/12 — Private material stays in the device; public certificates and signatures connect to trusted enrollment and state policy.

The device signs data with its private attestation key; the service checks the signature with the corresponding public key. Verification therefore does not require sending the UDS, CDI or private key. A signature initially connects a reply only to a public key. Establishing that the key belongs to the expected device and boot state requires tracing its provenance.[S3]

In this example, an earlier stage measures the next stage and certifies its public key and measurement before handing over control. It then protects its secrets and signing capability. The next stage receives a public relationship it can present. Even if compromised later, its own material does not let it reissue the earlier stage’s certificate with a different measurement. This depends on protecting that earlier capability.[S3]

The service follows the public certificate chain to an anchor it already trusts. The trusted starting stage also derives a device root key pair from the UDS. In this example, the vendor certifies its public key at manufacture, and the service enrolls the trusted source and device relationship beforehand. That is the manufacturing endorsement used here. An attacker generating keys and signing a complete chain does not automatically gain that provenance. Valid signatures and a trusted starting point are separate requirements.[S3][S5]

After checking provenance and signatures, the service compares measurements and configuration with its allowed-state policy. The outcome may be trusted provenance but a state not yet admitted. Verification therefore includes both identity relationships and state appraisal. A certificate does not make the complete service decision. A legitimate update provides a useful example of those decisions diverging.

Engineer extension: roots, device identity and leaf keys

The example establishes device provenance through a UDS-derived public key and manufacturing endorsement, then certifies later keys through layered certificates. A manufacturing trust anchor, a device root public key and a final-stage public key are distinct roles. Verifiers need trusted-source, certificate-scope, allowed-state and invalidation decisions. An arbitrary self-signed chain may lack established provenance even when its signatures are mathematically valid.[S3][S5]

09 · How is the same device recognized after an update?

An updated certificate branch still links to the original device; installation and admission approval remain separate.
9/12 — An updated certificate branch still links to the original device; installation and admission approval remain separate.

The vendor releases new sensor firmware and approves installation. Changed code alters the affected and later attestation material. A new public key does not, by itself, establish that someone replaced the sensor. The service must trace whether the new key retains a trusted provenance relationship.[S3]

In our Open Profile example, manufacturing endorsement connects to a root public key derived from the UDS. Only sensor firmware changes; the root secret, relevant derivation rules and trusted earlier stage stay fixed. That stage issues a certificate for the new key and measurement, connecting the new branch to the enrolled device. An update need not break the chain. Changing those premises requires a separate continuity analysis.[S3]

Recognizing the device still differs from admitting it. Vendor-approved v2 may not yet appear in the warehouse service’s allowlist. Provenance and a fresh reply can be valid while existing policy puts admission on hold. An administrator must check the approved version and reference information before updating policy. Treating every new key as an impostor, or every vendor signature as automatic admission, misses that distinction.[S3][S5]

This is why the lesson specifies attestation use. Sealing protects data with a device-derived secret so that code meeting the unsealing conditions can decrypt it later. The same named profile can apply different inputs to provide stability for that use. A changed attestation key does not imply that every data key changes or that all data is lost. Now suppose the service has approved v2. It still needs to determine whether the received answer was produced for this request.[S3]

Engineer extension: attestation and sealing stability

Open Profile v2.6 includes code, config, authority, mode and hidden in Attestation CDI inputs. Sealing CDI uses the more stable authority, mode and hidden inputs. A code-only update can therefore change attestation material without implying the same sealing change. Stability still depends on relevant inputs and earlier stages. Versioned sealing needs additional mechanisms; this lesson does not replace a complete data-migration design.[S3]

10 · Can yesterday’s valid answer be reused today?

An old N1 response fails the new N2 challenge; a fresh signature adds no new boot measurement.
10/12 — An old N1 response fails the new N2 challenge; a fresh signature adds no new boot measurement.

Another request presents yesterday’s recorded successful answer. Its signature may remain valid and its source may be trusted, but it is still an answer produced earlier. Accepting it could let someone resend old data without participating in the current attestation exchange. This is a replay problem.[S5]

Our service sends a fresh, unpredictable challenge for each request, illustrated as N1 and N2. The attester signs the current challenge together with its evidence. The service checks that challenge against this request. A valid signature on yesterday’s N1 does not turn it into today’s N2. The challenge must be bound to the signed contents, rather than attached as an independently replaceable field.[S5]

A new signature containing N2 helps establish a reply produced for this request. It does not make the device remeasure its complete boot software. Some claims in the reply may still come from earlier boot measurements. Evidence collection time, reply time and the state actually observed must be understood separately.[S5]

The service therefore checks provenance, signatures, the current challenge and allowed state together. These address who supplied the evidence, whether it was altered, whether the reply belongs to this request, and whether the state is admitted. Next, move further along the timeline: the sensor passed its boot-state check, but a vulnerability was exploited later. What can a fresh reply still tell us?

11 · What if compromise happens after boot?

Post-boot compromise may retain key use and answer a fresh challenge without guaranteeing current readings.
11/12 — Post-boot compromise may retain key use and answer a fresh challenge without guaranteeing current readings.

The sensor firmware was measured at boot and matched the service’s requirements. Later, an exploited vulnerability gave an attacker control over its execution state in memory. If that change lies outside the original measurement and evidence scope, boot inputs do not recompute themselves and the previously derived attestation key does not automatically change.[S3][S5]

Add one explicit condition: the compromised firmware can still use the original attestation key. It may then receive a fresh challenge and sign a reply for that request. A new signature does not fill the runtime observation gap. Additional isolation, measurement or restrictions on key use may change a real product’s behavior; this example does not give every compromised device identical capabilities.[S5]

The service can verify only the scope the evidence describes. It may establish which program was booted without establishing that the current application remains uncompromised. Nor does boot evidence alone guarantee that a temperature reading reflects the physical environment. The sensor element, data path and surroundings each involve further conditions.

Appropriate runtime isolation, secret protection, patching and service policy address these gaps. Additional evidence may be needed to observe relevant current state. Sending another challenge does not measure previously unobserved contents. Back at the warehouse, MY must keep each admission reason within what its evidence supports, separating established facts, rejection reasons and unresolved state.[S5]

Engineer extension: freshness has an object and a time scope

RFC 9334 distinguishes observation of claims from evidence generation and signing. A nonce can place signing after challenge generation without establishing a fresh measurement of every claim. This example fixes measurement at earlier boot and explicitly retains the compromised program’s key-use capability. Independent runtime measurement or isolation requires its own provenance and coverage conditions.[S5]

12 · Which request can MY accept now?

Copied labels, approved updates, replay and runtime scenarios require distinct admission reasons and scopes.
12/12 — Copied labels, approved updates, replay and runtime scenarios require distinct admission reasons and scopes.

The service receives the requests again. Copying SN-0042 and its public fingerprint does not establish trusted proof, so that request is not admitted under our policy. A legitimately updated device has a reason for admission when its chain is trusted, its current reply is valid and its new state is allowed. Replaying yesterday’s response fails the challenge check. Each decision follows a different check, rather than a serial or version label alone.

Now place the accepted device in page 11’s scenario: compromise occurs after its successful boot-state check. The earlier result remains valid within its scope, but that scope does not expand. The service must ask about later-state evidence, isolation of key use and acceptable risk. A boot attestation does not guarantee every future instant.[S5]

Return to the first system diagram. TPM provides callable protected operations; DICE describes how a device secret, measured derivation and protected handoffs establish trust relationships. The management laptop retains TPM services, while suitable components and sensors can use DICE evidence. The verifier appraises each within its coverage. They can be integrated, but responsibility for each required function must remain explicit.[S3][S8][S9]

The resulting reasoning sequence is to locate the protected origin, trace measurements and derivation, inspect handoff boundaries, then check the service’s trusted sources, freshness and policy. The two labs let you change conditions; five explained questions test nearby situations. Secure Elements offer another component to compare later. Commands, certificate encodings and manufacturing provisioning can be explored when implementation requires them.

Lab 1: Updates and derivation inputs

Baseline: device A, bootloader v1 and sensor firmware v1. Normal mode and other inputs stay fixed. First change only sensor firmware to compare the paths, then change the device or earlier code to trace the affected stages.

Changing inputs shows unchanged/changed stages and the selected TPM key/record behavior.

Lab 2: Can the service accept this evidence?

This example applies a selected boot-evidence and admission policy. Measurements come from earlier boot. It checks the chain, reply signature, challenge and allowed state. Runtime is shown separately so a passing boot-evidence result is not mistaken for a current safety guarantee.

Interactive results list admission, rejection or missing-information reasons; this boot evidence does not establish runtime safety.

Recap: make the reasons for trust verifiable

The TPM module provides protected operations. DICE connects device secrets, measured derivation and protected handoffs. External verification still needs provenance, reply freshness and admission policy, with an explicit boundary around unobserved state.

#DICE #HardwareSecurity #RootOfTrust #Attestation #Firmware

Glossary

TPM
A security module with standardized commands and behavior, available in several implementation forms.
DICE
A mechanism using protected secrets, trusted code and handoffs to establish identity and attestation relationships.
UDS
A device-unique root secret, restricted to the trusted starting stage in this example.
CDI
A secret derived from device material and specified inputs, not a public serial number.
Measurement
An evidence input representing selected code or state; its coverage must be defined.
Certificate
A signed public-key relationship with associated information; trusted provenance still needs checking.
Trust anchor
An origin the verifier already trusts when checking later certification relationships.
Nonce
An unpredictable value for this request, signed together with the evidence.
Admission policy
The service’s rules for accepting sources, states and other required conditions.

Five questions with explanations

1. What is wrong with drawing TPM and DICE as interchangeable chips and assigning them to large and small devices respectively?

TPM is a security module with several implementation forms. DICE is a mechanism implemented through hardware and trusted code. Device size does not define their roles. They can coexist, but the design must specify which evidence each host, component or environment supplies and how its provenance is trusted.

2. Must both attestation paths change their keys after a firmware update on the same device?

No. This TPM path may reuse its attestation key to sign a new measurement digest. The selected Open Profile DICE attestation path changes affected and later material when measured inputs change. That comparison does not mean all TPM keys stay fixed or every DICE use must change keys.

3. Why is a previous CDI left in memory readable by the next stage a problem, even if hardware protects the UDS?

Compromised later code may use earlier material that should be isolated, breaking the layered boundary. Handoff must address UDS access, temporary copies and earlier signing capability, not merely the root secret’s original storage location. Each stage should receive only the material it needs.

4. Installation is vendor-approved and the chain and current reply are valid, but the service refuses admission. Has device identity vanished?

First check whether the service allows the new state. With the root secret, relevant derivation rules and trusted earlier stage fixed, this example’s new branch still links to the same device. Vendor installation approval does not replace service admission policy. A pending update can justify a hold without implying impersonation or malware.

5. Compromise occurs after boot, but the original attestation key still answers a fresh challenge. Does that guarantee correct sensor readings?

No. The fresh challenge binds the reply to this request without adding runtime or physical-reading measurements to the earlier boot evidence. The retained key capability explains the fresh signature. Assessing current state requires evidence, protection and policy covering the relevant conditions.

Primary sources and verification date

Checked on 2026-10-22. The concrete example uses Open Profile for DICE v2.6, not a claim that it is a formal TCG standard. RFC 9334 is informational. Caliptra and AAOS examples retain their documented scope.

  1. [S3] Open Profile for DICE v2.6 — named example, not a formal TCG standard
  2. [S4] Microsoft Research — DICE: Device Identifier Composition Engine
  3. [S5] RFC 9334 — RATS Architecture, especially sections 10.2–10.4 (Informational)
  4. [S7] Microsoft Learn — How Windows uses the TPM
  5. [S8] Microsoft Learn — TPM recommendations: discrete, integrated and firmware forms
  6. [S9] Trusted Computing Group — DICE Root of Trust, component identity and evidence
  7. [S10] CHIPS Alliance — Caliptra architecture and design scope
  8. [S11] Android Automotive SDV — VM identity and attestation

Thanks for reading.

Take the concept with you, not just the terminology.

#DICE#Hardware Root of Trust#Attestation