summaryrefslogtreecommitdiffstats
path: root/keystore/java/android/security/keystore/KeyStoreCryptoOperationChunkedStreamer.java
Commit message (Collapse)AuthorAgeFilesLines
* KM module may consume less input than provided by finish time.Alex Klyubin2015-07-161-23/+71
| | | | | | | | | | | | | Keymaster1 HAL permits the implementation of "update" operation to leave some input unconsumed by the time "finish" operation neeeds to be invoked. This needs to be treated as "invalid input" error rather than a "can't happen" exception. This CL was confirmed to fix the issue by the vendor who encountered the issue. Bug: 22512100 Change-Id: Ibb1a37d58f650d03605612559a154ce2416d147c
* Make NONEwithECDSA truncate input when necessary.Alex Klyubin2015-06-241-8/+8
| | | | | | | | | | | | | | | | | | 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
* Expose AES GCM backed by Android Keystore.Alex Klyubin2015-06-171-9/+27
| | | | | | Bug: 18088752 Bug: 21786749 Change-Id: Ica90491037d2920f7635195894ba18882fc4406d
* Obtain entropy later in crypto operations, when possible.Alex Klyubin2015-06-121-7/+7
| | | | | | | | | | 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
* Expose RSA Cipher from Android Keystore Provider.Alex Klyubin2015-06-031-8/+9
| | | | | | | | | The RSA Cipher supports OAEPPadding, PKCS1Padding and NoPadding padding schemes. Bug: 18088752 Bug: 20912868 Change-Id: Ie050e12705bb553a402760a1d253fdb2247a1d50
* Move Android Keystore impl to android.security.keystore.Alex Klyubin2015-05-131-0/+274
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