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:
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.
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.
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
These are the things that actually run after boot, using the material DICE produced.
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."
DICE revolves around two core concepts: UDS and CDI.
UDS is a secret value unique to each device.
It's generated either externally or internally:
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.
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).
| UDS | HUK | |
|---|---|---|
| Source | TCG DICE spec | ARM PSA/TrustZone ecosystem |
| Purpose | Dedicated to DICE CDI derivation | Multi-purpose: CDI plus PSA platform keys, etc. |
| Paired concept | None | GUK (in CCA environments) |
| Access cutoff | Immediately after computing the CDI | Immediately after ROM/OTP code completes |
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:
If the software changes, the CDI changes with it. That the key reflects software state is DICE's single most powerful property.
Here's a step-by-step look at what happens when DICE runs.
The DICE subject (usually the ROM, or a previous layer) hashes the next layer's code and configuration.
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.
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.
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.
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.
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.
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.
Here's what the certificate signing chain looks like visualized:
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.
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.
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.
| Input | Meaning |
|---|---|
| Code Hash | Hash of the next layer's code image |
| Authority Hash | Hash of the public key that signed the code |
| Config Descriptor | Structured config values: debug state, device settings, etc. |
| Mode | Normal / Debug / Recovery / Not Configured |
| Hidden | An additional secret the consumer can inject |
By defining these inputs consistently, implementations from different vendors can compute and verify CDIs the same way.
Open DICE supports two certificate formats:
You can mix both formats within a single chain — upper layers as X.509, lower embedded layers as CWT.
The DPE (DICE Protection Environment) spec, published in 2023, takes DICE a step further into a service model.
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 main roles are the following two:
DeriveContext command. This extends DICE — which used to operate only at boot time — into runtime.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.
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:
| Command | Action |
|---|---|
| DeriveContext | Takes a measurement, internally derives a new CDI, returns a handle |
| CertifyKey | Issues a certificate for a specific public key (CDI-based signature) |
| GetCertificateChain | Returns the certificate chain accumulated so far |
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.
Caliptra, covered in an earlier post, adopts DICE as its core architecture.
Caliptra's DICE chain looks like this:
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'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.
The attestation protocol covered in an earlier SPDM post and DICE handle different layers.
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.
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.
Translated and adapted from the Korean original, "DICE에 대해 알아보자 (UDS에서 Chain of Trust, DPE, Caliptra)" by Ishmael (r-note.tistory.com).