Commit Graph

1662 Commits

Author SHA1 Message Date
Gaurav Shah
e3ef9c9f40 Vboot Reference: Move test key generation to a separate script and add sample test keys.
Key generation takes a long time. This will be useful in driving the cryptosuite through autotest.

Review URL: http://codereview.chromium.org/604016
2010-02-10 23:07:02 -08:00
Gaurav Shah
1f81a6f936 Refactor code from test/ to utils/ since they are not just used by tests.
Also, adds a simple analog of verify_data.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/578025
2010-02-06 14:34:31 -08:00
Gaurav Shah
355031b445 Fix lost variable declarations due to a botched merge on the previous push.
Also remove the len parameter to read_RSAkey since it's not used or required any more.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/579009
2010-02-05 15:00:23 -08:00
Gaurav Shah
290e0788fb Add generic wrappers for performing message digest operations.
A DigestContext structure now wraps state for all the SHA* algorithms. Replaced the old SHA*_file functions to use these new wrappers. Also moved the digest utility functions from tests/ to crypto/.

BUG=670
TEST=Modified existing tests to use the new wrappers and they pass.

Review URL: http://codereview.chromium.org/579007
2010-02-05 14:37:30 -08:00
Gaurav Shah
e178fd9e34 Add some convenience/helper functions for RSA. Modify test utility to use the new function.
BUG=670
TEST=RSA verification test using the convenience function is passes.

Review URL: http://codereview.chromium.org/575019
2010-02-05 11:44:58 -08:00
Gaurav Shah
d067712ff9 Add a StatefulMemcpy which can be used to safely and iteratively copy blocks of memory.
Review URL: http://codereview.chromium.org/572024
2010-02-04 19:35:03 -08:00
Gaurav Shah
73bfa0768e Make SHA* function prototypes consistent.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/572025
2010-02-04 19:08:06 -08:00
Gaurav Shah
3a878528da Fix copyright header on padding.h.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/570038
2010-02-04 18:58:48 -08:00
Gaurav Shah
d857f2a71c Minor fix to the "clean" Makefile target.
Review URL: http://codereview.chromium.org/549223
2010-02-01 16:58:33 -08:00
Gaurav Shah
8bf29d8ea1 Utility to output digests in format suitable for RSA signatures.
The current stable version of OpenSSL(0.9.8d) does not support RSA signature with SHA-256 and SHA-512 message digests. This utility outputs the hash of file data in a format suitable for use with the "openssl" command-line tool fir generating RSA signatures.

Also modified the tests to use this to generate RSA signature rather than "openssl pkeyutl" which is not supported on current stable version of OpenSSL.

Review URL: http://codereview.chromium.org/552227
2010-01-28 19:43:24 -08:00
Gaurav Shah
321f310040 Refactor SHA*_file functions into a separate file. Generate them using a C macro.
Review URL: http://codereview.chromium.org/558025
2010-01-28 16:59:42 -08:00
Gaurav Shah
322536d2f9 RSA signature verification and SHA-1/256/512 reference implementation for verified boot.
Also contains some preliminary tests for these primitives.

Review URL: http://codereview.chromium.org/553023
2010-01-28 15:01:23 -08:00