Commit Graph

549 Commits

Author SHA1 Message Date
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
Tommy Chiu
ee70569078 Add EncryptionOperationsTest.AesCbcZeroInputSuccess
Check if the zero input data with AES-CBC-[NONE|PKCS7] padding mode
generates correct output data and length.

Bug: 200553873
Test: VtsHalKeymasterV4_0TargetTest, VtsAidlKeyMintTargetTest
Merged-In: I729c2bad65e9d8b194422032346e5ee3c4b0dce5
Change-Id: I729c2bad65e9d8b194422032346e5ee3c4b0dce5
2022-05-31 13:37:55 +01:00
David Drysdale
cb822166e7 KeyMint VTS: abandon tests when Begin fails am: 7fc26b99d3 am: 1eacf174b9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2106464

Change-Id: I9383f156e0071a204ef7156dd40010b4ff39722a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 06:29:29 +00:00
David Drysdale
7fc26b99d3 KeyMint VTS: abandon tests when Begin fails
Test: VtsAidlKeyMintTargetTest
Change-Id: Id8bb29b3e2c3771d6033fe85c58c9cbd34e024fb
2022-05-25 15:34:05 +01:00
Seth Moore
97f58ffff5 Clean up description of IRemotelyProvisionedComponent uniqueId
The identifier is to be used in telemetry to identify problematic
implementations. Thus, it needs to be globally consistent, at least
within a given device type.

Test: None -- doc only changes
Bug: 231495834
Change-Id: Ia55db336fa099d8e1196f6bfe2bafb6fa5ead329
Merged-In: Ia55db336fa099d8e1196f6bfe2bafb6fa5ead329
2022-05-16 15:59:37 -07:00
Seth Moore
64dc27818d Clean up description of IRemotelyProvisionedComponent uniqueId am: 9b7f79cbf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/18360248

Change-Id: I8292a40b795dc2e4a62cc6f0f3199c82432661f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 15:34:01 +00:00
Treehugger Robot
523741dded Merge "KeyMint: Test Ecdsa key generation without curve" am: cff8c9fb9e am: 75905a5f94
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2047463

Change-Id: Ib2d789288735c7e1b7a01b507d4515c44400ae1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 10:58:49 +00:00
Treehugger Robot
cff8c9fb9e Merge "KeyMint: Test Ecdsa key generation without curve" 2022-05-13 09:56:16 +00:00
Seth Moore
9b7f79cbf6 Clean up description of IRemotelyProvisionedComponent uniqueId
The identifier is to be used in telemetry to identify problematic
implementations. Thus, it needs to be globally consistent, at least
within a given device type.

Test: None -- doc only changes
Bug: 231495834
Change-Id: Ia55db336fa099d8e1196f6bfe2bafb6fa5ead329
Merged-In: Ia55db336fa099d8e1196f6bfe2bafb6fa5ead329
2022-05-12 15:29:22 -07:00
Treehugger Robot
ebfaa65a1c Merge "Specify EcCurve when generating keys" am: a172a2309c am: 97a9abddd8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2092349

Change-Id: I17f1c4017cd6d84944614c515fd60e68b133617f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 00:54:26 +00:00
Treehugger Robot
a172a2309c Merge "Specify EcCurve when generating keys" 2022-05-11 09:08:22 +00:00
David Drysdale
d30cd1cc6f Merge "KeyMint VTS: x25519 pubkey as SubjectPublicKeyInfo" am: 53cf63d1fd am: 0b4d491139
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2092269

Change-Id: Ia4c69e47ddf2f062672961c7a3bebb2185bd3cfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-10 21:00:17 +00:00
David Drysdale
53cf63d1fd Merge "KeyMint VTS: x25519 pubkey as SubjectPublicKeyInfo" 2022-05-10 10:19:56 +00:00
Tommy Chiu
ec83644fab Specify EcCurve when generating keys
EC_CURVE is a mandatory tag which is specified in the keymint HAL when
generating EC keys.

Bug: 232056693
Change-Id: Ibe2b85744d7e555b7c7b48aa9e57ce45bb19ef89
2022-05-10 16:31:22 +08:00
Treehugger Robot
da91112339 Merge "Updated the description on Root of Trust Binding." am: 0ba8531279 am: f6c6fc7830
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2080599

Change-Id: Id7e9ffe8861b54363fc75afe3d86a4748fa4efad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 18:47:19 +00:00
Treehugger Robot
5d78414015 Merge "Update ProtectedData DKCertChain to use X.509" am: e003ed061b am: 2c2972a157
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2089226

Change-Id: Ia95b757401d196c49e8048039fbfc0152289f112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 18:47:00 +00:00
David Drysdale
857158ba12 KeyMint VTS: x25519 pubkey as SubjectPublicKeyInfo
The data for a key agreement operation should always send in the
SubjectPublicKeyInfo structure, not a raw key for X25519.

Test: VtsAidlKeyMintTargetTest
Bug: 231959070
Change-Id: Ib5157da6a986d957162fab60dbe927017cfdd703
Merged-In: Ib5157da6a986d957162fab60dbe927017cfdd703
2022-05-09 17:47:11 +01:00
David Drysdale
a410b770e9 KeyMint VTS: x25519 pubkey as SubjectPublicKeyInfo
The data for a key agreement operation should always send in the
SubjectPublicKeyInfo structure, not a raw key for X25519.

Test: VtsAidlKeyMintTargetTest
Bug: 231959070
Change-Id: Ib5157da6a986d957162fab60dbe927017cfdd703
2022-05-09 17:38:35 +01:00
Treehugger Robot
0ba8531279 Merge "Updated the description on Root of Trust Binding." 2022-05-09 16:36:54 +00:00
David Drysdale
955b77be57 Merge "KeyMint VTS: skip device ID checks on GSI" into tm-dev 2022-05-09 05:15:34 +00:00
Seth Moore
2c6790fe53 Update ProtectedData DKCertChain to use X.509
This matches against what we're shipping in tm-dev.

Bug: 227350250
Test: N/A -- doc changes only
Change-Id: I3771c0fd45999e4204ba3964ed421641f02d6e7c
2022-05-06 10:04:15 -07:00
Seth Moore
1e8fc75bc0 Merge "Clean up keymint ProtectedData documentation" into tm-dev 2022-05-06 14:58:50 +00:00
David Drysdale
7288bce38b Merge "KeyMint VTS: skip device ID checks on GSI" am: 072c0b3ab6 am: d043e8b231
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2086983

Change-Id: I9ecbd80c5a1612ebe27fc47a08407871778d2fd1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 06:05:00 +00:00
David Drysdale
32a7bece10 KeyMint VTS: skip device ID checks on GSI
Bug: 229356841
Test: VtsAidlKeyMintTargetTest
Change-Id: I3182bad5584c35df7b1eeb476dabb39d19fdf12c
(cherry picked from commit 555ba00c0f)
Merged-In: I3182bad5584c35df7b1eeb476dabb39d19fdf12c
2022-05-05 05:34:59 +00:00
David Drysdale
072c0b3ab6 Merge "KeyMint VTS: skip device ID checks on GSI" 2022-05-05 05:27:34 +00:00
Seth Moore
b8f9efc5e7 Clean up keymint ProtectedData documentation
- Fix up some minor CDDL formatting issues.
- Add more definition around the BCC, hopefully clearing up partner
  confusion around how to implement it.
- Explain when BccPayload entries may be omitted in the case of a
  "Degenerate BCC"
- Add a bit more description to the DKSignature format

Bug: 227350250
Test: N/A -- doc changes only
Change-Id: I28337a80e2b49661cc37876400d7ac3b8759ba01
Merged-In: I28337a80e2b49661cc37876400d7ac3b8759ba01
2022-05-04 14:43:40 -07:00
David Drysdale
bebd9520db Merge "Run SecureElementProvision tests for KeyMint version >= 2." am: d347852bcc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2051222

Bug: 230803681
Change-Id: I42b63bdea5fa0fb6c3a79e457f8bd63c6b346111
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
(cherry picked from commit 009d595c0f)
2022-05-04 17:04:38 +00:00
David Drysdale
c7588303b0 Merge "Run SecureElementProvision tests for KeyMint version >= 2." am: d347852bcc am: 009d595c0f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2051222

Change-Id: I29a40ba3147873bc02a437478d257a5aa21b7699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 10:24:39 +00:00
David Drysdale
d347852bcc Merge "Run SecureElementProvision tests for KeyMint version >= 2." 2022-05-04 09:48:48 +00:00
David Drysdale
b6e1609da1 Merge "Updated the description for APPLICATION_ID and APPLICATION_DATA" am: 6cd7c6295b am: de59134032
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2075380

Change-Id: Id72c336939ce5528d9438ba5b5b81ff9e9774b11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 07:08:56 +00:00
David Drysdale
6cd7c6295b Merge "Updated the description for APPLICATION_ID and APPLICATION_DATA" 2022-05-04 06:03:50 +00:00
David Drysdale
555ba00c0f KeyMint VTS: skip device ID checks on GSI
Bug: 229356841
Test: VtsAidlKeyMintTargetTest
Change-Id: I3182bad5584c35df7b1eeb476dabb39d19fdf12c
2022-05-03 18:50:58 +01:00
Subrahmanyaman
5083a85141 Updated the description for APPLICATION_ID and APPLICATION_DATA
As the signature of the getKeyCharacteristics() does not
use Tag Mechanism for app_id and app_data, there is no way
to distinguish between appId / appData  values that are
absent, vs values that are present but of zero length. Due to
this limitation a key with a zero-length app_id / app_data
cannot have its key characteristics retrieved using
getKeyCharacteristics()

Test: VtsAidlKeyMintTarget
Change-Id: I145dcba878171c174d48ad42fadeb49e045b5c55
2022-05-02 23:28:12 +00:00
Seth Moore
76626c0bda Clean up keymint ProtectedData documentation am: 1d389acec8 am: 19eff513d4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2075940

Change-Id: Ic9334c1ab5fa1faadec1f399a70b86933d41ddd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 19:20:00 +00:00
Subrahmanyaman
0f5953556c Updated the description on Root of Trust Binding.
The root of trust consists of a bitstring that must be derived
from the public key used by Verified Boot, from the lock state
and from the Verified Boot state of the device.

Test: VtsAidlKeyMintTarget

Change-Id: Ib20bf17066f087c6fc050a498cc7ed4a4cb08ae6
2022-04-29 02:39:11 +00:00
Seth Moore
1d389acec8 Clean up keymint ProtectedData documentation
- Fix up some minor CDDL formatting issues.
- Add more definition around the BCC, hopefully clearing up partner
  confusion around how to implement it.
- Explain when BccPayload entries may be omitted in the case of a
  "Degenerate BCC"
- Add a bit more description to the DKSignature format

Bug: 227350250
Test: N/A -- doc changes only
Change-Id: I28337a80e2b49661cc37876400d7ac3b8759ba01
2022-04-28 12:41:18 -07:00
Subrahmanyaman
4418984ab6 Run SecureElementProvision tests for KeyMint version >= 2.
Test: run vts -m VtsAidlKeyMintTarget
Change-Id: Icd2565170a473b539a1959042bbfa93e66947a69
2022-04-25 22:40:14 +00:00
Max Bires
d354a98041 Merge "Increase challenge size in tests." am: dcaa803893 am: a24527be86 am: 14bae2b195
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2066892

Change-Id: Iab5729979eef4a7e3d318f8c3fa816276442e5be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 09:39:01 +00:00
Max Bires
89c7488370 Increase challenge size in tests.
VTS tests were currently passing a challenge size of 32 in all cases.
However, the server currently sends a challenge of length 40, which may
or may not change in the future. A 64 byte upper limit provides a
standard size along with flexibility in case the challenge format
changes in the future.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I678bb915f139e4c23354180870a66ce33a9cfd8c
2022-04-20 12:23:19 +00:00
Jiyong Park
70f5837e1f Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: I61eb51c0334eb99489c6f1570110d7e18c350c99
2022-04-16 07:03:24 +09:00
David Drysdale
2c19304e56 Merge "Fix AES corrupt padding test" am: b474607b7c am: b661792d06 am: 2e449950d6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2059787

Change-Id: I1a4bf228d73452cbc718ab126165bf09e0cdf833
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 13:16:23 +00:00
David Drysdale
b809329dc7 Fix AES corrupt padding test
The AesEcbPkcs7PaddingCorrupted test has been incorrect since it was
originally introduced -- it was feeding the original message as input to
the decryption operation, rather than the corrupted ciphertext.  As a
result, the expected error code was also wrong -- INVALID_INPUT_LENGTH
is appropriate for a too-short cipher text (length 1 in this case),
whereas a corrupt-but-correct-length cipher text should give
INVALID_ARGUMENT.

Fix the test, and add a separate test to cover what was inadvertently
being tested before. Add a sentence to the HAL spec to describe what
expected and tested by CTS/VTS.

Bug: 194126736
Test: VtsAidlKeyMintTargetTest, VtsHalKeymasterV4_0TargetTest
Change-Id: Iaa5e42768814197f373797831093cf344d342b77
2022-04-11 08:35:11 +01:00
Jiyong Park
7faedf81a0 Merge changes from topic "aidl_freeze_tm" into tm-dev
* changes:
  Implement getInterfaceHash/Version for SoundTrigger
  Add -Wno-missing-permission-annotation for soundtrigger3
  V3 is the latest version of keymaster HAL interface
  Freeze AIDL APIs for TM
2022-04-02 00:15:20 +00:00
Eran Messeri
f9b12ac72a Merge "KeyMint: Device IDs attestation based on verion." am: 1b7abc43b6 am: d8fdf0b804 am: 8adaed5f62
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2028224

Change-Id: I2937358195e0218cf7337b989686f649b7e82d22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 14:53:49 +00:00
Prashant Patil
60f8d4d5b2 KeyMint: Test Ecdsa key generation without curve
Added new VTS EcdsaMissingCurve to test if EC_CURVE not specified while
generating new EC Key, keyGeneration should fail.

Bug: 225135360
Test: run vts -m VtsAidlKeyMintTargetTest
Change-Id: I32bbba05ed5203690292f7150d14f9644c4be6df
2022-03-31 10:26:51 +00:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Prashant Patil
88ad189036 KeyMint: Device IDs attestation based on verion.
Updated VTS testcases where Device IDs Attestation expected as optional
and made it mandatory if KeyMint version >= 2 or device first shipped
with api_level 33.

Bug: 221190197
Test: run vts -m VtsAidlKeyMintTargetTest
Change-Id: I8870a9301d36abdc4fa6585b9f8d62cc1cfd3d96
2022-03-25 12:16:11 +00:00
Treehugger Robot
d31d3b8554 Merge "Updated the vts attestation tests for strongbox implementations which do not support factory attestation." am: 950b7b8026 am: cc399cf7b0 am: af1490f3f7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2027803

Change-Id: I07f19f0c03955d3931842688d8a2ee31dbf174cf
2022-03-24 17:59:41 +00:00