Commit Graph

389 Commits

Author SHA1 Message Date
Treehugger Robot
bfc8afb4b1 Merge "Verify op_ is not a nullptr" am: 2d63764c34 am: a8b92e548f am: 3284c9aec4 am: 270df536e2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1940573

Change-Id: I1f9528c2abc699b27d77b3be1ffbb6897c9f11c8
2022-01-07 07:32:06 +00:00
Brian J Murray
eabd9d6d2a Verify op_ is not a nullptr
If op_ is a nullptr, the test runner can SIGSEGV.

Test: manual, atest EncryptionOperationsTest#TripleDesCbcPkcs7PaddingCorrupted
Bug: None

Signed-off-by: Brian J Murray <brianjmurray@google.com>
Change-Id: Ibdd6139952ca8bc83ac1a82202839feee39562e1
2022-01-06 15:26:16 -08:00
TreeHugger Robot
ba0e65261a Merge "Merge "Add android.hardware.security.dice HAL interface." am: b05a7c1376 am: 1d5af3f5ec" into sc-v2-dev-plus-aosp am: 20d510ef74
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16492969

Change-Id: I1c2c6239c7d6d84b8e0f0d030d1b32bb78b11d3e
2021-12-17 00:36:07 +00:00
TreeHugger Robot
20d510ef74 Merge "Merge "Add android.hardware.security.dice HAL interface." am: b05a7c1376 am: 1d5af3f5ec" into sc-v2-dev-plus-aosp 2021-12-17 00:22:45 +00:00
David Drysdale
9faa48aa87 Merge "KeyMint: new version number in attestation" am: 17393cbb40 am: 0a3c90f904 am: bb5882c6b3 am: 1cce1762fe
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1918628

Change-Id: Ie6b1966ff710b4fea1275c8b06b329f9b451910f
2021-12-16 23:23:19 +00:00
David Drysdale
1cce1762fe Merge "KeyMint: new version number in attestation" am: 17393cbb40 am: 0a3c90f904 am: bb5882c6b3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1918628

Change-Id: Ib930f22030769d965e1e0323cebfc4bf0344dcac
2021-12-16 22:58:36 +00:00
Treehugger Robot
4ddf8b5668 Merge "Add android.hardware.security.dice HAL interface." am: b05a7c1376 am: 1d5af3f5ec
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1883260

Change-Id: If3b724cc66bbc87aad86211c9e7e2f36719f2c33
2021-12-16 20:51:39 +00:00
David Drysdale
17393cbb40 Merge "KeyMint: new version number in attestation" 2021-12-16 09:37:15 +00:00
Treehugger Robot
b05a7c1376 Merge "Add android.hardware.security.dice HAL interface." 2021-12-16 00:16:45 +00:00
Janis Danisevskis
c3cc5a0b21 Add android.hardware.security.dice HAL interface.
The dice HAL provides access to the Dice artifacts of the running Android
instance.

Bug: 198197213
Test: VTS test comming in two ...
Change-Id: I6e84f9a9c7153e7a96c06d1d451e658b3f222586
2021-12-15 08:52:07 -08:00
David Drysdale
7dff4fc9b7 KeyMint: new version number in attestation
For the time being, allow the version number in the attestation record
to be 100 even if the AIDL version is 2, so that implementations don't
have to update both versions simultaneously.

Bug: 194358913
Test: TreeHugger, VtsAidlKeyMintTargetTest
Change-Id: I9aae69327a62014e286ce30ca2a4d91c4c280714
2021-12-15 14:31:19 +00:00
David Drysdale
54bac215fa Merge "KeyMint VTS: ATTEST_KEY has no other purpose" am: a67b0441fe am: 02c4ee0dca am: 35392ef70e am: 6e2b1afdeb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1844276

Change-Id: Idd7c93ed9a4ad0b36ce06006cef11f0990b7ffcf
2021-12-15 07:31:58 +00:00
David Drysdale
a67b0441fe Merge "KeyMint VTS: ATTEST_KEY has no other purpose" 2021-12-15 06:25:35 +00:00
Seth Moore
b568bd5790 Merge "Revert^2 "KeyMint HAL: add curve 25519, bump version"" am: 0834ba697f am: 07069c9e35 am: e41208c9b4 am: 3d160da02b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1920687

Change-Id: I3ead1f90d9a091b16eaa938e9640978c75ad9f6e
2021-12-14 19:56:59 +00:00
Seth Moore
0834ba697f Merge "Revert^2 "KeyMint HAL: add curve 25519, bump version"" 2021-12-14 18:49:58 +00:00
Steven Moreland
77b74ffc0a Merge "CHECK -> CHECK_EQ copy pasta" am: a8138bfbf6 am: dd39b5c9d0 am: f711c9d406 am: 53c7517b02
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1921302

Change-Id: I3f32bf37c1c025e82e14ee6c9f0ffde87f6bcbd6
2021-12-14 18:40:32 +00:00
Steven Moreland
ffb03995e6 CHECK -> CHECK_EQ copy pasta
Hey did I start this? We can take a little bit better errors. :)

Bug: N/A
Test: N/A
Change-Id: I0e96f7f49dae9968904333da9b8269694058c11c
2021-12-14 01:45:47 +00:00
Seth Moore
d79a0ec9ed Revert^2 "KeyMint HAL: add curve 25519, bump version"
e76045d7b0

Change-Id: Ia167fd45b6e590e34523810ee10118c5c141f538
2021-12-13 20:03:33 +00:00
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
e60248c8e7 KeyMint VTS: ATTEST_KEY has no other purpose
The KeyMint spec has always required that keys with the ATTEST_KEY
purpose "must not have any other purpose".

Add explicit tests for combined-purpose keys to be rejected.

Also expand the spec text to require a specific error code, and to
explain the rationale for single-purpose ATTEST_KEY keys.

Bug: 197096139
Test: VtsAidlKeyMintTargetTest
Change-Id: I2a2014f0ddc497128ba51bb3f43671f759789912
2021-11-03 09:58:05 +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