Commit graph

880 commits

Author SHA1 Message Date
Janis Danisevskis
768cec42b5 Merge "Keymint: Add rust derives to KeyMintHardwareInfo" 2021-02-01 22:19:45 +00:00
Janis Danisevskis
2d5868b4e0 Keymint Support: Fix keymint_tags.h
authorizationValue checked the uion value tag twice instead of checking
the actual tag value.

Test: N/A
Change-Id: I348b5ac06801a04ca7243088d758374148910d39
2021-01-31 21:05:41 -08:00
Janis Danisevskis
233e36943e Keymint: Add rust derives to KeyMintHardwareInfo
Test: N/A
Change-Id: I3dee43dc85d465123e2cc36f2640fe3fd49b9838
2021-01-30 08:45:48 -08:00
Treehugger Robot
45a8fe6521 Merge "Specify version for aidl_interface explicitly" 2021-01-29 02:23:01 +00:00
Jeongik Cha
1674c1354e Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: Ie7605c203c0f0eaf2c40f1e64ea45634b3aa54a5
Merged-In: I141de8ed6958fe42f727a0fa41473de4c1fb38de
2021-01-28 15:14:10 +00:00
Janis Danisevskis
08ca885240 SecureClock/SharedSecret: Add owners files.
Test: N/A
Change-Id: Ie9a210d9ffb476168b0df55cacd261711adfcb1f
2021-01-26 16:33:21 -08:00
Treehugger Robot
0d59cbdb1d Merge "Add limited use keys related tag into KeyMint aidl. And add vts test to verify the tag appears in the key characteristics. also if the tag is enforced in the hardware, afer the usage of the key is exhausted, the key blob should be invalidated from the secure storage (such as RPMB partition)." 2021-01-26 23:05:51 +00:00
David Zeuthen
df543ea006 Merge "KeyMint: Add support for key agreement operation and use it for ECDH." 2021-01-26 22:05:24 +00:00
David Zeuthen
e0c4089f06 KeyMint: Add support for key agreement operation and use it for ECDH.
Test: VtsAidlKeyMintTargetTest
Bug: 171847641
Change-Id: Id9dc0ee3c69d9c2421ce7b0f228580a90411169e
2021-01-26 12:09:17 -05:00
Janis Danisevskis
6bb888fecf Keymint/secureclock: Add Rust derives to some of the types.
This adds rust derive stanzas to TimeStamp, TimeStampToken, and
HardwareAuthToken.

Also removes an unused import from IKeyMintDevice.

Test: Compiles.
Change-Id: If41248f5cda8015ecb07bec5d1bc75317b803492
2021-01-25 10:51:54 -08:00
Qi Wu
d22ec8418b Add limited use keys related tag into KeyMint aidl.
And add vts test to verify the tag appears in the key characteristics.
also if the tag is enforced in the hardware, afer the usage of the key
is exhausted, the key blob should be invalidated from the secure storage
(such as RPMB partition).

Bug: b/174140443
Test: atest VtsHalKeyMintV1_0TargetTest

Change-Id: Ic65b855c5a8692ab8d1281dd46562ad0844ab1b0
2021-01-22 15:58:52 +08:00
Shawn Willden
1ddde5e97e Merge "Add basic testing for KeyMint certs." 2021-01-21 13:42:35 +00:00
Shawn Willden
0e80b5d108 Add basic testing for KeyMint certs.
This is by no means complete, but it validates basic functionality.
More is coming.

Test: VtsAidlKeyMintTargetTest
Change-Id: I0727a9f5b137b58b9a2f0aaf9935bfdc6525df8f
2021-01-20 22:45:40 -07:00
Janis Danisevskis
6251827cda KeyMint/SecureClock: Reverse dependency between keymint and secureclock.
This patch removes verifyAuthorization from the KeyMint spec in favor of
secureclock and the TimeStampToken. Timestamp has moved to secureclock
and the VerificationToken was removed from keymint. This reverses the
dependency between keymint and secureclock because keymint no imports
TimeStampToken and Timestamp from secureclock.

Test: Tested with CtsVerifier Fingerprint bound keys test.
Change-Id: I4e0bde0d77e74918e2b5483c30be8057417e3bf1
2021-01-14 10:19:28 -08:00
Janis Danisevskis
600b7775ef Merge changes from topic "secclock_sharedkey"
* changes:
  The aidl definition for Shared Secret functionality.
  Add Shared Secret to the compatibility matrix.
  The aidl definition for Secure Clock keymint service.
  Add Secure Clock to the compatibility matrix.
2021-01-14 18:04:02 +00:00
Chirag Pathak
be15180242 The aidl definition for Shared Secret functionality.
Test: N/A
Bug: b/171844725
Change-Id: I5f6217d487df89e8ceab92eb2bea55de5bace141
2021-01-13 15:30:05 -08:00
Chirag Pathak
c160ae682e The aidl definition for Secure Clock keymint service.
Test: N/A
Bug: b/168673523

Change-Id: I6134d8b4ce620ecceccc0ea88a234f01e6915798
2021-01-13 15:29:53 -08:00
Shawn Willden
7f42437ebb Change KeyCharacteristics
Support key characteristics with three security levels, do not store
unenforced authorizations with keys or bind them to keys.

Bug: 163606833
Test: atest VtsAidlKeyMintTargetTest
Change-Id: Idbc523f16d8ef66ec38e0d503ad579a93c49e7b4
2021-01-12 22:15:21 -07:00
David Zeuthen
1908606054 Merge "Add support and VTS test for RSA OAEP MGF1." 2021-01-05 16:31:02 +00:00
Shawn Willden
e0b0de5224 Fix atest VtsAidlKeyMintTargetTest
Renaming the test without updating the test configuration broke it.
This fixes it.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: I3f4c07a04f2b0ce604f0bbac43ffdbdbb5b34d53
2020-12-23 09:30:59 -07:00
Chirag Pathak
8b7455abb4 Add support and VTS test for RSA OAEP MGF1.
Test: atest VtsAidlKeyMintV1_0TargetTest
Bug: 160968519
Change-Id: I7093b26217b69ea36b4be8837b42cb9446887685
2020-12-22 15:58:52 -05:00
Janis Danisevskis
5ba093377c Revise keymint_tags.h
* replace NullOr with std::optional.
* Add mising tag.
* Undefine helper macros so that keymint_tags.h can be used together
  with keymaster_tags.h
* Check if KeyParameterValue variant matches KeyParameterTag in
  accessors.

Test: VtsAidlKeyMintTargetTest
Change-Id: I6c951071f30fd27c8c21a2e8cc86f421a3bc37d9
2020-12-18 08:34:20 -08:00
Shawn Willden
83fa6413ac Change KeyParameters to use a union.
AIDL now supports union types.  This CL changes KeyParameter to use
one.

Test: VtsAidlKeyMintTargetTest
Change-Id: I5112611b161e3de1ea86105ea3c7ed0912036a7b
2020-12-18 08:38:28 -07:00
Janis Danisevskis
24c0470408 Keymint: Use ndk_platform.
Test: N/A
Change-Id: I7e97d9d475a639cfe92c9e6b01689c9ff80d2abc
2020-12-17 11:34:59 -07:00
Shawn Willden
747eeaea28 Remove authorization set serialization.
This is no longer needed in KeyMint. Keystore2 implements similar
functionality in Rust.

Test: Build
Change-Id: Ia43716449756935619fb22ef5aba113e420c2687
2020-12-13 23:48:10 -07:00
Shawn Willden
09b5826c68 Move tag type comments where they belong.
Because AIDL doesn't allow tag values to be constructed the way we
did in HIDL (and before), each tag definition carries a comment
specifying what the "magic" tag type value used in its construction
means.  This CL moves those comments so they're adjacent to the value
they're documenting.

Test: Build
Change-Id: I30b037f9ddf6bf2b07326a53959d490e045c891a
2020-12-13 23:48:10 -07:00
Shawn Willden
1d3f85e891 Various cleanups
Mostly just removal of old-style #include guards in favor of #pragm
once, reorganization of header includes, correction of copyright
years, etc.

Test: VtsAidlKeyMintTargetTest
Change-Id: I070584ecec550a2f133b1c19f36f99e7b5544e7c
2020-12-13 23:48:10 -07:00
Shawn Willden
08a7e43e78 Revert^2 "Move keymint to android.hardware.security."
1ffcdebadd

Bug: 175345910
Bug: 171429297
Exempt-From-Owner-Approval: re-landing topic with no changes in this CL.
Change-Id: I691cad252f188b54a8076589d9955774d74d4729
2020-12-11 20:36:59 +00:00
Orion Hodson
1ffcdebadd Revert "Move keymint to android.hardware.security."
Revert "Keystore 2.0 SPI: Move keymint spec to security namespace."

Revert "Keystore 2.0: Move keymint spec to security namespace."

Revert "Keystore 2.0: Move keymint spec to security namespace."

Revert "Move keymint to android.hardware.security."

Revert "Configure CF to start KeyMint service by default."

Revert "Move keymint to android.hardware.security."

Revert "Move keymint to android.hardware.security."

Revert submission 1522123-move_keymint

Reason for revert: Build breakage
Bug: 175345910
Bug: 171429297
Reverted Changes:
Ief0e9884a:Keystore 2.0: Move keymint spec to security namesp...
Idb54e8846:Keystore 2.0: Move keymint spec to security namesp...
I9f70db0e4:Remove references to keymint1
I2b4ce3349:Keystore 2.0 SPI: Move keymint spec to security na...
I2498073aa:Move keymint to android.hardware.security.
I098711e7d:Move keymint to android.hardware.security.
I3ec8d70fe:Configure CF to start KeyMint service by default.
Icbb373c50:Move keymint to android.hardware.security.
I86bccf40e:Move keymint to android.hardware.security.

Change-Id: I160cae568ed6b15698bd0af0b19c6c949528762d
2020-12-11 10:45:43 +00:00
Shawn Willden
f73e952ea4 Move keymint to android.hardware.security.
Test: VtsAidlKeyMintTargetTest
Change-Id: I2498073aa834584229e9a4955a97f279a94d1dd5
2020-12-09 16:26:41 -07:00