Merge changes from topic "cherry-pick-rkp-hal-split"

* changes:
  Update the RKP aidl dependency
  Update README and CHANGELOG for RKP
  Split rkp from keymint
This commit is contained in:
Seth Moore
2022-11-10 19:32:31 +00:00
committed by Gerrit Code Review
34 changed files with 80 additions and 14 deletions

View File

@@ -15,10 +15,10 @@ aidl_interface {
],
imports: [
"android.hardware.keymaster-V3",
"android.hardware.security.keymint-V3",
"android.hardware.security.rkp-V3",
],
stability: "vintf",
frozen: false,
frozen: true,
backend: {
java: {
platform_apis: true,
@@ -32,28 +32,28 @@ aidl_interface {
version: "1",
imports: [
"android.hardware.keymaster-V3",
"android.hardware.security.keymint-V1",
"android.hardware.security.rkp-V1",
],
},
{
version: "2",
imports: [
"android.hardware.keymaster-V3",
"android.hardware.security.keymint-V1",
"android.hardware.security.rkp-V1",
],
},
{
version: "3",
imports: [
"android.hardware.keymaster-V3",
"android.hardware.security.keymint-V1",
"android.hardware.security.rkp-V1",
],
},
{
version: "4",
imports: [
"android.hardware.keymaster-V3",
"android.hardware.security.keymint-V2",
"android.hardware.security.rkp-V3",
],
},

View File

@@ -45,6 +45,7 @@ cc_library_static {
"libpuresoftkeymasterdevice",
"android.hardware.identity-support-lib",
"android.hardware.keymaster-V3-ndk",
"android.hardware.security.rkp-V3-ndk",
],
}
@@ -112,6 +113,7 @@ cc_binary {
"android.hardware.keymaster-V3-ndk",
"android.hardware.identity-libeic-hal-common",
"android.hardware.identity-libeic-library",
"android.hardware.security.rkp-V3-ndk",
],
srcs: [
"service.cpp",

View File

@@ -39,6 +39,8 @@ cc_test {
"libcrypto",
],
static_libs: [
"android.hardware.security.rkp-V3-cpp",
"android.hardware.security.rkp-V3-ndk",
"android.hardware.security.secureclock-V1-ndk",
"libcppbor_external",
"libcppcose_rkp",

View File

@@ -0,0 +1,10 @@
# KeyMint HAL
This directory contains the HAL definition for KeyMint. KeyMint provides
cryptographic services in a hardware-isolated environment.
Note that the `IRemotelyProvisionedComponent` HAL, and it's associated types,
used to also be defined in this directory. As of Android U, this HAL has been
moved to a different directory (../rkp). This move is ABI compatible, as the
interfaces have been maintained. The build is split so that the generated
code may be built with different options.

View File

@@ -1 +1,2 @@
976674616001f714f4a4df49ee45f548de828524
cd862ae2e49b54fc965dc1b99c218eb729c93bb1

View File

@@ -1 +1,2 @@
207c9f218b9b9e4e74ff5232eb16511eca9d7d2e
70c734fbd5cac5b36676d66d8d9aa941967e1e7b

View File

@@ -25,6 +25,7 @@ cc_binary {
"keymint_use_latest_hal_aidl_ndk_shared",
],
shared_libs: [
"android.hardware.security.rkp-V3-ndk",
"android.hardware.security.sharedsecret-V1-ndk",
"android.hardware.security.secureclock-V1-ndk",
"libbase",

View File

@@ -35,6 +35,7 @@ cc_defaults {
"libcrypto",
],
static_libs: [
"android.hardware.security.rkp-V3-ndk",
"android.hardware.security.secureclock-V1-ndk",
"libcppbor_external",
"libcppcose_rkp",

View File

@@ -63,6 +63,9 @@ cc_library {
defaults: [
"keymint_use_latest_hal_aidl_ndk_shared",
],
static_libs: [
"android.hardware.security.rkp-V3-ndk",
],
shared_libs: [
"libbase",
"libbinder_ndk",

View File

@@ -19,6 +19,12 @@ This document provides an exact description of which changes have occurred in th
* `uniqueId` String added as a field in order to differentiate IRPC instances on device.
## IRemotelyProvisionedComponent 2 -> 3
* The RKP HAL now builds separately from KeyMint.
* The HAL remains under the `android.hardware.security.keymint` package for
compatibility with previous releases. ABI compatibility requires this.
* Dependencies on the RKP HAL must add a dependency on
`"android.hardware.security.rkp"` generated code (instead of
`"android.hardward.security.keymint"`).
* ProtectedData has been removed.
* DeviceInfo
* `version` has moved to a top-level field within the CSR generated by the HAL

View File

@@ -6,8 +6,8 @@ Design a HAL to support over-the-air provisioning of certificates for asymmetric
keys. The HAL must interact effectively with Keystore (and other daemons) and
protect device privacy and security.
Note that this API is designed for KeyMint, but with the intention that it
should be usable for other HALs that require certificate provisioning.
Note that this API was originally designed for KeyMint, with the intention that
it should be usable for other HALs that require certificate provisioning.
Throughout this document we'll refer to the Keystore and KeyMint (formerly
called Keymaster) components, but only for concreteness and convenience; those
labels could be replaced with the names of any system and secure area
@@ -312,7 +312,7 @@ the range \[-70000, -70999\] (these are reserved for future additions here).
```
Please see
[ProtectedData.aidl](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl)
[ProtectedData.aidl](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/ProtectedData.aidl)
for a full CDDL definition of the BCC.
### `CertificateRequest`
@@ -366,9 +366,9 @@ Please see the related HAL documentation directly in the source code at the
following links:
* [IRemotelyProvisionedComponent
HAL](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl)
* [ProtectedData](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/ProtectedData.aidl)
* [MacedPublicKey](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/MacedPublicKey.aidl)
* [RpcHardwareInfo](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/RpcHardwareInfo.aidl)
* [DeviceInfo](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/DeviceInfo.aidl)
HAL](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl)
* [ProtectedData](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/ProtectedData.aidl)
* [MacedPublicKey](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/MacedPublicKey.aidl)
* [RpcHardwareInfo](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/RpcHardwareInfo.aidl)
* [DeviceInfo](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/DeviceInfo.aidl)

View File

@@ -0,0 +1,37 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["hardware_interfaces_license"],
}
aidl_interface {
name: "android.hardware.security.rkp",
vendor_available: true,
srcs: [
// This HAL was originally part of keymint.
"android/hardware/security/keymint/*.aidl",
// in the future
// "android/hardware/security/rkp/*.aidl",
],
stability: "vintf",
backend: {
java: {
min_sdk_version: "33",
},
rust: {
enabled: true,
},
},
versions_with_info: [
{
version: "1",
},
{
version: "2",
},
],
}

View File

@@ -0,0 +1 @@
d285480d2e0002adc0ace80edf34aa725679512e

View File

@@ -0,0 +1 @@
c8d34e56ae0807b61f028019622d8b60a37e0a8b