summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStoreKeyProperties.java
AgeCommit message (Collapse)Author
2015-05-13New AndroidKeyStore API in android.security.keystore.Alex Klyubin
This CL addresses the comments from API Council about Android KeyStore KeyPairGeneratorSpec, KeyGeneratorSpec and KeyStoreParameter: 1. These abstractions should not take or hold references to Context. 2. The Builders of these abstractions should take all mandatory parameters in their constructors rather than expose them as setters -- only optional paratemers should be exposed via setters. These comments cannot be addressed without deprecation in the already launched KeyPairGeneratorSpec and KeyStoreParameter. Instead of deprecating just the getContext methods and Builder constructors, this CL goes for the nuclear option of deprecating KeyPairGeneratorSpec and KeyStoreParameter as a whole and exposing all of the AndroidKeyStore API in the new package android.security.keystore. This enables this CL to correct all of the accrued design issues with KeyPairGeneratorSpec (e.g., naming of certificate-related methods) and KeyStoreParameter. This also makes the transition to API Level M more clear for existing users of the AndroidKeyStore API. These users will only have to deal with the new always-mandatory parameters (e.g., purposes) and sometimes-mandatory (e.g., digests, block modes, paddings) if they switch to the new API. Prior to this CL they would've had to deal with this if they invoked any of the new methods of KeyPairGeneratorSpec or KeyStoreParameter introduced in API Level M. This CL rips out all the new API introduced into KeyPairGeneratorSpec and KeyStoreParameter classes for Android M, thus reverting these classes to the API launched in L MR1. This is because the new API is now in android.security.keystore.KeyGenParameterSpec and KeyProtection respectively. Bug: 21039983 Change-Id: I59672b3c6ef7bc25c40aa85f1c47d9d8a05d627c
2015-05-12Flatten KeyStoreKeyProperties constants.Alex Klyubin
This moves constants/flags declared in inner classes of KeyStoreKeyProperties into KeyStoreKeyProperties, as requested by API Council. Bug: 21039983 Change-Id: I84a3c983e13644a027bed9f605ab8044220a352c
2015-05-12Merge "Hide @IntDef and @StringDef annotations from AnroidKeyStore API." ↵Alex Klyubin
into mnc-dev
2015-05-12Hide @IntDef and @StringDef annotations from AnroidKeyStore API.Alex Klyubin
By convention, these annotation classes should remain hidden API. Bug: 18088752 Bug: 21039983 Change-Id: Ifb5d2910c7dae4e0fd809876eb641f1aaf7a00a6
2015-05-11Add NonNull and Nullable annotations to AndroidKeyStore API.Alex Klyubin
This is to enable Android Lint and Android Studio to flag nullness issues at compile time. Bug: 18088752 Change-Id: I21033b8fcdd989d08c89b50685e47fbb9c74acbf
2015-05-08Replace "TEE" with "secure hardware".Alex Klyubin
This is to make the Android KeyStore API more generic. Bug: 18088752 Change-Id: I18bcc96db4af17127e5dc038becc9deb85bb48aa
2015-05-06Define String constants for AndroidKeyStore crypto.Alex Klyubin
This defines the String enum values based on JCA standard names for key algorithm, block mode, padding schemes, and digests. This should make it safer to interact with AndroidKeyStore code that uses JCA strings. This was requested by API Council. Bug: 18088752 Change-Id: I241d9225a13b85479d0a84e49d0a98cbc77e5817
2015-04-28Align AndroidKeyStore API with user auth API.Alex Klyubin
This simplifies the AndroidKeyStore API around user authentication: no more explicit control over which user authenticators are bound to which keys. User-authenticated keys with timeout are unlocked by whatever unlocks the secure lock screen (currently, password/PIN/pattern or fingerprint). User-authenticated keys that need authentication for every use are unlocked by fingerprint only. Bug: 20526234 Bug: 20642549 Change-Id: I1e5e6c988f32657d820797ad5696797477a9ebe9
2015-04-16Unhide KeyStoreKeyProperties.Origin.UNKNOWN.Alex Klyubin
Bug: 18088752 Change-Id: Idaed45d7e84f5f3eb4f623552b60206c504e967a
2015-04-16am b1aa7d0b: am 51884f0e: am 499126c4: Merge "Add Keymaster ↵Alex Klyubin
KM_ORIGIN_UNKNOWN constant." * commit 'b1aa7d0bc821614d943075c0d786cc3f5eeb8c73': Add Keymaster KM_ORIGIN_UNKNOWN constant.
2015-04-14Add Keymaster KM_ORIGIN_UNKNOWN constant.Alex Klyubin
This tracks d359b044830b292f492f8a8df5471f869e358399 from hardware/libhardware. Bug: 18088752 Change-Id: I9a7bd8bdee51c18ae0427eff4efe036213d2b175
2015-04-13Unhide the new AndroidKeyStore API.Alex Klyubin
Bug: 18088752 Change-Id: I93f87cbb1cd04a4a2e34f3d544d678c92cf052ee
2015-04-13resolved conflicts for merge of a978a3d6 to masterAlex Klyubin
Change-Id: Ifd7ca9e1dfa0d50a87f2bafef377fcaeb5d9f6d5
2015-04-13Use JCA names for block modes, paddings, and digests.Alex Klyubin
This replaces int-based enums from KeyStoreKeyConstraints with String values commonly used in JCA API. As part of under the hood refactoring: * KeyStoreKeyCharacteristics and KeyStoreKeyConstraints have been merged into KeyStoreKeyProperties. * KeymasterUtils methods operating on KeymasterArguments and KeymasterCharacteristics have been moved to their respective classes. Bug: 18088752 Change-Id: I9c8b984cb3c28184adb617e34d87f2837bd1d3a1