History log of /system/keymaster/rsa_key_factory.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d530305019e1ccc1e30a4f8edeb88db3d126e235 22-Jun-2015 Shawn Willden <swillden@google.com> Validate input sizes for RSA and ECDSA signing/verification ops.

Bug: 21955742
Change-Id: I4385a6539229b174facd5f04ce0391e2e8c3608d
/system/keymaster/rsa_key_factory.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/rsa_key_factory.cpp
398c158a0206217025f327c2d26bb6c86659f5a0 28-May-2015 Shawn Willden <swillden@google.com> Move assymetric key factory declarations to includes.

This exposes EcKeyFactory and RsaKeyFactory so they can be used for
constructing the Trusty KeymasterContext. Note that there are no code
changes, just reorganization.

Change-Id: I8e8e068fb875f9d9c5c35320a545347dc33bc507
/system/keymaster/rsa_key_factory.cpp