Commit graph

919 commits

Author SHA1 Message Date
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