History log of /system/keymaster/hmac_operation.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cb647fec03f71929fd316d2b8f0750f7b24824f3 27-Jan-2016 Shawn Willden <swillden@google.com> Support input to "finish()" in AndroidKeymaster operations.

This CL does not yet take advantage of the simplifications that allowing
input to finish() provides. That will require updating the Java layer
first, to remove some assumptions and code that assume update() must
eventually consume all input.

Change-Id: Ie85896027a1d55ddec06750d19addbb1f5e462c8
/system/keymaster/hmac_operation.cpp
33ab0389e908b98702806c746e7babc0d46eb452 08-Jul-2015 Shawn Willden <swillden@google.com> Add support for KM_TAG_MIN_MAC_LENGTH.

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
/system/keymaster/hmac_operation.cpp
ebc99a15e324d9f1cfaf681a8c95676984f16f08 26-Jun-2015 Shawn Willden <swillden@google.com> Support creation and use of HMAC keys with KM_DIGEST_NONE

KM_DIGEST_NONE should mean "any digest" when applied to HMAC keys,
allowing any valid digest to be specified during begin() of an HMAC
signature or verification operation.

Bug: 22119295
Change-Id: I4698435f5d7aaf0a2f66b9c7aa4097f60c9c6eb3
/system/keymaster/hmac_operation.cpp
0f906ec40f6ade7955c6b967ea522aade54ea2e4 20-Jun-2015 Shawn Willden <swillden@google.com> Add buffer wrap checks and disable throwing of std::bad_alloc.

Android is built with exceptions disabled, but "operator new" and
"operator new[]" still throw std::bad_alloc on failure rather than
returning new. In general this is a good thing, because it will cause
an immediate crash of the process rather than assigning a null pointer
which is probably not checked. But most memory allocations in Keymaster
are checked, because it's written to run in an environment where new
does *not* throw. This CL updates the code to explicitly use the
non-throwing new.

A handful of throwing news remain, but only in places where a crash on
failure is appropriate.

In addition, this CL also inserts buffer wrap checks in key locations
and changes the development-machine Makefile to build in 32-bit mode, to
make memory problems more apparent.

Bug: 21888473
Change-Id: I8ebc5ec12053e4f5274f6f57ce312abc10611cef
/system/keymaster/hmac_operation.cpp
ded8e7d0ad241fc0a930dbebbd9f2e2bf4e929a2 01-Jun-2015 Shawn Willden <swillden@google.com> Pass output params down to operations.

Change-Id: Ibd6956f6b8ef42f272d922050a7e5da3d78cffb7
/system/keymaster/hmac_operation.cpp
0629810b145187575bc26c910dded0d24c64569d 26-May-2015 Shawn Willden <swillden@google.com> Another refactor, deleting AbstractFactoryRegistry.

I should have known better than to make these singletons to begin
with. Globals create problems. This undoes that mistake.

Change-Id: Idf61d5f72e3c34b5c4ddb27cc94b05f506561743
/system/keymaster/hmac_operation.cpp
c3326552d973ce34f0f3138333a05a4a1865a699 28-Apr-2015 Adam Langley <agl@google.com> keymaster: support building with tip-of-tree BoringSSL.

Change-Id: Ie9bcbcb33f7904fbffef9dee4f5b4203b1d8f888
(cherry picked from commit b17720bd6675de8d3925ea7fb2ea5c7a8f773ac4)
/system/keymaster/hmac_operation.cpp
226746bfb5f79857145d5f3ebdfd6f49b6c114ac 08-May-2015 Shawn Willden <swillden@google.com> Enforce digest specifications.

Bug: 20917242, 19509156
Change-Id: I5b3509bea78754192f0d5e2a76de24621fc43621
/system/keymaster/hmac_operation.cpp
d79791b0c7123b3fc5db61a0805d7593f19ca8d9 09-May-2015 Shawn Willden <swillden@google.com> Revert "Remove compatibility with OpenSSL."

This created a build breakage in Trusty, and so was reverted in AOSP. Reverting here to sync.

This reverts commit de4ffa99837df492faca1ded33b14446c4a5c9be.

Change-Id: I80ffcb8f432e4af849aae49f40d313dd475d47fc
/system/keymaster/hmac_operation.cpp
de4ffa99837df492faca1ded33b14446c4a5c9be 05-May-2015 Shawn Willden <swillden@google.com> Remove compatibility with OpenSSL.

Android has switched from OpenSSL to BoringSSL. There were various
accommodations in the code for supporting both, but coming changes make
maintaining that support more difficult than it's worth, I'm abandoning
OpenSSL.

Change-Id: I9203c0215537c7f7aa2a89859ea52ff0f0582a9e
(cherry picked from commit 9011d1ae960beb29ba50634813c28892e738aac7)
/system/keymaster/hmac_operation.cpp
0c60f6f3f9f76819c7004c4c0c1da28b5c02c452 28-Apr-2015 Shawn Willden <swillden@google.com> Fix interpretation of KM_TAG_MAC_LENGTH in HmacOperation.

Bug: 19991862
Change-Id: If4f52c83eed7f4021c1eaaaa0168df5602da46a0
/system/keymaster/hmac_operation.cpp
09f25270e27ed7b04be6a557c8fe6482d882e7d1 15-Apr-2015 Shawn Willden <swillden@google.com> Make HMAC operations use MAC length specified at operation time.

MAC length is no longer associated with a key, but specified for each
operation.

Bug: 19991862
Change-Id: I2c4389a0ab8b68b6f3a9464063d4422caa81d9b7
/system/keymaster/hmac_operation.cpp
3ed6d06a378c29deacb1fb9cc33b599b309c3a52 15-Apr-2015 Shawn Willden <swillden@google.com> Add begin_params to CreationOperation.

Allowing several crypto parameters to be repeated on keys means we need
to be able to specify them at operation time, which means they'll be
passed in to the begin() params. This change makes it possible for
operations to actually receive these values.

Bug: 19509156
Change-Id: I4504f5206d93ce3040b6a5a8d8dacb5b08eb2b90
/system/keymaster/hmac_operation.cpp
60eebdc0b92724cd550aeba92d124cd50c4db5ae 26-Mar-2015 Thai Duong <thaidn@google.com> ECIES: fix memory leaks and add malloc checks in HKDF. Use fixed-timing
memcmp in HmacOperation.

Change-Id: Ia059730ae31976a684f957c6dcc8c975c06f05a5
/system/keymaster/hmac_operation.cpp
f01329d8692edde9a9ffb88f29f5d684eab481e2 12-Mar-2015 Shawn Willden <swillden@google.com> Improve error reporting and logging.

Bug: 19603049
Bug: 19509317
Change-Id: I041c973802e6c567adc5b1f280fc5bac27ba28d6
/system/keymaster/hmac_operation.cpp
51d5e0e6be1d77b06715028abbc42211411cf671 18-Dec-2014 Shawn Willden <swillden@google.com> Support HMAC_SHA1, and update supported* API.

Also add some more tests.

Change-Id: I11d02b5e0d207d5afc550adc5df45fd238e64a00
/system/keymaster/hmac_operation.cpp
567a4a04f43d35b785d50508e6459b01f2ab4d14 31-Dec-2014 Shawn Willden <swillden@google.com> Switch to using global logger

Change-Id: I7af02342320a9a431cd9845baaf5dbcf61d460c2
/system/keymaster/hmac_operation.cpp
63ac043f81f8e2a15bbadcb6628b92096295ab6a 29-Dec-2014 Shawn Willden <swillden@google.com> Refactor operation creation to use an operation factory registry.

Also modify GoogleKeymaster to query the operation factories to get
lists of supported modes and digests.

Change-Id: Ied30185df5dddaeaeb1106df63237757896d77db
/system/keymaster/hmac_operation.cpp
6bfbff0020bb964a736e30d717b338e3e3973a36 07-Feb-2015 Shawn Willden <swillden@google.com> Add additional params to update and finish operations.

Change-Id: I78a81b1ceb47a2abb189da4b0446800a56ec88c3
/system/keymaster/hmac_operation.cpp
111edb3bf8c51be9ffa3bb2454085f0b300c1e7a 06-Feb-2015 Shawn Willden <swillden@google.com> Add input & output params to begin operations.

This is in preparation for handling IV/nonce values via params rather
than prepended to ciphertext.

Change-Id: I657a029eaf66c2218c3f7cc149e86e9d01c41be0
/system/keymaster/hmac_operation.cpp
a550fba3d26d878873956f128de7607ff4cc96e4 13-Feb-2015 Adam Langley <agl@google.com> More fixes for BoringSSL compilation.

EC_GROUP_set_point_conversion_form has been removed in BoringSSL because
it didn't do anything.

Also, BoringSSL uses size_t and keymaster builds with a signed/unsigned
mismatch as a fatal error. This means that the casts to int aren't
needed in BoringSSL and, in fact, cause an error.

Change-Id: I52b7d34a5c90f40cfcc84c60b746404f374b1e80
/system/keymaster/hmac_operation.cpp
62c2286bcf93bdfebac85bb5318982f054ec6224 17-Dec-2014 Shawn Willden <swillden@google.com> Add support for HMAC_SHA224, HMAC_SHA384 and HMAC_SHA512.

Change-Id: I76c73f6e16e5ee4acaf8a78eacd1bfdf3db12b68
/system/keymaster/hmac_operation.cpp
0d560bfedd40389387f31f6696660fff6bc3a48a 16-Dec-2014 Shawn Willden <swillden@google.com> Add HMAC-SHA256 support.

Change-Id: I64c7bdf77388e3cb491b702c52c6746d32f317b0
/system/keymaster/hmac_operation.cpp