Understanding DICE

UDS, the Chain of Trust, DPE, and Caliptra

Posted by Suyeon Lee on June 28, 2026 · 19 mins read

Table of Contents

  1. What Is DICE
  2. What DICE Does
  3. Core Concepts: UDS and CDI
  4. DICE's Four-Step Operation
  5. Extension: Repeating the Four-Step Cycle
  6. Certificate Chain
  7. Open DICE: The Reference Implementation
  8. DICE Protection Environment
  9. Real-World Implementations
  10. Wrap-up

1. What Is DICE

DICE traces back to a concept Microsoft Research proposed in 2016. TCG (Trusted Computing Group) later standardized it and published the official spec.

TCG is the same standards body best known for the TPM (Trusted Platform Module). Where TPM defines external security chips for desktops and servers, DICE aims at a lightweight trust foundation for resource-constrained embedded/IoT devices — the idea that you can achieve a similar level of assurance using just a combination of software and hardware, without a separate chip like a TPM.

DICE stands for Device Identifier Composition Engine. Breaking down each word:

  • Device: creates an identity bound to one specific device.
  • Identifier: that identity takes the form of a cryptographic key.
  • Composition: the identity is created by composing a hardware secret (UDS) with software measurements.
  • Engine: not a physical chip, but a procedure. It defines the rule for how to derive a key this way — whenever a ROM or secure core carries out that procedure, it's acting as DICE.

Put simply, DICE is the process of building a chain of trust (keys + certificates) while booting; separate runtime protocols like SPDM/DPE are what actually use that chain to perform attestation.

2. What DICE Does

It's worth being precise about the scope of what DICE actually does. In one line:

DICE = the process of building a chain of trust (keys + certificates) while booting.

Boot Time: Building the Key Hierarchy and Certificate Chain

DICE's job is this: as each layer along the boot chain measures the next layer, it computes a CDI from that measurement, and derives a key pair and certificate from the CDI. Once boot finishes, DICE's job is done. The output is the RT Alias Key and its certificate chain.

ROM → compute CDI → generate IDevID, LDevID, FMC Alias Cert
FMC → compute CDI → generate RT Alias Cert
Boot complete → DICE finished

Runtime: the Protocols That Use DICE's Output

These are the things that actually run after boot, using the material DICE produced.

  • SPDM Attestation: signs challenges with the RT Alias Key and presents the certificate chain. Remotely proves "this device is running this firmware."
  • DPE service: at runtime, SoC components can append additional measurements to the DICE chain. This is the concept of extending DICE past boot time.

In other words, SPDM and DICE operate at different layers. DICE is "how the certificates get made"; SPDM is "how those certificates get exchanged and verified."

3. Core Concepts: UDS and CDI

DICE revolves around two core concepts: UDS and CDI.

UDS (Unique Device Secret)

UDS is a secret value unique to each device.

  • Stored in non-volatile hardware like eFuse or OTP (One-Time Programmable) storage.

It's generated either externally or internally:

  • eFuse/OTP injection: on the manufacturing line, an HSM generates a random 128–256-bit value per device and burns it into eFuse. This is how Caliptra's UDS works.
  • SRAM PUF: instead of injecting a separate value, it uses the manufacturing-process variation in SRAM cells (the 0/1 initial-value pattern at power-on) as a device fingerprint. Mostly used in small MCUs without eFuse.
  • TRNG-generated internally: at first boot, a value is generated with a TRNG and stored in NV storage. Since nothing is injected externally, this reduces exposure to supply-chain attacks.

UDS matters because it's the seed for the entire chain of trust. Without ever being exposed externally, it becomes the source that derives the keys for every layer. Access to the UDS is blocked once the DICE process completes — specifically, right after the ROM computes the first CDI.

Comparing UDS in the ARM Ecosystem and in Caliptra

The ARM ecosystem calls the same concept the HUK (Hardware Unique Key). The concept is identical, just named differently — the difference is that HUK is used for more than DICE CDI computation (e.g., PSA platform key derivation too), and in ARM CCA environments it's paired with a GUK (Group Unique Key).

UDSHUK
SourceTCG DICE specARM PSA/TrustZone ecosystem
PurposeDedicated to DICE CDI derivationMulti-purpose: CDI plus PSA platform keys, etc.
Paired conceptNoneGUK (in CCA environments)
Access cutoffImmediately after computing the CDIImmediately after ROM/OTP code completes

CDI (Compound Device Identifier)

The CDI is the result of composing the UDS and a software measurement with a KDF (Key Derivation Function). It's computed like this — I'll cover exactly which algorithm and additional details in section 9, Real-World Implementations.

CDI_Attestation = KDF(UDS, Hash(code) ‖ Hash(config) ‖ other inputs)
CDI_Sealing     = KDF(UDS, Hash(code) ‖ Hash(config) ‖ version info)

CDI splits into two kinds depending on purpose:

  • Attestation CDI: used to derive the key pair used for remote attestation. The basis for the claim "I am this specific device, running this specific software."
  • Sealing CDI: used to derive an encryption key for sealing data. Used to create data that can only be unsealed by a specific software version. If the firmware changes, the seal can't be undone — a natural rollback defense.

If the software changes, the CDI changes with it. That the key reflects software state is DICE's single most powerful property.

4. DICE's Four-Step Operation

Here's a step-by-step look at what happens when DICE runs.

Step 1. Measure

The DICE subject (usually the ROM, or a previous layer) hashes the next layer's code and configuration.

  • Code hash: e.g., a SHA-384 of the firmware image that will run next
  • Config hash: debug-lock state, secure boot mode, specific config bits, etc.

Since this measurement feeds into the CDI computation, what gets measured determines what the CDI means. This config value can vary by platform, and platforms often combine several config values together.

Step 2. Compute CDI

A new CDI is created using a KDF.

CDI_new = HMAC-KDF(key=UDS or CDI_prev, data=measurement)

The first layer uses the UDS as input; every subsequent layer uses the previous CDI as input. The UDS itself is used exactly once.

Step 3. Lock UDS

The moment CDI computation finishes, access to the UDS is blocked at the hardware level — implemented via register locks, memory protection settings, and the like. From this point on, no code can access the UDS value.

This lock is the core of DICE's security model. Even if a later layer is compromised, the UDS itself stays safe.

Step 4. Transfer Control

The newly computed CDI is handed to the next layer, along with control. That next layer uses the CDI to derive its own keys, then repeats the same process for the layer after it.

5. Extension: Repeating the Four-Step Cycle

Above, we walked through a single DICE cycle in detail. In an actual booting sequence, DICE repeats at every boot stage. For example, the structure looks like this:

┌─────────────────────────────────────────────┐
│  HW  │  UDS (eFuse, never exposed externally)│
└──────┴───────────────────────────────────────┘
           │  KDF(UDS, Hash(ROM))
           ▼
┌─────────────────────────────────────────────┐
│  ROM │  CDI_0  (Attestation / Sealing)       │
└──────┴───────────────────────────────────────┘
           │  KDF(CDI_0, Hash(BL1))
           ▼
┌─────────────────────────────────────────────┐
│  BL1 │  CDI_1                                │
└──────┴───────────────────────────────────────┘
           │  KDF(CDI_1, Hash(BL2))
           ▼
          ...

NOTE: in this diagram, a step is added where a hardware DICE computes the ROM's own hash before the ROM stage runs — but on most platforms, including Caliptra, the ROM is assumed to be the Root of Trust and the first trust anchor, so that step (hashing the ROM itself) is skipped.

There are two important properties visible in this structure.

1) Software measurements are reflected in the keys. If the BL1 code changes, CDI_1 changes, and every CDI downstream of it changes too. Booting with tampered firmware can never reproduce the keys of a legitimate boot.

2) Each layer can only access its own CDI. BL2 receives CDI_2, but it can't work backward from that to recover CDI_0 or the UDS. That's guaranteed by the one-way nature of the KDF.

6. Certificate Chain

Once a key pair is derived from a CDI, that key needs a certificate chain to actually be trusted. The DICE Attestation Architecture defines that certificate chain as follows.

IDevID (Initial Device Identity)

  • Derivation source: KDF(UDS)
  • Certificate signer: the Vendor CA (issued at manufacturing)
  • Used for: signing the LDevID certificate. IDevID and LDevID are sibling keys, each independently derived from the UDS; IDevID signs LDevID's certificate to chain them together as the same device.
  • Renewable: no (fixed to the UDS)

LDevID (Local Device Identity)

  • Derivation source: KDF(UDS, FE). FE (field entropy) is injected at field deployment.
  • Certificate signer: IDevID
  • Used for: signing the FMC Alias certificate
  • Renewable: yes (regenerated by rotating the FE)

FMC Alias Key

  • Derivation source: KDF(CDI_FMC). Derived from the CDI produced when the ROM measures FMC.
  • Certificate signer: LDevID
  • Used for: signing the RT Alias certificate
  • Renewable: automatically, every boot

RT Alias Key

  • Derivation source: KDF(CDI_RT). Derived from the CDI produced when FMC measures the Runtime.
  • Certificate signer: FMC Alias
  • Used for: signing challenges in remote attestation over protocols like SPDM. If the firmware changes, the CDI changes, so the key changes automatically too.
  • Renewable: automatically, every boot

Here's what the certificate signing chain looks like visualized:

Caliptra DICE certificate chain, from the Vendor Provisioner CA down through IDevID, LDevID, FMC Alias, RT Alias, to the DPE leaf

If attestation is the act of presenting a certificate, then because the firmware measurement is already baked into that certificate, this structure lets you know what software a device is running without a separate Measurement Report.

7. Open DICE: The Reference Implementation

Where the TCG spec defines the conceptual model, Google's Open DICE is a reference implementation that makes that spec concrete enough to actually build.

Open Profile's Key Contribution

The TCG spec alone doesn't specify the inputs that go into a CDI computation in enough detail. Open DICE standardizes the inputs for each layer.

InputMeaning
Code HashHash of the next layer's code image
Authority HashHash of the public key that signed the code
Config DescriptorStructured config values: debug state, device settings, etc.
ModeNormal / Debug / Recovery / Not Configured
HiddenAn additional secret the consumer can inject

By defining these inputs consistently, implementations from different vendors can compute and verify CDIs the same way.

Certificate Format: X.509 vs. CWT

Open DICE supports two certificate formats:

  • X.509: fully compatible with existing PKI infrastructure, reusing the verification tooling of the browser/TLS ecosystem. It's larger, which suits higher-performance environments.
  • CBOR Web Token (CWT, RFC 8392): a lightweight, CBOR-encoded token that packs the same information into a much smaller footprint for IoT/embedded environments outside TLS. This is what Open DICE's CBOR profile covers.

You can mix both formats within a single chain — upper layers as X.509, lower embedded layers as CWT.

8. DICE Protection Environment

The DPE (DICE Protection Environment) spec, published in 2023, takes DICE a step further into a service model.

The Problem

In the base DICE model, DICE operations (CDI computation, key derivation) run directly inside each layer's code along the boot chain. That means that layer has direct access to the CDI and derived keys.

Ideally, the CDI and secret keys should never leave an isolated environment. DPE proposes separating DICE operations into an independent service to structurally guarantee that isolation.

DPE's Role

DPE's main roles are the following two:

  • CDI isolation: confines the CDI inside a Secure Partition (e.g., TF-M), so outside code can never access it directly; clients can only reach DPE through an opaque context handle. The CDI is never exposed outside the secure partition.
  • Runtime extension: even after boot finishes, when a new component comes online, it can extend the DICE chain further using a DeriveContext command. This extends DICE — which used to operate only at boot time — into runtime.

How It Works

Let's use ARM TF-M's DPE as an example. Caliptra itself is a secure partition, but since the most intuitive way a DPE client extends the chain is through sequential DeriveContext calls at each boot stage, I'm using a platform where the host's booting sequence acts as the client, as the example.

DPE call sequence diagram showing DeriveContext and CertifyKey exchanged between a client and an isolated DPE service

The client never sees the CDI or the raw secret key. It only receives an opaque context handle, and sends commands to DPE using that handle.

Here are the main commands used in DPE:

CommandAction
DeriveContextTakes a measurement, internally derives a new CDI, returns a handle
CertifyKeyIssues a certificate for a specific public key (CDI-based signature)
GetCertificateChainReturns the certificate chain accumulated so far

TF-M Implementation

ARM's Trusted Firmware-M (TF-M) implements DPE as a Secure Partition. The Non-Secure World or other partitions access DPE through the PSA IPC message interface. Internally, it parses CBOR-encoded commands with the QCBOR library, and generates CWT certificates with t_cose.

9. Real-World Implementations

Caliptra

Caliptra, covered in an earlier post, adopts DICE as its core architecture.

Caliptra's DICE chain looks like this:

Caliptra DICE derivation chain rooted in the UDS, through the ROM DICE engine, IDevID, LDevID, FMC Alias, and RT Alias

Two things stand out. First, starting with Caliptra 2.0, it supports ECDSA-384 and PQC MLDSA-87 simultaneously — both algorithms run in parallel through the certificate chain. Second, runtime attestation is provided through the DPE service: other components inside the SoC add their own measurements to the chain and get certificates issued via Caliptra's DPE handle.

ARM RSE

ARM's RSE (Runtime Security Engine) also runs a DPE partition on top of TF-M. DICE is applied across the entire boot chain: BL1 ROM → BL2 → the Secure world → the Non-Secure world.

Where Caliptra exists as an independent security core inside the SoC, RSE also doubles as the ARM SoC's system control processor — that's the difference. But the DICE principle and chain structure are identical.

Relationship with SPDM

The attestation protocol covered in an earlier SPDM post and DICE handle different layers.

  • DICE: a specification for how to create certificates (key derivation, certificate issuance)
  • SPDM: a specification for how to exchange and verify the certificates that were created (a protocol)

The certificates and measurements that SPDM's GET_MEASUREMENTS and CHALLENGE commands need come from DICE. The two standards are separate, but on a real device they work together.

10. Wrap-up

If I had to sum up DICE in one sentence: it's a structure that bakes software measurements into keys.

Where a TPM bolts on a separate trusted chip, DICE turns the boot flow itself into a chain of trust. Without any separate security chip, it's designed so that the moment software state changes, the keys change with it.

Multiple platforms — Caliptra, RSE, Android's pVM, and others — have already adopted DICE. Across datacenters, mobile, and IoT alike, hardware RoT plus software-measurement-based key derivation is becoming an industry standard, and given that DICE sits at the center of that trend, I think understanding this concept matters.

In a follow-up post, I'll dig into caliptra-sw's implementation in detail — what inputs, what KDF, and exactly how the keys get derived and used.


References


Translated and adapted from the Korean original, "DICE에 대해 알아보자 (UDS에서 Chain of Trust, DPE, Caliptra)" by Ishmael (r-note.tistory.com).