389 Commits

Author SHA1 Message Date
Alex Klyubin
6a6f0c7de2 Merge "Add HmacSHA256 backed by AndroidKeyStore." 2015-03-30 20:34:48 +00:00
Chad Brubaker
021a1e090a am 7081a168: am 5341d83c: am f603e286: Merge "Add authorization binder methods"
* commit '7081a16859cdcf32f565379a8179ddc7b50b3c1d':
  Add authorization binder methods
2015-03-30 20:33:55 +00:00
Chad Brubaker
f603e28614 Merge "Add authorization binder methods" 2015-03-30 20:06:39 +00:00
Alex Klyubin
4ab8ea4498 Add HmacSHA256 backed by AndroidKeyStore.
This also adds the MAC length constraint on imported HMAC keys. HMAC
doesn't work without this constraint at the moment.

Bug: 18088752
Change-Id: I8613f58f5d2a84df00bcf6179d13e30619440330
2015-03-30 12:53:23 -07:00
Alex Klyubin
7760820ecc am 23c2b8e8: am d7e06104: am 36ee836d: Merge "Symmetric key generation for AndroidKeyStore."
* commit '23c2b8e81ec5a6e0c344f09e728d87300ac29bc2':
  Symmetric key generation for AndroidKeyStore.
2015-03-27 23:49:25 +00:00
Chad Brubaker
2fb1d0eb20 am db22c659: am 3e89fac5: am dbd9a4b6: Merge "Allow entropy to be provided to some operations"
* commit 'db22c6595c1b1949ff5473517609a7315b8e130f':
  Allow entropy to be provided to some operations
2015-03-27 23:49:17 +00:00
Alex Klyubin
2f0a46cf4f am 8e7df37c: am d880dc2f: am 274a4ee3: Merge "Symmetric key import for AndroidKeyStore."
* commit '8e7df37c9af178cd443c487f258773c0017501aa':
  Symmetric key import for AndroidKeyStore.
2015-03-27 23:31:38 +00:00
Alex Klyubin
d23a1f706f Symmetric key generation for AndroidKeyStore.
This currently supports AES and HMAC with SHA-256.

Bug: 18088752
Change-Id: Ife55438cf4129b895295681bb35091cd37eb73fb
2015-03-27 15:57:53 -07:00
Chad Brubaker
dae79e5408 Allow entropy to be provided to some operations
generateKey and begin can now optionally take an array of bytes to add
to the rng entropy of the device before the operation. If entropy is
specified and the device does not support add_rng_entropy or the call
fails then that device will not be used, leading to fallback or error
depending on the situation.

Change-Id: Id7d33e3cc959594dfa5483d002993ba35c1fb134
2015-03-27 14:28:35 -07:00
Alex Klyubin
274a4ee344 Merge "Symmetric key import for AndroidKeyStore." 2015-03-27 19:21:13 +00:00
Alex Klyubin
baf2838fd2 Symmetric key import for AndroidKeyStore.
AES and HmacSHA256 symmetric keys can now be imported into
AndroidKeyStore. These keys cannot yet be used.

Bug: 18088752
Change-Id: Iad2fd49d15ac4c2d676abe1153f5b5f0b6ff496c
2015-03-26 15:37:15 -07:00
Chad Brubaker
7eb1c21051 am b8d872fb: am 5a01999e: am 704aa5ae: Merge "Use correct tag type for RSA exponent"
* commit 'b8d872fbde849150083836f0d5be3f6fe1c03fb9':
  Use correct tag type for RSA exponent
2015-03-25 21:08:43 +00:00
Chad Brubaker
b09f1083e1 am 6558d4e7: am ee468ea8: am 6326f964: Merge "Make application/client id an object"
* commit '6558d4e75e8a129b1b1a78824ed091962a2574ef':
  Make application/client id an object
2015-03-25 21:08:35 +00:00
Chad Brubaker
781df04511 am 6050eb54: am 5b11b3d6: am 31cee318: Merge "Specify public exponent for RSA"
* commit '6050eb5459a00b95bf135d40e9e37cd043c863e4':
  Specify public exponent for RSA
2015-03-23 23:24:51 +00:00
Chad Brubaker
9f47709f8b Use correct tag type for RSA exponent
Change-Id: I957c4469401953d2298751c655ca8e9f95b9511d
2015-03-22 04:45:32 -07:00
Chad Brubaker
5e73c0eec2 Make application/client id an object
Having it as a raw byte[] caused issues in keystore because keymaster
handles a null blob differently than a blob with null contents. Make
this explicit in the API.

Change-Id: Ifcf550f438608b8f09fc589d00d06fffa6ee463b
2015-03-21 23:15:20 -07:00
Chad Brubaker
003a55a671 Specify public exponent for RSA
Keymaster no longer adds a default value, so these tests were failing.

Change-Id: I9c5a8d2552534db1d7fa77965b0d675acc3ccc0a
2015-03-20 14:03:49 -07:00
Chad Brubaker
5654b36b46 Add authorization binder methods
Add methods for sending an auth token to keystore and to query the
authorization state of a given operation.

Change-Id: I223df5c56ae2a251ef31cfe60f06c046c12a5cd8
2015-03-17 16:59:52 -07:00
Chad Brubaker
a19ff28c8f am 99e9acd9: am f1654c60: Merge "Add initial Keymaster 1.0 tests"
* commit '99e9acd9402679e28e6f4c3ee71cef2cc91b3311':
  Add initial Keymaster 1.0 tests
2015-03-13 18:26:11 +00:00
Chad Brubaker
8827c81732 Add initial Keymaster 1.0 tests
Change-Id: I3b8ef583b71056b92a876fa47556771604dae121
2015-03-06 10:27:47 -08:00
Chad Brubaker
39fee05ea2 am f271fa33: am cdc70256: am f3c117ca: Merge "Add new IKeystoreService methods to KeyStore"
* commit 'f271fa33f148b0c410e8ee06aceb1f2b57cd62c7':
  Add new IKeystoreService methods to KeyStore
2015-02-24 04:54:41 +00:00
Chad Brubaker
e6a461341c Add new IKeystoreService methods to KeyStore
Add wrappers for all the new IKeystoreService keymaster 0.4 methods to
android.security.KeyStore.

Change-Id: Icb5500cfffb62d1af326edf326e1b9b67e5cece9
2015-02-23 14:12:44 -08:00
Robin Lee
3798ed5e0b Device Policy API to choose a private key silently
Support for certificate chooser (keychain) to first query a profile
owner (if one exists) for a silent credentials grant which will be
passed back to the caller as an alias.

Bug: 15065444
Change-Id: I0729b435c218b7991e6cb5faedefb7900577afcc
2015-02-05 19:38:43 +00:00
Alex Klyubin
0b486da650 Merge "Remove DSA support from Android KeyStore and KeyChain." 2015-01-16 16:44:22 +00:00
Alex Klyubin
590c068e83 Merge "Add KeyPairGenerator.EC backed by Android KeyStore." 2015-01-16 16:44:06 +00:00
Alex Klyubin
cd2329dbfa Remove DSA support from Android KeyStore and KeyChain.
We're switching from OpenSSL to BoringSSL which does not support DSA.

Bug: 17409664
Change-Id: Id9b52666ba9ef234076105c925610b5b312988a5
2015-01-14 16:45:51 -08:00
Alex Klyubin
21a76df55c Add KeyPairGenerator.EC backed by Android KeyStore.
The Android KeyStore backed KeyPairGenerator can generate EC key
pairs, but it cannot be instantiated via the standard JCA approach of
KeyPairGenerator.getInstance("EC", "AndroidKeyStore"). Instead, the
user must invoke KeyPairGenerator.getInstance("RSA",
"AndroidKeyStore") and then tell it to generate an EC key pair.

This CL fixes this weirdness.

The fix requires the introduction of late resolution of key algorithm
and default key size. Prior to this CL, these parameters were resolved
prior to KeyPairGenerator initialization, inside KeyPairGeneratorSpec.
In this CL, these parameters are resolved during KeyPairGenerator
initialization. This is fine because KeyPairGeneratorSpec should be as
dumb as possible and all the logic should reside in KeyPairGenerator
and lower layers.

Bug: 19018089
Change-Id: I114502356e6c9691518cf05b6d9eb0920b4fe0b2
2015-01-14 13:35:32 -08:00
Chad Brubaker
7a2c973db7 Generate IKeystoreService using aidl
This replaces IKeystoreService.java with IKeystoreService.aidl and
changes the methods that passed down a byte[][] to instead pass down a
KeystoreArguments which is currently a thin parcelable wrapper around a byte[][].

Change-Id: I6367bcf57562f41a27aab14f1903b74995cb65c2
2015-01-13 18:29:15 -08:00
Kenny Root
9d2d6b6b4b Track change to Conscrypt
Change-Id: I8814fd0720acf09332927f184fdd9b2cdac4f413
2014-11-26 09:08:40 -08:00
Shawn Willden
dc8bc1160c Correct test data size in keystore signing and verification tests.
The test is sending too much data to be signed, which should actually
fail, and does on Volantis.  Apparently the other keymaster implementors
do something to pass it, because shamu and hammerhead pass, but the test
is wrong.

Change-Id: Ic616a551567d64f5d87d9607ceb08afa7be74f9d
2014-09-14 17:09:47 +00:00
Bernhard Bauer
26408ccd8e Add DevicePolicyManager PrivateKey mgmt
Additional device policy API to install keypairs to the keychain
silently.

Bug: 15065444
Change-Id: Idc25774c9ab1a61080290bebd6f5c4f24e6ee2e0
2014-09-11 19:17:00 +01:00
Zoltan Szatmary-Ban
f0ae135049 Extend IKeyChainService AIDL with CACert retrieval
Bug:16029580
Change-Id: I41a3bd2f3bd95550e59f1d0d0acd0e765d7b62d7
2014-09-08 17:59:42 +01:00
Robin Lee
f0246a8a14 Keep managed profile keystores in sync with owner
Fixes setting a keyguard password for keystore in a multi-user setup
while we're at it.

Bug: 16233206.
Change-Id: I7941707ca66ac25bd122fd22e5e0f639e7af697e
2014-08-29 23:03:42 +01:00
Zoltan Szatmary-Ban
3291de8f6c Revert "Revert "Revert "Revert "Revert "Update Trusted Credentials screen in settings"""""
This reverts commit c9249c69813c6fb889d71d84583c67ae2942e6de.

Change-Id: I5504fddaf7b18efb73cd6c76678b3b39ce9b0229
2014-08-15 14:01:14 +00:00
Zoltan Szatmary-Ban
f8d72cc14f Revert "Revert "Revert "Revert "Update Trusted Credentials screen in settings""""
This reverts commit 87efe74e092236c372d3b6909009641123aa416a.

This should be fine now with all the dependency CLs +2-ed


Change-Id: I96ad14ad5ff81e6b5391035cb6c5a62339c6cc40
2014-08-15 12:58:37 +00:00
Narayan Kamath
f75aadc028 Revert "Revert "Revert "Update Trusted Credentials screen in settings"""
This reverts commit 19c8ce291e89a9ef1442a20e1feab421b11536d7.

Change-Id: Ie5a5571127311e0a29f314c0566e779cfe940b53
2014-08-15 12:25:52 +00:00
Zoltan Szatmary-Ban
1e7bc0def8 Revert "Revert "Update Trusted Credentials screen in settings""
This reverts commit 0f0de0bdd021bad5f85fdb0399a4ea91a1611e25.

Change-Id: Ia3d0907e3d7c2ec42d64e45f60e3dfaffb932c3d
2014-08-15 12:55:35 +01:00
Zoltan Szatmary-Ban
678e3ecc93 Revert "Update Trusted Credentials screen in settings"
This reverts commit 4fde5aa9fab931d9becfc49f7d7b8526ad5640d9.

Change-Id: I581c38d64e9829b0079bafa42615f2aa0bf64763
2014-08-07 13:41:08 +00:00
Zoltan Szatmary-Ban
1386627335 Update Trusted Credentials screen in settings
Trusted credentials for both the primary user and its managed profiles are shown
on the Trusted Credentials fragment. All functionalities (e.g. disabling/enabling
of certificates) remain available.

Bug: 16029580

Change-Id: Ia92ae02d8c572bf4a3be172f6c255726cefc0fa1
2014-07-29 16:43:37 +01:00
Robin Lee
aab72f3b0a Merge "Revert "Revert "Publish DevicePolicyManager CA certificate APIs""" 2014-06-17 21:55:55 +00:00
Robin Lee
306fe08ce2 Revert "Revert "Publish DevicePolicyManager CA certificate APIs""
This reverts commit 792b270dbdc980cfe04e8d461bf00a1f45b5e936.

Change-Id: I18c7e0eca39868230cd8e4f4bbeb3c44ff9e8b78
2014-06-19 14:04:24 +00:00
Robin Lee
2b5e917026 Revert "Publish DevicePolicyManager CA certificate APIs"
This reverts commit 5260bf69946563dc47c17e7441b352adfce384c5.

Change-Id: I5e44fdac8a7375576b25171f58e31a1fa0e3c569
2014-06-17 22:12:28 +00:00
Robin Lee
6d3912e2ef Merge "Revert "Publish DevicePolicyManager CA certificate APIs"" 2014-06-17 21:55:55 +00:00
Robin Lee
b12f1778d6 Merge "Publish DevicePolicyManager CA certificate APIs" 2014-06-17 05:12:50 +00:00
Robin Lee
837304f6f6 Publish DevicePolicyManager CA certificate APIs
Exposes these methods:
 - hasCaCertInstalled
 - hasAnyCaCertsInstalled
 - installCaCert
 - uninstallCaCert

Allows device and profile owners to perform some certificate management
including querying for and enabling/disabling specific CA certificates.

Change-Id: I4aa8a1a8601b234e30acde99dfa382e04cb62495
2014-06-11 16:55:32 +01:00
Robert Ly
e37da759c5 am b1cb5aab: am 748856f2: am a7ddd029: am 80e84e2d: am f3cecfa2: am 55d525b2: am 716cc7dc: Add documentation for AndroidKeyStore
* commit 'b1cb5aabeb68815715eed423f1f9a7edb9a3e938':
  Add documentation for AndroidKeyStore
2014-06-11 19:33:51 +00:00
Robert Ly
80e84e2db9 am f3cecfa2: am 55d525b2: am 716cc7dc: Add documentation for AndroidKeyStore
* commit 'f3cecfa2185ef5622992b21da8204b8b6590ef2d':
  Add documentation for AndroidKeyStore
2014-06-10 02:39:28 +00:00
Robert Ly
f3cecfa218 am 55d525b2: am 716cc7dc: Add documentation for AndroidKeyStore
* commit '55d525b26b716351625798675afe69c6cf43cf5a':
  Add documentation for AndroidKeyStore
2014-06-10 02:36:10 +00:00
Robert Ly
716cc7dcac Add documentation for AndroidKeyStore
Add exposition about the use cases for AndroidKeyStore and links to the
API sample application for different use cases.

Bug: 8608817
Change-Id: Ic4ce9405781c92f12687895b28c671661ea5524f
2014-05-07 21:20:01 -07:00
Kenny Root
a365906e67 Use the correct package name for CHOOSER
Bug: 13013106
Change-Id: I1f715de18e7108274f5a98234376d48c2d329438
2014-03-17 16:21:56 -07:00