xref: /aosp_15_r20/hardware/interfaces/security/rkp/README.md (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1*4d7e907cSAndroid Build Coastguard Worker# Remote Provisioning HAL
2*4d7e907cSAndroid Build Coastguard Worker
3*4d7e907cSAndroid Build Coastguard Worker## Objective
4*4d7e907cSAndroid Build Coastguard Worker
5*4d7e907cSAndroid Build Coastguard WorkerDesign a HAL to support over-the-air provisioning of certificates for asymmetric
6*4d7e907cSAndroid Build Coastguard Workerkeys. The HAL must interact effectively with Keystore (and other services) and
7*4d7e907cSAndroid Build Coastguard Workerprotect device privacy and security.
8*4d7e907cSAndroid Build Coastguard Worker
9*4d7e907cSAndroid Build Coastguard WorkerNote that this API was originally designed for KeyMint, with the intention that
10*4d7e907cSAndroid Build Coastguard Workerit should be usable for other HALs that require certificate provisioning.
11*4d7e907cSAndroid Build Coastguard WorkerThroughout this document we'll refer to the Keystore and KeyMint (formerly
12*4d7e907cSAndroid Build Coastguard Workercalled Keymaster) components, but only for concreteness and convenience; those
13*4d7e907cSAndroid Build Coastguard Workerlabels could be replaced with the names of any system and secure area
14*4d7e907cSAndroid Build Coastguard Workercomponents, respectively, that need certificates provisioned.
15*4d7e907cSAndroid Build Coastguard Worker
16*4d7e907cSAndroid Build Coastguard Worker## Key design decisions
17*4d7e907cSAndroid Build Coastguard Worker
18*4d7e907cSAndroid Build Coastguard Worker### General approach
19*4d7e907cSAndroid Build Coastguard Worker
20*4d7e907cSAndroid Build Coastguard WorkerTo more securely and reliably get keys and certificates to Android devices, we
21*4d7e907cSAndroid Build Coastguard Workerneed to create a system where no party outside of the device's secure components
22*4d7e907cSAndroid Build Coastguard Workeris responsible for managing private keys. The strategy we've chosen is to
23*4d7e907cSAndroid Build Coastguard Workerdeliver certificates over the air, using an asymmetric key pair derived from a
24*4d7e907cSAndroid Build Coastguard Workerunique device secret (UDS) as a root of trust for authenticated requests from
25*4d7e907cSAndroid Build Coastguard Workerthe secure components. We refer to the public half of this asymmetric key pair
26*4d7e907cSAndroid Build Coastguard Workeras UDS\_pub.
27*4d7e907cSAndroid Build Coastguard Worker
28*4d7e907cSAndroid Build Coastguard WorkerIn order for the provisioning service to trust UDS\_pub we ask device OEMs to
29*4d7e907cSAndroid Build Coastguard Workeruse one of two mechanisms:
30*4d7e907cSAndroid Build Coastguard Worker
31*4d7e907cSAndroid Build Coastguard Worker1.  (Preferred, recommended) The device OEM extracts the UDS\_pub from each
32*4d7e907cSAndroid Build Coastguard Worker    device they manufacture and uploads the public keys to a backend server.
33*4d7e907cSAndroid Build Coastguard Worker
34*4d7e907cSAndroid Build Coastguard Worker1.  The device OEM certifies the UDS\_pub using an x.509 certificate chain
35*4d7e907cSAndroid Build Coastguard Worker    then stores the chain on the device rather than uploading a UDS\_pub for
36*4d7e907cSAndroid Build Coastguard Worker    every device immediately. However, there are many disadvantages and costs
37*4d7e907cSAndroid Build Coastguard Worker    associated with this option as the OEM will need to pass a security audit
38*4d7e907cSAndroid Build Coastguard Worker    of their factory's physical security, CA and HSM configuration, and
39*4d7e907cSAndroid Build Coastguard Worker    incident response processes before the OEM's public key is registered with
40*4d7e907cSAndroid Build Coastguard Worker    the provisioning server.
41*4d7e907cSAndroid Build Coastguard Worker
42*4d7e907cSAndroid Build Coastguard WorkerNote that in the full elaboration of this plan, UDS\_pub is not the key used to
43*4d7e907cSAndroid Build Coastguard Workersign certificate requests. Instead, UDS\_pub is just the first public key in a
44*4d7e907cSAndroid Build Coastguard Workerchain of public keys that end the KeyMint public key. All keys in the chain are
45*4d7e907cSAndroid Build Coastguard Workertransitively derived from the UDS and joined in a certificate chain following
46*4d7e907cSAndroid Build Coastguard Workerthe specification of the [Android Profile for DICE](android-profile-for-dice).
47*4d7e907cSAndroid Build Coastguard Worker
48*4d7e907cSAndroid Build Coastguard Worker[android-profile-for-dice]: https://pigweed.googlesource.com/open-dice/+/refs/heads/main/docs/android.md
49*4d7e907cSAndroid Build Coastguard Worker
50*4d7e907cSAndroid Build Coastguard Worker### Phases
51*4d7e907cSAndroid Build Coastguard Worker
52*4d7e907cSAndroid Build Coastguard WorkerRKP will be deployed with phased management of the root of trust
53*4d7e907cSAndroid Build Coastguard Workerbinding between the device and the backend. To briefly describe them:
54*4d7e907cSAndroid Build Coastguard Worker
55*4d7e907cSAndroid Build Coastguard Worker* Degenerate DICE (Phase 1): A TEE root of trust key pair is used to sign
56*4d7e907cSAndroid Build Coastguard Worker  certificate requests; a single self-signed certificate signifies this phase.
57*4d7e907cSAndroid Build Coastguard Worker* DICE (Phase 2): A hardware root of trust key pair is only accessible to ROM
58*4d7e907cSAndroid Build Coastguard Worker  or ROM extension code; the boot process follows the [Android Profile for
59*4d7e907cSAndroid Build Coastguard Worker  DICE](android-profile-for-dice).
60*4d7e907cSAndroid Build Coastguard Worker* SoC vendor certified DICE (Phase 3): This is identical to Phase 2, except the
61*4d7e907cSAndroid Build Coastguard Worker  SoC vendor also does the UDS\_pub extraction or certification in their
62*4d7e907cSAndroid Build Coastguard Worker  facilities, along with the OEM doing it in the factory. This tightens up the
63*4d7e907cSAndroid Build Coastguard Worker  "supply chain" and aims to make key upload management more secure.
64*4d7e907cSAndroid Build Coastguard Worker
65*4d7e907cSAndroid Build Coastguard Worker### Privacy considerations
66*4d7e907cSAndroid Build Coastguard Worker
67*4d7e907cSAndroid Build Coastguard WorkerBecause the UDS, CDIs and derived values are unique, immutable, unspoofable
68*4d7e907cSAndroid Build Coastguard Workerhardware-bound identifiers for the device, we must limit access to them. We
69*4d7e907cSAndroid Build Coastguard Workerrequire that the values are never exposed in public APIs and are only available
70*4d7e907cSAndroid Build Coastguard Workerto the minimum set of system components that require access to them to function
71*4d7e907cSAndroid Build Coastguard Workercorrectly.
72*4d7e907cSAndroid Build Coastguard Worker
73*4d7e907cSAndroid Build Coastguard Worker### Key and cryptographic message formatting
74*4d7e907cSAndroid Build Coastguard Worker
75*4d7e907cSAndroid Build Coastguard WorkerFor simplicity of generation and parsing, compactness of wire representation,
76*4d7e907cSAndroid Build Coastguard Workerand flexibility and standardization, we've settled on using the CBOR Object
77*4d7e907cSAndroid Build Coastguard WorkerSigning and Encryption (COSE) standard, defined in [RFC
78*4d7e907cSAndroid Build Coastguard Worker8152](https://tools.ietf.org/html/rfc8152). COSE provides compact and reasonably
79*4d7e907cSAndroid Build Coastguard Workersimple, yet easily-extensible, wire formats for:
80*4d7e907cSAndroid Build Coastguard Worker
81*4d7e907cSAndroid Build Coastguard Worker*   Keys,
82*4d7e907cSAndroid Build Coastguard Worker*   MACed messages,
83*4d7e907cSAndroid Build Coastguard Worker*   Signed messages, and
84*4d7e907cSAndroid Build Coastguard Worker*   Encrypted messages
85*4d7e907cSAndroid Build Coastguard Worker
86*4d7e907cSAndroid Build Coastguard WorkerCOSE enables easy layering of these message formats, such as using a COSE\_Sign
87*4d7e907cSAndroid Build Coastguard Workerstructure to contain a COSE\_Key with a public key in it. We call this a
88*4d7e907cSAndroid Build Coastguard Worker"certificate".
89*4d7e907cSAndroid Build Coastguard Worker
90*4d7e907cSAndroid Build Coastguard WorkerDue to the complexity of the standard, we'll spell out the COSE structures
91*4d7e907cSAndroid Build Coastguard Workercompletely in this document and in the HAL and other documentation, so that
92*4d7e907cSAndroid Build Coastguard Workeralthough implementors will need to understand CBOR and the CBOR Data Definition
93*4d7e907cSAndroid Build Coastguard WorkerLanguage ([CDDL, defined in RFC 8610](https://tools.ietf.org/html/rfc8610)),
94*4d7e907cSAndroid Build Coastguard Workerthey shouldn't need to understand COSE.
95*4d7e907cSAndroid Build Coastguard Worker
96*4d7e907cSAndroid Build Coastguard WorkerNote, however, that the certificate chains returned from the provisioning server
97*4d7e907cSAndroid Build Coastguard Workerare standard X.509 certificates.
98*4d7e907cSAndroid Build Coastguard Worker
99*4d7e907cSAndroid Build Coastguard Worker### Algorithm choices
100*4d7e907cSAndroid Build Coastguard Worker
101*4d7e907cSAndroid Build Coastguard WorkerThis document uses:
102*4d7e907cSAndroid Build Coastguard Worker
103*4d7e907cSAndroid Build Coastguard Worker*   ECDSA P-256 for attestation signing keys;
104*4d7e907cSAndroid Build Coastguard Worker*   Remote provisioning protocol signing keys:
105*4d7e907cSAndroid Build Coastguard Worker  *  Ed25519 / P-256 / P-384
106*4d7e907cSAndroid Build Coastguard Worker*   ECDH keys:
107*4d7e907cSAndroid Build Coastguard Worker  *  X25519 / P-256
108*4d7e907cSAndroid Build Coastguard Worker*   AES-GCM for all encryption;
109*4d7e907cSAndroid Build Coastguard Worker*   SHA-256 / SHA-384 / SHA-512 for message digesting;
110*4d7e907cSAndroid Build Coastguard Worker*   HMAC with a supported message digest for all MACing; and
111*4d7e907cSAndroid Build Coastguard Worker*   HKDF with a supported message digest for all key derivation.
112*4d7e907cSAndroid Build Coastguard Worker
113*4d7e907cSAndroid Build Coastguard WorkerWe believe that Curve25519 offers the best tradeoff in terms of security,
114*4d7e907cSAndroid Build Coastguard Workerefficiency and global trustworthiness, and that it is now sufficiently
115*4d7e907cSAndroid Build Coastguard Workerwidely-used and widely-implemented to make it a practical choice.
116*4d7e907cSAndroid Build Coastguard Worker
117*4d7e907cSAndroid Build Coastguard WorkerHowever, since hardware such as Secure Elements (SE) do not currently offer
118*4d7e907cSAndroid Build Coastguard Workersupport for curve 25519, we are allowing implementations to instead make use of
119*4d7e907cSAndroid Build Coastguard WorkerECDSA and ECDH.
120*4d7e907cSAndroid Build Coastguard Worker
121*4d7e907cSAndroid Build Coastguard WorkerThe CDDL in the rest of the document will use the '/' operator to show areas
122*4d7e907cSAndroid Build Coastguard Workerwhere either curve 25519, P-256 or P-384 may be used. Since there is no easy way
123*4d7e907cSAndroid Build Coastguard Workerto bind choices across different CDDL groups, it is important that the
124*4d7e907cSAndroid Build Coastguard Workerimplementor stays consistent in which type is chosen. E.g. taking ES256 as the
125*4d7e907cSAndroid Build Coastguard Workerchoice for algorithm implies the implementor should also choose the P256 public
126*4d7e907cSAndroid Build Coastguard Workerkey group further down in the COSE structure.
127*4d7e907cSAndroid Build Coastguard Worker
128*4d7e907cSAndroid Build Coastguard Worker## UDS certificates
129*4d7e907cSAndroid Build Coastguard Worker
130*4d7e907cSAndroid Build Coastguard WorkerAs noted in the section [General approach](#general-approach), the UDS\_pub may
131*4d7e907cSAndroid Build Coastguard Workerbe authenticated by an OEM using an x.509 certificate chain. Additionally,
132*4d7e907cSAndroid Build Coastguard Worker[RKP Phase 3](#phases) depends on the chip vendor signing the UDS\_pub and
133*4d7e907cSAndroid Build Coastguard Workerissuing an x.509 certificate chain. This section describes the requirements for
134*4d7e907cSAndroid Build Coastguard Workerboth the signing keys and the resulting certificate chain.
135*4d7e907cSAndroid Build Coastguard Worker
136*4d7e907cSAndroid Build Coastguard Worker### X.509 Certificates
137*4d7e907cSAndroid Build Coastguard Worker
138*4d7e907cSAndroid Build Coastguard WorkerX.509v3 public key certificates are the only supported mechanism for
139*4d7e907cSAndroid Build Coastguard Workerauthenticating a UDS\_pub. Certificates must be formatted according to
140*4d7e907cSAndroid Build Coastguard Worker[RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280), and certificate
141*4d7e907cSAndroid Build Coastguard Workerchains must satisfy the certificate path validation described in the RFC. RFC
142*4d7e907cSAndroid Build Coastguard Worker5280 covers most requirements for the chain, but this specification has some
143*4d7e907cSAndroid Build Coastguard Workeradditional requirements that must be met for the certificates:
144*4d7e907cSAndroid Build Coastguard Worker
145*4d7e907cSAndroid Build Coastguard Worker*   [`BasicConstraints`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.9)
146*4d7e907cSAndroid Build Coastguard Worker    *   All CA certificates must include this as a critical extension.
147*4d7e907cSAndroid Build Coastguard Worker    *   `pathLenConstraint` must be set correctly in each CA certificate to
148*4d7e907cSAndroid Build Coastguard Worker        limit the maximum chain length.
149*4d7e907cSAndroid Build Coastguard Worker    *   `cA` must be set to true for all certificates except the leaf
150*4d7e907cSAndroid Build Coastguard Worker        certificate.
151*4d7e907cSAndroid Build Coastguard Worker    *   `BasicConstraints` must be absent for the leaf/UDS certificate.
152*4d7e907cSAndroid Build Coastguard Worker    *   Consider the chain `root -> intermediate -> UDS_pub`. In such a chain,
153*4d7e907cSAndroid Build Coastguard Worker        `BasicConstraints` must be:
154*4d7e907cSAndroid Build Coastguard Worker        *   `{ cA: TRUE, pathLenConstraint: 1}` for the root certificate
155*4d7e907cSAndroid Build Coastguard Worker        *   `{ cA: TRUE, pathLenConstraint: 0}` for the intermediate certificate
156*4d7e907cSAndroid Build Coastguard Worker        *   Absent for the UDS certificate
157*4d7e907cSAndroid Build Coastguard Worker*   [`KeyUsage`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3)
158*4d7e907cSAndroid Build Coastguard Worker    *   All certificates in a UDS certificate chain must include this as a
159*4d7e907cSAndroid Build Coastguard Worker        critical extension.
160*4d7e907cSAndroid Build Coastguard Worker    *   CA certificates must set `KeyUsage` to only `keyCertSign`.
161*4d7e907cSAndroid Build Coastguard Worker    *   The UDS certificate must set `KeyUsage` to only `digitalSignature`.
162*4d7e907cSAndroid Build Coastguard Worker
163*4d7e907cSAndroid Build Coastguard Worker### Supported Algorithms
164*4d7e907cSAndroid Build Coastguard Worker
165*4d7e907cSAndroid Build Coastguard WorkerUDS certificates must be signed using one of the following allowed algorithms:
166*4d7e907cSAndroid Build Coastguard Worker
167*4d7e907cSAndroid Build Coastguard Worker*   `ecdsa-with-SHA256`
168*4d7e907cSAndroid Build Coastguard Worker    ([RFC 5758](https://www.rfc-editor.org/rfc/rfc5758#section-3.2))
169*4d7e907cSAndroid Build Coastguard Worker    *   Note: this algorithm is only usable with ECDSA P-256 keys
170*4d7e907cSAndroid Build Coastguard Worker*   `ecdsa-with-SHA384`
171*4d7e907cSAndroid Build Coastguard Worker    ([RFC 5758](https://www.rfc-editor.org/rfc/rfc5758#section-3.2))
172*4d7e907cSAndroid Build Coastguard Worker    *   Note: this algorithm is only usable with ECDSA P-384 keys
173*4d7e907cSAndroid Build Coastguard Worker*   `id-Ed25519` ([RFC 8410](https://www.rfc-editor.org/rfc/rfc8410#section-3))
174*4d7e907cSAndroid Build Coastguard Worker
175*4d7e907cSAndroid Build Coastguard Worker## Design
176*4d7e907cSAndroid Build Coastguard Worker
177*4d7e907cSAndroid Build Coastguard Worker### Certificate provisioning flow
178*4d7e907cSAndroid Build Coastguard Worker
179*4d7e907cSAndroid Build Coastguard WorkerTODO(jbires): Replace this with a `.png` containing a sequence diagram.  The
180*4d7e907cSAndroid Build Coastguard Workerprovisioning flow looks something like this:
181*4d7e907cSAndroid Build Coastguard Worker
182*4d7e907cSAndroid Build Coastguard Workerrkpd -> KeyMint: generateKeyPair
183*4d7e907cSAndroid Build Coastguard WorkerKeyMint -> KeyMint: Generate key pair
184*4d7e907cSAndroid Build Coastguard WorkerKeyMint --> rkpd: key\_blob,pubkey
185*4d7e907cSAndroid Build Coastguard Workerrkpd -> rkpd: Store key\_blob,pubkey
186*4d7e907cSAndroid Build Coastguard Workerrkpd -> Server: Get challenge
187*4d7e907cSAndroid Build Coastguard WorkerServer --> rkpd: challenge
188*4d7e907cSAndroid Build Coastguard Workerrkpd -> KeyMint: genCertReq(pubkeys, challenge)
189*4d7e907cSAndroid Build Coastguard WorkerKeyMint -> KeyMint: Sign CSR
190*4d7e907cSAndroid Build Coastguard WorkerKeyMint --> rkpd: signed CSR
191*4d7e907cSAndroid Build Coastguard Workerrkpd --> Server: CSR
192*4d7e907cSAndroid Build Coastguard WorkerServer -> Server: Validate CSR
193*4d7e907cSAndroid Build Coastguard WorkerServer -> Server: Generate certificates
194*4d7e907cSAndroid Build Coastguard WorkerServer --> rkpd: certificates
195*4d7e907cSAndroid Build Coastguard Workerrkpd -> rkpd: Store certificates
196*4d7e907cSAndroid Build Coastguard Worker
197*4d7e907cSAndroid Build Coastguard WorkerThe actors in the above diagram are:
198*4d7e907cSAndroid Build Coastguard Worker
199*4d7e907cSAndroid Build Coastguard Worker*   **Server** is the backend certificate provisioning server. It has access to
200*4d7e907cSAndroid Build Coastguard Worker    the uploaded device public keys and is responsible for providing encryption
201*4d7e907cSAndroid Build Coastguard Worker    keys, decrypting and validating requests, and generating certificates in
202*4d7e907cSAndroid Build Coastguard Worker    response to requests.
203*4d7e907cSAndroid Build Coastguard Worker*   **rkpd** is, optionally, a modular system component that is responsible for
204*4d7e907cSAndroid Build Coastguard Worker    communicating with the server and all of the system components that require
205*4d7e907cSAndroid Build Coastguard Worker    key certificates from the server. It also implements the policy that defines
206*4d7e907cSAndroid Build Coastguard Worker    how many key pairs each client should keep in their pool. When a system
207*4d7e907cSAndroid Build Coastguard Worker    ships with rkpd as a modular component, it may be updated independently from
208*4d7e907cSAndroid Build Coastguard Worker    the rest of the system.
209*4d7e907cSAndroid Build Coastguard Worker*   **Keystore** is the [Android keystore
210*4d7e907cSAndroid Build Coastguard Worker    daemon](https://developer.android.com/training/articles/keystore) (or, more
211*4d7e907cSAndroid Build Coastguard Worker    generally, whatever system component manages communications with a
212*4d7e907cSAndroid Build Coastguard Worker    particular secure aread component).
213*4d7e907cSAndroid Build Coastguard Worker*   **KeyMint** is the secure area component that manages cryptographic keys and
214*4d7e907cSAndroid Build Coastguard Worker    performs attestations (or perhaps some other secure area component).
215*4d7e907cSAndroid Build Coastguard Worker
216*4d7e907cSAndroid Build Coastguard Worker### HAL
217*4d7e907cSAndroid Build Coastguard Worker
218*4d7e907cSAndroid Build Coastguard WorkerThe remote provisioning HAL provides a simple interface that can be implemented
219*4d7e907cSAndroid Build Coastguard Workerby multiple secure components that require remote provisioning. It would be
220*4d7e907cSAndroid Build Coastguard Workerslightly simpler to extend the KeyMint API, but that approach would only serve
221*4d7e907cSAndroid Build Coastguard Workerthe needs of KeyMint, this is more general.
222*4d7e907cSAndroid Build Coastguard Worker
223*4d7e907cSAndroid Build Coastguard WorkerNOTE the data structures defined in this HAL may look a little bloated and
224*4d7e907cSAndroid Build Coastguard Workercomplex. This is because the COSE data structures are fully spelled-out; we
225*4d7e907cSAndroid Build Coastguard Workercould make it much more compact by not re-specifying the standardized elements
226*4d7e907cSAndroid Build Coastguard Workerand instead just referencing the standard, but it seems better to fully specify
227*4d7e907cSAndroid Build Coastguard Workerthem. If the apparent complexity seems daunting, consider what the same would
228*4d7e907cSAndroid Build Coastguard Workerlook like if traditional ASN.1 DER-based structures from X.509 and related
229*4d7e907cSAndroid Build Coastguard Workerstandards were used and also fully elaborated.
230*4d7e907cSAndroid Build Coastguard Worker
231*4d7e907cSAndroid Build Coastguard WorkerPlease see the related HAL documentation directly in the source code at the
232*4d7e907cSAndroid Build Coastguard Workerfollowing links:
233*4d7e907cSAndroid Build Coastguard Worker
234*4d7e907cSAndroid Build Coastguard Worker*   [IRemotelyProvisionedComponent
235*4d7e907cSAndroid Build Coastguard Worker    HAL](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl)
236*4d7e907cSAndroid Build Coastguard Worker*   [ProtectedData](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/ProtectedData.aidl)
237*4d7e907cSAndroid Build Coastguard Worker*   [MacedPublicKey](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/MacedPublicKey.aidl)
238*4d7e907cSAndroid Build Coastguard Worker*   [RpcHardwareInfo](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/RpcHardwareInfo.aidl)
239*4d7e907cSAndroid Build Coastguard Worker*   [DeviceInfo](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/DeviceInfo.aidl)
240*4d7e907cSAndroid Build Coastguard Worker
241*4d7e907cSAndroid Build Coastguard Worker### Support for Android Virtualization Framework
242*4d7e907cSAndroid Build Coastguard Worker
243*4d7e907cSAndroid Build Coastguard WorkerThe Android Virtualization Framwork (AVF) relies on RKP to provision keys for VMs. A
244*4d7e907cSAndroid Build Coastguard Workerprivileged vm, the RKP VM, is reponsible for generating and managing the keys for client
245*4d7e907cSAndroid Build Coastguard WorkerVMs that run virtualized workloads. See the following for more background information on the
246*4d7e907cSAndroid Build Coastguard WorkerRKP VM:
247*4d7e907cSAndroid Build Coastguard Worker*    [rkp-vm](https://android.googlesource.com/platform/packages/modules/Virtualization/+/main/service_vm/README.md#rkp-vm-remote-key-provisioning-virtual-machine)
248*4d7e907cSAndroid Build Coastguard Worker*    [rkp-service](https://source.android.com/docs/core/ota/modular-system/remote-key-provisioning#stack-architecture)
249*4d7e907cSAndroid Build Coastguard Worker
250*4d7e907cSAndroid Build Coastguard WorkerIt is important to distinquish the RKP VM from other components, such as KeyMint. An
251*4d7e907cSAndroid Build Coastguard Worker[RKP VM marker](https://pigweed.googlesource.com/open-dice/+/HEAD/docs/android.md#configuration-descriptor)
252*4d7e907cSAndroid Build Coastguard Worker(key `-70006`) is used for this purpose. The existence or absence of this marker is used to
253*4d7e907cSAndroid Build Coastguard Workeridentify the type of component decribed by a given DICE chain.
254*4d7e907cSAndroid Build Coastguard Worker
255*4d7e907cSAndroid Build Coastguard WorkerThe following describes which certificate types may be request based on the RKP VM marker:
256*4d7e907cSAndroid Build Coastguard Worker1. "rkp-vm": If a DICE chain has zero or more certificates without the RKP VM
257*4d7e907cSAndroid Build Coastguard Worker   marker followed by one or more certificates with the marker, then that chain
258*4d7e907cSAndroid Build Coastguard Worker   describes an RKP VM. If there are further certificates without the RKP VM
259*4d7e907cSAndroid Build Coastguard Worker   marker, then the chain does not describe an RKP VM.
260*4d7e907cSAndroid Build Coastguard Worker
261*4d7e907cSAndroid Build Coastguard Worker   Implementations must include the first RKP VM marker as early as possible
262*4d7e907cSAndroid Build Coastguard Worker   after the point of divergence between TEE and non-TEE components in the DICE
263*4d7e907cSAndroid Build Coastguard Worker   chain, prior to loading the Android Bootloader (ABL).
264*4d7e907cSAndroid Build Coastguard Worker2. "widevine" or "keymint": If there are no certificates with the RKP VM
265*4d7e907cSAndroid Build Coastguard Worker   marker then it describes a TEE component.
266*4d7e907cSAndroid Build Coastguard Worker3. None: Any component described by a DICE chain that does not match the above
267*4d7e907cSAndroid Build Coastguard Worker   two categories.
268