Commit graph

597 commits

Author SHA1 Message Date
David Drysdale
7ea97a310a KeyMint HAL: reinstate tags in extension schema
Commit 93c72cef92 ("KeyMint: sync all attestation tags",
http://aosp/1719302) removed various tags from the attestation that are
only applicable to symmetric keys, on the assumption that these are
irrelevant for the attestation extension that is generated for the
certificate holding asymmetric public keys.

However, that change did not take into account the fact that the
AuthorizationList ASN.1 schema is re-used elsewhere in the KeyMint API,
specifically as a way of describing the characteristics associated with
a key that is being securely imported via
IKeyMintDevice::importWrappedKey.

That import process may be used for symmetrics keys, and so the tags
that are specific to symmetric keys still need to be included in
AuthorizationList.

Similarly, USER_SECURE_ID values are never included in attestation
extensions because they have no meaning off-device, but they may be
needed as part of the import of a wrapped key.

Test: TreeHugger, comment change only
Bug: 244693617
Change-Id: Iaa941e120e3641a6e6c369b7c6a51f10b44df78a
2022-09-02 17:08:04 +01:00
David Drysdale
4683a5383f KeyMint HAL: clarify obsolete tags
The tag enum names can't be removed due to AIDL back-compatibility
requirements, and also it's useful to have the values present to avoid
inadvertent reuse.

Update the tag comment text to indicate that these tags are obsolete.

Bug: 191738660
Test: TreeHugger, comment change only
Change-Id: Icbd4c9cd0313f93bc491b49eb9077766d0f44e34
2022-09-02 17:07:41 +01:00
Xin Li
28cde8fd22 Merge "DO NOT MERGE - Merge Android 13" 2022-08-16 19:11:03 +00:00
David Drysdale
b97121d8a5 KeyMint VTS: use SCOPED_TRACE on all loops
Also add a couple of nullptr checks

Test: VtsAidlKeyMintTargetTest
Change-Id: Ic95b16fc6307f3b97cc54dbf08f5726641a761d9
2022-08-12 11:54:46 +01:00
David Drysdale
e76000e09b Merge "Docs: return EARLY_BOOT_ENDED instead of INVALID_KEY_BLOB." am: 6796c8b5aa
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2160639

Change-Id: I038bf7c4590425e88e4611dd36f4f6f3a0e35c4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 05:11:57 +00:00
David Drysdale
6796c8b5aa Merge "Docs: return EARLY_BOOT_ENDED instead of INVALID_KEY_BLOB." 2022-07-21 04:52:46 +00:00
Subrahmanyaman
0b9c196214 Docs: return EARLY_BOOT_ENDED instead of INVALID_KEY_BLOB.
All attempts to use an EARLY_BOOT_ONLY key after earlyBootEnded()
is called must fail with Error::EARLY_BOOT_ENDED.

Test: run vts -m VtsAidlKeyMintTarget
Change-Id: Ic3d028ceb7f71e6e266993ec4e877770cd8e5c4a
2022-07-20 17:26:12 +00:00
David Drysdale
ac42d60136 Merge "KeyMint HAL: clarify leaf cert requirements" am: 824c5d8f60
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2154073

Change-Id: Iaf833a5d576accb0fa104ce0e235e1c96b33c398
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 14:01:23 +00:00
David Drysdale
824c5d8f60 Merge "KeyMint HAL: clarify leaf cert requirements" 2022-07-15 13:37:19 +00:00
David Drysdale
26fd684e20 Merge "KeyMint: Test size requirements for ciphers" am: 96ed41b2e2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2147675

Change-Id: I029f366281a868e0f92173a6f71afe8fe846adf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 12:28:23 +00:00
David Drysdale
96ed41b2e2 Merge "KeyMint: Test size requirements for ciphers" 2022-07-15 12:10:10 +00:00
David Drysdale
9daf7c70a8 KeyMint HAL: clarify leaf cert requirements
Bug: 237624131
Bug: 238037309
Test: None, comment change
Change-Id: I7426deda8b0735f1ca34a22fc21ec0121a0fcca8
2022-07-14 17:39:42 +01:00
Prashant Patil
dd5f7f0e8d KeyMint: Test size requirements for ciphers
Test size requirements for symmetric (Stream and Block) ciphers.
These tests are similar to CTS tests of symmetric ciphers.
For reference CTS test BlockCipherTestBase#testKatEncryptOneByteAtATime
for all its derived classes eg. AES128CBCNoPaddingCipherTest,
AES128CBCPKCS7PaddingCipherTest etc.

Bug: 226899425
Test: run vts -m VtsAidlKeyMintTargetTest

Change-Id: I78408071fbf5a360d89c5bbae479faffd7c6d935
2022-07-13 12:36:22 +00:00
David Drysdale
0fdf10c4de Merge "KeyMint VTS: test default MGF_DIGEST behaviour" am: 5d88e95b36
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1888675

Change-Id: I3463a8111ccf186734cc325b7589fe688fb3b269
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 07:23:37 +00:00
David Drysdale
ae3727bf45 KeyMint VTS: test default MGF_DIGEST behaviour
KeyMint supports the specification of a separate MGF digest when
performing RSA-OAEP decryption, with a default value of SHA-1.

Test the expected behaviour here:
 - SHA-1 is used if nothing specified in key characteristics.
 - If something is specified in key characteristics, the operation
   parameter value has to be one of those values.

Bug: 203688354
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic2dd3641be732a273724faa20cf4edf8a1752506
2022-07-06 12:26:37 +01:00
Treehugger Robot
325d10484e Merge "Remove jdanis@ from OWNERS" am: 9dbbf700d9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2121652

Change-Id: Id7fa2fddecb9229682086c65c03534a362a7cfad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 01:12:31 +00:00
Treehugger Robot
9dbbf700d9 Merge "Remove jdanis@ from OWNERS" 2022-06-30 00:47:39 +00:00
Xin Li
30f27895e3 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I2bddc0d13a4de6a5766de85fdf432fd05d84a581
Change-Id: I3f77dda59ac4ff05d0d59de68c7f0f96f5b61712
2022-06-28 21:23:27 +00:00
Treehugger Robot
a5468b5127 Merge "Verify that imported keys have the correct characteristics." 2022-06-27 20:58:16 +00:00
David Drysdale
46f99f4e9a Merge "KeyMint HALs: clarifications" 2022-06-27 12:01:14 +00:00
Seth Moore
2f2db81f7d Merge "Add an IRPC changelog." 2022-06-24 22:49:32 +00:00
Max Bires
9dce048421 Add an IRPC changelog.
This document is meant to provide a clear summation for vendors looking
for a reference of what has changed from release to release, as well as
documentation for those working on developing the
IRemotelyProvisionedComponent interface.

Bug: 227266513
Test: The document is readable.
Change-Id: I909e22a31a88856af911a80a52ec7eda263693db
2022-06-24 20:54:11 +00:00
David Drysdale
e9e12405f5 Merge "KeyMint VTS: cope with ATTEST_KEY +/- SIGN" am: 11cb564913 am: cbaede3f72
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2123433

Change-Id: I0b032b1072607db7fb1092d972c8c8b77bcc1a9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 02:12:14 +00:00
Shawn Willden
fbb4cf383a Read VSR level from correct property. am: 35db349596 am: 4e97ec021e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2128833

Change-Id: Ibd849ae5d7e2e40072f68e1f49446fe558fdf6a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 02:12:05 +00:00
Jooyung Han
c3f8861bb8 Merge "Remove AIDL-libs from VNDK" 2022-06-20 01:15:09 +00:00
David Drysdale
8d925aee2d KeyMint HALs: clarifications
- Remove KeyPurpose comments that refer to public key operations.
 - Clarify/fix description of RSA_OAEP_MGF_DIGEST.
 - Describe HMAC key requirements.
 - Clarify RSA_PSS key length requirement
 - Clarify when shared secret should change (on restart)
 - Padding::NONE is not deprecated
 - Fix typos

Test: none, just comment changes
Change-Id: If58e8d8644aac926a990e50f7a873dca74cd4896
2022-06-17 09:25:32 +01:00
David Drysdale
11cb564913 Merge "KeyMint VTS: cope with ATTEST_KEY +/- SIGN" 2022-06-17 06:05:13 +00:00
Shawn Willden
35db349596 Read VSR level from correct property.
Bug: 235424890
Test: VtsHalKeymasterV4_0TargetTest & VtsAidlKeyMintTargetTest
Change-Id: I39109c097d129124097a303c3f108d015cb367e3
2022-06-17 10:49:29 +09:00
Treehugger Robot
86cfdfdffb Merge "Specify correct assignee for bugs." am: ce30f4b18c am: fa256305fe
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2120716

Change-Id: I5b4d3c4f4bfc33026cf408e4f46e219618c581b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 17:23:56 +00:00
Treehugger Robot
ce30f4b18c Merge "Specify correct assignee for bugs." 2022-06-16 16:39:20 +00:00
Treehugger Robot
ddc1e4c82d Merge "Add a README for Remote Key Provisioning." 2022-06-15 13:32:46 +00:00
Max Bires
82ed7a42c0 Add a README for Remote Key Provisioning.
This document goes a little more in depth on the motivating factors and
background mechanisms that occur with RKP, that are not appropriate for
direct inclusion in the HAL docs in the .aidl files.

Fixes: 234159998
Test: Readable
Merged-In: I141fb098c536a5468b1113af64dcf6185ea7ae9f
Change-Id: I141fb098c536a5468b1113af64dcf6185ea7ae9f
2022-06-15 05:29:22 -07:00
Jooyung Han
d81d6a12be Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
2022-06-14 16:42:42 +09:00
Jooyung Han
c0b24f4f13 Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Ignore-AOSP-First: some libs are still in internal master only.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
2022-06-14 14:08:59 +09:00
David Drysdale
4348927562 KeyMint VTS: cope with ATTEST_KEY +/- SIGN
This change syncs aosp/master with the change in http://aosp/2117528,
allowing devices that launched with the (incorrect) version of
ATTEST_KEY VTS tests in Android S to continue to pass the test.

Bug: 197096139
Bug: 230074335
Test: VtsAidlKeyMintTargetTest
Change-Id: If88642e238e64ca9ec80303a4a72f7171c63464f
2022-06-13 10:12:12 +01:00
TreeHugger Robot
668241010a Merge "Add a README for Remote Key Provisioning." into tm-dev am: 8c1586bc4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/18635577

Change-Id: Ic9d4911f335bc1e37651ec73bd1b231c7f180979
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 14:36:10 +00:00
TreeHugger Robot
8c1586bc4f Merge "Add a README for Remote Key Provisioning." into tm-dev 2022-06-10 13:29:11 +00:00
Max Bires
c08e808a78 Add a README for Remote Key Provisioning.
This document goes a little more in depth on the motivating factors and
background mechanisms that occur with RKP, that are not appropriate for
direct inclusion in the HAL docs in the .aidl files.

Bug: 234159998
Test: Readable
Change-Id: I141fb098c536a5468b1113af64dcf6185ea7ae9f
2022-06-10 04:52:27 -07:00
Shawn Willden
9411d1b2d1 Remove jdanis@ from OWNERS
Test: N/A
Change-Id: Ia9dbeacc91e19afbbd6cacb7df834115ef25e350
2022-06-09 06:40:42 -06:00
Shawn Willden
460ef388c7 Specify correct assignee for bugs.
Test: N/A, comment-only change
Change-Id: I78b32693531180f7377651edd0dab93cd2cfd870
2022-06-09 06:36:54 -06:00
David Drysdale
87d139a9c0 Merge "KeyMint VTS: check chain size before dereferencing" am: 543eb71cb6 am: abe4c2ec93
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2119365

Change-Id: Ieab3232fa446187eb02832125a8900d2893ceab2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 06:06:03 +00:00
David Drysdale
a8a888ecf7 KeyMint VTS: check chain size before dereferencing
Test: VtsAidlKeyMintTargetTest
Change-Id: Id5ded31e1120e501dc5eb90b78cad1190a4c3042
2022-06-08 12:44:42 +01:00
TreeHugger Robot
d782e21332 Merge "Implement KeyMint2 test for VSR13" into tm-dev 2022-06-06 20:56:36 +00:00
Shawn Willden
cc6112be2b Implement KeyMint2 test for VSR13 am: 22fb9c16fc am: 8329536c7c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2115214

Change-Id: Iebc5b136b1710498009111e0d0b654b3dffca565
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 18:42:30 +00:00
Shawn Willden
8292bc9292 Implement KeyMint2 test for VSR13
Test: VtsAidlKeyMintTargetTest & VtsHalKeymasterV4_0TargetTest
Bug: 235099905
Ignore-AOSP-First: Cherry pick from aosp/2115214
Change-Id: Ie10b705bb06990a2a2c6223fcce28f5fde6bf3f3
Merged-In: Ie10b705bb06990a2a2c6223fcce28f5fde6bf3f3
2022-06-06 17:13:01 +00:00
Shawn Willden
22fb9c16fc Implement KeyMint2 test for VSR13
Test: VtsAidlKeyMintTargetTest & VtsHalKeymasterV4_0TargetTest
Change-Id: Ie10b705bb06990a2a2c6223fcce28f5fde6bf3f3
2022-06-06 09:10:17 -06:00
Shawn Willden
0ae6bb0656 Implement alternate SE RoT provisioning
Bug: 219076736
Test: VtsAidlKeyMintTargetTest
Change-Id: Ia696d7765f316d35eba1b4e65acae6c1072987b1
2022-06-02 07:44:23 -06:00
Treehugger Robot
fe0771581a Merge "Implement alternate SE RoT provisioning" am: f1a7cc01ea am: 9b3075bff9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2032527

Change-Id: I4ac967ea61ddd019549755ef09fe82bc2ea67d61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 09:32:35 +00:00
Treehugger Robot
f1a7cc01ea Merge "Implement alternate SE RoT provisioning" 2022-06-01 08:47:51 +00:00
Shawn Willden
4315e135c6 Implement alternate SE RoT provisioning
Bug: 219076736
Test: VtsAidlKeyMintTargetTest
Change-Id: Ia696d7765f316d35eba1b4e65acae6c1072987b1
2022-05-31 14:14:54 -06:00