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/Targets.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1047,23 +1047,20 @@ int wolfBoot_get_encrypt_key(uint8_t *key, uint8_t *nonce);
1047
1047
int wolfBoot_erase_encrypt_key(void); /* called automatically by wolfBoot_success() */
1048
1048
```
1049
1049
1050
+
To use your own implementation for getting the encryption key use `CUSTOM_ENCRYPT_KEY` and `OBJS_EXTRA=src/my_custom_encrypt_key.o`. Then provide your own implementation of `int wolfBoot_get_encrypt_key(uint8_t *key, uint8_t *nonce);`
1051
+
1050
1052
To sign and encrypt an image, create a key file with the concatenated key and nonce, then use the sign tool:
1051
1053
1052
1054
```sh
1053
-
# Create key file (32-byte key + 16-byte IV for AES-256)
In your application, set the encryption key before triggering an update:
1062
-
1063
-
```c
1064
-
wolfBoot_set_encrypt_key(enc_key, enc_iv);
1065
-
wolfBoot_update_trigger();
1066
-
```
1063
+
The result is `fitImage_v1_signed_and_encrypted.bin`, which gets placed into your OFP_A or OFP_B partitions.
1067
1064
1068
1065
During boot, wolfBoot decrypts the image headers from disk to select the best candidate, loads and decrypts the full image to RAM, then verifies integrity and authenticity before booting. On successful boot, `wolfBoot_success()` clears the key from RAM.
0 commit comments