Home | History | Annotate | Download | only in include
      1 /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
      2  * Use of this source code is governed by a BSD-style license that can be
      3  * found in the LICENSE file.
      4  *
      5  * GUID structure.  Defined in appendix A of EFI standard.
      6  */
      7 
      8 #ifndef VBOOT_REFERENCE_VBOOT_2GUID_H_
      9 #define VBOOT_REFERENCE_VBOOT_2GUID_H_
     10 #include <stdint.h>
     11 
     12 #define UUID_NODE_LEN 6
     13 #define GUID_SIZE 16
     14 
     15 struct vb2_guid {
     16 	union {
     17 		struct {
     18 			uint32_t time_low;
     19 			uint16_t time_mid;
     20 			uint16_t time_high_and_version;
     21 			uint8_t clock_seq_high_and_reserved;
     22 			uint8_t clock_seq_low;
     23 			uint8_t node[UUID_NODE_LEN];
     24 		} uuid;
     25 		uint8_t raw[GUID_SIZE];
     26 	};
     27 } __attribute__((packed));
     28 
     29 #define EXPECTED_GUID_SIZE GUID_SIZE
     30 
     31 /* Key GUIDs to use for VB2_SIG_NONE and hash algorithms */
     32 
     33 #define VB2_GUID_NONE_SHA1 \
     34 	{{{0xcfb5687a,0x6092,0x11e4,0x96,0xe1,{0x8f,0x3b,0x1a,0x60,0xa2,0x1d}}}}
     35 
     36 #define VB2_GUID_NONE_SHA256 \
     37 	{{{0x0e4114e0,0x6093,0x11e4,0x9d,0xcb,{0x8f,0x8a,0xf4,0xca,0x2e,0x32}}}}
     38 
     39 #define VB2_GUID_NONE_SHA512 \
     40 	{{{0x1c695960,0x6093,0x11e4,0x82,0x63,{0xdb,0xee,0xe9,0x3c,0xcd,0x7e}}}}
     41 
     42 #endif  /* VBOOT_REFERENCE_VBOOT_2GUID_H_ */
     43