自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
DICE 的應用
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Device Identifier Composition Engine (DICE) 是 Android 安全性功能,可為每部裝置建立專屬的加密編譯身分,提供強大的認證機制,並改善裝置完整性。DICE 特別適合用於建立裝置身分,以便在需要強力證明身分和安全通訊的情況下使用。
遠端金鑰佈建 (RKP)
使用 DICE 進行 RKP 有幾項主要優點。
盡量減少攻擊面
DICE 會在裝置上提供的信任運算基礎 (TCB) 中 (通常是晶片本身,而非受信任的執行環境 (TEE)) 建立信任根,藉此強化 RKP。這可大幅減少攻擊面,並盡可能降低 RKP 遭到永久入侵的風險。
從 TEE 妥協復原
即使 TEE 或引導程式有遭到入侵的風險,可能會影響 KeyMint 產生的金鑰認證有效性,DICE 仍可提供機制來恢復裝置信任。
以往,TEE 或bootloader 中的安全漏洞會導致所有受影響裝置的認證金鑰遭到全面撤銷,即使修補安全漏洞,也無法恢復信任。這是因為 TEE 會針對透過 Android 驗證開機載入的 Android 映像檔執行遠端驗證,因此無法向遠端方證明已套用修補程式。DICE 會透過啟用目前韌體狀態的遠端驗證功能來解決這個問題,即使是在 Android 之外,也能讓受影響的裝置恢復信任。
隔離環境的雙向驗證
DICE 程序終止時,每個應用程式網域都會以金鑰的形式接收身分,憑證鏈會延伸至 ROM 衍生的共用信任根。隨著不同的載入路徑分歧,DICE 衍生程序會分成不同的分支,形成一棵憑證樹狀結構,所有分支都共用相同的根目錄,並建立裝置端公用金鑰基礎架構 (PKI)。
這個 PKI 可讓個別安全區塊中的元件相互驗證。具體例子之一是 Secretkeeper,這是一層硬體抽象層 (HAL),可讓特權虛擬機器 (pVM) 與 TEE 通訊,以便接收可用於安全儲存永久性資料的穩定機密金鑰。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Applications of DICE\n\nThe [Device Identifier Composition\nEngine (DICE)](/docs/security/features/dice) is an Android security feature that provides strong attestation and improves\ndevice integrity by creating a unique cryptographic identity for each device. DICE is especially\nuseful for creating device identities that can be used in scenarios requiring strong proof of\nidentity and secure communications.\n\nRemote Key Provisioning (RKP)\n-----------------------------\n\n\nThere are several key benefits that come from using DICE for RKP.\n\n### Minimization of the attack surface\n\n\nDICE enhances RKP by grounding the root of trust in the smallest possible\n[trusted computing base (TCB)](https://en.wikipedia.org/wiki/Trusted_computing_base)\navailable on the device, usually the chip itself, rather than within the Trusted Execution\nEnvironment (TEE). This greatly reduces the attack surface and minimizes the risk of permanent RKP\ncompromise.\n\n### Recovery from TEE compromises\n\n\nDICE provides a mechanism to recover trust in devices even if there are compromises in the TEE or\nbootloader that could affect the validity of the key attestations generated by\n[KeyMint](/docs/security/features/keystore/attestation#attestation-extension).\n\n\nHistorically, vulnerabilities in the\n[TEE](https://en.wikipedia.org/wiki/Trusted_execution_environment)\nor [bootloader](/docs/core/architecture/bootloader) led to\nfull revocation of attestation keys for all affected devices, with no path to recover trust even\nif the vulnerabilities were patched. This was because the TEE performed remote verification over\nthe Android image being loaded through the\n[Android Verified Boot](/docs/security/features/verifiedboot),\nmaking it impossible to prove to a remote party that the patches had been applied. DICE addresses\nthis issue by enabling remote verification of current firmware state, even outside of Android,\nallowing affected devices to recover trust.\n\nMutual authentication of isolated environments\n----------------------------------------------\n\n\nEach application domain that the DICE process terminates in receives an identity in the form of a\nkey with a certificate chain extending back to the shared root of trust derived by the ROM. The\nDICE derivation process separates into different branches as different loading paths diverge,\nforming a tree of certificates that all share the same root and creating an on-device public key\ninfrastructure (PKI).\n\n\nThis PKI enables components in separate secure enclaves to mutually authenticate one another. One\nconcrete example is [Secretkeeper](https://android.googlesource.com/platform/system/secretkeeper/),\na [hardware abstraction layer (HAL)](/docs/core/architecture/hal)\nthat allows privileged virtual machines (pVMs) to communicate with the TEE to receive a stable\nsecret that can be used to securely store persistent data."]]