Commit Graph

531 Commits

Author SHA1 Message Date
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
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
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
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
072c0b3ab6 Merge "KeyMint VTS: skip device ID checks on GSI" 2022-05-05 05:27:34 +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
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
Treehugger Robot
950b7b8026 Merge "Updated the vts attestation tests for strongbox implementations which do not support factory attestation." 2022-03-24 16:35:47 +00:00
subrahmanyaman
7d9bc46f6f Updated the vts attestation tests for strongbox implementations which
do not support factory attestation.

Bug: b/219962281
Test: Run vts tests.
Change-Id: Ie3f3f33f773227d879e11f11e2ef0eaee33db648
2022-03-23 22:27:05 +00:00
Treehugger Robot
0286ec5699 Merge "Fix CDDL for signatures." am: 1edd38d6ee am: 3303e97603 am: 08835aaa3d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2036743

Change-Id: Iaf829618dc93488ac3db71e6c7bab37830295ea7
2022-03-22 17:41:54 +00:00
Treehugger Robot
1edd38d6ee Merge "Fix CDDL for signatures." 2022-03-22 16:50:39 +00:00
Alan Stokes
ba9f55ee69 Fix CDDL for signatures.
The signature is not CBOR-encoded, it's the raw bytes of the signature
encoded as specified for the specific algorithm.

I've made the references to PureEd25519() / ECDSA() into comments,
since I believe they're not actually legal CDDL but are aimed at
humans. And I've made the two occurrences consistent with each other.

Test: N/A
Change-Id: Ia42362ff3d0ce5458322663256cbd34d258afe76
2022-03-22 15:23:13 +00:00
David Drysdale
895ae687e6 Merge "KeyMint VTS: strict test only for v2+" am: d057fc0cb6 am: 1f0d75f1f8 am: 3056221f7c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2033925

Change-Id: I2783a11812212640bbca13a8fd0faadba57e7103
2022-03-22 10:25:29 +00:00
David Drysdale
f371c5eac7 Merge "KeyMint HAL: clarify ATTEST_KEY is like SIGN" am: afa73442b7 am: bbbc278300 am: be65672ee4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2033928

Change-Id: I49d1939007b771ad90fed66b475d3034272ff291
2022-03-22 10:25:12 +00:00
David Drysdale
d057fc0cb6 Merge "KeyMint VTS: strict test only for v2+" 2022-03-22 09:28:52 +00:00
David Drysdale
afa73442b7 Merge "KeyMint HAL: clarify ATTEST_KEY is like SIGN" 2022-03-22 09:26:41 +00:00
Max Bires
c8d296af83 Merge "More canonicalization checks and canonicalize before signing" am: cf02e97946 am: 8daddefc18 am: 59624afdce
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2029343

Change-Id: Ia1ceaa34fdbcf2d20690e1cc447321bdf3b40856
2022-03-21 17:35:21 +00:00
David Drysdale
bcb2f73475 KeyMint HAL: clarify ATTEST_KEY is like SIGN
Bug: 221280929
Test: None, comment change only (already assumed by VTS tests)
Change-Id: Ifc077c6ce1a89164b0d7c70c6e3353d941eee670
2022-03-21 17:14:59 +00:00
Max Bires
cf02e97946 Merge "More canonicalization checks and canonicalize before signing" 2022-03-21 16:33:20 +00:00
David Drysdale
50a66b8f79 KeyMint VTS: strict test only for v2+
Bug: 223537775
Bug: 197096139
Test: VtsAidlKeyMintTargetTest
Change-Id: Ib77d52e4a91233c936b3a44f5eac71f53b2af450
2022-03-21 15:29:00 +00:00
Max Bires
e74f0bc950 More canonicalization checks and canonicalize before signing
This change makes sure the DeviceInfo CBOR map is canonicalized before
the signature check instead of just separately checking the
canonicalization in a separate call. Additionally, some ASSERTs have
been changed to EXPECTs in validation of the DeviceInfo map more
generally, where it makes sense to avoid failing immediately.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I69806c887656772ea6b5e2e3f0af50957e6b05e3
2022-03-21 05:19:15 +00:00
Tri Vo
06d5f095be Merge "KeyMint VTS: Expect empty key if boot state unverfied" am: a26f8cb316 am: 39f920bae3 am: c18ed24712
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2014678

Change-Id: I877572dcb311c4c83f4effb4e0dbdec38ebee5bc
2022-03-18 18:56:57 +00:00
Tri Vo
a26f8cb316 Merge "KeyMint VTS: Expect empty key if boot state unverfied" 2022-03-18 18:14:31 +00:00
Janis Danisevskis
500f3e0436 Merge changes from topic "default_dice_hal" am: 49a1688f5e am: 0b05aae7dc am: 2c90fb249d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1896435

Change-Id: Ic00ebe42a30cfa7bff9e229d07f91bb2ec4c3698
2022-03-16 21:17:13 +00:00
Janis Danisevskis
49a1688f5e Merge changes from topic "default_dice_hal"
* changes:
  Dice HAL: Add VTS Test.
  Dice HAL: Added default implementation.
2022-03-16 20:16:15 +00:00