Commit Graph

859 Commits

Author SHA1 Message Date
Treehugger Robot
bd532381bb Merge "Update the TimeoutAuthenticationMultiSid test" into main am: d99d7730b8 am: 96a5d15232
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2676695

Change-Id: I054264f3f5920397d66326b5f2dbedce48378a7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-09 15:36:12 +00:00
Treehugger Robot
d99d7730b8 Merge "Update the TimeoutAuthenticationMultiSid test" into main 2023-08-09 14:25:05 +00:00
Subrahmanya Manikanta Venkateswarlu Bhamidipati Kameswara Sri
07c7d28a84 Update the TimeoutAuthenticationMultiSid test
Update TimeoutAuthenticationMultiSid test to support
generateKey for Strongbox implementations without
factory attestation.

Bug: 293211157
Test: run vts -m VtsAidlKeyMintTarget
Change-Id: I27bf08d2fd2d9e0217a90ee8ccb789adfd9d5f7f
2023-08-08 22:33:37 +00:00
David Drysdale
b8749b670e Merge "KeyMint: use a smaller invalid IMEI value" into main am: 955fb9e5fc am: da606360cc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2694950

Change-Id: Ic4f38db75b5c07bb2652b18995559f9ecc6cb099
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-08 11:36:32 +00:00
David Drysdale
0215cb3d3e KeyMint: use a smaller invalid IMEI value
The invalid value used for the second IMEI attestation test is
potentially wrong in two ways:
- It doesn't match the provisioned value.
- It's not a valid IMEI, not least because it is longer than 16 bytes.

Make the test value shorter so the second failure doesn't apply and
the test can reliably expect CANNOT_ATTEST_IDS.

Bug: 292959871
Test: VtsAidlKeyMintTargetTest
Change-Id: If8c6b9e08b48e6caf5c767578e1ac43964214619
2023-08-07 11:53:46 +01:00
Max Bires
a7aadcfbb0 Merge "Slight documentation tweak" into main am: fe9355f3c6 am: 514ecb0613
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2663916

Change-Id: Ib71aab2e9d2f87bf79dcc13fc5f3fc21c95fd1d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 22:07:39 +00:00
Max Bires
fe9355f3c6 Merge "Slight documentation tweak" into main 2023-07-19 20:52:56 +00:00
Max Bires
5c0f7234b6 Slight documentation tweak
Specify that DICE-based RKP implementations may also allow a ROM
extension to manage the UDS public key.

Test: The words are semantically parseable
Change-Id: I8f9c6efb01fc76318220cf1bc4a0eb3a3ad42f87
2023-07-18 20:26:33 -07:00
Treehugger Robot
b0a7128cf4 Merge "Enabled attest-id tests to run on GSI builds as well." into main am: 03b140d2fb am: 07d682714b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2654740

Change-Id: I81822197f2362e22b485d8b1691e29c0a75752f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-18 18:14:13 +00:00
Treehugger Robot
03b140d2fb Merge "Enabled attest-id tests to run on GSI builds as well." into main 2023-07-18 16:39:32 +00:00
Rajesh Nyamagoud
c41ed964f0 Enabled attest-id tests to run on GSI builds as well.
Removed the check to skip the attest-id tests on GSI, modified the
attest-id tests to support this.

Bug: 290643623
Test: atest VtsAidlKeyMintTargetTest
Change-Id: Id79d7fb4c70ed94ed76bc57f3d66ce47e9b67b48
2023-07-12 00:12:38 +00:00
David Drysdale
5fa61b6df6 Allow extra ID attestation error codes am: c68dc93788 am: c67f8ef755 am: caaedb0a79
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2646791

Change-Id: I5bbde92b1b5c8b4896cfa418200d3608080a4269
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-06 12:31:59 +00:00
David Drysdale
c68dc93788 Allow extra ID attestation error codes
When deliberately testing invalid ID attestation, use the helper
function (which checks the error return code is correct) in one more
place.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
Change-Id: I6ea5bd7ee19b3b172330117bfde1b16745debba7
2023-07-06 10:23:55 +01:00
David Drysdale
e13d20b746 Merge "Fix attestation error checks" am: 82f86a1d4b am: 18283b6ca8 am: 286d2f7ea6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2648423

Change-Id: I2a602430efb68876909246f1704a8f470f8232dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-05 07:27:36 +00:00
David Drysdale
82f86a1d4b Merge "Fix attestation error checks" 2023-07-05 05:20:29 +00:00
David Drysdale
809a1a0205 Skip ATTEST_KEY using variant on waivered devices am: c3de1caf43 am: f2c3944f9f am: ab73150eb7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2583373

Change-Id: Iad85e0fd9382c51d7cfa1ad997d184d14b425170
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-04 16:03:51 +00:00
David Drysdale
c3de1caf43 Skip ATTEST_KEY using variant on waivered devices
Bug: 281452355
Bug: 289451966
Test: VtsAidlKeyMintTargetTest
Change-Id: Id448edae88569518deb2db4ab7bf50d16f33709a
2023-07-04 13:23:04 +01:00
David Drysdale
810fbcffed Fix attestation error checks
Avoid the ADD_FAILURE at the end if attestion ID failure uses an allowed
return code.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
Change-Id: I0dcac312ac4516a078b2742721e3a19074da52b1
2023-07-04 13:14:12 +01:00
Treehugger Robot
8623f8eef1 Merge "Validating key characteristics of generated/imported keys." am: 2e46e91864 am: 5250f6dc10 am: a7eae920f4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2566036

Change-Id: Ic95cbb9b4639ae993f0c877e2ce3c608c7d8b489
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 19:54:17 +00:00
Eran Messeri
e743381ae8 Merge "Update default KeyMint version to 3" am: 4a7c3810fc am: e7a36fadae am: 7b1f23fe51
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2633329

Change-Id: Icfae835c4b6ed7472e7b24a780acbbcc2e568598
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 18:42:16 +00:00
Treehugger Robot
2e46e91864 Merge "Validating key characteristics of generated/imported keys." 2023-06-29 17:34:26 +00:00
Eran Messeri
4a7c3810fc Merge "Update default KeyMint version to 3" 2023-06-29 16:37:48 +00:00
Treehugger Robot
c8307ef9bb Merge "Check for MGF1 digests in key characteristics." am: efb4b9397a am: 44502769e4 am: 0557be7193
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2552043

Change-Id: If43d94585c91dfe541a72c36af802d5850c9cdcc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-26 19:33:46 +00:00
Rajesh Nyamagoud
7b9ae3c485 Validating key characteristics of generated/imported keys.
Updated VTS tests to verify mgf-digests in key characteristics of
RSA-OAEP keys. Added new tests to import RSA-OAEP keys with
mgf-digests and verified imported key characteristics.

Bug: 279721313
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I06474a85c9e77fded264031ff5636f2c35bee6b4
2023-06-26 18:40:53 +00:00
Treehugger Robot
efb4b9397a Merge "Check for MGF1 digests in key characteristics." 2023-06-26 17:22:09 +00:00
David Drysdale
5f7d0654be Merge "Allow extra error code in device ID attestation" am: 1d7447e5d3 am: 013030d9a4 am: 36a30021e6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2627969

Change-Id: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 08:08:43 +00:00
David Drysdale
1d7447e5d3 Merge "Allow extra error code in device ID attestation" 2023-06-22 05:58:57 +00:00
Eran Messeri
8417708fe4 Update default KeyMint version to 3
Update the default KeyMint version to v3.
Note this affects the pure software implementation of KeyMint that is
not used for anything that tests currently run against.

Bug: 275982952
Test: m (that it builds)
Change-Id: I6ab10329af590bd2a045710dfff47c6e78740464
2023-06-21 16:11:25 +01:00
David Drysdale
f42238c99f Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Remove a couple of pointless invocations of the existing helper.

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic01c53cbe79f55c2d403a66acbfd04029395c287
2023-06-15 09:43:18 +01:00
Treehugger Robot
d87f909dc3 Merge "Support to get EC public key from the UdsCertchain." am: 1acca5c139 am: 8426045977 am: 7bfabde3fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615472

Change-Id: I4416b43432519db134e1f26e759bfc74e566c1f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 20:04:25 +00:00
Treehugger Robot
1acca5c139 Merge "Support to get EC public key from the UdsCertchain." 2023-06-14 17:38:22 +00:00
Subrahmanyaman
a18883a58c Support to get EC public key from the UdsCertchain.
Bug: 285896470
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I7f829b1346feeab0fd429ad7b9714181b6668b34
2023-06-12 17:29:38 +00:00
David Drysdale
6a7f8f3320 Merge "Use RAII to ensure KeyMint keyblobs deleted" am: 462eccaa3b am: 15bc932a09 am: 8eac8ba511
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2617612

Change-Id: I70a7a9ddfd5e62cd674f9d202dbb098224a439e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 12:02:16 +00:00
David Drysdale
1b9febc5ca Use RAII to ensure KeyMint keyblobs deleted
If some check in a VTS test case fails, the test function may exit early
and not call CheckedDeleteKey(&some_keyblob), thus "leaking" a key blob.

This isn't normally an issue, but if the key blob happens to use a
feature that uses some secure storage (e.g. ROLLBACK_RESISTANCE or
USAGE_COUNT_LIMIT=1) then this may leak some scarse resource.

To avoid the chance of this, use an RAII holder to ensure that
manually-managed keyblobs (i.e. key blobs that are not held in the
key_blob_ member of the base test class) are always deleted.

Bug: 262212842
Test: VtsAidlKeyMintTargetTest
Change-Id: Ie8806095e249870484b9875eb660070607f339a3
2023-06-07 15:46:42 +01:00
David Drysdale
3aff152024 Merge "KeyMint: more authentication tests" am: 130e32ad5f am: 524f7607df am: b32416e8c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615470

Change-Id: Id07e2638aed619eee8037c6852b9c4785d4de69d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 11:55:39 +00:00
David Drysdale
de2a493b9a KeyMint: more authentication tests
- Test key with multiple allowed SIDs
- Test invalid timestamp token

Test: VtsAidlKeyMintTargetTest
Change-Id: Ieb18d43d8c2db821d32857a332a0a68917b1eba4
2023-06-05 15:02:30 +01:00
Treehugger Robot
74634c2db5 Merge "Extend QC SPU waiver to VSR-S devices." am: 3258884207 am: f25e3b2bcb am: 2415be97e3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2609268

Change-Id: I41cbb8d74e4fb5e3a09fce966b63a63c0da4625a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 21:59:04 +00:00
Treehugger Robot
7589384303 Merge "Rewrite RKP readme in terms of DICE" am: 139b663e38 am: e8821b0fd6 am: aae23ac225
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2597060

Change-Id: I18230a5dc04380215a65db99f49ca8ce8ba3b26e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 21:57:56 +00:00
Treehugger Robot
3258884207 Merge "Extend QC SPU waiver to VSR-S devices." 2023-06-01 19:39:19 +00:00
Shawn Willden
0f1b257f96 Extend QC SPU waiver to VSR-S devices.
Bug: 281452355
Test: VtsAidlKeyMintTargetTest
Change-Id: I9fc1d1f9a3b5b29cfee3ad325bc1c4ef72c44c13
2023-05-31 10:22:54 -06:00
Andrew Scull
99cba0640d Rewrite RKP readme in terms of DICE
Update the RKP readme to match contemporary philosophy about the design.
This includes replacing discussion if the obsolete term `BCC` with a
description of the Android Profile for DICE.

The privacy concerns are relaxed to match updates to the HAL which
remove the superencryption of the DICE chain.

Test: n/a
Fix: 281755202
Change-Id: I3a6fd2cd12599c5843b5dce0044eb16c2afbffa2
2023-05-23 21:08:29 +00:00
Andrew Scull
d49d16a7f3 Merge "Require the config hash" am: 122b4986d4 am: a45d765922 am: e204f73890
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2587808

Change-Id: Ib06a2441034b42f2126bf282856331729aa8eb08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 00:18:28 +00:00
Andrew Scull
122b4986d4 Merge "Require the config hash" 2023-05-16 21:19:24 +00:00
Andrew Scull
790b5d23dd Merge "Add security version to config descriptor" am: 1d23120bad am: abf2969751 am: 411d1dcc5d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2587032

Change-Id: I90070b3a444e6d25b45e4362b45240da6cd5669c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 00:20:41 +00:00
Andrew Scull
1d23120bad Merge "Add security version to config descriptor" 2023-05-15 22:43:39 +00:00
Treehugger Robot
f7ca2c881d Merge "VTS: Test specifying --expect_upgrade {yes,no}" am: 434a0cc160 am: 9715eb7117 am: 239b468f30
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2588687

Change-Id: I0d2c43aaf6ac295f7f1f824efe5045c886b29beb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 11:19:42 +00:00
Treehugger Robot
434a0cc160 Merge "VTS: Test specifying --expect_upgrade {yes,no}" 2023-05-15 09:11:41 +00:00
Tommy Chiu
025f3c5acd VTS: Test specifying --expect_upgrade {yes,no}
It should definitely be the case that a different SPL triggers key
requires upgrade, but the converse isn't true -- if no SPL change, it's
OK for the device to request upgrade anyhow.

Bug: 281604435
Change-Id: Ic03ce51fb4b18ff669595ab430f9fccd1da48997
2023-05-15 07:23:27 +00:00
Andrew Scull
b804354851 Require the config hash
Align with the Open Profile for DICE by requiring that the configuration
hash be included because the configuration input is a hash of the
specified configuration desscriptor.

Test: n/a
Change-Id: I9d2ef560dc8e6f567b5b8d1a244f5138c45ae420
2023-05-14 23:24:25 +00:00
Andrew Scull
0d520e8e17 Add security version to config descriptor
Introduce a field to the configuration descriptor that provides a
standard semantically-defined version number rather than the
vendor-defined component version which acts more like a build ID.

Test: n/a
Bug: 282205139
Change-Id: Idb0c991ab12ae75687236f2489e639e4422a0225
2023-05-13 21:17:07 +00:00