Commit Graph

91 Commits

Author SHA1 Message Date
Eran Messeri
5cf3783938 Merge "KeyStore: X25519 key import" am: 9db6ee342b am: 03e7318d7d am: 65f1d04dcd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2183495

Change-Id: I5e1da00bef3f5185396ade33cea906075b4770e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-25 16:19:00 +00:00
Prashant Patil
25c8f48a8d KeyStore: X25519 key import
Added a KeyAgreement algorithm for X25519(XDH) in KeyProperties.
KM_ALGORITHM_EC is used for XDH because Keymint uses KM_ALGORITHM_EC along
with Curve25519 to differentiate X25519 and other EC keys.

Algorithm name XDH is set for X25519 private key.

Consilidated methods of Keymaster specific conversions of EC_CURVE into
KeymasterUtil.

Bug: 240682299
Test: run cts -m CtsKeystoreTestCases -t android.keystore.cts.Curve25519Test#x25519KeyImportAndAgreementTest
Change-Id: I3f95738194e62be0f1d821b1eb467ed810a5a175
2022-11-14 14:51:15 +00:00
Eran Messeri
6a6a9e73fd Merge "Keystore: EC_CURVE tag added import agruments" am: edce19fef7 am: 51c53d6357 am: 7811859715
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2164659

Change-Id: I81c11e5af30d15b7f1ea74e46c55d40e515f23ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 17:13:52 +00:00
Eran Messeri
edce19fef7 Merge "Keystore: EC_CURVE tag added import agruments" 2022-11-04 15:59:42 +00:00
Treehugger Robot
6ee781740a Merge "Keystore:Expected exception for invalid Keys" am: 4fe1ed8e51 am: d3472b9eed am: 90969f2230 am: 1e6ff36751 am: 34a5947082
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2175743

Change-Id: Ifacca68b9dd4f594f9720c027ff3bdf9e5b6a04c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-04 18:37:31 +00:00
Prashant Patil
0ee5912b75 Keystore:Expected exception for invalid Keys
If EC curves of Public and Private keys are different, an
InvalidKeyException is expected.

But the current implementation does not throw exception from doPhase method
and fails in generateSecret method.

The fix is in AndroidKeyStoreECPublicKey to provide
correct ECParameterSpec while creating a PrivateKey object.

Bug: 215175472
Test: run cts -m CtsKeystoreWycheproofTestCases -t com.google.security.wycheproof.JsonEcdhTest#testSecp224r1
Test: run cts -m CtsKeystoreWycheproofTestCases -t com.google.security.wycheproof.JsonEcdhTest#testSecp256r1
Test: run cts -m CtsKeystoreWycheproofTestCases -t com.google.security.wycheproof.JsonEcdhTest#testSecp384r1
Test: run cts -m CtsKeystoreWycheproofTestCases -t com.google.security.wycheproof.JsonEcdhTest#testSecp521r1
Test: run cts -m CtsKeystoreTestCases -t android.keystore.cts.KeyAgreementTest#testDoPhase_withDifferentCurveKey_fails
Change-Id: Ie221926d8a3be3fe6679e723575c5021cafba98e
2022-09-22 11:40:59 +01:00
Prashant Patil
a2b8cdd04e Keystore: EC_CURVE tag added import agruments
As per Keymint documentation EC key import has to provide EC_CURVE tag.
This is required for Strongbox implementation test using wycheproof test
cases.

Also added a support to get KEY_SIZE based on EC_CURVE, if it is not
included into Authorization list.

Bug: 237634216
Test: run cts -m CtsKeystoreWycheproofTestCases
Change-Id: Ie981721c38477e74da3cba6613dc0b34e453609c
2022-09-21 16:27:34 +01:00
Treehugger Robot
4eb3e94812 Merge "Keystore: Included KM_TAG_RSA_OAEP_MGF_DIGEST tag" am: eea63d6aa4 am: f42d5e8847 am: 72b1cc3e49 am: 3f20176ddf am: 074bff50de
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2167462

Change-Id: I6479a9d91248581cadf7cf4acab02b9e01cc6ad2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 16:02:16 +00:00
Prashant Patil
0443f760d0 Keystore: Included KM_TAG_RSA_OAEP_MGF_DIGEST tag
Included KM_TAG_RSA_OAEP_MGF_DIGEST for RSA keys generation and import
if supported padding is defined as OAEP. All supported digest are added
as KM_TAG_RSA_OAEP_MGF_DIGEST and also default MGF1-SHA1 digest is added
because crypto operations could fail is MGF1ParameterSpec is not provided.

Note this includes additional Attestation parameter in returned
certificate and need to handle accordingly.

Bug: 203688354
Test: run cts -m CtsKeystoreTestCases -t android.keystore.cts.CipherTest#testKatBasicWithDifferentProviders
Change-Id: I2086f2520667ccac9116e04de39f6328a0d3fc5b
2022-09-14 15:26:12 +01:00
Eric Biggers
34945b1fd2 AndroidKeyStore: support platform use of rollback-resistant keys
The keystore2 binder API supports rollback resistance when KeyMint
supports it, but until now this wasn't exposed to Java code that uses
AndroidKeyStore.  Add support for rollback-resistant keys to
KeyProtection and AndroidKeyStoreSpi.setSecretKeyEntry() so that
LockSettingsService can request it for SP protector keys.

This CL does *not* do any of the following:

- Add any non-hidden APIs.  KeyMint implementations only support a
  limited number of rollback-resistant keys; currently the available
  space is reserved for platform use only.  Note that other examples of
  "hidden", platform-only key properties are
  isCriticalToDeviceEncryption() and getBoundToSpecificSecureUserId().

- Support rollback resistance with keys directly generated by Keystore.
  This isn't currently needed.  Note that this would require changes
  KeyGenParameterSpec and AndroidKeyStoreKeyGeneratorSpi.

- Allow querying the rollback resistance property of keys.  This isn't
  currently needed.  Note that this would require changes to KeyInfo and
  AndroidKeyStoreSecretKeyFactorySpi.

Bug: 239632930
Test: see I05f3b7e5c139471febe5c266a39e3dc3bca4831f
Change-Id: Ifcfd0b8f1bf440ef1ac80a9ac2b0e9c7f62106dd
2022-07-23 00:38:03 +00:00
Seth Moore
b51dd03878 Ensure key generation retries after remote key provisioning
Previously, the key pair generation would error out even if we
successfully provisioned attestation keys. Instead, we should retry
key generation after the GenerateRkpKeyService reports an OK status.

Bug: 231495834
Test: RemoteProvisionerUnitTests
Change-Id: I049294cbc7119de55b5de02499bf4609d4c6de5d
Merged-In: I049294cbc7119de55b5de02499bf4609d4c6de5d
2022-05-16 16:11:32 -07:00
Seth Moore
8cf2a52033 Ensure key generation retries after remote key provisioning
Previously, the key pair generation would error out even if we
successfully provisioned attestation keys. Instead, we should retry
key generation after the GenerateRkpKeyService reports an OK status.

Bug: 231495834
Test: RemoteProvisionerUnitTests
Change-Id: I049294cbc7119de55b5de02499bf4609d4c6de5d
2022-05-12 17:18:22 -07:00
Eran Messeri
16882a2ac3 Keystore: Wire X25519 key agreement
Implement support for the X25519 key agreement functionality.

Similar to Ed25519, two new classes are added:
* AndroidKeyStoreXDHPrivateKey
* AndroidKeyStoreXDHPublicKey

The private key class is simply a handle to the KeyMint key.
The public key class implements XECPublicKey, the interface
needed for using this key in a platform-backed key agreement.

Because of Conscrypt API boundaries, the functionality of Conscrypt's
OpenSSLX25519PublicKey is duplicated here - namely, matching the
prefix of the encoded key.

Bug: 194359292
Test: atest android.keystore.cts.Curve25519Test
Change-Id: Ifc12be528ab544fd6909bb0dd6224a0a4dd400c6
Merged-In: Ifc12be528ab544fd6909bb0dd6224a0a4dd400c6
2022-05-12 23:00:16 +01:00
Eran Messeri
b32c72a426 Keystore: Wire up Ed25519 signing
Wire Ed25519 signing into Keystore. This consists of registering a
provider for Ed25519.

Ed25519 has its own digest scheme, so the caller should specify "none"
as the digest scheme, and that's the tag that's going to be passed into
KeyMint.
However, unlike other uses of the "NONE" digest scheme, the input to the
signature algorithm should not be truncated.

Bug: 194359292
Test: atest android.keystore.cts.Curve25519Test
Merged-In: Icce4f7f2f8fa10081a9c6beff4813c2d91756469
Change-Id: Ic59ad0aa8343c6aecf6d5c273166d1f4d10e4f21
2022-05-12 11:07:23 +01:00
Eran Messeri
4c20e224f6 Keystore: Wire X25519 key agreement
Implement support for the X25519 key agreement functionality.

Similar to Ed25519, two new classes are added:
* AndroidKeyStoreXDHPrivateKey
* AndroidKeyStoreXDHPublicKey

The private key class is simply a handle to the KeyMint key.
The public key class implements XECPublicKey, the interface
needed for using this key in a platform-backed key agreement.

Because of Conscrypt API boundaries, the functionality of Conscrypt's
OpenSSLX25519PublicKey is duplicated here - namely, matching the
prefix of the encoded key.

Bug: 194359292
Test: atest android.keystore.cts.Curve25519Test
Change-Id: Ifc12be528ab544fd6909bb0dd6224a0a4dd400c6
2022-05-12 10:56:30 +01:00
Eran Messeri
46faab535f Keystore: Wire up Ed25519 signing
Wire Ed25519 signing into Keystore. This consists of registering a
provider for Ed25519.

Ed25519 has its own digest scheme, so the caller should specify "none"
as the digest scheme, and that's the tag that's going to be passed into
KeyMint.
However, unlike other uses of the "NONE" digest scheme, the input to the
signature algorithm should not be truncated.

Bug: 194359292
Test: atest android.keystore.cts.Curve25519Test
Change-Id: Icce4f7f2f8fa10081a9c6beff4813c2d91756469
2022-05-11 18:53:04 +01:00
Eran Messeri
51d7088287 Keystore: Support Ed25519 keys
Implement support for Ed25519 signing keys in Android Keystore.
Because Conscrypt does not yet handle those keys, the Keystore classes
implement EdECPublicKey directly and parse the keys.

Specifically, AndroidKeyStoreEdECPublicKey can take an encoded X.509 key
specification, validate the encoding is of an Ed25519 key, then parse
the oddity and Y point on the curve.
RFC8032 describes EdDSA signature scheme, particularly Ed25519.
RFC8410, Section 3, defines the OID for Ed25519 keys (1.3.101.112).
RFC8410, Section 4, describes the encoding of the public key.

Bug: 195309719
Bug: 194359292
Bug: 214203951
Test: atest android.security.keystore2.AndroidKeyStoreEdECPublicKeyTest
Merged-In: I07b793cbd5029630768368ad4a863bbc1c828ced
Change-Id: I477e87658b98bc3340da9a062d81508aad041c07
2022-05-10 10:19:39 +01:00
Eran Messeri
143fa39384 Keystore: Support Ed25519 keys
Implement support for Ed25519 signing keys in Android Keystore.
Because Conscrypt does not yet handle those keys, the Keystore classes
implement EdECPublicKey directly and parse the keys.

Specifically, AndroidKeyStoreEdECPublicKey can take an encoded X.509 key
specification, validate the encoding is of an Ed25519 key, then parse
the oddity and Y point on the curve.
RFC8032 describes EdDSA signature scheme, particularly Ed25519.
RFC8410, Section 3, defines the OID for Ed25519 keys (1.3.101.112).
RFC8410, Section 4, describes the encoding of the public key.

Bug: 195309719
Bug: 194359292
Bug: 214203951
Test: atest android.security.keystore2.AndroidKeyStoreEdECPublicKeyTest
Change-Id: I07b793cbd5029630768368ad4a863bbc1c828ced
2022-05-05 14:58:52 +01:00
Max Bires
9510ef1aa2 Make generateKey() return a status
This change adds some integers to the AIDL interface in order to convey
status back to the caller of generateKey(). This will inform the caller
as to whether or not the errors that may occur during provisioning are
permanent, and if not, what to do with the transient error.

Bug: 227306369
Test: RemoteProvisionerUnitTests
Change-Id: I9202358a102b0fb0a104525632a005acb7355840
2022-04-20 14:31:54 -07:00
Eran Messeri
dfe33810c0 KeyStore: Surface RKP failures
On systems that rely solely on remotely-provisioned keys (RKP),
the attestation keys may run out or be unavailable for attesting
a newly-generated key. This could happen when:
* the device first connects to the Internet
* The device had all the keys used and:
 ** It hadn't yet completed obtaining new ones.
 ** The RKP server declines to issue new keys.

In these cases, the caller must be informed that their key generation
request failed (likely temporarily), and that they should retry it.

The retry policy returned tells the caller when to re-try.
Bug: 227306369
Test: atest android.keystore.cts.KeyStoreExceptionTest

Merged-In: Ief30a3ab97da95b68d172e725c38acbefab92fa9
Change-Id: I0b2619fcbcb3ac4d94ed85f3ce5934e015c0828c
2022-03-31 11:06:30 +01:00
Eran Messeri
3875cf7e0c Curve 25519: Support use via Android Keystore provider (part 1)
Ensure that the user gets an accurate error message when they try to
generate Curve 25519 keys according to JEP 324
(https://openjdk.java.net/jeps/324).

Android Keystore requires every key to have a name, so it is not
possible to generate a key using NamedParameterSpec only (with a
KeyPairGenerator).

Support this and throw an exception to the caller indicating how they
_can_ generate keys with this curve.

Bug: 222440855
Bug: 195309719
Bug: 194359292
Test: atest android.keystore.cts.KeyFactoryTest android.keystore.cts.Curve25519Test
Test: atest CtsLibcoreTestCases:libcore.java.security.ProviderTest
Change-Id: I5aa163f177507906c6482d079eb6cb55d93accf7
2022-03-09 13:07:52 +00:00
Eran Messeri
259ca1ec61 Do not register Curve25519 as a key factory directly
Do not register Curve 25519 algorithms as key factories, until we fix
the registration to be in compliance with JEP 324.

Bug: 222440855
Bug: 222194540
Test: atest android.keystore.cts.Curve25519Test android.keystore.cts.KeyFactoryTest#testAlgorithmList CtsLibcoreTestCases:libcore.java.security.ProviderTest#test_Provider_getServices
Merged-In: Ibd53070a890955affaff5e4e7213892afd423db7
Change-Id: I11b3574aeff54b3eb8bf496c4c14aa1338629ce5
2022-03-09 11:03:12 +00:00
Eran Messeri
5deebdd570 Keystore: Support Curve 25519 in the SPI layer
Add support for Curve 25519 in the public API.
This requires upgrading the keymint dependency to V2.

Note that this CL only passes tha tags to Keystore,
but does not yet let the caller use the generated keys
because of missing Conscrypt classes.

Bug: 194359292
Test: atest android.keystore.cts.Curve25519Test
Change-Id: I15223abec34b72c857e26fcc47d8ecf08c1f8c8d
2022-03-01 15:00:19 +00:00
Seth Moore
c78e369c4c Fix incorrect SID matching for bio prompts
The default value for canUnlockViaBiometrics, which determines if we
are able to show a bio prompt, is true. However, if there are 0
biometric authenticator IDs, then it's impossible for the user to
satisfy a bio prompt. In this case, we should set canUnlockViaBiometrics
to false.

The loop that is normally expected to invert canUnlockViaBiometrics was
never run in the case of 0 bio authenticator ids, so we mistakenly
let the crypto init operation succeed when we should have blocked it.

Bug: 188864794
Test: Manual, using sample app that displays a biometric prompt.
Change-Id: Ib95b0564aa098157718b8d4a45b11baa69dad71b
2021-12-01 14:59:24 -08:00
Treehugger Robot
70e7dd44b4 Merge changes Ic6e60752,I2b8b7e74
* changes:
  Test for contract between AndroidKeyStoreKey hash and equals.
  Keystore 2.0 SPI: Fix contract between equals and hashCode 2
2021-10-08 15:31:03 +00:00
Janis Danisevskis
5fe5f2def0 Test for contract between AndroidKeyStoreKey hash and equals.
Test: atest KeystoreTests
Bug: 196118021

Merged-In: Ic6e60752faa986debe3d325f54242cffaa03b336
Change-Id: Ic6e60752faa986debe3d325f54242cffaa03b336
2021-10-07 16:39:39 -07:00
Janis Danisevskis
e36fe6bf46 Keystore 2.0 SPI: Fix contract between equals and hashCode 2
This fixes the contract between equals and hashCode in
AndroidKeystorePublicKey. The previous fix made only a reference
comparisson between certificate blobs. In this patch java.util.Arrays is
used to compare and compute the hash of the array.

Bug: 196118021
Test: See following CL.
Change-Id: I2b8b7e740fb377de39fd21f763e15cb00024b2fc
2021-10-07 16:24:46 -07:00
Janis Danisevskis
4ff6274fa7 Keystore 2.0 SPI: Fix NullPointerException in setKeyEntry.
Fix a NullPointerException when trying to insert SecretKey that already
exists.

Bug: 202146009
Test: atest android.keystore.cts.AndroidKeyStoreTest#testKeyStore_SetKeyEntry_ReplacedWithSameGeneratedSecretKey
Change-Id: If3a4bd6677ab3173c5c1a7c921ba567b7981662b
2021-10-07 08:24:42 -07:00
Seth Moore
11cce949b6 Fix key alias string comparison
The code was doing a reference compare, not object value comparison,
resulting in failures in the KeyStore setEntry API.

Test: CtsKeystoreTestCases:android.keystore.cts.AndroidKeyStoreTest
Fixes: 197138784
Change-Id: I2c5e47283eed5694951869e9ea3853364ddef9d1
2021-08-19 12:44:08 -07:00
Janis Danisevskis
7bdc12d5f3 Keystore 2.0 SPI: Fix contract between equals and hashCode
This fixes the contract between equals and hashCode in
AndroidKeystoreKey and AndroidKeystorePublicKey.

Bug: 196118021
Test: N/A
Change-Id: I3f7e6d72d53c7051c13daeb5aa6ce1abf4eb0cc5
2021-08-12 12:29:02 -07:00
Janis Danisevskis
f5985b0838 Keystore 2.0 SPI: Add EC_CURVE tag on key generation.
The KeyMint spec requires the specification of the EC_CURVE tag when
generating an EC key. This patch adds the correct curve tag parameter to
the parameter list.

Test: CtsVerifier Protected confirmation test.
Bug: 192908276
Merged-In: I2e7dd4868abda85d244e73592ff12d688f5c21fc
Change-Id: I2e7dd4868abda85d244e73592ff12d688f5c21fc
2021-07-08 10:00:22 -07:00
Max Bires
5023e1fb96 Merge "Fixing the race condition in GenerateRkpKey" 2021-07-01 14:20:37 +00:00
Victor Chang
507a653a6e Update the java doc of AndroidKeyStoreProvider#getKeyStoreOperationHandle to support Signature object
Test: m droid
Change-Id: Ie65dcfe96f3bb00cc9af4d49e4e1d1f57bde438a
2021-06-16 15:57:44 +01:00
Max Bires
5e43390b9b Fixing the race condition in GenerateRkpKey
This file was written on the assumption that bindService was
synchronous, which it isn't. This change adds a CountDownLatch to force
the class to wait for the binding to finish. If the relevant key
generation service is not present on the system, then this
functionality will just silently be skipped over.

Bug: 190222116
Test: atest RemoteProvisionerUnitTests
Change-Id: Ie34997a08aa743642c66a20c4b756cd47bff4af1
Merged-In: Ie34997a08aa743642c66a20c4b756cd47bff4af1
2021-06-13 21:50:36 +00:00
Max Bires
b2a11d35e5 Revert "Fixing the race condition in GenerateRkpKey"
This reverts commit 0f62195535.

Reason for revert: Breaks non-RKP systems

Bug: 190222116
Change-Id: I7e31a3045caa7b8bb0e34c8d1e266c104a627324
Merged-In: I7e31a3045caa7b8bb0e34c8d1e266c104a627324
2021-06-09 20:21:41 +00:00
Max Bires
0f62195535 Fixing the race condition in GenerateRkpKey
This file was written on the assumption that bindService was
synchronous, which it isn't. This change adds a CountDownLatch to force
the class to wait for the binding to finish.

Bug: 190222116
Test: atest RemoteProvisionerUnitTests
Change-Id: I917a61da612f21f9a0f783bea5d24270d4e1db42
Merged-In: I917a61da612f21f9a0f783bea5d24270d4e1db42
2021-06-07 18:30:51 +00:00
Joshua Duong
3b2decbb34 Merge "Use keymasterSwEnforcedUserAuthenticators if keymasterHwEnforcedUserAuthenticators is zero." 2021-05-13 20:16:08 +00:00
Janis Danisevskis
738e422b00 Keystore 2.0 SPI: Fix NPE in getUniqueAliases.
getUniqueAliases may return a null if an error occurred. This would lead
to a NPE in engineAliases.

This patch makes getUniqueAliases return an empty HashSet instead.

Test: atest KeystoreTests

Change-Id: I387d90ea851a8b9c18bb2b20d1a0bfc1ab76c99f
2021-05-12 17:29:26 -07:00
Joshua Duong
299345bb8e Use keymasterSwEnforcedUserAuthenticators if keymasterHwEnforcedUserAuthenticators is zero.
Bug: 186562600

Test: atest android.appsecurity.cts.AuthBoundKeyTest#useInvalidatedAuthBoundKey
Change-Id: I52a9c04b3e000416fb141d90d8d1f034348499de
2021-05-12 08:30:05 -07:00
Treehugger Robot
06df6d84eb Merge "Keystore 2.0 SPI: Fix engineDoFinal with null input." 2021-04-23 17:53:34 +00:00
Janis Danisevskis
70cf430ede Keystore 2.0 SPI: Fix engineDoFinal with null input.
AndroidKeyStoreCipherSpiBase.engineDoFinal may get called with a null
input argument. In the case where we forward the operation to the
default provider doFinal() needs to be called instead of
doFinal(byte[], int, int).

Bug: 183913233
Test: atest android.keystore.cts.CipherTest#testEncryptsAndDecryptsUsingCipherStreams
Change-Id: Ia3afaf281be7c8e5493ac8e4155a7aa02d1d37f0
2021-04-22 14:55:45 +00:00
Nikita Iashchenko
1bc8a1f886 Remove usage of Math.randomLongInternal
As a part of internal libcore API cleanup some of the functions
previously exposed are getting removed from public surface.
Math#randomLongInternal is a wrapper around java.util.Random and has no
specific implications so its usages are get refactored.

Bug: 154796679
Test: m droid
Change-Id: I29e0e9307fbaf9c1ac018b83014efb2d3dd74479
2021-04-21 14:10:43 +00:00
Janis Danisevskis
464e6c415f Keystore 2.0 SPI: Make getAttestationIds return an empty array.
getAttestationIds shall return an empty array instead of null.

Bug: 184026478
Test: N/A
Change-Id: I6c6233fa50a83cf7d6354d2783525704a3b39d0d
2021-04-07 14:38:57 -07:00
Janis Danisevskis
a6dcf091f5 Keystore 2.0: Remove Keystore 1.0 SPI with all remaining references
Bug: 171305684
Test: CtsKeystoreTestCases
Change-Id: I337515dadc9e45b909bff058d4e13371b4fa843c
2021-04-01 17:06:41 -07:00
Max Bires
e7f48b9926 Merge "Adding AIDL and functions for talking to RemoteProvisioner" 2021-03-25 00:03:09 +00:00
Max Bires
7fd458dc44 Adding AIDL and functions for talking to RemoteProvisioner
This change adds an AIDL interface which the RemoteProvisioner app
implements that allows the keystore SPI to inform the app when an
attestation key may have been used, and when the underlying attestation
key pool is totally empty. The former is a non-blocking call, and the
latter blocks until completion.

Since the latter involves network, there are timeouts involved on the
app side to ensure that the blocking call doesn't hang indefinitely if
there's no network.

Test: atest CtsKeystoreTestCases && atest RemoteProvisionerUnitTests

Change-Id: Ie49e37659c96ce5c1626d1b99a4a7ccc62028156
2021-03-24 01:13:10 -07:00
Janis Danisevskis
68570cc5a7 Keystore 2.0: Add @IntDef for Keystore namespaces.
Bug: 182914789
Test: N/A
Change-Id: Ibdfd2a4a37d7200317ef449ef857f34401625237
2021-03-22 17:43:32 -07:00
Janis Danisevskis
8758b2ceaf Keystore 2.0: Fix infinit recursion.
Fix endless recursion when Cipher is initialized with
AndroidKeyStorePrivateKey.

Fixes: 183167349
Test: atest android.keystore.cts.AndroidKeyStoreTest#testKeyStore_Encrypting_RSA_NONE_NOPADDING
Change-Id: I5b4166fb1a4e298072f7156ba61a64966e86dc53
2021-03-19 08:09:34 +00:00
Treehugger Robot
be1b1d5550 Merge "Keystore 2.0: Fix diagnosing invalid key in CipherSpiBase." 2021-03-18 23:46:37 +00:00
Janis Danisevskis
0b66a19bdd Keystore 2.0: No longer install the legacy provider.
The legacy provider is obsolete now that all calling code has
been fixed.

Bug: 183100147
Bug: 183093711
Bug: 171305684
Test: N/A
Merged-In: I0d71d3c9cdd586a508827eb26120c872cb8643ea
Change-Id: I0d71d3c9cdd586a508827eb26120c872cb8643ea
2021-03-18 20:24:39 +00:00