Commit Graph

7 Commits

Author SHA1 Message Date
Louis Yung-Chieh Lo
37f6b55a25 Add helper functions and files for gpt tests.
Review URL: http://codereview.chromium.org/1729006
2010-04-22 21:22:22 -07:00
Gaurav Shah
ed9c96a7aa VBoot Reference: Refactor Pass 1: Split {firmware|kernel}_image
This CL refactors verified boot firmware and kernel image functions into firmware and userland portions. Data Types and Functions that need to be a part of the final firmware implementation reside in files with "_fw" suffix - firmware_image_fw.{c|h} and kernel_image_fw.{c|h}.

Also some Makefile cleanups.

Review URL: http://codereview.chromium.org/1599001
2010-03-30 18:56:07 -07:00
Gaurav Shah
e450be4ce4 Propagate use of uint64_t to more functions that may need to deal with arbitrary length data.
This CL fixes some functions to use uint64_t that I missed the first time around. It ended up requiring some minor changes to how some of the helper functions work (StatefulMemcpy*()).

Also adds new tests to make sure that reference code can verify/process big firmware and kernel images.

BUG=670
TEST=Adds some new, old ones still pass.

Review URL: http://codereview.chromium.org/1519008
2010-03-29 21:27:08 -07:00
Gaurav Shah
f5564fa98c Vboot Reference: Refactor Code.
This CL does the following:
1) It adds a SignatureBuf function which uses the OpenSSL library to generate RSA signature. This is more robust than the previous way of invoking the command line "openssl" utility and capturing its output. No more unnecessary temporary files for signature operations.
2) It adds functions that allow direct manipulation of binary verified Firmware and Kernel Image blobs in memory.
3) It changes the structure field members for FirmwareImage to make it consistent with KernelImage. Now it's clearer which key is used when.
4) Minor bug fixes and slightly improved API for dealing verified boot firmware and kernel images.
5) Renames the RSA_verify function to prevent conflicts with OpenSSL since it's linked into the firmware utility binary.

Review URL: http://codereview.chromium.org/661353
2010-03-02 15:40:01 -08:00
Gaurav Shah
08df9b88a3 Vboot Reference: Add the "real" reference firmware verification function (VerifyFirmware).
The old VerifyFirmware function (now called VerifyFirmwareImage) works on the FirmwareImage structure. This CL adds a verification function which can be used directly on packed binary verified boot firmware blobs. This function can be used as the reference implementation for verified boot in firmware. In addition, all functions that work on FirmwareImage structure have been renames to distinguish them from those which work on binary firmware blobs.

In addition, this adds some new crypto utility functions and refactors old ones.
BUG=670
TEST=Added tests for the new function and they pass.

Review URL: http://codereview.chromium.org/650105
2010-02-23 16:16:23 -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
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