History log of /frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3876b1be27e3aefde9a72eb2e4f856e94fc5f946 09-Sep-2015 Alex Klyubin <klyubin@google.com> Support cross-UID access from AndroidKeyStore.

This is meant for exposing the pre-existing cross-UID access to keys
backed by the keystore service via higher-level JCA API. For example,
this lets system_server use Wi-Fi or VPN UID keys via JCA API.

To obtain a JCA AndroidKeyStore KeyStore for another UID, use the
hidden system API AndroidKeyStoreProvider.getKeyStoreForUid(uid).

To generate a key owned by another UID, invoke setUid(uid) on
KeyGenParameterSpec.Builder.

This CL does not change the security policy, such as which UID can
access/modify which UIDs' keys. The policy is that only certain system
UIDs are permitted to access keys of certain other system UIDs.

Bug: 23978113
Change-Id: Ie381530f41dc41c50d52f675fb9e68bc87c006de
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
d23dc502b0a1952887d4453cba98aa2e3d2f5009 24-Jun-2015 Alex Klyubin <klyubin@google.com> Make NONEwithECDSA truncate input when necessary.

Keymaster's implementation of ECDSA with digest NONE rejects input
longer than group size in bytes. RI's NONEwithECDSA accepts inputs
of arbitrary length by truncating them to the above size. This CL
makes Android Keystore's NONEwithECDSA do the truncation to keep
the JCA and Keymaster happy.

The change is inside AndroidKeyStoreECDSASignatureSpi$NONE. All other
small modifications are for supporting that change by making it
possible for AndroidKeyStoreSignatureSpiBase to pass in the signature
being verified into KeyStoreCryptoOperationStreamer. This in turn is
needed to make it possible for NONEwithECDSA implementation to provide
a wrapper streamer which truncates input.

Bug: 22030217
Change-Id: I26064f6df37ef8c631d70a36a356aa0b76a9ad29
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
ae6cb7aad56bb006769cd8a69b92af7236644fc1 23-Jun-2015 Alex Klyubin <klyubin@google.com> Keymaster INT, LONG and DATE tag values are unsigned.

This CL ensures that Android Keystore framework code complies with
signedness of keymaster tags. In particular:
* INT tags are unsigned 32-bit numbers, and
* LONG and DATE tags are unsigned 64-bit numbers.

The ensure compliance, KeymasterArguments and KeyCharacteristics
classes through which Android Keystore interacts with Keymaster tags
have been modified as follows:
* ENUM and INT tags which used to be conflated are now added/queried
via separate methods, because ENUM can remain represented as an int
data type whereas INT is now represented as a long data type with
permitted range being [0; 2^32).
* Methods for adding/quering LONG tags have been switched from the long
data type to the BigInteger data type and now ensure that the value
is in the permitted [0; 2^63).
* Methods for adding/querying DATE tags now ensure the Date value is
in the permitted range [0; 2^63) ms since Unix epoch.
* Methods for adding tags throw an IllegalArgumentException if the tag
type is unsuitable for the method. This is to ensure that tags with
invalid values cannot be added through similar methods (e.g., INT tag
added via an ENUM tag addition method invoked with a negative value).

Bug: 22008538
Change-Id: I6eefd5cbb561cc52d27de952691af4d9d5e1af1e
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
a72b55195c23fc06d1600efe8f6aac85290c7f8f 12-Jun-2015 Alex Klyubin <klyubin@google.com> Obtain entropy later in crypto operations, when possible.

This makes Android Keystore crypto operations defer pulling entropy
from provided SecureRandom until KeyStore.finish, where appropriate.
Such as when performing asymmetric encryption or generating
signatures.

Bug: 18088752
Change-Id: I4a897754e9a846214cf0995c5514f98cf0edd76b
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
966486e134c901ea61195b352fdd81476b3639b4 01-Jun-2015 Chad Brubaker <cbrubaker@google.com> Track changes to the keystore binder API

Output parameters are gone from begin, instead they will returned in the
OperationResult and begin, update, and finish may return output
parameters.

Change-Id: I072afeb6c65f6c512b40603824c25686ac44e7c8
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
96d7245c00be386355ec583ac980b024b223218b 29-May-2015 Alex Klyubin <klyubin@google.com> Cleanup Binder token resetting.

This is a follow-up to 7cbcfd4fc1e538bd391a20cdd00dd1494ace2d0e where
during the review it was pointed out that the code could be
streamlined.

Bug: 18088752
Change-Id: Iecb9fdbc31a0f3cdcb94ddb1b3e7e12a0543a231
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java
dcdaf87ed0aa99073638bcfe645949f130f0c7ad 14-May-2015 Alex Klyubin <klyubin@google.com> Move Android Keystore impl to android.security.keystore.

This moves the non-public API classes backing Android Keystore from
android.security to android.security.keystore, a package specially
created for Android Keystore.

Bug: 18088752
Change-Id: Ibf04d6a26c54d310b0501fc5e34f37b1176324ad
/frameworks/base/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java