You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/firmware_image.md
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,15 +42,53 @@ Each **Type** has a different meaning, and integrate information about the firmw
42
42
43
43
- A 'version' Tag (type: 0x0001, size: 4 Bytes) indicating the version number for the firmware stored in the image
44
44
- A 'timestamp' Tag (type: 0x0002, size 8 Bytes) indicating the timestamp in unix seconds for the creation of the firmware
45
-
- A 'sha256 digest' Tag (type: 0x0003, size: 32 Bytes) used for integrity check of the firmware
45
+
- A 'sha digest' Tag (type: 0x0003, size: digest size (32 Bytes for SHA256)) used for integrity check of the firmware
46
46
- A 'firmware signature' Tag (type: 0x0020, size: 64 Bytes) used to validate the signature stored with the firmware against a known public key
47
47
- A 'firmware type' Tag (type: 0x0030, size: 2 Bytes) used to identify the type of firmware, and the authentication mechanism in use.
48
48
49
-
Optionally, a 'public key hint digest' Tag can be transmitted in the header (type: 0x10, size:32 Bytes). This Tag contains the SHA256 digest of the public key used
49
+
A 'public key hint digest' tag is transmitted in the header (type: 0x10, size:32 Bytes). This tag contains the SHA digest of the public key used
50
50
by the signing tool. The bootloader may use this field to locate the correct public key in case of multiple keys available.
51
51
52
52
wolfBoot will, in all cases, refuse to boot an image that cannot be verified and authenticated using the built-in digital signature authentication mechanism.
53
53
54
+
### Adding custom fields to the manifest header
55
+
56
+
It is possible to add custom fields to the manifest header, by using the `--custom-tlv` option in the signing tool.
57
+
58
+
In order for the fields to be secured (checked by wolfBoot for integrity and authenticity),
59
+
their value is placed in the manifest header before the signature is calculated. The signing tool takes care of the alignment and padding of the fields.
60
+
61
+
The custom fields are identified by a 16-bit tag, and their size is indicated by a 16-bit length field. The tag and length fields are stored in little-endian format.
62
+
63
+
At runtime, the values stored in the manifest header can be accessed using the `wolfBoot_find_header` function.
64
+
65
+
The syntax for `--custom-tlv` option is also documented in [docs/Signing.md](/docs/Signing.md#adding-custom-fields-to-the-manifest-header).
66
+
67
+
### Image header: Example
68
+
69
+
This example adds a custom field when the signing tool is used to sign the firmware image:
0 commit comments