summaryrefslogtreecommitdiffstats
path: root/keystore/java/android/security/KeymasterUtils.java
Commit message (Collapse)AuthorAgeFilesLines
* Use JCA names for block modes, paddings, and digests.Alex Klyubin2015-04-131-22/+301
| | | | | | | | | | | | | | | 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
* Rename KeymasterException to KeyStoreException.Alex Klyubin2015-04-021-31/+0
| | | | | | | | | | | | The code in question talks to KeyStore which returns error codes which are a mix of keystore and keymaster error codes. To better match the layering of KeyStore on top of keystore and keymaster, this CL renames KeymasterException into KeyStoreException. It also adds human-readable error messages to exceptions raised by keystore rather than keymaster (e.g., key not found). Bug: 18088752 Change-Id: I4cd1235e16518c9f2e8c5557a457774c6e687b88
* Add exception types for AndroidKeyStore key validity issues.Alex Klyubin2015-04-011-0/+4
| | | | | Bug: 18088752 Change-Id: I7494cb6a793e2b57bb849a4253bba2803778c161
* Hook in user authenticators and their exceptions.Alex Klyubin2015-03-311-1/+14
| | | | | Bug: 18088752 Change-Id: I2835dbe51d09587a3081597c6aaf536aa1427e24
* Add license banner to recently added AndroidKeyStore files.Alex Klyubin2015-03-311-0/+16
| | | | | Bug: 18088752 Change-Id: I027f9530a02cca081aae8eb94833d2fdcb678e9a
* Add SecretKeyFactory backed by AndroidKeyStore.Alex Klyubin2015-03-311-0/+38
| | | | | | | | | | | | | | | | This factory provides a way to obtain information about a SecretKey backed by AndroidKeyStore. The information is provided in a form of an instance of KeyStoreKeySpec class. EXAMPLE SecretKeyFactory factory = SecretKeyFactory.getInstance( key.getAlgorithm(), "AndroidKeyStore"); KeyStoreKeySpec keySpec = factory.getKeySpec(key, KeyStoreKeySpec.class); Bug: 18088752 Change-Id: I26c9dd544f80230fe7039501eeb471eaf875452b
* Add HmacSHA256 backed by AndroidKeyStore.Alex Klyubin2015-03-301-2/+4
| | | | | | | | 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
* Symmetric key generation for AndroidKeyStore.Alex Klyubin2015-03-271-0/+21
This currently supports AES and HMAC with SHA-256. Bug: 18088752 Change-Id: Ife55438cf4129b895295681bb35091cd37eb73fb