summaryrefslogtreecommitdiff
path: root/android_keymaster_test_utils.h
AgeCommit message (Collapse)Author
2016-01-27Add attestation support to SoftKeymaster.Shawn Willden
Bug: 22914603 Change-Id: I7650f1b691665bce3024556c2ea38e122c9cb2cf
2016-01-26Update unit tests to use keymaster2 interface.Shawn Willden
We no longer test the keymaster1 interface. That's okay, because it will be gone shortly. Change-Id: Id30c2fcda5d535165a0081a783b2252c112e5474
2015-11-25Fix pass-through of deletion on wrapped KM0 and KM1.Shawn Willden
SoftKeymasterDevice was incorrectly directly sending deletion requests to wrapped hardware. In some cases the key blob passed in by SoftKeymasterDevice is a hardware blob encapsulated by a wrapper, and we need to remove the encapsulation before passing it on. Bug: 25676862 Change-Id: Ic315c6b08d9ec15aa0be8f28f485a221bc7f1135
2015-08-13Do digesting, and sometimes padding, in SW when HW doesnt.Shawn Willden
The keymaster1 specification only requires HW modules to implement SHA256 out of the list of keymaster1 digest modes. That would force many keys to be software only, and would break legacy scenarios. This change uses SoftKeymasterDevice to front keymaster modules that don't implement the full suite of digests, quietly inserting KM_DIGEST_NONE and KM_PAD_NONE into key generation/import requests when necessary, then performing the digesting, and sometimes padding, in software, then delegating crypto operations to the hardware. This is only done for RSA and EC keys. Software digesting isn't possible for HMAC or AES-GCM keys. Note that this is not the complete fix for the bug. Some changes in keystore are also required, coming in another CL. Bug: 22529223 Change-Id: I740572eb11341fb0659085309da01d5cbcd3854d
2015-07-16Add support for KM_TAG_MIN_MAC_LENGTH.Shawn Willden
HMAC and AES-GCM keys must be bound to a mininum MAC/tag length at creation, and operations may not specify a length smaller than the minimum, or provide a length smaller than the minimum during verification. Bug: 22337277 Change-Id: Id5ae2f4259045ba1418c28e9de8f4a47e67fd433
2015-06-24Rename keymaster tag types to clarify that integers are unsigned.Shawn Willden
Bug: 22008538 Change-Id: I096cd977b34e9767845aaeece2da5f04c7fc86fe
2015-06-22Require and handle digest for OAEP mode.Shawn Willden
Bug: 21998286 Change-Id: I03b21da6a71b7a7a01f3743f01925719191b0124
2015-06-03Fix support of HW keymaster0 keys.Shawn Willden
Bug: 21593823 Change-Id: Id9ed06b1c6805b1cff36577910715eda7727eef4
2015-06-03Add AES-GCM mode.Shawn Willden
Bug: 19919114 Change-Id: I27efed097efbd93d587a50f5d82fad80a96e7527
2015-05-28Delegate ECDSA keys to keymaster0 in SoftKeymasterDevice.Shawn Willden
Bug: 20912868 Change-Id: If63899e3244aed45d939d0165e6d94a1caa9d220
2015-05-28Delegate RSA keys to keymaster0 in SoftKeymasterDevice.Shawn Willden
Bug: 20912868 Change-Id: I515a125f1247357d2cd9b4633c3b223590848093
2015-05-26Make Keymaster1Test parameterizable.Shawn Willden
This enabled running the same test suite across different implementations. Bug: 20912868 Change-Id: Iaa2c4bcb38224d090aa54184a042375eb835ad60
2015-05-18Remove references to Google in Android keymaster reference implementation.Shawn Willden
Change-Id: I05de61353fc806b90232fab7c1d1cf76aefa35fc