Commit graph

370 commits

Author SHA1 Message Date
David Drysdale
9758dcae18 Merge "Revert "KeyMint HAL: add curve 25519, bump version"" am: 391a772300 am: f121b2c2bb am: 4df4387267 am: 633046efb2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1918632

Change-Id: I465283c26ef3a281a07a83dbe3c33a138c2eac75
2021-12-13 17:09:42 +00:00
Eran Messeri
3ef44eb5b0 Merge "Keymint: Test that corrupting the signature for HMAC verification fails" am: 924613950c am: 309c32adb7 am: a7ee9f53ed am: 4a9da1da1a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1915101

Change-Id: Ifb396f5f61426d445dcbb20453f5b42ea42347e6
2021-12-13 17:09:17 +00:00
David Drysdale
391a772300 Merge "Revert "KeyMint HAL: add curve 25519, bump version"" 2021-12-13 16:14:16 +00:00
David Drysdale
92b51f25f7 Merge "KeyMint HAL: add curve 25519, bump version" am: f21e1a5c4a am: 5a63e3ea57 am: e373da49f8 am: e274e87d59
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1900930

Change-Id: Id2cc500639fe34fdd84fbbaa67c5092033b51267
2021-12-13 16:06:50 +00:00
David Drysdale
e76045d7b0 Revert "KeyMint HAL: add curve 25519, bump version"
Revert "Bump keystore2 AIDL API version 1->2"

Revert "Advertise support of KeyMint V2"

Revert submission 1900930-version-bump

Reason for revert: Broken build on sc-qpr1-dev-plus-aosp, b/210450339
Reverted Changes:
I42a9b854f:keystore2: cope with new curve25519 enum
I167d568d6:Bump keystore2 AIDL API version 1->2
I3a16d072e:Advertise support of KeyMint V2
Ibf2325329:KeyMint HAL: add curve 25519, bump version

Change-Id: I78d4b07c41aa6bfeb367b56a58deeac6adb6ec46
2021-12-13 16:01:21 +00:00
Eran Messeri
924613950c Merge "Keymint: Test that corrupting the signature for HMAC verification fails" 2021-12-13 15:51:33 +00:00
David Drysdale
f21e1a5c4a Merge "KeyMint HAL: add curve 25519, bump version" 2021-12-13 14:25:22 +00:00
David Drysdale
c069a75302 KeyMint HAL: add curve 25519, bump version
Marked as required for TRUSTED_ENVIRONMENT impls but not STRONGBOX.

Bump keymint HAL version 1->2 in defaults and in current compatibility
matrix.

Bug: 194358913
Test: build
Change-Id: Ibf2325329f0656a2d1fc416c2f9a74d505d0bf20
2021-12-09 14:07:51 -08:00
Prashant Patil
dec9fdc81d Keymint: Test that corrupting the signature for HMAC verification fails
A VTS test case to verify HMAC signature verification fails if data or
signature is currupted.

Bug: 209452930
Test: run vts -m VtsAidlKeyMintTargetTest
Change-Id: I2177fd99cfab4ef4a347d50461db0d2e3ad8c612
2021-12-09 13:41:30 +00:00
Brian Murray
9515f38185 Merge "Avoid SIGSEGV if attest key generation fails." am: 14604af9d1 am: b07682e3db am: 7f3d007475 am: 69946003de
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1915277

Change-Id: I562a3b420110b7b1450e5d3159deacd1fe6bef31
2021-12-09 00:12:33 +00:00
Brian J Murray
aa8a75840f Avoid SIGSEGV if attest key generation fails.
Add an explicit check that `attested_key_cert_chain.size() > 0`.

Bug: 209672758
Test: atest 'PerInstance/AttestKeyTest#AllEcCurves/1_android_hardware_security_keymint_IKeyMintDevice_strongbox'

Signed-off-by: Brian J Murray <brianjmurray@google.com>
Change-Id: I4f7cb4fb1a30f26e6ef15c54714699f6ae91ba36
2021-12-08 10:59:22 -08:00
David Drysdale
3b27293bfd Merge "KeyMint VTS: option to skip BOOT_PATCHLEVEL check" am: 8aeb7ef2b4 am: 8a2977f698 am: 4f6428aada am: 8e2cc360ee
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1907696

Change-Id: I1254ed22f8ecdefccbffa0531256a18ae2089c38
2021-12-02 20:18:09 +00:00
David Drysdale
8aeb7ef2b4 Merge "KeyMint VTS: option to skip BOOT_PATCHLEVEL check" 2021-12-02 17:44:15 +00:00
David Drysdale
99f0d25bd9 Merge "Use defaults to reference current keymint version" am: ddf63247e9 am: 2fedeb5718 am: 5a903ea23a am: 8b035f0e23
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1898852

Change-Id: Id00ef73ec28418c4a2f859919c6eac3845748941
2021-12-02 10:51:40 +00:00
David Drysdale
ddf63247e9 Merge "Use defaults to reference current keymint version" 2021-12-02 07:55:03 +00:00
David Drysdale
dbbbe2ea6d KeyMint VTS: option to skip BOOT_PATCHLEVEL check
The KeyMint spec requires that all generated keys include the
BOOT_PATCHLEVEL for the device.

However, the VTS test sometimes gets run in an environment where this
is not possible; specifically the Trusty QEMU tests don't have the
bootloader -> KeyMint communication that is needed to populate this
information.

Add a command line flag that disables checks for BOOT_PATCHLEVEL to
cope with these scenarios, making sure that it defaults to having the
checks enabled.

Test: VtsAidlKeyMintTargetTest
Change-Id: I215c8a18afbd68af199d49f74b977ad7cac6b805
2021-12-02 07:52:33 +00:00
Treehugger Robot
325960671f Merge "KeyMint: Test invalid AES key sizes" am: bb0ab83af8 am: 7770509519 am: 9087d75542 am: 14a6f9e8b5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1893476

Change-Id: If84895969168bb49f1f5a22d252bfcd31a84be58
2021-12-01 15:06:40 +00:00
Treehugger Robot
bb0ab83af8 Merge "KeyMint: Test invalid AES key sizes" 2021-12-01 13:48:57 +00:00
David Drysdale
f60d8c4535 Merge "Fix flaky corrupted padding tests" am: a33f46bc2a am: 61cf943208 am: 02951d1167 am: d1c5ed5bec
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1903312

Change-Id: I803c4549b635d900934403c775886b1153b91a12
2021-11-30 07:41:54 +00:00
David Drysdale
a33f46bc2a Merge "Fix flaky corrupted padding tests" 2021-11-30 06:44:30 +00:00
David Drysdale
4c1f6ac496 Fix flaky corrupted padding tests
Transfer the fix in http://aosp/1745035 from the KeyMint VTS test back
into the keymaster VTS test.

Bug: 189261752
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I5f0a69255cfe980dd6e71fa29ff06a84cb668f6d
2021-11-29 16:17:11 +00:00
David Drysdale
49255346b4 Use defaults to reference current keymint version
The KeyMint HAL will soon be updated for a new version. To make this
process easier, add a cc_defaults and rust_defaults that references
the "current" version, and use this elsewhere. This should hopefully
mean that a future version bump only needs to happen in the defaults.

Test: TreeHugger
Change-Id: If7dd0c5778acb92177e16fd4fb4a04dcb837ad06
2021-11-22 16:13:08 +00:00
David Drysdale
060a61ac76 Merge "KeyMint VTS: don't combine ATTEST_KEY with SIGN" am: 4f51da1c9e am: bc899371f4 am: e230fd076e am: d379450115
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1877245

Change-Id: I7167e66d22d4dc3a348135d6f55a532284b1d070
2021-11-19 08:46:29 +00:00
David Drysdale
4f51da1c9e Merge "KeyMint VTS: don't combine ATTEST_KEY with SIGN" 2021-11-19 07:53:34 +00:00
Prashant Patil
d72b35175f KeyMint: Test invalid AES key sizes
Added invalid AES key sizes to be tested for Default and TEE based
Keymint implementations.

Bug: 205679497
Test: run vts -m VtsAidlKeyMintTargetTest
Change-Id: Id9044cdc0324258c15f1daa81487c7819a780fe8
2021-11-16 15:58:09 +00:00
David Drysdale
8819ea5192 Merge "KeyMint VTS: extra unique ID test" am: 7a5b3d062d am: 3a539327e3 am: f103c76afe am: 37afdad0c5 am: 6a20b8d8c2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1877242

Change-Id: Iab4f133f9ccbb5afcf04d05cd46ba316f38c03e2
2021-11-11 07:47:21 +00:00
David Drysdale
13f2a40e44 KeyMint VTS: extra unique ID test
Test that specifying RESET_SINCE_ID_ROTATION results in a different
unique ID value.

Test: VtsAidlKeyMintTargetTest
Bug: 202487002
Change-Id: I2aed96514bf9e4802f0ef756f880cac79fa09554
2021-11-10 06:26:31 +00:00
David Drysdale
22ce4c9114 Merge "Consolidate OWNERS files" am: af19de9975 am: 19d2110e4b am: 4913fa7e92 am: 5fa63fa5e0 am: 84d3c89491
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1877236

Change-Id: Ib11364cbbe62f21f5702ce1a9d9c3293782fed81
2021-11-04 10:26:02 +00:00
David Drysdale
b3b121493d KeyMint VTS: don't combine ATTEST_KEY with SIGN
Update the VTS tests so that attestation keys are not created with
another purpose.

Bug: 197096139
Test: VtsAidlKeyMintTargetTest
Change-Id: Ib6e4ad98cbe5c3015138854679b11fa0e683ade9
2021-11-01 17:15:51 +00:00
David Drysdale
fa36259cb2 Consolidate OWNERS files
Have a single OWNERS file for everything under
hardware/interfaces/security

Test: TreeHugger
Change-Id: I1f15296edefda447916e9a3e8211e88ed8854f90
2021-11-01 08:42:42 +00:00
David Drysdale
60d0c7f950 Merge "KeyMint VTS: check INCLUDE_UNIQUE_ID works" am: 1e3d97de43 am: 010a23aa0d am: 460d22a4da am: f6a0f5fb9d am: 44d56954a2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1853960

Change-Id: Ifb0d3669578cd75b964c74b40e9032a31c89261c
2021-10-29 15:17:53 +00:00
David Drysdale
1e3d97de43 Merge "KeyMint VTS: check INCLUDE_UNIQUE_ID works" 2021-10-29 13:49:07 +00:00
David Drysdale
565ccc70ed KeyMint VTS: check INCLUDE_UNIQUE_ID works
Bug: 202487002
Test: atest VtsAidlKeyMintTargetTest (on CF, O6)
Change-Id: I8bc674b47549aa1133f816c510289774db752e04
2021-10-29 14:39:12 +01:00
David Drysdale
e003b0c518 Merge "Specify KeyMint EC keys by curve not size" am: 153bbc9cc5 am: 0e3027ab80 am: b7633b628a am: a00cd71e26 am: 612eacf7ed
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1857515

Change-Id: Idb8657ec174d66ab7efe28526bbc912d31f65556
2021-10-29 07:06:01 +00:00
David Drysdale
153bbc9cc5 Merge "Specify KeyMint EC keys by curve not size" 2021-10-29 05:54:57 +00:00
Tommy Chiu
d6aacae29d libkeymint_support: Make it vendor accessiable am: abcf89dd53 am: 948bfe2cae am: 1f8a0ea462 am: 582686b67f am: 638f98a2f2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1870241

Change-Id: I6896d7c066b312655104d2770e74a2c9a99d59f7
2021-10-26 17:39:51 +00:00
Tommy Chiu
abcf89dd53 libkeymint_support: Make it vendor accessiable
This support function is supposed to be useable by vendor in treble.
Add "vendor_available" to reflect that.

Bug: 203481954
Test: Link by vendor successfully
Change-Id: I9709ac0ab79405c336ed8a1bc44b2ef643dd5b2d
2021-10-26 23:25:42 +08:00
David Drysdale
915ce253a8 Specify KeyMint EC keys by curve not size
Future addition of extra curves means that key size is not enough to
identify the particular EC curve required. Use the EcCurve enum instead.

Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Ia6b7d86a387cfc06db05e4ba6ff8f331e9c6345f
2021-10-14 15:38:38 +01:00
David Drysdale
4357048c05 Merge "KeyMint VTS: improve ATTESTATION_ID_ tests" am: f46b2d5402 am: 0ce446e730 am: c39a694e01 am: 3867a0d821 am: 88f4b59923
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1853954

Change-Id: I081f3feb529a259ddcb8fdb4cbbdbe65667ae810
2021-10-14 14:36:17 +00:00
David Drysdale
f46b2d5402 Merge "KeyMint VTS: improve ATTESTATION_ID_ tests" 2021-10-14 13:33:41 +00:00
David Drysdale
c53b7d9da8 KeyMint VTS: improve ATTESTATION_ID_ tests
Existing comment is incorrect: the ATTESTATION_ID_* values that the test
provided are rejected because they do not match the device values, not
because the tags are specific to device-unique attestation.

Fix the test comment (and make the values more obviously wrong), and
add a separate test that includes correct values of ATTESTATION_ID_*
values.

Test: VtsAidlKeyMintTargetTest
Change-Id: I5c5f5ef6a228990c9e46f90727e0f135dfc2c528
2021-10-14 14:32:04 +01:00
David Drysdale
acb264c779 Merge "KeyMint VTS: use GTEST_SKIP for optional fn" am: c8520ad895 am: dfce78b011 am: 61180078f2 am: 4ceb5911a3 am: f76f261862
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1853955

Change-Id: Id3b3d344e9648c7c4d884f82dafe68927df1c602
2021-10-14 13:21:19 +00:00
TreeHugger Robot
c865a586c1 Merge "Keymint: Update ClearOperationsTest.TooManyOperations parameter" 2021-10-13 11:49:57 +00:00
Tommy Chiu
05698ff907 Keymint: Update ClearOperationsTest.TooManyOperations parameter
Keymint is not supposed to support public key operations.
Update the parameter to reflect that.

Bug: 202928979
Test: VtsAidlKeyMintTargetTest
Change-Id: Id746953f5c68be6730beb3a7340e075ef28039c2
2021-10-13 18:37:21 +08:00
David Drysdale
513bf12932 KeyMint VTS: use GTEST_SKIP for optional fn
When a KeyMint VTS exercises optional functionality, where possible
use GTEST_SKIP() when that functionality is absent, so the test
summary includes information about what is present and what isn't.

This should not affect the overall test result.

Test: VtsAidlKeyMintTargetTest
Change-Id: I62d244d2e4ecc67737906009575e64b50450d4c4
2021-10-12 07:22:28 +01:00
David Drysdale
4e2ca70398 Merge "KeyMint VTS: don't crash on invalid patchlevel" am: e1152b6390 am: 4e9cab823d am: 69d66e13db am: b8dfd10b9b am: 767ea5b166
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1844900

Change-Id: I50ea6e748154c6ce771af537b0d5fa43ccef28bf
2021-10-05 14:52:46 +00:00
David Drysdale
4e9cab823d Merge "KeyMint VTS: don't crash on invalid patchlevel" am: e1152b6390
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1844900

Change-Id: I76b505672b7c78b03a9c79df6473212ea5c65072
2021-10-05 14:09:00 +00:00
David Drysdale
e1152b6390 Merge "KeyMint VTS: don't crash on invalid patchlevel" 2021-10-05 13:54:09 +00:00
David Drysdale
50e567ef72 Merge "KeyMint VTS: enable patchlevel checks" am: 8fb4a1c82e am: 22a5ccd132 am: a9bedb53da am: 3d6cd17f1b am: 70da8310a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1840175

Change-Id: Ie9893cc4775fe860e6833032b23359181d9ef4c2
2021-10-05 10:56:12 +00:00
David Drysdale
22a5ccd132 Merge "KeyMint VTS: enable patchlevel checks" am: 8fb4a1c82e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1840175

Change-Id: I8b58efc55b884da16fe1312d571f42852ce642ff
2021-10-05 10:08:25 +00:00