struct AvbVBMetaImageHeader

Defined at line 125 of file ../../third_party/android/platform/external/avb/include/libavb/../../libavb/avb_vbmeta_image.h

Binary format for header of the vbmeta image.

The vbmeta image consists of three blocks:

+-----------------------------------------+

| Header data - fixed size |

+-----------------------------------------+

| Authentication data - variable size |

+-----------------------------------------+

| Auxiliary data - variable size |

+-----------------------------------------+

The "Header data" block is described by this struct and is always

|AVB_VBMETA_IMAGE_HEADER_SIZE| bytes long.

The "Authentication data" block is |authentication_data_block_size|

bytes long and contains the hash and signature used to authenticate

the vbmeta image. The type of the hash and signature is defined by

the |algorithm_type| field.

The "Auxiliary data" is |auxiliary_data_block_size| bytes long and

contains the auxiliary data including the public key used to make

the signature and descriptors.

The public key is at offset |public_key_offset| with size

|public_key_size| in this block. The size of the public key data is

defined by the |algorithm_type| field. The format of the public key

data is described in the |AvbRSAPublicKeyHeader| struct.

The descriptors starts at |descriptors_offset| from the beginning

of the "Auxiliary Data" block and take up |descriptors_size|

bytes. Each descriptor is stored as a |AvbDescriptor| with tag and

number of bytes following. The number of descriptors can be

determined by walking this data until |descriptors_size| is

exhausted.

The size of each of the "Authentication data" and "Auxiliary data"

blocks must be divisible by 64. This is to ensure proper alignment.

Descriptors are free-form blocks stored in a part of the vbmeta

image subject to the same integrity checks as the rest of the

image. See the documentation for |AvbDescriptor| for well-known

descriptors. See avb_descriptor_foreach() for a convenience

function to iterate over descriptors.

This struct is versioned, see the |required_libavb_version_major|

and |required_libavb_version_minor| fields. This represents the

minimum version of libavb required to verify the header and depends

on the features (e.g. algorithms, descriptors) used. Note that this

may be 1.0 even if generated by an avbtool from 1.4 but where no

features introduced after 1.0 has been used. See the "Versioning

and compatibility" section in the README.md file for more details.

All fields are stored in network byte order when serialized. To

generate a copy with fields swapped to native byte order, use the

function avb_vbmeta_image_header_to_host_byte_order().

Before reading and/or using any of this data, you MUST verify it

using avb_vbmeta_image_verify() and reject it unless it's signed by

a known good public key.

Public Members

uint8_t[4] magic
uint32_t required_libavb_version_major
uint32_t required_libavb_version_minor
uint64_t authentication_data_block_size
uint64_t auxiliary_data_block_size
uint32_t algorithm_type
uint64_t hash_offset
uint64_t hash_size
uint64_t signature_offset
uint64_t signature_size
uint64_t public_key_offset
uint64_t public_key_size
uint64_t public_key_metadata_offset
uint64_t public_key_metadata_size
uint64_t descriptors_offset
uint64_t descriptors_size
uint64_t rollback_index
uint32_t flags
uint32_t rollback_index_location
uint8_t[48] release_string
uint8_t[80] reserved