Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: vboot_firmware/lib/include/vboot_struct.h

Issue 2762009: Add vbutil_key (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Util to pack/unpack .vbpubk files Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « utility/vbutil_key.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Data structure definitions for verified boot, for on-disk / in-eeprom 5 * Data structure definitions for verified boot, for on-disk / in-eeprom
6 * data. 6 * data.
7 */ 7 */
8 8
9 #ifndef VBOOT_REFERENCE_VBOOT_STRUCT_H_ 9 #ifndef VBOOT_REFERENCE_VBOOT_STRUCT_H_
10 #define VBOOT_REFERENCE_VBOOT_STRUCT_H_ 10 #define VBOOT_REFERENCE_VBOOT_STRUCT_H_
11 11
12 #include <stdint.h> 12 #include <stdint.h>
13 13
14 14
15 /* Public key data */ 15 /* Public key data */
16 typedef struct VbPublicKey { 16 typedef struct VbPublicKey {
17 uint64_t key_offset; /* Offset of key data from start of this struct */ 17 uint64_t key_offset; /* Offset of key data from start of this struct */
18 uint64_t key_size; /* Size of key data in bytes (NOT strength of key 18 uint64_t key_size; /* Size of key data in bytes (NOT strength of key
19 * in bits) */ 19 * in bits) */
20 uint64_t algorithm; /* Signature algorithm used by the key */ 20 uint64_t algorithm; /* Signature algorithm used by the key */
21 uint64_t key_version; /* Key version */ 21 uint64_t key_version; /* Key version */
22 } VbPublicKey; 22 } VbPublicKey;
23 23
24 24
25 /* Signature data (a secure hash, possibly signed) */ 25 /* Signature data (a secure hash, possibly signed) */
26 typedef struct VbSignature { 26 typedef struct VbSignature {
27 uint64_t sig_offset; /* Offset of signature data from start of this 27 uint64_t sig_offset; /* Offset of signature data from start of this
28 * struct */ 28 * struct */
29 uint64_t sig_size; /* Size of signature data from start of this struct */ 29 uint64_t sig_size; /* Size of signature data in bytes */
30 uint64_t data_size; /* Size of the data block which was signed in bytes */ 30 uint64_t data_size; /* Size of the data block which was signed in bytes */
31 } VbSignature; 31 } VbSignature;
32 32
33 33
34 #define KEY_BLOCK_MAGIC "CHROMEOS" 34 #define KEY_BLOCK_MAGIC "CHROMEOS"
35 #define KEY_BLOCK_MAGIC_SIZE 8 35 #define KEY_BLOCK_MAGIC_SIZE 8
36 36
37 #define KEY_BLOCK_HEADER_VERSION_MAJOR 2 37 #define KEY_BLOCK_HEADER_VERSION_MAJOR 2
38 #define KEY_BLOCK_HEADER_VERSION_MINOR 1 38 #define KEY_BLOCK_HEADER_VERSION_MINOR 1
39 39
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 uint64_t bootloader_size; /* Size of bootloader in bytes */ 115 uint64_t bootloader_size; /* Size of bootloader in bytes */
116 VbSignature body_signature; /* Signature for the kernel body */ 116 VbSignature body_signature; /* Signature for the kernel body */
117 } VbKernelPreambleHeader; 117 } VbKernelPreambleHeader;
118 /* This should be followed by: 118 /* This should be followed by:
119 * 2) The signature data for the kernel body, pointed to by 119 * 2) The signature data for the kernel body, pointed to by
120 * body_signature.sig_offset. 120 * body_signature.sig_offset.
121 * 3) The signature data for (VBFirmwarePreambleHeader + body signature 121 * 3) The signature data for (VBFirmwarePreambleHeader + body signature
122 * data), pointed to by preamble_signature.sig_offset. */ 122 * data), pointed to by preamble_signature.sig_offset. */
123 123
124 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ 124 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */
OLDNEW
« no previous file with comments | « utility/vbutil_key.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698