Commit graph

1026 commits

Author SHA1 Message Date
Hasini Gunasinghe
5df6ed5e66 Update the VTS module according to the refactoring in aosp/2826571
Test: atest VtsAidlAuthGraphRoleTest, atest VtsAidlAuthGraphSessionTest
Change-Id: I6cc3bd17952f602b58668d35e09c6a5385c7de61
2023-11-16 06:49:05 +00:00
Treehugger Robot
2000d6735a Merge "Revert "Revert "Revert "[avf] Adjust IRPC VTS tests to handle AV..."" into main 2023-11-14 02:41:56 +00:00
Alan Stokes
9cf6ef128f Revert "Revert "Revert "[avf] Adjust IRPC VTS tests to handle AV..."
Revert submission 2812456-revert-2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ-PAWNEHUQBT

Reason for revert: SELinux denials: b/310744536

Reverted changes: /q/submissionid:2812456-revert-2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ-PAWNEHUQBT

Change-Id: Ibfbb80fed423d722362115e744fa13c376537e92
2023-11-14 01:40:45 +00:00
Alice Wang
ae656627a0 Merge "Revert "Revert "[avf] Adjust IRPC VTS tests to handle AVF in uns..."" into main 2023-11-13 21:33:49 +00:00
David Drysdale
0a44da8589 Merge changes from topic "ag-wire" into main
* changes:
  AuthGraph: add per-role VTS tests
  AuthGraph: add fuzzer
  AuthGraph: move code into library
  AuthGraph: reduce dependency on authgraph_core
2023-11-09 07:11:51 +00:00
David Drysdale
fe41825f1c AuthGraph: add per-role VTS tests
Add VTS tests that just exercise a single role, sink or source.

Use the AuthGraph core library to provide the implementation of the
other role.  This means that the tests are best written in Rust.

Put the test code into a library, so that other HALs which include
AuthGraph as a component can exercise the AuthGraph parts in their own
VTS tests.

Test: VtsAidlAuthGraphRoleTest
Bug: 284470121
Change-Id: I73f6aa277b41cc728587d707d7a6f82f0d18e08f
2023-11-08 12:43:29 +00:00
David Drysdale
6fb22dc9ef AuthGraph: add fuzzer
Test: m android.hardware.authgraph-service.nonsecure_fuzzer
Bug: 284470121
Change-Id: Ib702b5b0cf69a4a839326297c2d71355562b46c3
2023-11-06 13:26:25 +00:00
David Drysdale
6c09af215d AuthGraph: move code into library
Use the core library's new service implementation, which wraps a
channel to the TA.

In this nonsecure case, the TA is local in-process, so use the core
library's AuthGraphTa, and implement the SerializedChannel as just
a direct invocation of the TA.

Move this code into a _nonsecure library, so the main.rs just has
the code needed to start the executable and register the service.

Test: VtsAidlAuthGraphSessionTest
Bug: 284470121
Change-Id: I738d3876872a8cd248f0ebec708676d1173b6e37
2023-11-06 13:08:45 +00:00
Frederick Mayle
9891be01f8 use getDescription in test failure message
getMessage is often empty. getDescription will always include at least
the status code.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Id401184a3c3642188e26fa2ec03f19515f89ae4f
2023-11-03 14:41:06 -07:00
David Drysdale
f2117ff77c AuthGraph: reduce dependency on authgraph_core
The authgraph_hal library should only depend on libauthgraph_wire, not
on libauthgraph_core, so adjust error processing accordingly.

Test: VtsAidlAuthGraphSessionTest
Bug: 284470121
Change-Id: I48056db6ceeab409d0f165f8e051809129643c6f
2023-11-03 12:22:42 +00:00
Eran Messeri
4f73689e26 Merge "Document the allowed challenge size" into main 2023-11-02 13:59:09 +00:00
Eran Messeri
79cb992033 Document the allowed challenge size
KeyMint should be able to handle challenges up to 128 bytes.
Document this (and the expected error code) in Tag.aidl.

Bug: 307714384
Test: m
Change-Id: Id099dd055c81b10d777effdf364395f84d8b35c6
2023-11-01 19:22:30 +00:00
David Drysdale
7fd838c0fe Add (nonsecure) default AuthGraph impl
Add an implementation for the AuthGraph key exchange HAL, to allow
testing and policy compliance.

In real use, IAuthGraphKeyExchange instances are expected to be
retrieved from some other HAL, allowing the AuthGraph instance to be
specifically correlated with the component that uses it.

Bug: 284470121
Bug: 291228560
Test: hal_implementation_test
Test: VtsAidlAuthGraphSessionTest
Change-Id: Ib064292d60bead663af7721fd1406f2a9b5d8ecd
2023-10-31 23:18:56 +00:00
David Drysdale
d42cb6fa69 authgraph: add parallel session VTS tests
Test: VtsAidlAuthGraphSessionTest
Change-Id: Idcf79afe838fdbfb88bd7f43fe758ac03d9ba0d1
2023-10-31 23:18:56 +00:00
David Drysdale
c8625a8963 authgraph: add placeholder VTS test
Test: VtsAidlAuthGraphSessionTest (with nonsecure default impl)
Change-Id: I1a94071da8de8d4934709fa7875f89a0bb00a142
2023-10-31 23:18:56 +00:00
Hasini Gunasinghe
0e2495f107 Define the AIDL interface for AuthGraph key exchange.
Introduce the AIDL methods for key exchange and the CDDLs for
the relevant input/output types that are CBOR encoded.

Use a standard comment format in CDDL files to indicate where additional
structure definitions can be found, in the hope that one day tooling
will be available to automatically check schema syntax.

Add authgraph to compatibility matrix

This CL merges the CLs: aosp/2750484, aosp/2750485, aosp/2750486 by
drysdale@google.com

Co-authored-by: David Drysdale <drysdale@google.com>

Bug: 284470121
Test: validate schemas with https://cddl.anweiss.tech/
Test: VtsAidlAuthGraphSessionTest (with nonsecure default impl)
Change-Id: I2793666ede028f8abe91569587c09dcac21c67e0
2023-10-31 23:18:56 +00:00
Alice Wang
247b39a92f Revert "Revert "[avf] Adjust IRPC VTS tests to handle AVF in uns..."
Revert submission 2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ

Reason for revert: This change relands the topic
https://r.android.com/q/topic:%22expose-avf-rkp-hal%22
This SELinux denial has been fixed in system/sepolicy

Reverted changes: /q/submissionid:2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ

Change-Id: Ia1aed212bf8de4b81239997cc1d1ca665cc456eb
2023-10-31 15:16:55 +00:00
Alice Wang
cdf9d2c936 Revert "[avf] Adjust IRPC VTS tests to handle AVF in unsupported env"
Revert submission 2778549-expose-avf-rkp-hal

Reason for revert: SELinux denial
avc:  denied  { find } for pid=3400 uid=10085 name=android.hardware.security.keymint.IRemotelyProvisionedComponent/avf scontext=u:r:rkpdapp:s0:c85,c256,c512,c768 tcontext=u:object_r:avf_remotelyprovisionedcomponent_service:s0 tclass=service_manager permissive=0


Reverted changes: /q/submissionid:2778549-expose-avf-rkp-hal

Bug: 308596709
Change-Id: Id6a930d16949389048713cef20dfa06cdbb9ac95
2023-10-31 15:01:15 +00:00
Alice Wang
87f8dce549 [avf] Adjust IRPC VTS tests to handle AVF in unsupported env
This cl adjusts IRPC VTS tests so that it can handle the IRPC AVF
impl in an environment where the IRPC operations are not supported.

Bug: 299257581
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Iae96076c20e360e6a4aca5518ca8df21920f6978
2023-10-27 09:50:19 +00:00
Alan Stokes
8cbbc15bc3 Give a name to the ConfigurationDescriptor.
Test: N/A
Change-Id: Ia2f4198e97a61494ba50e46fd198ee1f1ad44f0d
2023-10-13 13:43:21 +00:00
Prashant Patil
2114dca2aa RSA OAEP MGF1 digest VTS relaxed for keymint < V3
Since there were no VTS test to strictly check RSA_OAEP_MGF_DIGEST,
there are released devices with Keymint which do not include this tag in
key characteristics, hence these test fails on such Keymint and UDC
Android framework.

Hence version check is added before asserting MGF digest checks.

Bug: 297306437
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I43054f8dbbd46de53deef5e6771c736e770280e0
2023-10-10 10:03:30 +00:00
Treehugger Robot
3877b6094b Merge "Skip known VTS failures on vendor code till U" into main am: 87e6b60eb3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2654142

Change-Id: If63ff188c3e82b4648706b910ee02e729409cdc1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-25 19:58:54 +00:00
Treehugger Robot
87e6b60eb3 Merge "Skip known VTS failures on vendor code till U" into main 2023-09-25 19:24:14 +00:00
Ryan Prichard
2abfe4abc7 Merge "Fix nonce uniqueness tests" into main am: 8d333ff410
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2758146

Change-Id: Ifc31204eaea700e50e8ac0601fa77911b590b65c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 20:51:37 +00:00
Ryan Prichard
8d333ff410 Merge "Fix nonce uniqueness tests" into main 2023-09-22 19:43:55 +00:00
Andrew Scull
68e76934b2 Merge "Select the DICE validation rules based on the VSR" into main am: b484308d5c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2678076

Change-Id: I4694e2508d1381537a25e663382563e24221af7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 19:33:43 +00:00
Treehugger Robot
6375a4ce87 Merge "Don't require UNKNOWN_ERROR" into main am: 606a406750
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2757927

Change-Id: Iea95e5d2e565bdc4908587e5d07203946d24efbb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 19:32:52 +00:00
Andrew Scull
b484308d5c Merge "Select the DICE validation rules based on the VSR" into main 2023-09-21 18:48:49 +00:00
Treehugger Robot
606a406750 Merge "Don't require UNKNOWN_ERROR" into main 2023-09-21 18:30:15 +00:00
Tri Vo
7b565c4e7b Don't require UNKNOWN_ERROR
Negative test cases should not expect UNKNOWN_ERROR from Keymint since
the exact cause of failure is known.

In general, we should avoid UNKNOWN_ERROR because it makes error
attribution difficult.

To avoid adding retroactive requirements KM implementation, relax the
check to expect any error.

Bug: 298194325
Test: VtsAidlKeyMintTargetTest
Change-Id: I136fb6d36ae92c9e3722ffefe9a067d3515dcbf9
2023-09-20 19:31:48 -04:00
Ryan Prichard
b2c9d5c9a6 Fix nonce uniqueness tests
std::unique consolidates the unique nonces at the start of the `nonces`
vector, but it doesn't modify nonces.size(), so these tests weren't
actually verifying that the nonces were unique. Add a vector::erase
call to shrink the vector.

After upgrading libc++, std::unique is [[nodiscard]] and this bug is
a compiler error.

Bug: 175635923
Test: treehugger
Test: m VtsAidlSharedSecretTargetTest VtsHalKeymasterV4_0TargetTest
Change-Id: I7fd8c40a3920bf3a8988c8065503c78ba36dc742
2023-09-20 16:11:35 -07:00
Andrew Scull
1ca978f373 Select the DICE validation rules based on the VSR
Check the VSR of the device to select the DICE validation rules that
will be appropriate to use for VTS.

Test: TH
Change-Id: Iff19debd1e442a0b318da1a4d8a08d470efba0ae
2023-09-20 14:30:48 +00:00
Eran Messeri
4b7b07e24d Merge "Enable EcdsaAttestationIdTags VTS for GSI" into main am: 801c76b13e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2745873

Change-Id: If827b01dfb1e5cb4d395d32e29fe34d548ea9a42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-19 11:28:53 +00:00
Eran Messeri
801c76b13e Merge "Enable EcdsaAttestationIdTags VTS for GSI" into main 2023-09-19 10:55:45 +00:00
David Drysdale
069412e781 Merge "KeyMint: clarify EC_CURVE on import" into main am: a2d3f2499c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2740353

Change-Id: Ie52807c884e5e52ac07845ae8e0275a0eacba2a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 16:11:40 +00:00
David Drysdale
a2d3f2499c Merge "KeyMint: clarify EC_CURVE on import" into main 2023-09-18 15:00:57 +00:00
David Drysdale
e865448a4e Merge "KeyMint VTS: re-order auth failure arms" into main am: 2ef3749cba
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2750968

Change-Id: I03e4e696611bee62c71fc6e50fea8136329e1510
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 11:04:31 +00:00
David Drysdale
60a02ab943 Merge "KeyMint: check missing EC_CURVE on v3+" into main am: c91d05699f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2750972

Change-Id: Ibe592cb6ba1b9107ea6972fa085dad9a4a89154e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 11:04:07 +00:00
David Drysdale
2ef3749cba Merge "KeyMint VTS: re-order auth failure arms" into main 2023-09-15 10:36:47 +00:00
David Drysdale
9ed7d2c5bf KeyMint: check missing EC_CURVE on v3+
The original change to add this test didn't make it into the Android 13
version of the VTS test, so the version gate needs to be updated to be
v3+

Bug: 292318194
Test: VtsAidlKeyMintTargetTest --gtest_filter="*EcdsaMissingCurve*"
Change-Id: I94bf816688e57c7c04893a23cf0399129de94229
2023-09-14 15:16:27 +01:00
David Drysdale
a35699cb5c KeyMint VTS: re-order auth failure arms
Allow for devices that claim to need external timestamps, but don't.

Test: VtsAidlKeyMintTargetTest
Bug: 300211206
Change-Id: Ie450d9969c337d5274502f3600e14c0b481e8b34
2023-09-14 11:34:15 +01:00
David Drysdale
46b80f12da Merge "rkp: pull out remaining CDDL and make compliant" into main am: 05f682fd3d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2745396

Change-Id: I1e44e873db4b6f846f3e28248ed3bfec9b1ba859
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-12 08:49:45 +00:00
David Drysdale
04d2ed4ff0 rkp: pull out remaining CDDL and make compliant
Extract CDDL from MacedPublicKey.aidl and DeviceInfo.aidl.

Make -70000 optional in `PublicKey`.

Make CDDL compliant with RFC8610:

- Move `bstr` contents for generated data (e.g. `ECDSA(..)`) to comments.
- Fix alternatives in CBOR-encoded bstr instances.

Add more RFC references and unify reference style.

Try to use a standard format to indicate that external files are needed
for the complete CDDL schema.  (Hopefully in the future we might have
tooling that uses these to check the schemas.)

Test: Compile with docs.rs/cddl-cat and https://cddl.anweiss.tech/
Change-Id: Ie1d6c39f1cc0314e312df9205b570b89178ebd16
2023-09-11 17:23:09 +01:00
Prashant Patil
24f7579130 Enable EcdsaAttestationIdTags VTS for GSI
Earlier, attestation properties didn't match on GSI images, hence
EcdsaAttestationIdTags VTS test case was skipped on GSI images.

Recently attestation properties reading priority changed as
ro.product.*_for_attestation -> ro.product.vendor.* -> ro.product.*
that means on GSI images ro.product.vendor.* properties could be used
and hence attestation should work. Incase ro.product.vendor.* properties
are not same as provisioned values to KM. They should be set as
ro.product.*_for_attestation on base build.

Bug: 298586194
Test: atest VtsAidlKeyMintTargetTest:PerInstance/NewKeyGenerationTest#EcdsaAttestationIdTags/0_android_hardware_security_keymint_IKeyMintDevice_default
Change-Id: Ie945bd8f7060e0e768daf9681d121ea5f170a6e1
2023-09-07 15:40:33 +00:00
David Drysdale
9b8d75eacb KeyMint: clarify EC_CURVE on import
Bug: 292318194
Test: VtsAidlKeyMintTargetTest
Change-Id: I4194b70f1da8816e19f231331c738050c2b7d59f
2023-09-06 13:37:57 +01:00
Alice Wang
e537902a03 Merge "Make android.hardware.security.rkp-rust available for virt apex" into main am: 01fc1b7279
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2727795

Change-Id: Ida99a60bf01d57ea1853f8b2c72746805ee20c7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 08:04:00 +00:00
Alice Wang
01fc1b7279 Merge "Make android.hardware.security.rkp-rust available for virt apex" into main 2023-09-06 07:36:55 +00:00
David Drysdale
d8fecae7a1 Merge "Summarize security HALs" into main am: 06717b5ec2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2727975

Change-Id: Ib3aa50a0fe48d6ec148f027bdcdbdcb0abe019e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 06:29:31 +00:00
David Drysdale
06717b5ec2 Merge "Summarize security HALs" into main 2023-09-06 06:04:26 +00:00
Istvan Nador
6d3ce4954e Enable the keymaster logger in the default Keymint am: 8f28f8b8ea
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2738433

Change-Id: I4ed1aad6a176685e53492e5f8eaaac98c4975e95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 16:10:25 +00:00
Istvan Nador
8f28f8b8ea Enable the keymaster logger in the default Keymint
This solution was adopted from Cuttlefish's host side Keymint
implementation: I22bde00aed311c6774f83acc08a2c21e6e75141f.

Bug: 296983430
Test: Tested with Cuttlefish that the logs are present in logcat.
Change-Id: I942b0200bb164a2a865b255c6f26d628cbd345a4
2023-09-04 12:05:58 +00:00
David Drysdale
1d5b2daffe Summarize security HALs
Test: nope
Change-Id: Ie222c457a7637aa41bafbdb6c875624fbb82a397
2023-09-04 13:04:45 +01:00
Treehugger Robot
76c929f01e Merge "Move CDDL into separate CDDL files" into main am: f9e524c5b1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2727995

Change-Id: Iedd1e8b48ba470d4c16d4306e0f9dc05008b25d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 23:08:44 +00:00
Treehugger Robot
f9e524c5b1 Merge "Move CDDL into separate CDDL files" into main 2023-09-01 22:20:54 +00:00
Andrew Scull
f8d5b437b1 Merge "Test the format of patch level device info" into main am: 92bd93934a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2736075

Change-Id: I0901620654d311c76880dd3856ef55bf7ae17cea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 21:28:37 +00:00
Paul Crowley
6aae9b6432 Move CDDL into separate CDDL files
Move CDDL out of comments and into files, per-method
generateCertificateRequest.cddl
generateCertificateRequestV2.cddl

This makes it easier to read and it means tools can parse it.

Test: Treehugger
Change-Id: I9b71b094d128a5a4566a4d352aaa11d1c9b595ff
2023-09-01 19:27:57 +00:00
Andrew Scull
e780dbf0d0 Test the format of patch level device info
On top of checking that the patch level are a UINT, also check that they
follow the YYYYMM or YYYYMMDD format in the CSR v3 as is required by the
server validation logic. This check is not applied in the factory as the
value might not yet be correctly provisioned.

Bug: 269813991
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I5c62ba176dae390ea0a387bba6cb975226e3873a
2023-09-01 17:42:31 +00:00
Tri Vo
075ff6faf0 Merge "keymint: Clarify usage of certificate tags with importWrappedKey" into main am: d284817690
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2693003

Change-Id: Iea46167531e74c6eaffc663adeeb32ffcc4ccb19
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 16:03:20 +00:00
Tri Vo
d284817690 Merge "keymint: Clarify usage of certificate tags with importWrappedKey" into main 2023-08-30 15:12:13 +00:00
Xin Li
879960bdce Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Change-Id: I9466127d8d0fa38df36ca99f704853b2db871e67
2023-08-25 13:29:30 -07:00
Treehugger Robot
7bed173e4c Merge "Only require RKP on T+ chipsets" into main 2023-08-25 19:08:06 +00:00
Seth Moore
8be875e0d0 Only require RKP on T+ chipsets
It turns out we had a bug (b/263844771) in how RKP support was
detected, and that was fixed. However, due to this bug, some S chipests
shipped without RKP support which is now required by the tests.

This change drops the RKP requirement from S chipsets. There should be
no new S chipsets, so this effectively grandfathers in the previous
ones that were skipped by the RKP VTS tests.

T+ tests (both VTS and other suites) will verify that RKP support is
there, so there is no gap introduced by this change.

Bug: 297139913
Test: VtsAidlKeyMintTargetTest
Change-Id: I387e5f058ada698747aac103c1745682291f2d1c
2023-08-25 11:13:41 -07:00
Alice Wang
d6281e7d82 Make android.hardware.security.rkp-rust available for virt apex
Bug: 274881098
Test: atest MicrodroidHostTests
Change-Id: I5791bc8f0aa4dd5938871edb8b67f4d0d1ee2599
2023-08-25 12:06:08 +00:00
Treehugger Robot
ee6590ef2d Merge "Fix typo in CDDL" into main 2023-08-25 09:52:42 +00:00
David Drysdale
41bbc573f7 Merge "KeyMint: fix auth test HAT" into main 2023-08-25 09:45:42 +00:00
Alan Stokes
5004b8b5ae Fix typo in CDDL
Test: N/A
Change-Id: Iba25acb24306d36c97be07987857237363654bb5
2023-08-25 09:34:35 +01:00
David Drysdale
97272d8d5f KeyMint: fix auth test HAT
The test case for an auth-per-operation HAT with an invalid HMAC
is wrong -- it is re-using the previous HAT, which fails for a
different reason (has an old challenge).

Fix the test to use the HAT that's wrong in the intended way.

Bug: 297333975
Test: VtsAidlKeyMintTargetTest
Change-Id: I15fe9b0c1b53452df0f67dd44534fdb80a6c2a9c
2023-08-25 07:30:12 +01:00
Tomasz Wasilczyk
5c8abe9cc2 Use String8/16 c_str [security]
Bug: 295394788
Test: make checkbuild
Change-Id: I4dd1a43c314af087c4f8ecad3570613ed841589c
2023-08-23 18:51:57 +00:00
Tri Vo
77f4bced2e keymint: Clarify usage of certificate tags with importWrappedKey
Bug: 292534977
Test: atest android.keystore.cts.ImportWrappedKeyTest
Change-Id: I2cb65bc27e4f6b64c331bae4e4a8242ff1d91e43
2023-08-18 14:54:20 -04:00
Andrew Scull
2332583ad1 Reference definition of the Android Profile for DICE
Remove the inline definition of the Android Profile for DICE and instead
reference the definition that exists alongside the Open Profile for DICE
and is now the source of truth for the profile.

Test: n/a
Change-Id: Ia71a674234be13542ad0ce4db0b764e8ee0c7a62
2023-08-18 12:39:39 +00:00
David Drysdale
ae8c281824 Merge "KeyMint: allow extra error code" into main 2023-08-16 10:20:21 +00:00
Treehugger Robot
a2441d9090 Merge "Add VSR annotation to KeyMint tests" into main 2023-08-15 14:17:24 +00:00
Treehugger Robot
1452142a46 Merge "Whenever generateKey fails updated AttestKeyTests to abort instead of continuing the execution of the test." into main 2023-08-15 11:30:45 +00:00
David Drysdale
84b685adf5 KeyMint: allow extra error code
Bug: 295055603
Test: VtsAidlKeyMintTargetTest
Change-Id: Ifbd4a899364c38bb6ad63bb5b5a683c69edfb5b7
2023-08-11 16:00:32 +01: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
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
Eran Messeri
5fe06ea215 Add VSR annotation to KeyMint tests
Add VSR annotations for the KeyMint v2 and KeyMint v3 requirements.

Bug: 251242992
Test: N/a
Change-Id: I0cf5eff86fe18df6f567b30d697af01bc8cdbb4e
2023-08-02 22:34:24 +01:00
Rajesh Nyamagoud
45b478f32e Whenever generateKey fails updated AttestKeyTests to abort instead of
continuing the execution of the test.

If generateKey fails and execution continues then it leads to issues
while verifying the attest records and causing the crash.

Test: atest VtsAidlKeyMintTargetTest
Bug: 292300030
Change-Id: I66bd650423e9e5bbbfe8411a1455c4ea5846f1ff
2023-07-26 04:49:36 +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
03b140d2fb Merge "Enabled attest-id tests to run on GSI builds as well." into main 2023-07-18 16:39:32 +00:00
Subrahmanya Manikanta Venkateswarlu Bhamidipati Kameswara Sri
2ce542d3f9 Skip known VTS failures on vendor code till U
Some of the SE Javacard OS implementations does not fulfill all of the
expectations as to when cipher text is to be generated. However, the
implementations are compliant with Javacard Specifications. This patch
skips the known VTS failures till U.

Bug: 290850651
Test: run vts -m VtsAidlKeyMintTarget
Change-Id: Id3746adc7385b41f4b4b2ebc8e7583972769134d
2023-07-12 19:54:21 +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
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
82f86a1d4b Merge "Fix attestation error checks" 2023-07-05 05:20:29 +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
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
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
Treehugger Robot
6b9a329637 Merge "Remove recommentation of non-normal mode" am: a0f28846c4 am: fbc43248ed am: 763b04373a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2586968

Change-Id: I1af977dfb7a19222bfbb6b1729ad07f84f6b2a4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-13 00:03:19 +00:00
Treehugger Robot
a0f28846c4 Merge "Remove recommentation of non-normal mode" 2023-05-12 22:21:51 +00:00
Andrew Scull
9da6cf1319 Remove recommentation of non-normal mode
Only specify the requirements for `normal` DICE mode and allow vendors
to choose the non-normal mode that fits their need per the ope-dice
specification.

Add a note that RKP required `normal` mode in the DICE chain in order to
trust the device.

Test: n/a
Bug: 263144485
Change-Id: Iaaa3799c53234de61a51ebc855822b93ab3e5bb8
2023-05-12 19:36:22 +00:00
Treehugger Robot
ef1d68d6b1 Merge "KM VTS test fix - handled "null" value for imei." am: 95ec2cdd2f am: 6b4a8807a5 am: 64369644bb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2584850

Change-Id: Ic35998f7b4ed7e445012d4ed71cd377bb5a95724
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 04:18:02 +00:00
Treehugger Robot
95ec2cdd2f Merge "KM VTS test fix - handled "null" value for imei." 2023-05-12 02:44:22 +00:00
Andrew Scull
464f6fba31 Merge "Document expectations of DICE mode" am: ebcdcdbc03 am: ad2adbcb6f am: c71526cd1c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2583537

Change-Id: I38cd7ee77039cd53e6f5ea448ecdcea28fb3ad99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 03:00:53 +00:00
Andrew Scull
ebcdcdbc03 Merge "Document expectations of DICE mode" 2023-05-10 00:53:08 +00:00
Andrew Scull
ed74a681eb Document expectations of DICE mode
The Open Profile for DICE give possible guidelines on the requirements
for the DICE mode but Android needs those to be strictly specified.

Fix: 263144485
Test: n/a
Change-Id: Ia5fc937654504199cabf4709f1c15484242e0161
2023-05-09 18:34:11 +00:00
Rajesh Nyamagoud
71d19b21c3 KM VTS test fix - handled "null" value for imei.
Added a check to make sure IMEI is not "null".

Bug: 281676499
Test: atest VtsAidlKeyMintTargetTest
Change-Id: Ia1569a30412d633eee4d4de8cd00dea077d1c23d
2023-05-09 17:23:02 +00:00
Tri Vo
9aad35fa97 Merge "Test cases for attested Root-of-Trust" am: 67567baf94 am: de5d2be299 am: a483e7bd70
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2576910

Change-Id: Id0a3de5ac79f2947c756ff8a9c36bc56d09082c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 19:11:54 +00:00
Tri Vo
67567baf94 Merge "Test cases for attested Root-of-Trust" 2023-05-05 17:07:39 +00:00
Tri Vo
520a95bc31 Test cases for attested Root-of-Trust
Add tests for verfied boot state and VBMeta digest.

Bug: 255344624
Test: VtsKeyMintAidlTargetTest
Change-Id: I4f0697e1a7cb83ca87150b6683cac3084a593864
2023-05-05 10:04:39 -07:00
Hasini Gunasinghe
4d14f24928 Merge "Challenge is expected in timestamp token in case 2" am: 51471dcfce am: aa54976ba4 am: 86a83243ec
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2574790

Change-Id: I36b53c635b8c3a288c20fd16e31df808ce837e73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-04 17:32:03 +00:00
Hasini Gunasinghe
51471dcfce Merge "Challenge is expected in timestamp token in case 2" 2023-05-04 15:21:15 +00:00
Hasini Gunasinghe
77819bb988 Challenge is expected in timestamp token in case 2
In the second case out of the two cases of authorization enforcement
described for update(), it seems like the challenge is expected in
the timestamp token.

Test: N/A
Change-Id: I33e1b84bf8218335665b31ca144b3b4ecb342328
2023-05-03 22:33:30 +00:00
Max Bires
929c88fd70 Merge "Support for non-factory attestation in Strongbox." am: c4f05e81e0 am: 41f750ff37 am: 0ca0cd5c87
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2553970

Change-Id: I680f41959d83d5569b60b5f74930b8c85505bd73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 18:22:49 +00:00
Max Bires
c4f05e81e0 Merge "Support for non-factory attestation in Strongbox." 2023-05-03 16:05:49 +00:00
Treehugger Robot
7f17abc28a Merge "Strongbox may not support 1024 bit key size for RSA." am: 453ec12115 am: cde000ed4b am: 9949e31f36
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2573531

Change-Id: I47e0856e0ab557075abaa8be335fef728a6092f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 17:48:09 +00:00
Treehugger Robot
453ec12115 Merge "Strongbox may not support 1024 bit key size for RSA." 2023-05-02 15:39:50 +00:00
Subrahmanyaman
ce2bebdd79 Strongbox may not support 1024 bit key size for RSA.
Strongbox may not support 1024 bit key size for RSA.
So in NoUserConfirmation test updated the key size to
2048 so that the test works for both TEE and Strongbox.

Bug: 280117495
Test: run VtsAidlKeyMintTarget
Change-Id: I32bb28001aca9b69eedb1bd3d0bcff43052d06e4
2023-04-28 23:37:02 +00:00
Seth Moore
82c8f1f895 Merge "Add VSR annotations for RKP DICE" am: 5fc0168163 am: 68af3d71f8 am: 802a456489
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2568770

Change-Id: I25f29ea8963f558924da0d84f38d2cfd6971049d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 00:56:57 +00:00
Seth Moore
5fc0168163 Merge "Add VSR annotations for RKP DICE" 2023-04-27 22:05:36 +00:00
Seth Moore
ac1639f227 Add VSR annotations for RKP DICE
Bug: 277965670
Test: n/a (comment changes only)
Change-Id: I64e34c1f9865811f0967148cad914f7ef77f9448
2023-04-27 11:15:28 -07:00
Subrahmanyaman
50fcf7d066 Support for non-factory attestation in Strongbox.
Updated the BootLoaderStateTest for strongbox implementations which
do not support factory attestation.

Test: vts -m VtsAidlKeyMintTarget
Change-Id: I8fe176a18fc0b9e2b2d0b012b7b63124d15c9e2f
2023-04-26 18:58:03 +00:00
Andrew Scull
d029c3cc70 Merge "Strictly deprecate IRPC test mode key generation" am: 29b1d626ba am: 67b98a3a24 am: 6a4ab98db1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2559010

Change-Id: I6806f9c75ee1a0378d9a43379745e188f08dfb50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-25 14:41:50 +00:00
Andrew Scull
f2ae193680 Strictly deprecate IRPC test mode key generation
It's already documented that IRPC v3 doesn't make use of test mode keys
however VTS still required support for their generation. Fix this and
simplify implementation of the v3 HAL by expecting an error in all cases
that the deprecated test mode keys are seen.

IRPC v3 also fully deprecated the EEK meaning a v3 implementation must
unconditionally report CURVE_NONE for supportedEekCurve.

The VTS tests are enhanced with contextual version constants rather than
reusing constants with seemingly unrelated names.

Bug: 278013975
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I5709a0b1cd77eb28e677f64bb781fad58d91570a
2023-04-24 20:23:48 +00:00
Shawn Willden
207322654a Check for MGF1 digests in key characteristics.
A bug in the Trusty HAL service caused it to replace MGF1 digest tags
with Tag::INVALID.  This tests that MGF1 tags are returned properly in
the MGF1 success test, and verifies that Tag::INVALID is never
returned by any test.

Bug: 278157584
Test: adb shell /data/nativetest/VtsAidlKeyMintTargetTest/VtsAidlKeyMintTargetTest
Change-Id: I5d391310795c99f37acf3c48310c127a7a31fac3
2023-04-21 16:51:33 -06:00
Treehugger Robot
3e925253ad Merge "Add checks for different size of challenge" am: a95f69da2e am: 15ffcaf669 am: 6b32036b41
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2495456

Change-Id: Iab818789f86cf498e40a4e6fb2f592b7be7d9822
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-17 05:43:33 +00:00
Treehugger Robot
a95f69da2e Merge "Add checks for different size of challenge" 2023-04-17 04:20:54 +00:00
Treehugger Robot
9d9af1049a Merge "Allow uninstantiated BootloaderStateTest" am: d83eed2fe3 am: cfc708d3ef am: d5663b9625
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2535086

Change-Id: I43e8c83658920718a9a7588ea8ab195cdd6d6f0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 23:04:26 +00:00
Tri Vo
78e07d5dff Allow uninstantiated BootloaderStateTest
No tests are instantiated if KeyMint is present on the the device.
Explicitly allow that.

Bug: 277975776
Test: VtsAidlKeyMintTargetTest
Change-Id: I88f1c0a81f36d198dabcb1420b62a00bacdbb6e7
2023-04-14 11:01:22 -07:00
Tri Vo
dc91a4dbf4 Merge "Test for bootloader state" am: eb94a4f9ef am: e1c1abb059 am: cd06c1740a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2514097

Change-Id: I96df03008dc42ad6c251b8d6f22f115a9480a680
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 17:54:36 +00:00
Tri Vo
eb94a4f9ef Merge "Test for bootloader state" 2023-04-12 16:20:51 +00:00