Skip to main content

KMS

A CVM on Phala Cloud does not store its keys on disk. Each time it starts, it asks a key management service (KMS) for them. The KMS runs in its own TEE and gives keys only to CVMs that pass its checks. You can see every KMS and what it allows in Reference values.

What does a KMS check before it gives keys?

The CVM sends its attestation report. The KMS checks that the CVM’s OS image hash is on its allowlist and that the app is allowed to run this exact code, its compose hash. Keys are derived for each app, so one app cannot get another app’s keys.

How is Phala KMS different from the on-chain KMS?

They check the same things. They differ in where the allowlists live and who can change them. Phala KMS keeps its allowlists in Phala Cloud, and Phala Cloud updates them. The Ethereum KMS and the Base KMS keep their OS image allowlist in a DstackKms contract on that chain, and only that contract’s owner can change it. Each app keeps its allowed compose hashes in its own DstackApp contract, and only the app’s owner can change them. Anyone can read both on the chain.

What are the root keys?

Each KMS has two root public keys. The k256 key signs what the KMS hands out, so you can check that a key came from this KMS. The CA key is the root of the KMS certificate chain. Your CVM records this public key in the key-provider event of its attestation event log. That ties the CVM to one KMS. To check which KMS your CVM uses, compare that event with the CA public key on the KMS page.

What are KMS nodes?

A KMS runs as several copies, called nodes, on different machines. Every node holds the same root keys, so any node can serve your CVM. If one machine goes down, the others keep serving.

What does the device list mean?

Each KMS also keeps a list of device IDs. A device ID names one TEE machine. A KMS node starts only on a machine whose device ID is on that list. This list is about where KMS nodes run. It does not decide which machines your CVM runs on. On an on-chain KMS, an app owner can limit which devices the app runs on in the app’s own contract. The device list shows the lists of the on-chain KMS.

What do TCB status and TCB-R mean?

Intel publishes which CPU microcode and firmware versions are safe to use. A device’s TCB status is Intel’s verdict on it: Up to date, SW hardening needed, Configuration needed, Out of date, or Revoked. A KMS node starts only on a device whose status is exactly Up to date. TCB-R is Intel’s TCB evaluation data number. Intel raises it after each TCB Recovery, when a security fix requires machines to update.

What is the gateway?

The gateway routes internet traffic to CVMs and handles their TLS certificates. Each KMS trusts one gateway app, and the KMS page shows that app’s contract address.