Commit Graph

507 Commits

Author SHA1 Message Date
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
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