Commit graph

536 commits

Author SHA1 Message Date
Jim Blackler
cb8a6b42d2 Merge "Revert "Delete KM1"" am: 0531c94771 am: 7e0f50f4fe
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1853098

Change-Id: I2bc88903556a42984553014cdbd3010939dded25
2021-10-11 14:39:01 +00:00
Jim Blackler
0531c94771 Merge "Revert "Delete KM1"" 2021-10-11 14:04:30 +00:00
Jim Blackler
a08ea2d23f Revert "Delete KM1"
Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert submission 1844016-delkm1

Reason for revert: b/202675261
Reverted Changes:
Iba996962b:Delete KM1
Ia4c5359cd:Delete KM1
Iee6ec9816:Delete KM1
I6058e4d86:Delete KM1
I8abb9c570:Delete KM1
I9c4dc5c9e:Delete KM1

Change-Id: I2a2d4b737a90f8ce31cd14b68f64564d8d245ab3
2021-10-11 13:38:59 +00:00
Shawn Willden
bb661ea978 Merge "Delete KM1" am: 13274fa22d am: 9c379e224f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1849793

Change-Id: I6d7acf78da1a57e078ffd21378d2021740633960
2021-10-09 01:19:59 +00:00
Shawn Willden
13274fa22d Merge "Delete KM1" 2021-10-09 00:46:52 +00:00
Shawn Willden
50f70d73da Delete KM1
Test: Build
Change-Id: Iee6ec98163dff3a969debd9f4343c7b06ebe8d4f
2021-10-07 09:43:32 -06:00
Yiming Pan
02aa333117 Merge "Backfill owner information for VTS module VtsHalKeymasterV4_0TargetTest." am: ea60a110ab am: e988b0f6c7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1813761

Change-Id: Ie1be063bc1c976404fdb285c5653bb3c14c851e2
2021-09-28 16:02:04 +00:00
Yiming Pan
d6bc599f1d Merge "Backfill owner information for VTS module VtsHalKeymasterV3_0TargetTest." am: 1a1b23ecf4 am: 5f27f901cd
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1813760

Change-Id: I5679e4c8702c53952ac6c8f7106273c94d324dfd
2021-09-28 16:01:58 +00:00
Yiming Pan
709ace51dd Merge "Backfill owner information for VTS module VtsHalKeymasterV4_1TargetTest." am: 9b6eea2479 am: 4d0ca281d7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814138

Change-Id: I4dd19edd2db979533021a2754b4463b480e2c7b4
2021-09-28 16:01:47 +00:00
Yiming Pan
e988b0f6c7 Merge "Backfill owner information for VTS module VtsHalKeymasterV4_0TargetTest." am: ea60a110ab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1813761

Change-Id: I65bd9c3bde86a4d297419bda45c2ea5ab1ad08d7
2021-09-28 15:50:15 +00:00
Yiming Pan
5f27f901cd Merge "Backfill owner information for VTS module VtsHalKeymasterV3_0TargetTest." am: 1a1b23ecf4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1813760

Change-Id: I749ee3fb64eb5997a11492856d24f44f06da4261
2021-09-28 15:50:09 +00:00
Yiming Pan
4d0ca281d7 Merge "Backfill owner information for VTS module VtsHalKeymasterV4_1TargetTest." am: 9b6eea2479
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814138

Change-Id: If028a781f9476e35551844687e8ce3fa64fc6537
2021-09-28 15:49:58 +00:00
Yiming Pan
ea60a110ab Merge "Backfill owner information for VTS module VtsHalKeymasterV4_0TargetTest." 2021-09-28 01:24:22 +00:00
Yiming Pan
1a1b23ecf4 Merge "Backfill owner information for VTS module VtsHalKeymasterV3_0TargetTest." 2021-09-28 01:24:09 +00:00
Yiming Pan
9b6eea2479 Merge "Backfill owner information for VTS module VtsHalKeymasterV4_1TargetTest." 2021-09-28 01:23:31 +00:00
Bob Badour
e180b3db5c [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces am: b8995451aa
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1826012

Change-Id: I010e5711d6ab29aadb262799de8f04df08145453
2021-09-14 19:28:50 +00:00
Bob Badour
b8995451aa [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  bluetooth/1.0/default/test/fuzzer/Android.bp
  keymaster/4.0/support/fuzzer/Android.bp
  radio/aidl/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Id9c8b253a2402a07637f96281bcdaffbf3afc3c3
2021-09-13 17:50:14 -07:00
Bob Badour
bf387481b9 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  bluetooth/1.0/default/test/fuzzer/Android.bp
  keymaster/4.0/support/fuzzer/Android.bp
  radio/aidl/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: If766e3abcdff8263e2cb2eb707d4743bfb395db6
2021-09-10 11:01:15 -07:00
Treehugger Robot
4134175657 Merge "Added fuzzers for libkeymaster4support" am: 03c30ca9a8 am: 52607dea82
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1729193

Change-Id: I79584356828bed8e4b40641cf615478c1e0f0822
2021-09-09 03:48:55 +00:00
Treehugger Robot
52607dea82 Merge "Added fuzzers for libkeymaster4support" am: 03c30ca9a8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1729193

Change-Id: Iecd2b69c3cbf5a21cadbd9768b27f5df24786d48
2021-09-09 03:33:55 +00:00
Treehugger Robot
03c30ca9a8 Merge "Added fuzzers for libkeymaster4support" 2021-09-09 03:25:49 +00:00
Max Bires
7db2454972 Merge "Revert "AesInvalidKeySize skip 192 on SB devices"" am: f970abe674
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1803229

Change-Id: Iba41af9658e056e59331fbf5799f21365d13723b
2021-09-01 08:34:29 +00:00
Yiming Pan
4300e62ef8 Backfill owner information for VTS module VtsHalKeymasterV4_1TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: Ifdf098e6bd86abfbe4917beb20c3aff3abc9f150
2021-08-30 12:59:29 -07:00
Yiming Pan
7f3a1bf518 Backfill owner information for VTS module VtsHalKeymasterV4_0TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I4328efc697dafa313fd685f12d867006b8b332ee
2021-08-30 12:52:20 -07:00
Yiming Pan
066eaa58de Backfill owner information for VTS module VtsHalKeymasterV3_0TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: Iba4f8145d1d525f262a3c0634a5bbf7d4e499059
2021-08-30 12:52:10 -07:00
Max Bires
f0394173a4 Merge "AesInvalidKeySize skip 192 on SB devices" into sc-dev 2021-08-20 16:15:29 +00:00
Max Bires
d067e790ab Revert "AesInvalidKeySize skip 192 on SB devices"
This reverts commit eb8b0577e8.

Reason for revert: Broke a different TEE implementation

Bug: 196922051
Change-Id: I9f136d237bd06bfe2a1cc29d11bb1fbe0b8ace5e
Merged-In: I9f136d237bd06bfe2a1cc29d11bb1fbe0b8ace5e
2021-08-20 07:30:36 +00:00
Max Bires
5b7f78d43b AesInvalidKeySize skip 192 on SB devices
This change clarifies the language to specify that StrongBox devices
must only support key sizes of 128 and 256. Additionally, it changes the
new AesInvalidKeySize test to only enforce against StrongBox instances
on devices that launch on S or later, not previously launched devices.

Ignore-AOSP-First: CP to AOSP
Bug: 191736606
Test: Test passes on a StrongBox enabled device
Change-Id: Ic0ff19d2d19d6e18dfbc0fad4b8182264f36b2f6
2021-08-19 03:28:15 -07:00
Bill Richardson
f332d02bc6 Merge "Revert "AesInvalidKeySize skip 192 on SB devices"" into sc-dev 2021-08-18 16:54:06 +00:00
Ayushi Khopkar
20bf5e70bc Added fuzzers for libkeymaster4support
This patch adds following fuzz targets: keymaster4_attestation_fuzzer, keymaster4_authSet_fuzzer and keymaster4_utils_fuzzer

Test: ./keymaster4_attestation_fuzzer
Test: ./keymaster4_authSet_fuzzer
Test: ./keymaster4_utils_fuzzer
Bug: 189053968

Change-Id: Ieca5ba012f395a25cca9e37856d197031daf7dd9
2021-08-18 12:23:03 +05:30
Max Bires
0224cfe3e0 Revert "AesInvalidKeySize skip 192 on SB devices"
This reverts commit eb8b0577e8.

Reason for revert: Broke a different TEE implementation

Bug: 196922051
Change-Id: I9f136d237bd06bfe2a1cc29d11bb1fbe0b8ace5e
2021-08-17 14:41:49 +00:00
Xin Li
e287df40b9 Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: Ifa71accba7ecf2ab15980227a4413831cfceb187
Change-Id: I7fb44c6c578a51c8ad36649d20a46233fd9609ca
2021-08-14 06:30:57 +00:00
Max Bires
3828fb2214 Merge "AesInvalidKeySize skip 192 on SB devices" 2021-08-13 21:45:14 +00:00
Max Bires
f24a66f42a Merge "AesInvalidKeySize skip 192 on SB devices" into sc-dev 2021-08-13 21:45:03 +00:00
Max Bires
eb8b0577e8 AesInvalidKeySize skip 192 on SB devices
This change clarifies the language to specify that StrongBox devices
must only support key sizes of 128 and 256. Additionally, it changes the
new AesInvalidKeySize test to only enforce against StrongBox instances
on devices that launch on S or later, not previously launched devices.

Ignore-AOSP-First: CP to AOSP
Bug: 191736606
Test: Test passes on a StrongBox enabled device
Change-Id: I1a27a0d61e5247ad90c8f5b1423f2a1567016bac
2021-08-09 23:04:26 -07:00
Max Bires
86edc262af AesInvalidKeySize skip 192 on SB devices
This change clarifies the language to specify that StrongBox devices
must only support key sizes of 128 and 256. Additionally, it changes the
new AesInvalidKeySize test to only enforce against StrongBox instances
on devices that launch on S or later, not previously launched devices.

Ignore-AOSP-First: CP to AOSP
Bug: 191736606
Test: Test passes on a StrongBox enabled device
Change-Id: I1a27a0d61e5247ad90c8f5b1423f2a1567016bac
2021-08-09 23:03:53 -07:00
David Drysdale
13cddcb298 KeyMaster 4.0 VTS: fix GSI detection
Commit f18a8328a1 ("keymaster: Relax testing under GSI") disabled
some tag checks for devices running with GSI, but detected GSI by
looking for an absence of the ro.boot.vbmeta.device_state property.

This property is currently present on GSI, so instead detect GSI using
the existing is_gsi() helper, which checks ro.product.system.name
against "mainline".

Bug: 192513934
Test: atest VtsHalKeymasterV4_0TargetTest:PerInstance/AttestationTest
Merged-In: If3c7d84a9e091b9b0842e4d8919453600bc239ea
Change-Id: If3c7d84a9e091b9b0842e4d8919453600bc239ea
2021-08-02 14:33:01 +01:00
David Drysdale
1c93999d3d KeyMaster 4.0 VTS: fix GSI detection
Commit f18a8328a1 ("keymaster: Relax testing under GSI") disabled
some tag checks for devices running with GSI, but detected GSI by
looking for an absence of the ro.boot.vbmeta.device_state property.

This property is currently present on GSI, so instead detect GSI using
the existing is_gsi() helper, which checks ro.product.system.name
against "mainline".

Bug: 192513934
Test: atest VtsHalKeymasterV4_0TargetTest:PerInstance/AttestationTest
Change-Id: If3c7d84a9e091b9b0842e4d8919453600bc239ea
Ignore-AOSP-First: manual merge to aosp/master to follow
2021-07-14 16:57:35 +01:00
David Drysdale
e3cdcb2410 KeyMaster 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 fix the support libraries to add the missing fields to the ASN.1
schema and fix the existing ordering.

Bug: 190757200
Test: VtsHalKeymasterV4_1TargetTest, VtsHalKeymasterV4_0TargetTest
Merged-In: I11d28d71676d44ebdc79b25b2eb70947022bb1cf
Ignore-AOSP-First: to be cross-merged manually
Change-Id: I5e19880bbc9e2e667f1204bdc2247ae53a3dada7
2021-06-17 16:43:48 +01:00
David Drysdale
66ab046f18 KeyMaster 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 fix the support libraries to add the missing fields to the ASN.1
schema and fix the existing ordering.

Bug: 190757200
Test: VtsHalKeymasterV4_1TargetTest, VtsHalKeymasterV4_0TargetTest
Change-Id: I11d28d71676d44ebdc79b25b2eb70947022bb1cf
Ignore-AOSP-First: to be cross-merged manually
2021-06-17 16:33:24 +01:00
Eran Messeri
a7e867a911 Test validity of device-unique attestation chain
Test the validity of the chain produced when device-unique attestation
is requested.

When the caller requests that the key attestation be signed using the
device-unique attestation key, the chain will look different than
a chain signed by the batch key (common case):
(1) The chain is exactly of length 2.
(2) The root is self-signed and is unique to the device.

Test that the chain is correctly signed in this change. The root is not
currently correctly self-signed, so don't test (2) yet.

Bug: 189425310
Bug: 187803288
Test: atest VtsHalKeymasterV4_1TargetTest:PerInstance/DeviceUniqueAttestationTest
Ignore-AOSP-First: Already merged in aosp
Merged-In: I91578eb2b7588685cc86c467423e9394c3f3c262
Change-Id: I7e83ba7c9c8c68b95b1456fb37bb5aa939c4e6f8
2021-06-16 14:38:44 +01:00
Eran Messeri
cb238ffdad Test validity of device-unique attestation chain
Test the validity of the chain produced when device-unique attestation
is requested.

When the caller requests that the key attestation be signed using the
device-unique attestation key, the chain will look different than
a chain signed by the batch key (common case):
(1) The chain is exactly of length 2.
(2) The root is self-signed and is unique to the device.

Test that the chain is correctly signed in this change. The root is not
currently correctly self-signed, so don't test (2) yet.

Bug: 189425310
Bug: 187803288
Test: atest VtsHalKeymasterV4_1TargetTest:PerInstance/DeviceUniqueAttestationTest
Change-Id: I91578eb2b7588685cc86c467423e9394c3f3c262
2021-06-08 11:42:54 +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
Tommy Chiu
566d1cb6e0 KeyMaster vts: Allow --dump_attestations to show whole DEVICE_UNIQUE_ATTESTATION
This debug option used to dump only leaf certificate.

Bug: 187803288
Change-Id: I6cd55597e5127f8aada3dc31ab3e81595f4affbf
2021-05-12 18:04:19 +08:00
Shawn Willden
aef2a7562e Merge "Added a new test case to validate AES algorithm with invalid key sizes." 2021-05-05 19:48:28 +00:00
Jooyung Han
9c3ebfc83f aidl: Set explicit default values
This fixes warnings in AIDL files(-Wenum-explicit-default).

No semantic changes. (Explicit values are all zero enumerators.)

Fixes: 179853367
Test: mma in hardware/interfaces/keymaster
Change-Id: If5a70da3efd05a344c39ef1d2e73b7ec2b894f33
2021-04-27 18:33:17 +09:00
BKSSM Venkateswarlu
4bed95e355 Added a new test case to validate AES algorithm with invalid key sizes.
Strongbox keymaster does not support keysize of length 192 for AES algorithm.
Test: Executed keymaster vts test cases.

Change-Id: I3db310f4e2353761c68a4c94aa19d9fa71aa9215
2021-04-19 18:47:00 +01:00
Janis Danisevskis
9d363652af KeyMaster 4.0: Add missing tags to support library.
keymaster_tags.h was missing the tags
ATTESTATION_ID_SERIAL/IMEI/MEID.

Test: N/A
Bug: 183412538
Change-Id: I7216971a30fa1f42f152035bf79959f21bdbc09b
2021-04-06 12:54:57 -07: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
Treehugger Robot
ac85c24b77 Merge "vts: Correct the test RSA key format" 2021-03-09 06:05:50 +00:00