Commit graph

597 commits

Author SHA1 Message Date
Seth Moore
42c1133fed Add ensuring that test BCC keys not unique ids
Get two test BCCs, then ensure that no repeated keys are found.

Bug: 192687735
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I48f86e7dfa9ab4bc6303a8d1b64ac7ca6ac76bbf
Merged-In: I48f86e7dfa9ab4bc6303a8d1b64ac7ca6ac76bbf
2021-07-02 15:58:26 -07:00
Seth Moore
8b78dc5031 Correct the description for getKeyCharacteristics
The description should note that keystore-enforced tags are not to be
returned. This is done so that the keymint implementation doesn't have
to bother keeping track of tags it's not repsonsible for dealing with.

Fixes: 192575557
Test: none (it's just a comment change)
Change-Id: I3ff94201c262a5071d271b150dbbf21888d678aa
Merged-In: I3ff94201c262a5071d271b150dbbf21888d678aa
2021-07-01 11:39:13 -07:00
Seth Moore
f4c8ff9bef Add a utility to JSON-format a CSR with build info
We need both the build fingerprint as well as the CSR when uploading
data to the APFE provisioning server. Add a utility function to format
the output as a JSON blob so that it may be easily collected in the
factory in a serialized data format, then later uploaded.

Test: libkeymint_remote_prov_support_test
Test: VtsAidlKeyMintTargetTest
Test: VtsHalRemotelyProvisionedComponentTargetTest
Bug: 191301285
Change-Id: I751c5461876d83251869539f1a395ba13cb5cf84
2021-07-01 10:17:28 -07:00
Treehugger Robot
0ab5ef3ff7 Merge changes from topic "rkp-factory-tool"
* changes:
  Add real GEEK for RKP factory enrollment
  Add a unit test for remote_prov_utils
2021-06-30 20:39:53 +00:00
Seth Moore
0611028bc4 Add a utility to JSON-format a CSR with build info am: 23f624599f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15115450

Change-Id: I591dc34a4850ca8f40aa13026af1c62e421619ba
2021-06-30 19:29:28 +00:00
Seth Moore
23f624599f Add a utility to JSON-format a CSR with build info
We need both the build fingerprint as well as the CSR when uploading
data to the APFE provisioning server. Add a utility function to format
the output as a JSON blob so that it may be easily collected in the
factory in a serialized data format, then later uploaded.

Test: libkeymint_remote_prov_support_test
Test: VtsAidlKeyMintTargetTest
Test: VtsHalRemotelyProvisionedComponentTargetTest
Bug: 191301285
Change-Id: I751c5461876d83251869539f1a395ba13cb5cf84
2021-06-30 09:32:08 -07:00
David Drysdale
8e8698913a Merge "KeyMint VTS: allow for stricter SharedSecret impls" into sc-dev 2021-06-29 05:49:21 +00:00
David Drysdale
cb02ff3548 Merge "KeyMint HAL: clarify spec text" am: 17a0526b1e am: 575246020d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1749620

Change-Id: I94c443b5e9cd495ccf1a95867cc19cc996b1307b
2021-06-28 17:33:09 +00:00
David Drysdale
56cdfbde56 Merge "KeyMint VTS: allow for stricter SharedSecret impls" am: f854cde530 am: a01b8259e3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1749644

Change-Id: I840e0d5199e1735d25b52d584ef0187d34346d97
2021-06-28 17:32:53 +00:00
David Drysdale
382e34835d KeyMint HAL: clarify spec text
- Make clear that CERTIFICATE_NOT_{BEFORE,AFTER} must be specified for
   generating/importing asymmetric keys.
 - Fix enforcement level of Tag::UNLOCKED_DEVICE_REQUIRED.
 - Fix reference to exportKey() for Tag::STORAGE_KEY to mention
   convertStorageKeyToEphemeral instead.
 - Mark Tag::CONFIRMATION_TOKEN as deprecated.

Test: none, comment change
Bug: 188672564
Merged-In: I68727b024f6b6743403941763aefca64e3eb091a
Change-Id: I68727b024f6b6743403941763aefca64e3eb091a
Ignore-AOSP-First: already merged in aosp/master
2021-06-28 18:15:14 +01:00
David Drysdale
17a0526b1e Merge "KeyMint HAL: clarify spec text" 2021-06-28 17:14:23 +00:00
David Drysdale
62272fc2f5 KeyMint VTS: allow for stricter SharedSecret impls
Bug: 192223752
Test: VtsAidlSharedSecretTargetTest
Merged-Ind: Iccf2d0fe2a2d10ad12269dfecf78ea1d831c3ad4
Change-Id: Iccf2d0fe2a2d10ad12269dfecf78ea1d831c3ad4
Ignore-AOSP-First: already merged in aosp/master
2021-06-28 18:02:36 +01:00
David Drysdale
f854cde530 Merge "KeyMint VTS: allow for stricter SharedSecret impls" 2021-06-28 17:01:22 +00:00
David Drysdale
d46d61efec KeyMint VTS: allow for stricter SharedSecret impls
Bug: 192223752
Test: VtsAidlSharedSecretTargetTest
Change-Id: Iccf2d0fe2a2d10ad12269dfecf78ea1d831c3ad4
2021-06-28 14:58:28 +01:00
David Drysdale
5cf4a11c01 KeyMint HAL: clarify spec text
- Make clear that CERTIFICATE_NOT_{BEFORE,AFTER} must be specified for
   generating/importing asymmetric keys.
 - Fix enforcement level of Tag::UNLOCKED_DEVICE_REQUIRED.
 - Fix reference to exportKey() for Tag::STORAGE_KEY to mention
   convertStorageKeyToEphemeral instead.
 - Mark Tag::CONFIRMATION_TOKEN as deprecated.

Test: none, comment change
Bug: 188672564
Change-Id: I68727b024f6b6743403941763aefca64e3eb091a
2021-06-28 12:43:10 +01:00
Seth Moore
50d62b0b15 Add real GEEK for RKP factory enrollment
Include a unit test to verify the GEEK cert chain is valid.

Test: libkeymint_remote_prov_support_test
Bug: 191301285
Change-Id: Icf9cfa165fbccb24b36b03ff3ce729a7e9c44cfd
Merged-In: Icf9cfa165fbccb24b36b03ff3ce729a7e9c44cfd
2021-06-25 10:48:49 -07:00
Seth Moore
42a2f6b6e2 Add a unit test for remote_prov_utils
This functionality will be used for the factory tooling, so we should
test it. Additionally, some new functionality will soon be added, and
it also needs to be tested.

Test: libkeymint_remote_prov_support_test
Bug: 191301285
Change-Id: I6a8798fc4b09fff1e829185a4b9e471921e5d2a9
Merged-In: I6a8798fc4b09fff1e829185a4b9e471921e5d2a9
2021-06-25 10:48:33 -07:00
Seth Moore
6d716dafec Add real GEEK for RKP factory enrollment am: 415f0ce4fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15071133

Change-Id: I8e25143efcbf531d2a850df6366f85c81058f0eb
2021-06-25 16:10:11 +00:00
Seth Moore
3a6cb24f82 Add a unit test for remote_prov_utils am: 7a55bb5cf8
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15071132

Change-Id: I3ec55bda354af4cc3dd1deca74c38c734a1801d0
2021-06-25 16:10:10 +00:00
Treehugger Robot
3e00e71055 Merge "Fix flaky corrupted padding tests" am: b54aebc2d8 am: 03a6cfdc15
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1745035

Change-Id: I9e6d25ea0313c650c1c01bcb8254e97545ca5964
2021-06-24 21:36:54 +00:00
Treehugger Robot
b54aebc2d8 Merge "Fix flaky corrupted padding tests" 2021-06-24 21:17:33 +00:00
Seth Moore
7a55ae3ddc Fix flaky corrupted padding tests
It's possible that corrupted ciphertext decrypts just fine. e.g. the
output ends with "0x01".

However, the chances of this happening are relatively low
(roughly 1/256). Corrupt the ciphertext up to 8 times, ensuring that
the likelihood of multiple successful decryptions is so miniscule that
it's effectively impossible.

Test: Ran *PaddingCorrupted tests 50000 times
Change-Id: If40ecd7817819921c020ea9b86ada18c4c77ea55
2021-06-24 12:45:23 -07:00
Seth Moore
415f0ce4fe Add real GEEK for RKP factory enrollment
Include a unit test to verify the GEEK cert chain is valid.

Test: libkeymint_remote_prov_support_test
Ignore-AOSP-First: No merge path to aosp, will manually merge
Bug: 191301285
Change-Id: Icf9cfa165fbccb24b36b03ff3ce729a7e9c44cfd
2021-06-23 13:05:59 -07:00
Seth Moore
798188aba0 Remove ignoreSignature for cose signature checks
This flag is never used anywhere, so just remove it. When used, it would
bypass signature checks. This is something we generally don't want to
do, even in testing. So remove the flag so there's no temptation to use
it.

Bug: 190942528
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I0433c1eedc08e9a5a5ad71347154867dba61689e
Merged-In: I0433c1eedc08e9a5a5ad71347154867dba61689e
2021-06-22 18:32:56 -07:00
Seth Moore
7a55bb5cf8 Add a unit test for remote_prov_utils
This functionality will be used for the factory tooling, so we should
test it. Additionally, some new functionality will soon be added, and
it also needs to be tested.

Ignore-AOSP-First: No merge path to aosp, will manually merge
Test: libkeymint_remote_prov_support_test
Bug: 191301285
Change-Id: I6a8798fc4b09fff1e829185a4b9e471921e5d2a9
2021-06-22 17:54:34 -07:00
TreeHugger Robot
2105f08415 Merge "Remove ignoreSignature for cose signature checks" into sc-dev am: 1aa95b63d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15016110

Change-Id: I893a697010077fdc99c225a8178665d94e5c0ffb
2021-06-22 17:44:38 +00:00
TreeHugger Robot
1aa95b63d0 Merge "Remove ignoreSignature for cose signature checks" into sc-dev 2021-06-22 17:21:13 +00:00
Alan Stokes
adb7159de8 Merge "Allow CompOS APEX to access Keystore AIDL." am: fd7eeeaa1d am: 2a77df8a86
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1741123

Change-Id: Ic575adc36112cccc34bc3f5d959c401a9513aedf
2021-06-22 08:39:19 +00:00
Alan Stokes
fd7eeeaa1d Merge "Allow CompOS APEX to access Keystore AIDL." 2021-06-22 08:13:11 +00:00
David Drysdale
308916bfaf KeyMint VTS: require curve for ECDSA keys
The KeyMint AIDL spec requires that "Tag::EC_CURVE must be provided to
generate an ECDSA key". Move the VTS tests to always create ECDSA keys
by curve not key size.

Bug: 188672564
Test: VtsAidlKeyMintTargetTest
Merged-In: I33036387c243b21ab0ecd49221b7e7757598913e
Change-Id: I33036387c243b21ab0ecd49221b7e7757598913e
Ignore-AOSP-First: already merged in aosp/master
2021-06-21 07:14:05 +01:00
David Drysdale
924643748b KeyMint VTS: more attestation info tests
Try all tags in attestion extension one by one

Test: VtsAidlKeyMintTargetTest on CF
Bug: 186735514
Merged-In: I63ca8d298d2d16f707f2437ab48aaa69c1d7563d
Change-Id: I63ca8d298d2d16f707f2437ab48aaa69c1d7563d
Ignore-AOSP-First: already merged in aosp/master
2021-06-21 07:13:45 +01:00
David Drysdale
dfff9c74f1 Merge changes I33036387,I63ca8d29 am: aedb92d5af am: 5455f2dc13
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1740893

Change-Id: I64708a3f57a27daa694722d6019419371be22101
2021-06-21 05:53:21 +00:00
David Drysdale
aedb92d5af Merge changes I33036387,I63ca8d29
* changes:
  KeyMint VTS: require curve for ECDSA keys
  KeyMint VTS: more attestation info tests
2021-06-21 05:30:10 +00:00
Max Bires
2f87ec175f Merge "Updating CDDL schemas to match the finalized spec." into sc-dev 2021-06-21 02:11:39 +00:00
Treehugger Robot
82bbebdd13 Merge "Updating CDDL schemas to match the finalized spec." am: 11854c2d82 am: b8cf151c98
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1720450

Change-Id: I45e601192b1f05c794dea2cf61fa2668942a32a5
2021-06-18 14:56:06 +00:00
Treehugger Robot
11854c2d82 Merge "Updating CDDL schemas to match the finalized spec." 2021-06-18 14:32:25 +00:00
Eran Messeri
d26ffeca38 Merge "Remove KeyMint TODOs" am: 45e16a09ca am: 4d2be4b6a5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1741125

Change-Id: I906ccb9f8d121af9235c4d8398e9170b4e19c581
2021-06-18 13:56:57 +00:00
Eran Messeri
45e16a09ca Merge "Remove KeyMint TODOs" 2021-06-18 13:28:25 +00:00
Eran Messeri
241295940e Merge "KeyMint: Document KeyCharacteristics" am: 30a6b0e7f0 am: cd489e35d3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1736773

Change-Id: I0cf6aed6e658184e2a6c86a75c7ea96d74c2ef30
2021-06-18 13:04:59 +00:00
David Drysdale
df09e54ef3 KeyMint VTS: require curve for ECDSA keys
The KeyMint AIDL spec requires that "Tag::EC_CURVE must be provided to
generate an ECDSA key". Move the VTS tests to always create ECDSA keys
by curve not key size.

Bug: 188672564
Test: VtsAidlKeyMintTargetTest
Change-Id: I33036387c243b21ab0ecd49221b7e7757598913e
2021-06-18 13:52:47 +01:00
Eran Messeri
30a6b0e7f0 Merge "KeyMint: Document KeyCharacteristics" 2021-06-18 12:41:00 +00:00
Eran Messeri
2950654d44 Remove KeyMint TODOs
Remove TODOs from the KeyMint specification that were not concrete
enough or did not have enough context to act upon.

Bug: 183737811
Test: That it compiles.
Change-Id: I01899be5e65e9943053aa796a2ab23f1a783a1aa
2021-06-18 13:03:30 +01:00
Eran Messeri
58c8e39110 KeyMint: Document KeyCharacteristics
Document the various fields in KeyCharacteristics.

Bug: 183737811
Test: That it compiles.
Change-Id: I629001a3f5ac5d1e61ae6ffaa2702e3d32f56e52
2021-06-18 12:28:09 +01:00
Alan Stokes
e75851712b Allow CompOS APEX to access Keystore AIDL.
Makes the AIDL (and its dependencies) available to allow client code
to build against it.

Fixes: 190995136
Test: Client code (in progress) builds.
Change-Id: I06e7486463bca93ed25377c0dca30484a6bbf656
2021-06-18 10:21:36 +01:00
David Drysdale
37af4b3656 KeyMint VTS: more attestation info tests
Try all tags in attestion extension one by one

Test: VtsAidlKeyMintTargetTest on CF
Bug: 186735514
Change-Id: I63ca8d298d2d16f707f2437ab48aaa69c1d7563d
2021-06-18 07:45:27 +01:00
Seth Moore
474eee3351 Remove ignoreSignature for cose signature checks
This flag is never used anywhere, so just remove it. When used, it would
bypass signature checks. This is something we generally don't want to
do, even in testing. So remove the flag so there's no temptation to use
it.

Ignore-AOSP-First: Will cherry-pick to AOSP
Bug: 190942528
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I0433c1eedc08e9a5a5ad71347154867dba61689e
2021-06-17 12:41:39 -07:00
David Drysdale
4b8360b45a KeyMint VTS: improve attestation tests am: 03346e175e
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14964378

Change-Id: I5ab0bd80eab05bbd65d0ed9e6c4b580aaed80d49
2021-06-17 17:36:39 +00:00
David Drysdale
a676c3b4ef KeyMint VTS: improve attestation tests
Check that the various ATTESTATION_ID_* tags are included if they
have the correct value, and that keygen fails if they have an invalid
value.

Also update attestation tags to include vendor/boot patchlevel if
they're available. (They always should be, but fixing that is a
separate task.)

Bug: 190757200
Test: VtsAidlKeyMintTargetTest
Merged-In: Ibaed7364c6d08c0982e2a9fb6cb864ae42cf39fe
Change-Id: Ibaed7364c6d08c0982e2a9fb6cb864ae42cf39fe
2021-06-17 16:43:37 +01:00
David Drysdale
03346e175e KeyMint VTS: improve attestation tests
Check that the various ATTESTATION_ID_* tags are included if they
have the correct value, and that keygen fails if they have an invalid
value.

Also update attestation tags to include vendor/boot patchlevel if
they're available. (They always should be, but fixing that is a
separate task.)

Bug: 190757200
Test: VtsAidlKeyMintTargetTest
Change-Id: Ibaed7364c6d08c0982e2a9fb6cb864ae42cf39fe
2021-06-17 16:33:20 +01:00
Eran Messeri
afe9af040d Merge "Improve unique attestation docs & tests" into sc-dev 2021-06-17 15:00:15 +00:00
Eran Messeri
a9ce01cfed Improve unique attestation docs & tests
Improve the documentation and tests related to device-unique
attestation on StrongBox KeyMint devices:
* Test that the chain produced is exactly of length 2.
* Document how the chain needs to be structured.
* Explain the trust properties of the key used for the
  self-signed root.

Test: atest VtsAidlKeyMintTargetTest
Bug: 187803288
Ignore-AOSP-First: Already merged in AOSP
Merged-In: I09bb16d6938b567c114485d2df00bde9d3e1ccf9
Change-Id: Ib7efdd428ce5a2e14c281077e3a77048c9721702
2021-06-16 14:41:18 +01:00
David Drysdale
c14f322159 VTS tests: check size of byte strings
Bug: 181883620
Test: VtsAidlSecureClockTargetTest, VtsAidlSharedSecretTargetTest
Merged-In: I9ea8687e0c9e89140bcddfefcc2a6177c99b2e4d
Change-Id: I9ea8687e0c9e89140bcddfefcc2a6177c99b2e4d
Ignore-AOSP-First: already present in aosp/master
2021-06-16 08:59:50 +01:00
David Drysdale
f164c06afb KeyMint VTS: extract full vendor patchlevel
The vendor patchlevel is YYYYMMDD not YYYYMM

Bug: 188672564
Bug: 186735514
Test: VtsAidlKeyMintTargetTest
Merged-In: Ia641f8eef84a85aec8f2a0551c192b6874301126
Change-Id: Ia641f8eef84a85aec8f2a0551c192b6874301126
Ignore-AOSP-First: already present in aosp/master
2021-06-16 08:58:54 +01:00
David Drysdale
de24c1f82d Merge "VTS tests: check size of byte strings" am: 98949afb70 am: f0f6682ab5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1736653

Change-Id: I624f43d3877cbd4f56b4512d83d789f1af076b0d
2021-06-16 07:49:54 +00:00
David Drysdale
511d9bcc28 Merge "KeyMint VTS: extract full vendor patchlevel" am: 52ce52fb1e am: 24babae302
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1719301

Change-Id: I336baca3387a2ee1329760b0d22a8912b7373786
2021-06-16 07:49:45 +00:00
David Drysdale
98949afb70 Merge "VTS tests: check size of byte strings" 2021-06-16 07:17:53 +00:00
David Drysdale
52ce52fb1e Merge "KeyMint VTS: extract full vendor patchlevel" 2021-06-16 07:17:27 +00:00
Eran Messeri
a40b84b49a Merge "Use TagType constants" am: 1e6730acec am: b2178bc9c9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1737653

Change-Id: I7de0a984ee4f7d8c3a88eaf87fec594afc7902a2
2021-06-15 15:51:51 +00:00
Eran Messeri
a5047720f0 Use TagType constants
Now that the aidl compiler supports it, use constants from TagType to
indicate the type of each tag, rather than duplicating the values of
the constants.

Test: atest VtsAidlKeyMintTargetTest
Bug: 183737811
Change-Id: Ie8af1f00d04fa05c59cfc72692caecbcf2fae483
2021-06-15 14:26:59 +01:00
David Drysdale
9c7fae7e81 KeyMint VTS: extract full vendor patchlevel
The vendor patchlevel is YYYYMMDD not YYYYMM

Bug: 188672564
Bug: 186735514
Test: VtsAidlKeyMintTargetTest
Change-Id: Ia641f8eef84a85aec8f2a0551c192b6874301126
2021-06-15 13:12:07 +01:00
David Drysdale
fd1b38dc66 VTS tests: check size of byte strings
Bug: 181883620
Test: VtsAidlSecureClockTargetTest, VtsAidlSharedSecretTargetTest
Change-Id: I9ea8687e0c9e89140bcddfefcc2a6177c99b2e4d
2021-06-14 09:52:48 +01:00
David Drysdale
fd5b1a6da8 KeyMint: sync all attestation tags
Get description of ASN.1 schema in HAL and the keymint support library
in sync with each other.  Change code to always list tags in the same
order (by numeric tag).

Bug: 188672564
Bug: 186735514
Test: VtsAidlKeyMintTargetTest
Merged-In: I620f54ba4a265ea69d174f6f44765a8508bfe803
Change-Id: I620f54ba4a265ea69d174f6f44765a8508bfe803
Ignore-AOSP-First: already merged into aosp/master
2021-06-09 09:10:33 +01:00
David Drysdale
a5af95bff3 Merge "KeyMint: sync all attestation tags" am: ba8e44599c am: 16d7e387a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1719302

Change-Id: I75004dbf0512fafea3396a2884f803faa7fd0828
2021-06-09 06:18:30 +00:00
David Drysdale
ba8e44599c Merge "KeyMint: sync all attestation tags" 2021-06-09 05:49:33 +00:00
David Drysdale
eaab0f2816 KeyMint VTS: better early boot key tests
Add a check that the TAG_EARLY_BOOT_ONLY is included in the returned key
characteristics.

Bug: 188672564
Test: VtsAidlKeyMintTargetTest
Merged-In: I200c61f34888c720c47f6289d79cd21d78436b58
Change-Id: I200c61f34888c720c47f6289d79cd21d78436b58
Ignore-AOSP-First: already merged in aosp/master
2021-06-08 12:04:45 +01:00
David Drysdale
5cbbb6d580 Merge "KeyMint VTS: better early boot key tests" am: f3374d4237 am: 83b0b9a2fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1719303

Change-Id: I2814959563c2ea2f6cd9a4561e9504d1570c90ca
2021-06-07 16:43:19 +00:00
David Drysdale
96ad2036b2 KeyMint VTS: test getKeyCharacteristics()
Bug: 186685601
Bug: 188855306
Test: VtsAidlKeyMintTargetTest
Merged-In: Icf400533b0ded98b9338f2d782d95d90c7efbff4
Change-Id: Icf400533b0ded98b9338f2d782d95d90c7efbff4
Ignore-AOSP-First: already merged in aosp/master
2021-06-07 17:27:36 +01:00
David Drysdale
f3374d4237 Merge "KeyMint VTS: better early boot key tests" 2021-06-07 16:05:23 +00:00
David Drysdale
93c72cef92 KeyMint: sync all attestation tags
Get description of ASN.1 schema in HAL and the keymint support library
in sync with each other.  Change code to always list tags in the same
order (by numeric tag).

Bug: 188672564
Bug: 186735514
Test: VtsAidlKeyMintTargetTest
Change-Id: I620f54ba4a265ea69d174f6f44765a8508bfe803
2021-06-07 13:46:49 +01:00
Treehugger Robot
8e928b5b0f Merge "Improve unique attestation docs & tests" am: 0872e42bec am: f5eb250c29
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1719304

Change-Id: I94ee1b03e81fe308166446ed5a9c77f4f4fecdd5
2021-06-07 11:49:11 +00:00
Treehugger Robot
0872e42bec Merge "Improve unique attestation docs & tests" 2021-06-07 11:22:48 +00:00
David Drysdale
adfe6116d5 KeyMint VTS: better early boot key tests
Add a check that the TAG_EARLY_BOOT_ONLY is included in the returned key
characteristics.

Bug: 188672564
Test: VtsAidlKeyMintTargetTest
Change-Id: I200c61f34888c720c47f6289d79cd21d78436b58
2021-06-04 16:42:23 +01:00
David Drysdale
f417c062d1 Merge "KeyMint VTS: test getKeyCharacteristics()" am: 19c7c575f0 am: fdf8b5d957
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1714348

Change-Id: Ia80b988f91e409835ad80e26dc5a45fdcc324b31
2021-06-03 07:45:23 +00:00
David Drysdale
19c7c575f0 Merge "KeyMint VTS: test getKeyCharacteristics()" 2021-06-03 06:55:24 +00:00
Max Bires
995bbe52a3 Merge "Fixing tests to reflect change in CDDL" into sc-dev am: 09c9ab7c9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14739444

Change-Id: I22c525a9e716d5185d96c4cc4782dcd8aa1f11dc
2021-06-03 00:32:19 +00:00
Treehugger Robot
6f87175e16 Merge "Fixing tests to reflect change in CDDL" 2021-06-03 00:25:49 +00:00
Treehugger Robot
bf3990ca24 Merge "Correct the description for getKeyCharacteristics" am: e8d43f7e59 am: bb1b56ab1f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1723364

Change-Id: I6462aaf864f7c5da64d28749238e9aecaad221fe
2021-06-01 20:13:47 +00:00
Treehugger Robot
1607b3abb2 Merge "Fix for the documentation in TimeStampToken.aidl. HMAC computation will always use 1, which is the value of SecurityLevel.TRUSTED_ENVIRONMENT. This is done for backwards compatibility purpose. Test: N/A Bug: None." am: 006bdf3fa9 am: 94131d871b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1717931

Change-Id: Ied8b5ca9a7d2ae2d6716c4fa31705fd32dcd6472
2021-06-01 20:03:06 +00:00
Treehugger Robot
e8d43f7e59 Merge "Correct the description for getKeyCharacteristics" 2021-06-01 19:49:43 +00:00
Seth Moore
fa3d38d206 Correct the description for getKeyCharacteristics
The description should note that keystore-enforced tags are not to be
returned. This is done so that the keymint implementation doesn't have
to bother keeping track of tags it's not repsonsible for dealing with.

Bug: 186685601
Test: none (it's just a comment change)
Change-Id: I3ff94201c262a5071d271b150dbbf21888d678aa
2021-06-01 11:30:24 -07:00
Treehugger Robot
006bdf3fa9 Merge "Fix for the documentation in TimeStampToken.aidl. HMAC computation will always use 1, which is the value of SecurityLevel.TRUSTED_ENVIRONMENT. This is done for backwards compatibility purpose. Test: N/A Bug: None." 2021-06-01 17:18:21 +00:00
Eran Messeri
90747ad701 Improve unique attestation docs & tests
Improve the documentation and tests related to device-unique
attestation on StrongBox KeyMint devices:
* Test that the chain produced is exactly of length 2.
* Document how the chain needs to be structured.
* Explain the trust properties of the key used for the
  self-signed root.

Test: atest VtsAidlKeyMintTargetTest
Bug: 187803288
Change-Id: I09bb16d6938b567c114485d2df00bde9d3e1ccf9
2021-05-27 18:19:18 +01:00
Max Bires
314b21f39a Updating CDDL schemas to match the finalized spec.
This primarily updates CDDL to allow for OEMs who wish to use P256
instead of Ed25519 to do so. One structural change of note that affects
all implementors is that SignedMacAad now includes the tag from the
COSE_Mac0 of MacedKeysToSign to prevent a potential vulnerability that
would exist if an attacker compromised the server's EEK private key.

Bug: 189018262
Test: Purely a comment change
Change-Id: I043a19c6aba0f771315d45c04ab5263b610b5de8
Merged-In: I043a19c6aba0f771315d45c04ab5263b610b5de8
2021-05-27 01:11:15 +00:00
Max Bires
12ea07108e Updating CDDL schemas to match the finalized spec.
This primarily updates CDDL to allow for OEMs who wish to use P256
instead of Ed25519 to do so. One structural change of note that affects
all implementors is that SignedMacAad now includes the tag from the
COSE_Mac0 of MacedKeysToSign to prevent a potential vulnerability that
would exist if an attacker compromised the server's EEK private key.

Bug: 189018262
Test: Purely a comment change
Change-Id: I043a19c6aba0f771315d45c04ab5263b610b5de8
2021-05-26 18:11:07 -07:00
Max Bires
8dff0b3584 Fixing tests to reflect change in CDDL
This fixes up the tests to go along with the change to the signature
of the MAC key. Primarily, this adds the MAC tag from the MACing
operation over the public key set to be signed into the AAD of the
signature of said MAC key.

Bug: 189018262
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Ibdcf242e0ae73dee1a08fe98d939130055e4492e
Merged-In: Ibdcf242e0ae73dee1a08fe98d939130055e4492e
2021-05-26 21:42:17 +00:00
Max Bires
f884283cd6 Fixing tests to reflect change in CDDL
This fixes up the tests to go along with the change to the signature
of the MAC key. Primarily, this adds the MAC tag from the MACing
operation over the public key set to be signed into the AAD of the
signature of said MAC key.

Bug: 189018262
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Ibdcf242e0ae73dee1a08fe98d939130055e4492e
2021-05-26 14:40:32 -07:00
Treehugger Robot
9839acee2e Merge "Correct documentation for update()" am: 25e701b915 am: 302b92e7b3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1717530

Change-Id: Ia095fdf84607309cda9efd3f5348ea36f4208603
2021-05-26 12:54:05 +00:00
Treehugger Robot
25e701b915 Merge "Correct documentation for update()" 2021-05-26 12:16:04 +00:00
Jiyong Park
a26f0629d3 Merge "Freeze AIDL APIs for SC" into sc-dev 2021-05-25 22:43:57 +00:00
Treehugger Robot
29159c728f Merge "Generate COSE MAC with a callback, not raw key" 2021-05-25 19:35:37 +00:00
Chirag Pathak
8ac0743508 Fix for the documentation in TimeStampToken.aidl. HMAC computation will always use 1, which is the value of SecurityLevel.TRUSTED_ENVIRONMENT. This is done for backwards compatibility purpose.
Test: N/A
Bug: None.

Change-Id: I1fd979908103f9095cc7c306e0d5036d6b357b30
2021-05-25 19:22:43 +00:00
Treehugger Robot
241327c140 Merge "Shifting VTS libs to static_lib entry" 2021-05-25 18:12:22 +00:00
Max Bires
753e88cfda Merge "Shifting VTS libs to static_lib entry" into sc-dev 2021-05-25 16:16:50 +00:00
Seth Moore
026bb7431d Generate COSE MAC with a callback, not raw key
The cppcose_rkp library was updated to generate MAC via callback instead
of passing keys around to allow for stronger MAC key protection.

Bug: 182928606
Test: VtsHalRemotelyProvisionedComponentTargetTest
Test: RemoteProvisionerUnitTests
Change-Id: Ia8a0410408fe3064e904c5282b52f172f8134b9a
Merged-In: Ia8a0410408fe3064e904c5282b52f172f8134b9a
2021-05-25 07:57:13 -07:00
Shawn Willden
0b11d84fdd Correct documentation for update()
update() is no longer allowed to consume only part of the data provided.

Change-Id: Ia64a9c0340f19b5dca6dff2502dc7072021522b6
Test: N/A
2021-05-25 12:14:03 +00:00
David Drysdale
300b555b6b KeyMint VTS: test getKeyCharacteristics()
Bug: 186685601
Bug: 188855306
Test: VtsAidlKeyMintTargetTest
Change-Id: Icf400533b0ded98b9338f2d782d95d90c7efbff4
2021-05-25 11:07:51 +01:00
Jiyong Park
72b6359859 Freeze AIDL APIs for SC
Ignore-AOSP-First: part of SC finalization

Bug: 188713899
Test: m
Change-Id: Iee18cd05954dc8ea08cc4f985499a70977d1af4f
2021-05-25 10:13:26 +09:00
Seth Moore
7735ba5ea9 Generate COSE MAC with a callback, not raw key
The cppcose_rkp library was updated to generate MAC via callback instead
of passing keys around to allow for stronger MAC key protection.

Bug: 182928606
Test: VtsHalRemotelyProvisionedComponentTargetTest
Test: RemoteProvisionerUnitTests
Change-Id: Ia8a0410408fe3064e904c5282b52f172f8134b9a
2021-05-24 12:16:08 -07:00
Max Bires
e857afb6a6 Shifting VTS libs to static_lib entry
If these HALs aren't present on the device, then the test runner will
fail due to test binary trying to dynamically link to libs that aren't
present. Statically linking them will allow the test to fail gracefully
when the test harness sees that the HAL interfaces aren't available on
device.

Fixes: 184797684
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I0f8dea081a51256cfb0e50d6af20038e2b8f1f07
Merged-In: I0f8dea081a51256cfb0e50d6af20038e2b8f1f07
2021-05-23 22:10:13 +00:00
Max Bires
38dd36eaa8 Shifting VTS libs to static_lib entry
If these HALs aren't present on the device, then the test runner will
fail due to test binary trying to dynamically link to libs that aren't
present. Statically linking them will allow the test to fail gracefully
when the test harness sees that the HAL interfaces aren't available on
device.

Fixes: 184797684
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I0f8dea081a51256cfb0e50d6af20038e2b8f1f07
2021-05-23 15:09:08 -07:00
David Drysdale
bad3aebaeb Merge "KeyMint: improve HAL spec and tests" into sc-dev 2021-05-21 13:51:17 +00:00
David Drysdale
216d99293f KeyMint: improve HAL spec and tests
- clarify & test BIGNUM spec
- allow alternative return codes when requesting device unique
  attestation
- use specific error for early boot import failure
- test more early boot key scenarios (in post-early-boot mode)

Bug: 188672564
Test: VtsAidlKeyMintTargetTest
Merged-In: I70a342084a29144aef1ed0ff80fec02cc06ffbc0
Change-Id: I70a342084a29144aef1ed0ff80fec02cc06ffbc0
2021-05-21 07:47:06 +01:00
TreeHugger Robot
0c1aaef83c Merge "KeyMint vts: Correct the EC curve parameter and some return code" into sc-dev 2021-05-21 01:47:14 +00:00
David Drysdale
db0dcf5034 KeyMint: improve HAL spec and tests
- clarify & test BIGNUM spec
- allow alternative return codes when requesting device unique
  attestation
- use specific error for early boot import failure
- test more early boot key scenarios (in post-early-boot mode)

Test: VtsAidlKeyMintTargetTest
Change-Id: I70a342084a29144aef1ed0ff80fec02cc06ffbc0
2021-05-19 16:40:25 +01:00
TreeHugger Robot
bb2b88ae7f Merge changes I10c4beea,I0efc30f3 into sc-dev
* changes:
  KeyMint VTS: local RSA encryption
  KeyMint VTS: local asymmetric verification
2021-05-18 13:58:16 +00:00
Tommy Chiu
3b56cbca28 KeyMint vts: Correct the EC curve parameter and some return code
Strongbox doens't support p-224. Change the curve to p-256 for better
compatibility.
Also update the tags to be filtered on the hw-enforcement list.

Bug: 186735514
Test: VtsAidlKeyMintTargetTest
Change-Id: I3f587c5471ca68b88a565ee9ec2e27d1e9e11b17
Merged-In: Ia8eb4c8e28810de5f37295abd8baed6f01b19a3c
2021-05-18 11:47:13 +08:00
David Drysdale
cad5403270 Merge changes I10c4beea,I0efc30f3
* changes:
  KeyMint VTS: local RSA encryption
  KeyMint VTS: local asymmetric verification
2021-05-17 17:12:40 +00:00
David Drysdale
2b6c351a40 KeyMint VTS: local RSA encryption
Change RSA encryption (with public key) so it happens locally in the
test, rather than by invoking an ENCRYPT operation against KeyMint.

 - Specify MGF1 digest for OAEP mode as (now) required by AIDL spec.
 - Drop tests for too-long encryption inputs.
 - Adjust test comments to reflect decryption-only nature.
 - Change parameter checking tests to do so on DECRYPT rather than ENCRYPT.

Bug: 188385353
Test: VtsAidlKeyMintTargetTest
Merged-In: I10c4beea28387eecfd0bc7c5dfd59a1b66fec21e
Change-Id: I10c4beea28387eecfd0bc7c5dfd59a1b66fec21e
2021-05-17 15:19:48 +01:00
David Drysdale
fe42aa3a3f KeyMint VTS: local asymmetric verification
Change verification of ECDSA and RSA signatures so it happens locally
in the test, rather than by invoking a VERIFY operation against KeyMint.

Bug: 188385353
Test: VtsAidlKeyMintTargetTest
Merged-In: I0efc30f3c96cd70ac636d34718eff53cc23f1480
Change-Id: I0efc30f3c96cd70ac636d34718eff53cc23f1480
2021-05-17 15:19:32 +01:00
David Drysdale
a8d103dd09 KeyMint HAL: cert dates are in milliseconds
Bug: 188385338
Test: None, comment change only
Merged-In: I6251d4a0ba74d111f4c107f9a54a5c45811aa90f
Change-Id: I6251d4a0ba74d111f4c107f9a54a5c45811aa90f
2021-05-17 14:57:23 +01:00
David Drysdale
8d1d302ffa Merge "KeyMint HAL: cert dates are in milliseconds" 2021-05-17 13:45:21 +00:00
Tommy Chiu
77aae9e40e Merge "KeyMint vts: Correct the EC curve parameter and some return code" 2021-05-15 01:50:30 +00:00
David Drysdale
59cae644e7 KeyMint VTS: local RSA encryption
Change RSA encryption (with public key) so it happens locally in the
test, rather than by invoking an ENCRYPT operation against KeyMint.

 - Specify MGF1 digest for OAEP mode as (now) required by AIDL spec.
 - Drop tests for too-long encryption inputs.
 - Adjust test comments to reflect decryption-only nature.
 - Change parameter checking tests to do so on DECRYPT rather than ENCRYPT.

Test: VtsAidlKeyMintTargetTest
Change-Id: I10c4beea28387eecfd0bc7c5dfd59a1b66fec21e
2021-05-12 16:09:44 +01:00
Tommy Chiu
c93c439ad3 KeyMint vts: Correct the EC curve parameter and some return code
Strongbox doens't support p-224. Change the curve to p-256 for better
compatibility.
Also update the tags to be filtered on the hw-enforcement list.

Change-Id: I3f587c5471ca68b88a565ee9ec2e27d1e9e11b17
2021-05-12 19:13:55 +08:00
David Drysdale
df8f52ee8d KeyMint VTS: local asymmetric verification
Change verification of ECDSA and RSA signatures so it happens locally
in the test, rather than by invoking a VERIFY operation against KeyMint.

Test: VtsAidlKeyMintTargetTest
Change-Id: I0efc30f3c96cd70ac636d34718eff53cc23f1480
2021-05-12 11:51:24 +01:00
David Drysdale
2a73db3d9e KeyMint VTS: fix 3DES key sizes
DES key size is 7/8 of what's provided.

Test: VtsAidlKeyMintTargetTest
Change-Id: I645c1df11646d129a9421630cb6e5ed86edb8899
2021-05-10 10:59:19 +01:00
David Drysdale
e650667341 KeyMint HAL: cert dates are in milliseconds
Test: None, comment change only
Change-Id: I6251d4a0ba74d111f4c107f9a54a5c45811aa90f
2021-05-06 08:25:33 +01:00
David Drysdale
c9bc2f742d KeyMint VTS: symmetric import test with bad keylen
Test: VtsAidlKeyMintTargetTest
Change-Id: I32ad8ad2ca2b18d3279ebe77ba63b34457ab888d
2021-05-05 15:59:39 +01:00
David Drysdale
d0bc4b9e64 KeyMint HAL: restore getKeyCharacteristics() docs
Commit 40eb8f53ea ("KeyMint AIDL tweaks") removed references to
getKeyCharacteristics() in docs, as it was a KeyMaster entrypoint
that wasn't present on the KeyMint HAL.

Commit dadb18dd29 ("Add getKeyCharacteristics method to KeyMint")
added the getKeyCharacteristics() entrypoint to KeyMint, as it
turned out it was needed after all.

This commit restores references to getKeyCharacteristics() in the
Tag.aidl documentation.

Test: VtsAidlKeyMintTargetTest
Change-Id: I860479554b85f4adfeddd4eee70a09cf5265c938
2021-05-05 15:58:43 +01:00
Tommy Chiu
384c82dd14 Merge "vts: Correct the parameters on strongbox" 2021-05-05 14:08:48 +00:00
Shawn Willden
da2b9ae9f8 Merge changes Ic8949e22,Ia3a6363d
* changes:
  Update DeviceUniqueAttestationTest to match spec
  Make AttestKeyTest not crash if no cert is returned.
2021-05-04 19:50:41 +00:00
Tommy Chiu
3950b45a44 vts: Correct the parameters on strongbox
If GenerateKey() with user-provide key_blob, it needs to be specified in
the following begin() operations as well. Update the test case just to
take key_blob from private member instead of creating a local one.

Note:
- Remove redudent TAG_NO_AUTH_REQUIRED in DeviceUniqueAttestationTest

Change-Id: I81860294e1e7e01a57e66e08e75507a8292ec0c3
2021-05-04 23:09:56 +08:00
David Drysdale
3368b3c6b0 Merge "More KeyMint VTS testcases" 2021-05-04 08:00:41 +00:00
Shawn Willden
ced5c2c23a Update DeviceUniqueAttestationTest to match spec
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic8949e223eb7ba2445d4738dcd9b31a1d244bb46
2021-05-03 16:36:49 -06:00
Shawn Willden
c410f6fb44 Make AttestKeyTest not crash if no cert is returned.
Test: VtsAidlKeyMintTargetTest
Change-Id: Ia3a6363d854742681f684ff989b98b7cfda30746
2021-05-03 16:36:33 -06:00
Shawn Willden
c46f9da49f Merge "AttestationKey documentation" 2021-05-03 15:07:38 +00:00
Paul Crowley
8b25958b75 Merge "Add getKeyCharacteristics method to KeyMint" 2021-04-30 21:06:14 +00:00
David Drysdale
d2cc8c2c5e More KeyMint VTS testcases
Tests for:
 - non-prime RSA exponent (fails with CF KeyMint)
 - RSA exponent value of 3
 - key size > 512 for `STRONGBOX`
 - unknown tag inclusion
 - CBC input size not block size multiple
 - challenge omitted for attestation (fails with CF KeyMint)
 - import RSA key with implicit params
 - vestigial upgradeKey test
 - importWrappedKey errors
 - importWrappedKey sids ignored
 - duplicate/missing params on begin()
 - more tests for incompatible params on begin()
 - HMAC size not multiple of 8 (fails with CF KeyMint)
 - wrong size caller IV for 3DES rejected
 - too large MIN_MAC_LENGTH for HMAC
 - invalid AES-GCM minimum MAC length values
 - check failed updateAad() cancels operation
 - check that auto-generated nonces are distinct
 - (DISABLED_) invoke destroyAttestationIds()
 - omitting optional RSA keygen tags

Also add commenting to illustrate the ASN.1 structure of hex data.

Test: VtsKeyMintAidlTargetTest
Change-Id: I4663c42671cbb094ffe8d603e0352ffa9f1dbf2e
2021-04-30 19:15:39 +01:00
Paul Crowley
dadb18dd29 Add getKeyCharacteristics method to KeyMint
(cherry picked from commit 402d62f7be)

Bug: 186685601
Test: Treehugger
Merged-In: Ie72d865a37e2b6834fe6a86bf843d30286384aa5
Change-Id: Ie72d865a37e2b6834fe6a86bf843d30286384aa5
2021-04-30 10:58:31 -07:00
David Drysdale
bb3d85eaa4 Test for patchlevels and too much entropy
Add tests for:
 - Too much entropy should be rejected with INVALID_INPUT_LENGTH
 - All authorization lists should include a vendor and boot patchlevel.

These requirements are in both the KeyMint and the KeyMaster 4.0 AIDL
specificications, but have never been policed before.

Currently disabled with a command-line flag because CF does not have
the patchlevels and so fails lots of tests.

Test: VtsKeyMintAidlTargetTest
Change-Id: Ic9622ef3f1b80e013a34059218e3e029f392eb72
2021-04-30 14:50:14 +01:00
David Drysdale
7de9febd17 Add more symmetric KeyMint tests
Also fix some test name comments along the way.

Test: VtsKeyMintAidlTargetTest
Change-Id: I828acfaa676e1b9fa2e3c6f184f9dafb936b0e82
2021-04-30 14:50:12 +01:00
David Drysdale
40eb8f53ea KeyMint AIDL tweaks
- Describe 3DES requirements
- Remove references to non-existent getKeyCharacteristics() entrypoint
- Remove references to non-existent attestKey() entrypoint
- Remove mention of asymmetric verification operations
- Remove text describing incomplete update()
- Remove text discussing padding for ECDSA
- EC keys can't encrypt/decrypt
- Force use of curve not key size for EC keys
- Drop TODO re: CBOR encoding of wrapped key
- Indicate caller-provided nonces must have correct size
- Add more reference to IKeyMintOperation
- Align parameter names with signatures
- Correct MIN_MAC_LENGTH error code
- Make CREATION_DATETIME consistently optional
- Describe use of MGF1 digest option
- Fix typos

Test: VtsKeyMintAidlTargetTest (CF)
Change-Id: Ie01b99d33be7336e872bf24a7761a3ac5b1d584c
2021-04-30 14:19:31 +01:00
Treehugger Robot
af3b58e35a Merge "Add attestation format documentation" 2021-04-27 20:40:50 +00:00
David Drysdale
5cde787c9f Merge "Align KeyMint AIDL with usage" 2021-04-27 16:43:01 +00:00
Shawn Willden
8691e58bd1 AttestationKey documentation
Test: N/A, only added documentation
Change-Id: I41ed99c385c99511e8a9a19a5aa7aec180ee41ac
2021-04-27 09:22:25 -06:00
Shawn Willden
3cb64a6822 Add attestation format documentation
Somehow the attestation format docs got dropped from KeyMint in the
transition from Keymaster.  This replaces them, and also clarifies
that KeyMint StrongBox should not support device attestation.

Test: VtsAidlKeyMintTargetTest
Change-Id: I2334e99b4797c7a0e2e59727ffa730cf7504df31
2021-04-27 09:22:25 -06:00
Selene Huang
8f9494c4f6 Added various vts tests for attestKey.
- Added tests for signing attest key with factory chain.
  - Added test for signing encryption keys.
  - Added tests for chaining many RSA attest keys on the same chain.
  - Added tests for chaining many Ec attest keys on the same chain.
  - Added tests for alternate chaining of rsa-ec-rsa-ec-rsa attesti
    keys on the same chain.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: I9c67e2b928d6bba6cc4074a4b65f639f33c9ec26
2021-04-24 22:43:13 -07:00
Selene Huang
6e46f1467c Added vts tests for certificate subject and serial for various
algorithms and self sign or non-self sign certificates.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: I4e9d8db7be500f165c3a9f240ea2dfe00c2a70d1
2021-04-22 15:18:32 -07:00
David Drysdale
56ba912b30 Align KeyMint AIDL with usage
- Make HardwareAuthToken nullable on begin()
 - Drop unused vestigial performOperation() entrypoint
 - Drop unused Tag::BLOB_USAGE_REQUIREMENTS

Test: TreeHugger, VtsKeyMintAidlTargetTest (CF)
Change-Id: I577ac04d843ee6d03cbfb99e56ef3e69eb034532
2021-04-22 15:55:29 +01:00
Selene Huang
6d70ac2462 Merge "Implement device unique attestation vts tests for keymint." 2021-04-21 19:46:56 +00:00
Treehugger Robot
04d6d4a186 Merge "Added 12 various attestation related vts tests. - Check for app id only if challenge is provided. - Verify self sign certificate works for RSA and Ecdsa. - Verified attestation is generated for encryption keys too. - Verify no attestation is generated for symetric keys. - Verify app id is always required when attestation challenge is provided to the new key generation. - Verify app id is ignored when challenge is missing. - Verify app id length is properly encoded. - Added vts tests for various attestation success and fail cases." 2021-04-21 05:57:09 +00:00
Selene Huang
4f64c22809 Added 12 various attestation related vts tests.
- Check for app id only if challenge is provided.
- Verify self sign certificate works for RSA and Ecdsa.
- Verified attestation is generated for encryption keys too.
- Verify no attestation is generated for symetric keys.
- Verify app id is always required when attestation challenge is
  provided to the new key generation.
- Verify app id is ignored when challenge is missing.
- Verify app id length is properly encoded.
- Added vts tests for various attestation success and fail cases.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: If29249b0913fd9c2f91d20188ca5cfbaa04bead8
2021-04-20 19:23:40 -07:00
Selene Huang
531a72d7ff Implement device unique attestation vts tests for keymint.
Test: atest VtsAidlKeyMintTargetTest
Change-Id: If271c915d33cece035ab67b9149ae4ba762648b4
2021-04-21 01:45:13 +00:00
Max Bires
261a0490b6 Porting the client <-> HAL service interface
This change removes the interface layer between the client and the
underlying HAL. This is one part of a two part change to properly finish
migrating all of the RemotelyProvisionedComponent functionality to
system/keymaster.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Ibccc6b3af86a63b8a6c6207fffd43cfc41b903b5
2021-04-20 02:00:00 +00:00
Treehugger Robot
ed54acfbff Merge "Adding getHardwareInfo to IRPC" 2021-04-19 22:04:32 +00:00
Treehugger Robot
4b84c912a0 Merge "Porting IRPC functionality." 2021-04-19 19:30:27 +00:00
Max Bires
9704ff6b85 Porting IRPC functionality.
This is the change that removes the functionality that has been shifted
over to appropriate classes and contexts in system/keymaster.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I491f4ef823868322ea6a804d88ca09662c099a44
2021-04-17 18:19:28 -07:00
Max Bires
4190509ed6 Adding getHardwareInfo to IRPC
This adds a way to derive information about the hardware for clients
that call the HAL. The primary functional usecase here is to
differentiate which EC curve the underlying hardware for a given
instance of IRemotelyProvisionedComponent is supported.

Originally, curve 25519 would have been used in all implementations for
verifying the EEK certificate chain and doing ECDH, but secure elements
do not offer 25519 support yet. In order to support remote provisioning
on SEs, we have to relax the standard here a bit to allow for P256.

Test: Everything builds
Change-Id: I9245c6f4e27bd118fe093bffc0152549ed7f0825
2021-04-17 15:37:43 -07:00
Selene Huang
0a8dd959a4 Merge "Update Keymint documentation in aidl." 2021-04-14 21:43:05 +00:00
Selene Huang
e5727e66c2 Add Rsa 2048 import key test for strongbox.
Test: atest VtsAidlKeyMintTargetTest
Change-Id: If228b11fe23d2aaaa68e8ff53f0420c5e5ae62fb
2021-04-13 22:51:54 -07:00
Selene Huang
6ea762a04b Update Keymint documentation in aidl.
Change-Id: I8eb73da95d9070c46d61973b26373628a1333e9f
Test: n/a
2021-04-14 00:58:36 +00:00
Treehugger Robot
d997c72959 Merge "vts: Correct the TagType when verify_attestation_record" 2021-04-13 13:06:58 +00:00
David Drysdale
4dc010739d Check that KeyMint provides IRemotelyProvisionedComponent
Move helper utilities across into KeyMintAidlTestBase to allow re-use.

Test: VtsHalRemotelyProvisionedComponentTargetTest, VtsAidlKeyMintTargetTest
Change-Id: Ib9e55a7d72fd197016ae1a1f073dadedafa09c25
2021-04-12 14:48:31 +01:00
Treehugger Robot
5bb7be3f8e Merge "Setting libcppcose to host supported." 2021-04-08 05:03:45 +00:00
Tommy Chiu
f00d8f1c0a vts: Correct the TagType when verify_attestation_record
TAG_BOOT_PATCHLEVEL and TAG_VENDOR_PATCHLEVEL should be interger type.

Fixed: 184796337
Test: VtsAidlKeyMintTargetTest not abort
Change-Id: Iccd6ac93910d44c0a02b798210909c404a98d8ab
2021-04-08 11:12:32 +08:00
Max Bires
bcde7a7f66 Setting libcppcose to host supported.
This change adds the host supported flag to the libcppcose and removes
some unnecessary dependencies from the blueprint file.

Test: libcppcose builds
Change-Id: I45bca44267a50d0d401fc1964f96363e558317ff
2021-04-07 16:28:05 -07:00
Janis Danisevskis
71eb2258bf Merge "Security: Add @SensitiveData annotation." 2021-04-07 21:35:26 +00:00
Janis Danisevskis
3829840d36 Security: Add @SensitiveData annotation.
Bug: 174857732
Test: N/A
Change-Id: Id1aeaf9b0da79b8c4d5e91f30942a31a26f7b1d4
2021-04-06 09:50:19 -07:00
Chirag Pathak
cfb9792b4c Adds new error code which is required by keystore to handle strongbox hal related functionality.
Test: N/A
Bug: b/184306647

Change-Id: Ifbf7b931e58420f17e16f297205018248d39f476
2021-04-02 20:17:27 +00:00
Shawn Willden
14fdd67a30 Allow SecureClock tests to pass on devices w/out SecureClock
Bug: 182289099
Test: VtsAidlSecureClockTargetTest
Change-Id: I830fe2879cd3328adf950060afb7e9eb18e558b7
2021-04-01 17:06:06 -06:00
Shawn Willden
7e71f1e5c5 Allow KeyMint tests to pass on devices w/out KeyMint
Bug: 181987225
Test: VtsAidlKeyMintTargetTest
Change-Id: I243fee463611ec2bf1f3661c46d3431280e187aa
2021-04-01 16:44:22 -06:00
Shawn Willden
7bbf6298f2 Correct error code in attest_key docs.
Also adds a test to verify that implementations return the expected
error code.

Test: VtsAidlKeyMintTargetTest
Change-Id: Ic8e9953a2572eb0cc8fefc363934eaf9b432b5a4
2021-04-01 12:57:21 -06:00
Shawn Willden
49e5b5eacc Merge "Fix documentation of EARLY_BOOT_ONLY tag in KeyMint" 2021-04-01 14:36:07 +00:00
David Drysdale
4d3c298c66 Use a heuristic to correlate devices
Every KeyMint device should have a corresponding
IRemotelyProvisionedComponent instance, but the converse is not true.

So given an IRPC instance under test, look for a corresponding KeyMint
device by comparing suffixes, but just skip the test if not found.

Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I390aa7025eb77f75a3280e8d85dc453b784c23ee
2021-03-31 18:27:36 +01:00
David Drysdale
f6fc5a6336 Fix DeviceInfo encoding and checks
- Make the default implementation include the DeviceInfo as a map, not
   a bstr-holding-a-map, to match the spec.
 - Check the signature of the signed MAC even in test mode.
 - Include the DeviceInfo in the data that the signature covers.

Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I9084343c1273c16a9cbd5a1156e7057a1c54a860
2021-03-31 18:08:59 +01:00
David Drysdale
b39baeaa92 Merge changes I2f5187bf,Icb79e1e0,I833894d3,I54dcaa61,I47a810f2
* changes:
  Test that provisioned keys can be used with KeyMint
  Add tests with corrupted MAC on keypair
  Add more EEK variant tests and related fixes
  Commonize MacedPublicKey and ProtectedData checks
  Tweak IRemotelyProvisionedComponent AIDL docs
2021-03-31 14:48:41 +00:00
Treehugger Robot
0ccd277dcb Merge "Adding jbires to keymint/aidl/OWNERS" 2021-03-31 10:06:21 +00:00
Treehugger Robot
93d82aca8f Merge "Clarify certificate chain requirements documentation." 2021-03-30 14:28:51 +00:00
Shawn Willden
5ae01f4539 Clarify certificate chain requirements documentation.
Test: N/A comment-only change
Change-Id: I8f27f9c6d550d970212f3e460be33b28929fda09
2021-03-29 08:44:03 -06:00
David Drysdale
f0d516d281 Test that provisioned keys can be used with KeyMint
Test: VtsRemotelyProvisionedComponentTests
Change-Id: I2f5187bfb4fd1572d10c306377e07a6d167689fa
2021-03-29 09:17:54 +01:00
David Drysdale
e99ed8667a Add tests with corrupted MAC on keypair
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Icb79e1e03518ebb20430f33c3d30a44a383798ed
2021-03-29 09:17:51 +01:00
David Drysdale
cceca9f5f6 Add more EEK variant tests and related fixes
- Test with deliberately-invalid EEK in request:
    - corrupt signature
    - missing initial self-signed cert
 - Test with different sizes of EEK chain.

These tests will only really take effect when we have a valid GEEK to
test with.

Other changes:
 - Fix encoding of KeyUsage bitset.
 - Add a made-up allowed-root pubkey for prod mode. This needs to be
   replaced with the real GEEK when available.
 - Fix generateEek() so that the first private key isn't used for
   all signing operations.

Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I833894d33cd1757b7a0cfcf18f79b61e4e56a556
2021-03-29 09:17:18 +01:00
David Drysdale
c84007725b Commonize MacedPublicKey and ProtectedData checks
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I54dcaa6175b243219cb333f82278ecce08f8bb17
2021-03-29 09:16:15 +01:00
David Drysdale
a5ddfbdcad Tweak IRemotelyProvisionedComponent AIDL docs
- Use P-256 in MacedPublicKey: The main place that MacedPublicKey is
   used requires a P-256 key, so use that as the example in the comment.
 - Fix leaf key type comment
 - Fix AES key size comment
 - Typo fix

Test: none, just comment change
Change-Id: I47a810f2a965facad6ddcd251341f233884e5f7c
2021-03-29 07:23:28 +00:00
David Zeuthen
7f8ccb5caf KeyMint + KeyMaster: Include permissions for FEATURE_HARDWARE_KEYSTORE.
This change includes permission files for the new permission
FEATURE_HARDWARE_KEYSTORE for the default KeyMaster and KeyMint
implementations.

Test: Manually inspected that permission files are installed.
Test: atest android.keystore.cts.KeyAttestationTest#testAttestationKmVersionMatchesFeatureVersion
Bug: 160616951
Change-Id: Ia35e1ba6c894624999eed62e8434a20ebc833b97
2021-03-25 08:07:03 -04:00
Max Bires
127b72ac0e Merge "Require RemoteProvisioner app for HAL service" 2021-03-25 01:07:12 +00:00
Treehugger Robot
2bb0aa102d Merge "This fixes the potential vts test failures for devices with no registered shared secret services. It aso fixes the static dependency issue. Test: atest VtsAidlSharedSecretTargetTest, atest VtsAidlSecureClockTargetTest Bug: b/182913582" 2021-03-25 00:33:00 +00:00
Max Bires
459bf52740 Merge "IRemotelyProvisionedComponent returns DeviceInfo" 2021-03-24 23:29:13 +00:00
Max Bires
501dcde8a7 Require RemoteProvisioner app for HAL service
Any device that provides an implementation for
IRemotelyProvisionedComponent will need the RemoteProvisioner system app
to actually drive the business logic and handle communicating out to
external servers. If this HAL is not present, then the app should not be
present on device either.

Test: app appears on CF, does not appear on e.g. blueline, coral
Change-Id: I84c3e450486ecff841b848b5e5e7a15f26895725
2021-03-24 11:00:52 -07:00
Max Bires
fdbb904a0c IRemotelyProvisionedComponent returns DeviceInfo
This alters the AIDL interface and underlying functionality to have the
component return the DeviceInfo CBOR blob that is used as AAD in
verification of a signature over a MAC key. Trying to reconstruct this
from userspace is very likely to lead to pain and subtle errors in the
future as adoption of this HAL increases, and multiple instances of this
HAL may exist on device simultaneously.

Test: atest VtsRemotelyProvisionedComponentTests
Change-Id: I44bd588586652630ed31a87cfda7e9c01cbf0a2f
2021-03-24 10:04:23 -07:00
Satya Tangirala
38b3bcee7f Merge "Keystore 2.0: add convertStorageKeyToEphemeral() to IKeymintDevice" 2021-03-24 03:43:38 +00:00
Chirag Pathak
f29ce36ecd This fixes the potential vts test failures for devices with no registered shared secret services. It aso fixes the static dependency issue.
Test: atest VtsAidlSharedSecretTargetTest, atest VtsAidlSecureClockTargetTest
Bug: b/182913582

Change-Id: Id526b729a7930bb081c794d9fae564eab9e300d5
2021-03-24 02:29:37 +00:00
Max Bires
928940ab07 Adding jbires to keymint/aidl/OWNERS
With great powers comes great responsibility. Or reverts.

Test: jbires can give owners vote on CLs in gerrit
Change-Id: I2efa65047b15be4a5138e6b343a534b3da245909
2021-03-23 11:26:14 -07:00
Shawn Willden
1f71f2c412 Fix documentation of EARLY_BOOT_ONLY tag in KeyMint
Change-Id: Ib49ee844e43fc10d83e0dd8d3b3b92914059f6f8
Test: VtsAidlKeyMintTargetTest
2021-03-23 12:29:09 +00:00
Satya Tangirala
c757c1ba39 Keystore 2.0: add convertStorageKeyToEphemeral() to IKeymintDevice
Add a function convertStorageKeyToEphemeral to IKeymintDevice that vold
can use to get a per-boot ephemeral key from a wrapped storage key.

Bug: 181806377
Bug: 181910578
Change-Id: I1b008423e3e24797132c8eb79ab3899e2b1c68e8
2021-03-22 17:39:36 -07:00
Janis Danisevskis
442a08d3ee security.sharedsecret: Add rust derives and fix docs.
Add rust derives to SecretSharingParameters.

Also fix some comments.

Test: N/A
Change-Id: Id3f02744d2880e59c678d781344bcbb83e8c8864
2021-03-22 15:35:38 -07:00
Janis Danisevskis
61eadb7ce4 Security: Provide generated java sources.
Enable generation of java sources for AIDL interfaces. This allows
enabling the @SensitiveData annotation without causing circular build
dependencies.

Also mark doc comments as @hide to prevent the interface from being
included in the SDK.

Bug: 174857732
Test: N/A
Merged-In: If00e4dfc24bf776f87c7e2b2e3f42350aa4d4379
Change-Id: If00e4dfc24bf776f87c7e2b2e3f42350aa4d4379
2021-03-22 20:02:39 +00:00
Max Bires
72ca1d2a40 Merge "COSE unprotected parameters are a map not a bstr" 2021-03-18 15:08:43 +00:00
Satya Tangirala
66e371f3d6 Keystore 2.0: Sync output format of generated headers
The output format of headers generated by
"m android.hardware.security.keymint-update-api" has changed. This patch
updates the format of those generated files in the tree.

Change-Id: If00a194f136c67197c96081b3c211d615fad5f07
2021-03-15 14:43:14 -07:00
David Drysdale
31a2b56ca2 COSE unprotected parameters are a map not a bstr
As per RFC 8152 section 3, the unprotected parameters in the headers
of COSE objects are just encoded as a map, not as a bstr that contains
the CBOR-encoding of a map.

Test: TreeHugger presubmit
Change-Id: Id4eeb023d3a81ad1398d78d410c8224bf941f9b1
2021-03-15 14:56:29 +00:00
David Drysdale
812a1d3d4a Fix docs for SecurityLevel::TRUSTED_ENVIRONMENT
Test: VtsAidlKeyMintTargetTest
Change-Id: I6bbc9abe308ba4b16297a7adc335cbb6f735f76c
2021-03-04 15:39:43 +00:00
Shawn Willden
d659c7c181 Add performOperation stub.
Test: VtsAidlKeyMintTargetTest
Change-Id: I3689fd2993941343c6b9ba503fbe56153742fb3e
2021-03-01 09:29:39 -07:00
Treehugger Robot
be9a813aec Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces" 2021-03-01 04:00:19 +00:00
Paul Crowley
b79f2a807c Merge "Add MAX_BOOT_LEVEL tag, BOOT_LEVEL_EXCEEDED error" 2021-02-27 05:05:50 +00:00
Paul Crowley
5d30131709 Add MAX_BOOT_LEVEL tag, BOOT_LEVEL_EXCEEDED error
A key with the MAX_BOOT_LEVEL tag cannot be used past a particular
stage of device boot.

Test: Treehugger
Bug: 176450483
Change-Id: I113e3101734736a8621a01ed85969a4ecbe12a68
2021-02-26 14:33:46 -08:00
Shawn Willden
91f8c7c091 Merge "Separate updateAad from update & other cleanups" 2021-02-26 16:04:53 +00:00
Bob Badour
bbff7921dc [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  neuralnetworks/utils/adapter/Android.bp
  security/keymint/aidl/vts/performance/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I139497d894d893a405d9b16df5e23b69dc82674f
2021-02-26 03:45:46 -08:00
Treehugger Robot
8bfd260e3e Merge "Fixing VTS tests after IKeyMint breakage" 2021-02-25 02:18:31 +00:00
Shawn Willden
92d79c093f Separate updateAad from update & other cleanups
Test: VtsKeyMintAidlTargetTest
Change-Id: Ib4ab43dbf2604a7642fb2b551646fd7f0adac615
2021-02-24 15:54:12 -07:00
Bob Badour
b224b363de [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  atrace/1.0/Android.bp
  atrace/1.0/default/Android.bp
  atrace/1.0/vts/functional/Android.bp
  audio/2.0/Android.bp
  audio/2.0/config/Android.bp
  audio/4.0/Android.bp
  audio/4.0/config/Android.bp
  audio/5.0/Android.bp
  audio/5.0/config/Android.bp
  audio/6.0/Android.bp
  audio/6.0/config/Android.bp
  audio/7.0/Android.bp
  audio/7.0/config/Android.bp
  audio/common/2.0/Android.bp
  audio/common/4.0/Android.bp
  audio/common/5.0/Android.bp
  audio/common/6.0/Android.bp
  audio/common/7.0/Android.bp
  audio/common/7.0/example/Android.bp
  audio/common/all-versions/default/Android.bp
  audio/common/all-versions/default/service/Android.bp
  audio/common/all-versions/test/utility/Android.bp
  audio/common/all-versions/util/Android.bp
  audio/core/all-versions/default/Android.bp
  audio/core/all-versions/default/util/Android.bp
  audio/core/all-versions/vts/functional/Android.bp
  audio/effect/2.0/Android.bp
  audio/effect/2.0/xml/Android.bp
  audio/effect/4.0/Android.bp
  audio/effect/4.0/xml/Android.bp
  audio/effect/5.0/Android.bp
  audio/effect/5.0/xml/Android.bp
  audio/effect/6.0/Android.bp
  audio/effect/6.0/xml/Android.bp
  audio/effect/7.0/Android.bp
  audio/effect/7.0/xml/Android.bp
  audio/effect/all-versions/default/Android.bp
  audio/effect/all-versions/default/util/Android.bp
  audio/effect/all-versions/vts/functional/Android.bp
  audio/policy/1.0/vts/functional/Android.bp
  audio/policy/1.0/xml/Android.bp
  audio/policy/1.0/xml/pfw_schemas/Android.bp
  authsecret/1.0/Android.bp
  authsecret/1.0/default/Android.bp
  authsecret/1.0/vts/functional/Android.bp
  authsecret/aidl/Android.bp
  authsecret/aidl/default/Android.bp
  authsecret/aidl/vts/Android.bp
  automotive/audiocontrol/1.0/Android.bp
  automotive/audiocontrol/1.0/default/Android.bp
  automotive/audiocontrol/1.0/vts/functional/Android.bp
  automotive/audiocontrol/2.0/Android.bp
  automotive/audiocontrol/2.0/default/Android.bp
  automotive/audiocontrol/2.0/vts/functional/Android.bp
  automotive/can/1.0/default/libnetdevice/Android.bp
  automotive/can/1.0/hidl-utils/Android.bp
  automotive/can/1.0/tools/Android.bp
  automotive/can/1.0/tools/configurator/Android.bp
  automotive/can/1.0/tools/configurator/proto/Android.bp
  automotive/can/1.0/tools/libcanhaltools/Android.bp
  automotive/can/1.0/vts/functional/Android.bp
  automotive/can/1.0/vts/utils/Android.bp
  automotive/evs/1.0/Android.bp
  automotive/evs/1.0/default/Android.bp
  automotive/evs/1.0/vts/functional/Android.bp
  automotive/evs/1.1/Android.bp
  automotive/evs/1.1/default/Android.bp
  automotive/evs/1.1/vts/functional/Android.bp
  automotive/evs/1.1/vts/fuzzing/Android.bp
  automotive/evs/common/utils/default/Android.bp
  automotive/evs/common/utils/default/test/fuzz/Android.bp
  automotive/occupant_awareness/aidl/Android.bp
  automotive/occupant_awareness/aidl/default/Android.bp
  automotive/occupant_awareness/aidl/mock/Android.bp
  automotive/occupant_awareness/aidl/vts/functional/Android.bp
  automotive/sv/1.0/Android.bp
  automotive/sv/1.0/default/Android.bp
  automotive/sv/1.0/vts/functional/Android.bp
  automotive/vehicle/2.0/Android.bp
  automotive/vehicle/2.0/default/Android.bp
  automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
  automotive/vehicle/2.0/utils/Android.bp
  biometrics/face/1.0/Android.bp
  biometrics/face/1.0/default/Android.bp
  biometrics/face/1.0/vts/functional/Android.bp
  biometrics/fingerprint/2.1/Android.bp
  biometrics/fingerprint/2.1/default/Android.bp
  biometrics/fingerprint/2.1/vts/functional/Android.bp
  biometrics/fingerprint/2.2/Android.bp
  biometrics/fingerprint/2.2/vts/functional/Android.bp
  bluetooth/1.0/Android.bp
  bluetooth/1.0/default/Android.bp
  bluetooth/1.0/vts/functional/Android.bp
  bluetooth/1.1/Android.bp
  bluetooth/1.1/default/Android.bp
  bluetooth/1.1/vts/functional/Android.bp
  bluetooth/a2dp/1.0/Android.bp
  bluetooth/a2dp/1.0/default/Android.bp
  bluetooth/a2dp/1.0/vts/functional/Android.bp
  bluetooth/audio/2.0/Android.bp
  bluetooth/audio/2.0/default/Android.bp
  bluetooth/audio/2.0/vts/functional/Android.bp
  bluetooth/audio/2.1/Android.bp
  bluetooth/audio/2.1/default/Android.bp
  bluetooth/audio/2.1/vts/functional/Android.bp
  bluetooth/audio/utils/Android.bp
  boot/1.0/Android.bp
  boot/1.0/default/Android.bp
  boot/1.0/vts/functional/Android.bp
  boot/1.1/Android.bp
  boot/1.1/default/Android.bp
  boot/1.1/default/boot_control/Android.bp
  boot/1.1/vts/functional/Android.bp
  boot/1.2/Android.bp
  boot/1.2/default/Android.bp
  boot/1.2/vts/functional/Android.bp
  broadcastradio/1.0/Android.bp
  broadcastradio/1.0/default/Android.bp
  broadcastradio/1.0/vts/functional/Android.bp
  broadcastradio/1.1/Android.bp
  broadcastradio/1.1/default/Android.bp
  broadcastradio/1.1/vts/functional/Android.bp
  broadcastradio/2.0/Android.bp
  broadcastradio/2.0/default/Android.bp
  broadcastradio/2.0/vts/functional/Android.bp
  broadcastradio/common/tests/Android.bp
  broadcastradio/common/utils/Android.bp
  broadcastradio/common/utils1x/Android.bp
  broadcastradio/common/utils2x/Android.bp
  broadcastradio/common/vts/utils/Android.bp
  camera/common/1.0/Android.bp
  camera/common/1.0/default/Android.bp
  camera/device/1.0/Android.bp
  camera/device/1.0/default/Android.bp
  camera/device/3.2/Android.bp
  camera/device/3.2/default/Android.bp
  camera/device/3.3/Android.bp
  camera/device/3.3/default/Android.bp
  camera/device/3.4/Android.bp
  camera/device/3.4/default/Android.bp
  camera/device/3.5/Android.bp
  camera/device/3.5/default/Android.bp
  camera/device/3.6/Android.bp
  camera/device/3.6/default/Android.bp
  camera/metadata/3.2/Android.bp
  camera/metadata/3.3/Android.bp
  camera/metadata/3.4/Android.bp
  camera/metadata/3.5/Android.bp
  camera/provider/2.4/Android.bp
  camera/provider/2.4/default/Android.bp
  camera/provider/2.4/vts/functional/Android.bp
  camera/provider/2.5/Android.bp
  camera/provider/2.5/default/Android.bp
  camera/provider/2.6/Android.bp
  cas/1.0/Android.bp
  cas/1.0/default/Android.bp
  cas/1.0/vts/functional/Android.bp
  cas/1.1/Android.bp
  cas/1.1/default/Android.bp
  cas/1.1/vts/functional/Android.bp
  cas/1.2/Android.bp
  cas/1.2/default/Android.bp
  cas/1.2/vts/functional/Android.bp
  cas/native/1.0/Android.bp
  common/aidl/Android.bp
  common/fmq/aidl/Android.bp
  common/support/Android.bp
  compatibility_matrices/Android.bp
  compatibility_matrices/Android.mk
  compatibility_matrices/build/Android.bp
  compatibility_matrices/exclude/Android.bp
  configstore/1.0/Android.bp
  configstore/1.0/vts/functional/Android.bp
  configstore/1.1/Android.bp
  configstore/1.1/default/Android.mk
  configstore/utils/Android.bp
  confirmationui/1.0/Android.bp
  confirmationui/1.0/default/Android.bp
  confirmationui/1.0/vts/functional/Android.bp
  confirmationui/support/Android.bp
  contexthub/1.0/Android.bp
  contexthub/1.0/default/Android.bp
  contexthub/1.0/vts/functional/Android.bp
  contexthub/1.1/Android.bp
  contexthub/1.1/default/Android.bp
  contexthub/1.1/vts/functional/Android.bp
  contexthub/common/vts/Android.bp
  drm/1.0/Android.bp
  drm/1.0/default/Android.bp
  drm/1.0/vts/functional/Android.bp
  drm/1.1/Android.bp
  drm/1.1/vts/functional/Android.bp
  drm/1.2/Android.bp
  drm/1.2/vts/functional/Android.bp
  drm/1.3/Android.bp
  drm/1.3/vts/functional/Android.bp
  dumpstate/1.0/Android.bp
  dumpstate/1.0/default/Android.bp
  dumpstate/1.0/vts/functional/Android.bp
  dumpstate/1.1/Android.bp
  dumpstate/1.1/default/Android.bp
  dumpstate/1.1/vts/functional/Android.bp
  fastboot/1.0/Android.bp
  fastboot/1.0/default/Android.bp
  fastboot/1.1/Android.bp
  fastboot/1.1/default/Android.bp
  gatekeeper/1.0/Android.bp
  gatekeeper/1.0/default/Android.bp
  gatekeeper/1.0/software/Android.bp
  gatekeeper/1.0/software/tests/Android.bp
  gatekeeper/1.0/vts/functional/Android.bp
  gnss/1.0/Android.bp
  gnss/1.0/default/Android.bp
  gnss/1.0/vts/functional/Android.bp
  gnss/1.1/Android.bp
  gnss/1.1/default/Android.bp
  gnss/1.1/vts/functional/Android.bp
  gnss/2.0/Android.bp
  gnss/2.0/default/Android.bp
  gnss/2.0/vts/functional/Android.bp
  gnss/2.1/Android.bp
  gnss/2.1/default/Android.bp
  gnss/2.1/vts/functional/Android.bp
  gnss/common/utils/default/Android.bp
  gnss/common/utils/vts/Android.bp
  gnss/measurement_corrections/1.0/Android.bp
  gnss/measurement_corrections/1.1/Android.bp
  gnss/visibility_control/1.0/Android.bp
  graphics/allocator/2.0/Android.bp
  graphics/allocator/2.0/default/Android.bp
  graphics/allocator/2.0/utils/gralloc1-adapter/Android.bp
  graphics/allocator/2.0/utils/hal/Android.bp
  graphics/allocator/2.0/utils/passthrough/Android.bp
  graphics/allocator/3.0/Android.bp
  graphics/allocator/4.0/Android.bp
  graphics/bufferqueue/1.0/Android.bp
  graphics/bufferqueue/2.0/Android.bp
  graphics/common/1.0/Android.bp
  graphics/common/1.1/Android.bp
  graphics/common/1.2/Android.bp
  graphics/common/aidl/Android.bp
  graphics/composer/2.1/Android.bp
  graphics/composer/2.1/default/Android.bp
  graphics/composer/2.1/utils/command-buffer/Android.bp
  graphics/composer/2.1/utils/hal/Android.bp
  graphics/composer/2.1/utils/hwc2on1adapter/Android.bp
  graphics/composer/2.1/utils/hwc2onfbadapter/Android.bp
  graphics/composer/2.1/utils/passthrough/Android.bp
  graphics/composer/2.1/utils/resources/Android.bp
  graphics/composer/2.1/utils/vts/Android.bp
  graphics/composer/2.1/vts/functional/Android.bp
  graphics/composer/2.2/Android.bp
  graphics/composer/2.2/default/Android.mk
  graphics/composer/2.2/utils/command-buffer/Android.bp
  graphics/composer/2.2/utils/hal/Android.bp
  graphics/composer/2.2/utils/passthrough/Android.bp
  graphics/composer/2.2/utils/resources/Android.bp
  graphics/composer/2.2/utils/vts/Android.bp
  graphics/composer/2.2/vts/functional/Android.bp
  graphics/composer/2.3/Android.bp
  graphics/composer/2.3/default/Android.bp
  graphics/composer/2.3/utils/command-buffer/Android.bp
  graphics/composer/2.3/utils/hal/Android.bp
  graphics/composer/2.3/utils/passthrough/Android.bp
  graphics/composer/2.3/utils/vts/Android.bp
  graphics/composer/2.3/vts/functional/Android.bp
  graphics/composer/2.4/Android.bp
  graphics/composer/2.4/default/Android.bp
  graphics/composer/2.4/utils/command-buffer/Android.bp
  graphics/composer/2.4/utils/hal/Android.bp
  graphics/composer/2.4/utils/passthrough/Android.bp
  graphics/composer/2.4/utils/vts/Android.bp
  graphics/composer/2.4/vts/functional/Android.bp
  graphics/mapper/2.0/Android.bp
  graphics/mapper/2.0/default/Android.bp
  graphics/mapper/2.0/utils/hal/Android.bp
  graphics/mapper/2.0/utils/passthrough/Android.bp
  graphics/mapper/2.0/utils/vts/Android.bp
  graphics/mapper/2.0/vts/functional/Android.bp
  graphics/mapper/2.1/Android.bp
  graphics/mapper/2.1/default/Android.bp
  graphics/mapper/2.1/utils/hal/Android.bp
  graphics/mapper/2.1/utils/passthrough/Android.bp
  graphics/mapper/2.1/utils/vts/Android.bp
  graphics/mapper/2.1/vts/functional/Android.bp
  graphics/mapper/3.0/Android.bp
  graphics/mapper/3.0/utils/vts/Android.bp
  graphics/mapper/3.0/vts/functional/Android.bp
  graphics/mapper/4.0/Android.bp
  graphics/mapper/4.0/utils/vts/Android.bp
  graphics/mapper/4.0/vts/functional/Android.bp
  health/1.0/Android.bp
  health/1.0/default/Android.bp
  health/2.0/Android.bp
  health/2.0/default/Android.bp
  health/2.0/utils/libhealthhalutils/Android.bp
  health/2.0/utils/libhealthservice/Android.bp
  health/2.0/utils/libhealthstoragedefault/Android.bp
  health/2.0/vts/functional/Android.bp
  health/2.1/Android.bp
  health/2.1/default/Android.bp
  health/2.1/vts/functional/Android.bp
  health/storage/1.0/Android.bp
  health/storage/1.0/default/Android.bp
  health/storage/1.0/vts/functional/Android.bp
  health/storage/aidl/Android.bp
  health/storage/aidl/default/Android.bp
  health/storage/aidl/vts/functional/Android.bp
  health/storage/impl_common/Android.bp
  health/storage/test_common/Android.bp
  health/utils/libhealth2impl/Android.bp
  health/utils/libhealthloop/Android.bp
  identity/aidl/Android.bp
  identity/aidl/default/Android.bp
  identity/aidl/vts/Android.bp
  identity/support/Android.bp
  input/classifier/1.0/Android.bp
  input/classifier/1.0/default/Android.bp
  input/classifier/1.0/vts/functional/Android.bp
  input/common/1.0/Android.bp
  ir/1.0/Android.bp
  ir/1.0/default/Android.bp
  ir/1.0/vts/functional/Android.bp
  keymaster/3.0/Android.bp
  keymaster/3.0/default/Android.mk
  keymaster/3.0/vts/functional/Android.bp
  keymaster/4.0/Android.bp
  keymaster/4.0/default/Android.bp
  keymaster/4.0/support/Android.bp
  keymaster/4.0/vts/functional/Android.bp
  keymaster/4.0/vts/performance/Android.bp
  keymaster/4.1/Android.bp
  keymaster/4.1/default/Android.bp
  keymaster/4.1/support/Android.bp
  keymaster/4.1/vts/functional/Android.bp
  keymaster/aidl/Android.bp
  light/2.0/Android.bp
  light/2.0/default/Android.bp
  light/2.0/vts/functional/Android.bp
  light/aidl/Android.bp
  light/aidl/default/Android.bp
  light/aidl/vts/functional/Android.bp
  light/utils/Android.bp
  media/1.0/Android.bp
  media/1.0/xml/Android.mk
  media/Android.bp
  media/bufferpool/1.0/Android.bp
  media/bufferpool/2.0/Android.bp
  media/c2/1.0/Android.bp
  media/c2/1.1/Android.bp
  media/omx/1.0/Android.bp
  media/omx/1.0/vts/functional/audio/Android.bp
  media/omx/1.0/vts/functional/common/Android.bp
  media/omx/1.0/vts/functional/component/Android.bp
  media/omx/1.0/vts/functional/store/Android.bp
  media/omx/1.0/vts/functional/video/Android.bp
  memtrack/1.0/Android.bp
  memtrack/1.0/default/Android.bp
  memtrack/1.0/vts/functional/Android.bp
  memtrack/aidl/Android.bp
  memtrack/aidl/default/Android.bp
  memtrack/aidl/vts/Android.bp
  neuralnetworks/1.0/Android.bp
  neuralnetworks/1.0/utils/Android.bp
  neuralnetworks/1.0/vts/functional/Android.bp
  neuralnetworks/1.1/Android.bp
  neuralnetworks/1.1/utils/Android.bp
  neuralnetworks/1.1/vts/functional/Android.bp
  neuralnetworks/1.2/Android.bp
  neuralnetworks/1.2/utils/Android.bp
  neuralnetworks/1.2/vts/functional/Android.bp
  neuralnetworks/1.3/Android.bp
  neuralnetworks/1.3/utils/Android.bp
  neuralnetworks/1.3/vts/functional/Android.bp
  neuralnetworks/aidl/Android.bp
  neuralnetworks/aidl/utils/Android.bp
  neuralnetworks/aidl/vts/functional/Android.bp
  neuralnetworks/utils/common/Android.bp
  neuralnetworks/utils/service/Android.bp
  nfc/1.0/Android.bp
  nfc/1.0/default/Android.bp
  nfc/1.0/vts/functional/Android.bp
  nfc/1.1/Android.bp
  nfc/1.1/vts/functional/Android.bp
  nfc/1.2/Android.bp
  nfc/1.2/vts/functional/Android.bp
  oemlock/1.0/Android.bp
  oemlock/1.0/vts/functional/Android.bp
  oemlock/aidl/Android.bp
  oemlock/aidl/default/Android.bp
  oemlock/aidl/vts/Android.bp
  power/1.0/Android.bp
  power/1.0/default/Android.bp
  power/1.0/vts/functional/Android.bp
  power/1.1/Android.bp
  power/1.1/vts/functional/Android.bp
  power/1.2/Android.bp
  power/1.2/vts/functional/Android.bp
  power/1.3/Android.bp
  power/1.3/vts/functional/Android.bp
  power/aidl/Android.bp
  power/aidl/default/Android.bp
  power/aidl/vts/Android.bp
  power/stats/1.0/Android.bp
  power/stats/1.0/default/Android.bp
  power/stats/1.0/vts/functional/Android.bp
  power/stats/aidl/Android.bp
  power/stats/aidl/default/Android.bp
  power/stats/aidl/vts/Android.bp
  radio/1.0/Android.bp
  radio/1.0/vts/functional/Android.bp
  radio/1.1/Android.bp
  radio/1.1/vts/functional/Android.bp
  radio/1.2/Android.bp
  radio/1.2/default/Android.bp
  radio/1.2/vts/functional/Android.bp
  radio/1.3/Android.bp
  radio/1.3/vts/functional/Android.bp
  radio/1.4/Android.bp
  radio/1.4/vts/functional/Android.bp
  radio/1.5/Android.bp
  radio/1.5/vts/functional/Android.bp
  radio/1.6/Android.bp
  radio/1.6/vts/functional/Android.bp
  radio/config/1.0/Android.bp
  radio/config/1.0/default/Android.bp
  radio/config/1.0/vts/functional/Android.bp
  radio/config/1.1/Android.bp
  radio/config/1.1/vts/functional/Android.bp
  radio/config/1.2/Android.bp
  radio/config/1.2/vts/functional/Android.bp
  radio/config/1.3/Android.bp
  radio/config/1.3/vts/functional/Android.bp
  radio/deprecated/1.0/Android.bp
  rebootescrow/aidl/Android.bp
  rebootescrow/aidl/default/Android.bp
  rebootescrow/aidl/vts/functional/Android.bp
  renderscript/1.0/Android.bp
  renderscript/1.0/default/Android.bp
  renderscript/1.0/vts/functional/Android.bp
  secure_element/1.0/Android.bp
  secure_element/1.0/vts/functional/Android.bp
  secure_element/1.1/Android.bp
  secure_element/1.1/vts/functional/Android.bp
  secure_element/1.2/Android.bp
  secure_element/1.2/vts/functional/Android.bp
  security/keymint/aidl/Android.bp
  security/keymint/aidl/default/Android.bp
  security/keymint/aidl/vts/functional/Android.bp
  security/keymint/support/Android.bp
  security/secureclock/aidl/Android.bp
  security/secureclock/aidl/vts/functional/Android.bp
  security/sharedsecret/aidl/Android.bp
  security/sharedsecret/aidl/vts/functional/Android.bp
  sensors/1.0/Android.bp
  sensors/1.0/default/Android.bp
  sensors/1.0/vts/functional/Android.bp
  sensors/2.0/Android.bp
  sensors/2.0/default/Android.bp
  sensors/2.0/multihal/Android.bp
  sensors/2.0/vts/functional/Android.bp
  sensors/2.1/Android.bp
  sensors/2.1/default/Android.bp
  sensors/2.1/multihal/Android.bp
  sensors/2.1/vts/functional/Android.bp
  sensors/common/default/2.X/Android.bp
  sensors/common/default/2.X/multihal/Android.bp
  sensors/common/default/2.X/multihal/tests/Android.bp
  sensors/common/utils/Android.bp
  sensors/common/vts/2_X/Android.bp
  sensors/common/vts/utils/Android.bp
  soundtrigger/2.0/Android.bp
  soundtrigger/2.0/default/Android.bp
  soundtrigger/2.0/default/Android.mk
  soundtrigger/2.0/vts/functional/Android.bp
  soundtrigger/2.1/Android.bp
  soundtrigger/2.1/default/Android.mk
  soundtrigger/2.1/vts/functional/Android.bp
  soundtrigger/2.2/Android.bp
  soundtrigger/2.2/default/Android.bp
  soundtrigger/2.2/vts/functional/Android.bp
  soundtrigger/2.3/Android.bp
  soundtrigger/2.3/default/Android.bp
  soundtrigger/2.3/vts/functional/Android.bp
  tests/bar/1.0/Android.bp
  tests/bar/1.0/default/Android.bp
  tests/baz/1.0/Android.bp
  tests/baz/1.0/default/Android.bp
  tests/expression/1.0/Android.bp
  tests/extension/light/2.0/Android.bp
  tests/extension/light/2.0/default/Android.bp
  tests/extension/vibrator/aidl/Android.bp
  tests/extension/vibrator/aidl/client/Android.bp
  tests/extension/vibrator/aidl/default/Android.bp
  tests/foo/1.0/Android.bp
  tests/foo/1.0/default/Android.bp
  tests/foo/1.0/default/lib/Android.bp
  tests/hash/1.0/Android.bp
  tests/hash/1.0/default/Android.bp
  tests/inheritance/1.0/Android.bp
  tests/inheritance/1.0/default/Android.bp
  tests/lazy/1.0/Android.bp
  tests/lazy/1.1/Android.bp
  tests/libhwbinder/1.0/Android.bp
  tests/libhwbinder/1.0/default/Android.bp
  tests/libhwbinder/aidl/Android.bp
  tests/memory/1.0/Android.bp
  tests/memory/1.0/default/Android.bp
  tests/memory/2.0/Android.bp
  tests/msgq/1.0/Android.bp
  tests/msgq/1.0/default/Android.bp
  tests/multithread/1.0/Android.bp
  tests/multithread/1.0/default/Android.bp
  tests/safeunion/1.0/Android.bp
  tests/safeunion/1.0/default/Android.bp
  tests/safeunion/cpp/1.0/Android.bp
  tests/safeunion/cpp/1.0/default/Android.bp
  tests/trie/1.0/Android.bp
  tests/trie/1.0/default/Android.bp
  tetheroffload/config/1.0/Android.bp
  tetheroffload/config/1.0/vts/functional/Android.bp
  tetheroffload/control/1.0/Android.bp
  tetheroffload/control/1.0/vts/functional/Android.bp
  tetheroffload/control/1.1/Android.bp
  tetheroffload/control/1.1/vts/functional/Android.bp
  thermal/1.0/Android.bp
  thermal/1.0/default/Android.bp
  thermal/1.0/vts/functional/Android.bp
  thermal/1.1/Android.bp
  thermal/1.1/vts/functional/Android.bp
  thermal/2.0/Android.bp
  thermal/2.0/default/Android.bp
  thermal/2.0/vts/functional/Android.bp
  tv/cec/1.0/Android.bp
  tv/cec/1.0/default/Android.bp
  tv/input/1.0/Android.bp
  tv/input/1.0/default/Android.bp
  tv/input/1.0/vts/functional/Android.bp
  tv/tuner/1.0/Android.bp
  tv/tuner/1.0/default/Android.bp
  tv/tuner/1.0/vts/functional/Android.bp
  usb/1.0/Android.bp
  usb/1.0/default/Android.bp
  usb/1.0/vts/functional/Android.bp
  usb/1.1/Android.bp
  usb/1.1/vts/functional/Android.bp
  usb/1.2/Android.bp
  usb/1.2/vts/functional/Android.bp
  usb/gadget/1.0/Android.bp
  usb/gadget/1.1/Android.bp
  usb/gadget/1.1/default/Android.bp
  usb/gadget/1.1/default/lib/Android.bp
  vibrator/1.0/Android.bp
  vibrator/1.0/default/Android.bp
  vibrator/1.0/vts/functional/Android.bp
  vibrator/1.1/Android.bp
  vibrator/1.1/vts/functional/Android.bp
  vibrator/1.2/Android.bp
  vibrator/1.2/vts/functional/Android.bp
  vibrator/1.3/Android.bp
  vibrator/1.3/example/Android.bp
  vibrator/1.3/vts/functional/Android.bp
  vibrator/aidl/Android.bp
  vibrator/aidl/default/Android.bp
  vibrator/aidl/vts/Android.bp
  vr/1.0/Android.bp
  vr/1.0/default/Android.bp
  vr/1.0/vts/functional/Android.bp
  weaver/1.0/Android.bp
  weaver/1.0/vts/functional/Android.bp
  weaver/aidl/Android.bp
  weaver/aidl/default/Android.bp
  weaver/aidl/vts/Android.bp
  wifi/1.0/Android.bp
  wifi/1.0/vts/functional/Android.bp
  wifi/1.1/Android.bp
  wifi/1.1/vts/functional/Android.bp
  wifi/1.2/Android.bp
  wifi/1.2/vts/functional/Android.bp
  wifi/1.3/Android.bp
  wifi/1.3/vts/functional/Android.bp
  wifi/1.4/Android.bp
  wifi/1.4/default/Android.mk
  wifi/1.4/vts/functional/Android.bp
  wifi/hostapd/1.0/Android.bp
  wifi/hostapd/1.0/vts/functional/Android.bp
  wifi/hostapd/1.1/Android.bp
  wifi/hostapd/1.1/vts/functional/Android.bp
  wifi/hostapd/1.2/Android.bp
  wifi/hostapd/1.2/vts/functional/Android.bp
  wifi/offload/1.0/Android.bp
  wifi/offload/1.0/vts/functional/Android.bp
  wifi/supplicant/1.0/Android.bp
  wifi/supplicant/1.0/vts/functional/Android.bp
  wifi/supplicant/1.1/Android.bp
  wifi/supplicant/1.1/vts/functional/Android.bp
  wifi/supplicant/1.2/Android.bp
  wifi/supplicant/1.2/vts/functional/Android.bp
  wifi/supplicant/1.3/Android.bp
  wifi/supplicant/1.3/vts/functional/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-NCSA to:
  Android.bp
  automotive/can/1.0/Android.bp
  automotive/can/1.0/default/Android.bp

Added SPDX-license-identifier-NCSA to:
  automotive/can/1.0/default/libc++fs/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: I602b072f77ff41e9eb8d3c36b6b5315d63664006
Merged-in: I602b072f77ff41e9eb8d3c36b6b5315d63664006
2021-02-21 20:36:55 -08:00
Max Bires
126869a009 Fixing VTS tests after IKeyMint breakage
This CL re-enables the IRemotelyProvisionedComponent VTS tests after
updating the IRemotelyProvisionedComponent HAL to generate keys with
PURPOSE_ATTEST_KEY instead of PURPOSE_ATTEST_SIGN to match the new
PURPOSE_* functionality in KeyMint.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I70c7918b460898d31e343c060ac07986271148a9
2021-02-21 18:38:08 -08:00
Chirag Pathak
8aae28396e Implementing KeyMint performance/benchmark tests.
Test: run VtsAidlKeyMintBenchmarkTest in the adb shell
Bug: b/171287439

Change-Id: I70b2b2a3a1b6707088706326a5fd4a36d1065f5d
2021-02-19 17:51:47 +00:00
Treehugger Robot
cb2ba40919 Merge "Specify version for aidl_interface explicitly" 2021-02-18 12:59:44 +00:00
Shawn Willden
7c13039711 Add KeyPurpose::ATTEST_KEY.
This allows applications to generate their own attestation keys and
then use them to attest other application-generated keys.

Bug: 171845652
Test: VtsAidlKeyMintTargetTest
Change-Id: I32add16dcc2d1b29665a88024610f7bef7e50200
2021-02-17 08:08:27 -07:00
Jeongik Cha
95dbe442b2 Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: I8ccf9c8d08ad7131c77d316bf36fb515421d3ae1
2021-02-17 12:30:56 +09:00
Shawn Willden
274bb55f10 Add RemotelyProvisionedComponent HAL.
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I51fb01f4c52949c81f3ad2d694a4afdf0fa67788
2021-02-16 07:40:59 -08:00
Treehugger Robot
82d8bdd90d Merge "Add more tests for limited use key feature." 2021-02-15 05:48:12 +00:00
Qi Wu
8e727f799b Add more tests for limited use key feature.
Verify that when keymint implementation supports rollback resistance,
it must also enforce the single use key in hardware by secure hardware.

Test: atest -c VtsAidlKeyMintTargetTest
Change-Id: Ib984003247906ded7266da620e2d82e826d916bc
2021-02-11 16:37:32 +00:00
Chirag Pathak
9ea6a0addc Vts tests for earlyBoot and deviceLocked functionality.
Test: atest VtsAidlKeyMintTargetTest
Bug: b/171287439.

Change-Id: I41c0b7b6b608b26147669b007225ad6f2d3cdfed
2021-02-10 23:42:44 +00:00
Chirag Pathak
bcf07f93a7 The aidl changes related to device locked, entryBootEnded and hw info.
Test: atest VtsAidlKeyMintTargetTest
Bug: b/178222844, 179062062

Change-Id: Id4ffd6dae48ba45019d42303413ddbc35eb59935
2021-02-10 22:06:45 +00:00
Chirag Pathak
8960aaefea The implementation of vts and default implementation to support ISecureClock and ISharedSecret AIDLs.
Test: atest VtsAidlSecureClockTargetTest, atest VtsAidlSharedSecretTargetTest
Bug: b/175136979, b/175141176

Change-Id: I4a0d25981d0172c0e2c8defc61b325eca6d6a029
2021-02-10 18:48:34 +00:00
Janis Danisevskis
164bb878d4 Fix Keymint VTS test after adding CERTIFICATE_* tags
Pass required tags to generateKey and importKey.

Bug: 179809936
Test: VtsAidlKeyMintTargetTest
Change-Id: I762f73de50ca35c2f1ed271385d863910f53dcd2
2021-02-09 13:55:26 -08:00
Janis Danisevskis
2679ad6f24 Merge "Keymint: Add CERTIFICATE_* tags required for certificate generation." 2021-02-08 16:52:16 +00:00
Qi Wu
beefae4790 Add more vts tests related to limited use key.
1. Fix test case for usage count limit tag = 1 case, when
  hardware cannot enforce it, the tag should by enforced by keystore.
2. Add test case for usage count limit tag > 1.
3. Add test case to verify the usage count limit tag appears
  correctly in the attestation certificate for asymmetic key.

Test: atest -c VtsAidlKeyMintTargetTest

Change-Id: I01df278b42a91a78c8888c13c4f81b7ec70cfa22
2021-02-02 20:47:30 +08:00
Janis Danisevskis
e2ccb19399 Keymint: Add CERTIFICATE_* tags required for certificate generation.
Also fixes some formatting.

Test: N/A
Change-Id: I27e9dcfa638b544ab49befa208b294e55a04f2c1
2021-02-01 23:34:55 -08:00
Treehugger Robot
06e5b50fc3 Merge "Add new SecurityLevel::KEYSTORE" 2021-02-02 06:13:07 +00:00
Shawn Willden
a5ec08abec Add new SecurityLevel::KEYSTORE
We need a way to distinguish between tags that are enforced by KeyMint
with security level "SOFTWARE" and tags that are not enforced by
KeyMint but are expected to be enforced by KEYSTORE.

Test: VtsAidlKeyMintTargetTest
Change-Id: I9f414bec43959577a50d49146029c9edb031be56
2021-02-01 16:57:39 -07:00
Janis Danisevskis
768cec42b5 Merge "Keymint: Add rust derives to KeyMintHardwareInfo" 2021-02-01 22:19:45 +00:00
Janis Danisevskis
2d5868b4e0 Keymint Support: Fix keymint_tags.h
authorizationValue checked the uion value tag twice instead of checking
the actual tag value.

Test: N/A
Change-Id: I348b5ac06801a04ca7243088d758374148910d39
2021-01-31 21:05:41 -08:00
Janis Danisevskis
233e36943e Keymint: Add rust derives to KeyMintHardwareInfo
Test: N/A
Change-Id: I3dee43dc85d465123e2cc36f2640fe3fd49b9838
2021-01-30 08:45:48 -08:00
Treehugger Robot
45a8fe6521 Merge "Specify version for aidl_interface explicitly" 2021-01-29 02:23:01 +00:00
Jeongik Cha
1674c1354e Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: Ie7605c203c0f0eaf2c40f1e64ea45634b3aa54a5
Merged-In: I141de8ed6958fe42f727a0fa41473de4c1fb38de
2021-01-28 15:14:10 +00:00
Janis Danisevskis
08ca885240 SecureClock/SharedSecret: Add owners files.
Test: N/A
Change-Id: Ie9a210d9ffb476168b0df55cacd261711adfcb1f
2021-01-26 16:33:21 -08:00
Treehugger Robot
0d59cbdb1d Merge "Add limited use keys related tag into KeyMint aidl. And add vts test to verify the tag appears in the key characteristics. also if the tag is enforced in the hardware, afer the usage of the key is exhausted, the key blob should be invalidated from the secure storage (such as RPMB partition)." 2021-01-26 23:05:51 +00:00
David Zeuthen
df543ea006 Merge "KeyMint: Add support for key agreement operation and use it for ECDH." 2021-01-26 22:05:24 +00:00
David Zeuthen
e0c4089f06 KeyMint: Add support for key agreement operation and use it for ECDH.
Test: VtsAidlKeyMintTargetTest
Bug: 171847641
Change-Id: Id9dc0ee3c69d9c2421ce7b0f228580a90411169e
2021-01-26 12:09:17 -05:00
Janis Danisevskis
6bb888fecf Keymint/secureclock: Add Rust derives to some of the types.
This adds rust derive stanzas to TimeStamp, TimeStampToken, and
HardwareAuthToken.

Also removes an unused import from IKeyMintDevice.

Test: Compiles.
Change-Id: If41248f5cda8015ecb07bec5d1bc75317b803492
2021-01-25 10:51:54 -08:00
Qi Wu
d22ec8418b Add limited use keys related tag into KeyMint aidl.
And add vts test to verify the tag appears in the key characteristics.
also if the tag is enforced in the hardware, afer the usage of the key
is exhausted, the key blob should be invalidated from the secure storage
(such as RPMB partition).

Bug: b/174140443
Test: atest VtsHalKeyMintV1_0TargetTest

Change-Id: Ic65b855c5a8692ab8d1281dd46562ad0844ab1b0
2021-01-22 15:58:52 +08:00
Shawn Willden
1ddde5e97e Merge "Add basic testing for KeyMint certs." 2021-01-21 13:42:35 +00:00
Shawn Willden
0e80b5d108 Add basic testing for KeyMint certs.
This is by no means complete, but it validates basic functionality.
More is coming.

Test: VtsAidlKeyMintTargetTest
Change-Id: I0727a9f5b137b58b9a2f0aaf9935bfdc6525df8f
2021-01-20 22:45:40 -07:00
Janis Danisevskis
6251827cda KeyMint/SecureClock: Reverse dependency between keymint and secureclock.
This patch removes verifyAuthorization from the KeyMint spec in favor of
secureclock and the TimeStampToken. Timestamp has moved to secureclock
and the VerificationToken was removed from keymint. This reverses the
dependency between keymint and secureclock because keymint no imports
TimeStampToken and Timestamp from secureclock.

Test: Tested with CtsVerifier Fingerprint bound keys test.
Change-Id: I4e0bde0d77e74918e2b5483c30be8057417e3bf1
2021-01-14 10:19:28 -08:00
Janis Danisevskis
600b7775ef Merge changes from topic "secclock_sharedkey"
* changes:
  The aidl definition for Shared Secret functionality.
  Add Shared Secret to the compatibility matrix.
  The aidl definition for Secure Clock keymint service.
  Add Secure Clock to the compatibility matrix.
2021-01-14 18:04:02 +00:00
Chirag Pathak
be15180242 The aidl definition for Shared Secret functionality.
Test: N/A
Bug: b/171844725
Change-Id: I5f6217d487df89e8ceab92eb2bea55de5bace141
2021-01-13 15:30:05 -08:00
Chirag Pathak
c160ae682e The aidl definition for Secure Clock keymint service.
Test: N/A
Bug: b/168673523

Change-Id: I6134d8b4ce620ecceccc0ea88a234f01e6915798
2021-01-13 15:29:53 -08:00
Shawn Willden
7f42437ebb Change KeyCharacteristics
Support key characteristics with three security levels, do not store
unenforced authorizations with keys or bind them to keys.

Bug: 163606833
Test: atest VtsAidlKeyMintTargetTest
Change-Id: Idbc523f16d8ef66ec38e0d503ad579a93c49e7b4
2021-01-12 22:15:21 -07:00
David Zeuthen
1908606054 Merge "Add support and VTS test for RSA OAEP MGF1." 2021-01-05 16:31:02 +00:00
Shawn Willden
e0b0de5224 Fix atest VtsAidlKeyMintTargetTest
Renaming the test without updating the test configuration broke it.
This fixes it.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: I3f4c07a04f2b0ce604f0bbac43ffdbdbb5b34d53
2020-12-23 09:30:59 -07:00
Chirag Pathak
8b7455abb4 Add support and VTS test for RSA OAEP MGF1.
Test: atest VtsAidlKeyMintV1_0TargetTest
Bug: 160968519
Change-Id: I7093b26217b69ea36b4be8837b42cb9446887685
2020-12-22 15:58:52 -05:00
Janis Danisevskis
5ba093377c Revise keymint_tags.h
* replace NullOr with std::optional.
* Add mising tag.
* Undefine helper macros so that keymint_tags.h can be used together
  with keymaster_tags.h
* Check if KeyParameterValue variant matches KeyParameterTag in
  accessors.

Test: VtsAidlKeyMintTargetTest
Change-Id: I6c951071f30fd27c8c21a2e8cc86f421a3bc37d9
2020-12-18 08:34:20 -08:00
Shawn Willden
83fa6413ac Change KeyParameters to use a union.
AIDL now supports union types.  This CL changes KeyParameter to use
one.

Test: VtsAidlKeyMintTargetTest
Change-Id: I5112611b161e3de1ea86105ea3c7ed0912036a7b
2020-12-18 08:38:28 -07:00
Janis Danisevskis
24c0470408 Keymint: Use ndk_platform.
Test: N/A
Change-Id: I7e97d9d475a639cfe92c9e6b01689c9ff80d2abc
2020-12-17 11:34:59 -07:00
Shawn Willden
747eeaea28 Remove authorization set serialization.
This is no longer needed in KeyMint. Keystore2 implements similar
functionality in Rust.

Test: Build
Change-Id: Ia43716449756935619fb22ef5aba113e420c2687
2020-12-13 23:48:10 -07:00
Shawn Willden
09b5826c68 Move tag type comments where they belong.
Because AIDL doesn't allow tag values to be constructed the way we
did in HIDL (and before), each tag definition carries a comment
specifying what the "magic" tag type value used in its construction
means.  This CL moves those comments so they're adjacent to the value
they're documenting.

Test: Build
Change-Id: I30b037f9ddf6bf2b07326a53959d490e045c891a
2020-12-13 23:48:10 -07:00
Shawn Willden
1d3f85e891 Various cleanups
Mostly just removal of old-style #include guards in favor of #pragm
once, reorganization of header includes, correction of copyright
years, etc.

Test: VtsAidlKeyMintTargetTest
Change-Id: I070584ecec550a2f133b1c19f36f99e7b5544e7c
2020-12-13 23:48:10 -07:00
Shawn Willden
08a7e43e78 Revert^2 "Move keymint to android.hardware.security."
1ffcdebadd

Bug: 175345910
Bug: 171429297
Exempt-From-Owner-Approval: re-landing topic with no changes in this CL.
Change-Id: I691cad252f188b54a8076589d9955774d74d4729
2020-12-11 20:36:59 +00:00
Orion Hodson
1ffcdebadd Revert "Move keymint to android.hardware.security."
Revert "Keystore 2.0 SPI: Move keymint spec to security namespace."

Revert "Keystore 2.0: Move keymint spec to security namespace."

Revert "Keystore 2.0: Move keymint spec to security namespace."

Revert "Move keymint to android.hardware.security."

Revert "Configure CF to start KeyMint service by default."

Revert "Move keymint to android.hardware.security."

Revert "Move keymint to android.hardware.security."

Revert submission 1522123-move_keymint

Reason for revert: Build breakage
Bug: 175345910
Bug: 171429297
Reverted Changes:
Ief0e9884a:Keystore 2.0: Move keymint spec to security namesp...
Idb54e8846:Keystore 2.0: Move keymint spec to security namesp...
I9f70db0e4:Remove references to keymint1
I2b4ce3349:Keystore 2.0 SPI: Move keymint spec to security na...
I2498073aa:Move keymint to android.hardware.security.
I098711e7d:Move keymint to android.hardware.security.
I3ec8d70fe:Configure CF to start KeyMint service by default.
Icbb373c50:Move keymint to android.hardware.security.
I86bccf40e:Move keymint to android.hardware.security.

Change-Id: I160cae568ed6b15698bd0af0b19c6c949528762d
2020-12-11 10:45:43 +00:00
Shawn Willden
f73e952ea4 Move keymint to android.hardware.security.
Test: VtsAidlKeyMintTargetTest
Change-Id: I2498073aa834584229e9a4955a97f279a94d1dd5
2020-12-09 16:26:41 -07:00