blob: fda6aaf4d900d952fecfb63253bdabae11f8f7c7 [file] [log] [blame]
Gaurav Shah56c9f4d2010-03-03 13:15:53 -08001This directory contains a reference implementation for Chrome OS
2verified boot in firmware.
3
4----------
5Directory Structure
6----------
7
8include/ - Contains all the code headers. firmware_image.h and
9kernel_image.h contains the structures that represent a verified boot
10firmware and kernel image. Note that the
11
12crypto/ - Contains the implementation for the crypto library. This
13includes implementations for SHA1, SHA256, SHA512, and RSA signature
14verification (for PKCS #1 v1.5 signatures).
15
16common/ - Contains some utility functions and stub implementations for
17certain wrapper functions used in the verification code. Some of these
18(for example Free(), Malloc()) will need to be replaced with
19appropriate firmware-land equivalent.
20
21utils/ - This contains the implementation of kernel and firmware image
22verification (see firmware_image.c and kernel_image.c) and some
23utilities (e.g. firmware_utility - for generating verified boot
24firmware images).
25
26tests/ - User-land tests and benchmarks that test the reference
27implementation. Please have a look at these if you'd like to
28understand how to use the reference implementation.
29
30
31----------
32Some useful utilities:
33----------
34
35firmware_utility.c To generate verified boot firmware images.
36
37dumpRSAPublicKey.c Dump RSA Public key (from a DER-encoded X509
38 certificate) in a format suitable for
39 use by RSAVerify* functions in
40 crypto/.
41
42verify_data.c Verify a given signature on a given file.
43
44
45----------
46Here's what is required for a minimal verified boot implementation
47----------
48
491) Crypto implementation from crypto/. The verified boot code should
50use the wrappers from rsa_utility.h and sha_utility.h - RSAVerify_f()
51and Digest*() functions.
52
532) Verified Firmware and Kernel image verification functions - only
54functions that work on binary blobs (VerifyFirmware() and
55VerifyKernel()) are required. The functions that work on Firmware and
56Kernel images (e.g. VerifyFirmwareImage()) are only useful for
57user-land utilities that manipulate signed firmware and kernel images.
58