Hello, I'm an embedded developer working with the RT1020 EVK platform.
I have studied and followed the first two tutorial videos on the following site:
https://www.nxp.com/design/design-center/training/TIP-MCUXPRESSO-SECURE-PROVISIONING-TOOL
The project I’m testing is based on the shell demo app from the SDK examples.
I’m conducting tests with the boot mode always set to Authenticated (HAB) to support secure boot functionality.
However, I've encountered some confusing results that I cannot fully explain.
Here is a detailed summary of the test steps and observations:
Key Generation and Image Creation
After generating keys and applying them, I set XIP_BOOT_HEADER_ENABLE=0 in the shell demo project, then built the project in MCUXpresso IDE, which produced evkmimxrt1020_shell.axf. Using the MCUXpresso Secure Provisioning Tool (SPT), I created the following three binaries via the Build Image tab:
1. Board A (Fuses Burned, HAB Enabled)
This board has gone through the full process in the tutorial videos, and the fuses have already been programmed.
(1-a) Flash evkmimxrt1020_shell.bin
Mode: Serial Downloader
Image: evkmimxrt1020_shell.bin
No fuse warning popup (as expected, fuses already burned)
Result: Successful write, board boots normally
(1-b) Flash signed_MIMXRT1020_flashloader.bin
(1-c) Flash unsigned_MIMXRT1020_flashloader.bin
2. Board B (HAB Not Yet Enabled)
This board has not been fused yet.
(2-a) Flash evkmimxrt1020_shell.bin
Fuse warning popup appears → Chose "NO (write image only)"
Expectation: Board should not boot
Result: Board boots successfully Why??
(2-b) Flash signed_MIMXRT1020_flashloader.bin
(2-c) Flash unsigned_MIMXRT1020_flashloader.bin
3. Flashing via MCUXpresso IDE GUI Flash Tool (Board A, internal boot mode)
(3-a) Flash .axf (XIP_BOOT_HEADER_ENABLE=0)
(3-b) Flash .bin
(3-c) Flash signed_MIMXRT1020_flashloader.bin
(3-d) Flash unsigned_MIMXRT1020_flashloader.bin
(3-e) Flash .axf (XIP_BOOT_HEADER_ENABLE=1)
4. Flashing via MCUXpresso IDE (Board B, internal boot mode)
(4-a) Flash .axf (XIP_BOOT_HEADER_ENABLE=0)
(4-b) Flash .bin
(4-c) Flash signed_MIMXRT1020_flashloader.bin
(4-d) Flash unsigned_MIMXRT1020_flashloader.bin
(4-e) Flash .axf (XIP_BOOT_HEADER_ENABLE=1)
My Main Questions
Why do cases 1-b and 1-c fail to boot on Board A, even though the fuses are already burned and the board is HAB-enabled?
From the results of 1-a and 2-a, it seems that flashing evkmimxrt1020_shell.bin may implicitly select the proper signed/unsigned flashloader image based on the HAB status.
Is this correct?
If not, does the evkmimxrt1020_shell.bin file internally include both the signed and unsigned versions of the flashloader?
(This seems unlikely based on file sizes.)
In case 2-c, the board does not boot even though it’s unfused and the unsigned image was used.
Why does this happen?
The same issue is observed in 4-d as well.
Since the MCUXpresso IDE can flash .bin files directly, I expected it to boot in this case.
In 3-b and 3-c, Board A does not boot even when using the correct .bin or signed flashloader image.
Could this be a limitation of flashing via IDE rather than via SPT?
And, what exactly is the signed_MIMXRT1020_flashloader.bin image?
Is it not the signed application image?
For all 1, 2, 3, 4 test cases, I’ve listed the expected result and the actual result.
Please let me know if any of my expectations were incorrect, or if any of my test methods were flawed.
6. Based on my experiments, I am questioning my understanding of Authentication (HAB) secure boot.
I originally understood HAB secure boot to serve the purpose of ensuring image integrity and preventing tampering.
However, based on my test results, this no longer seems to be the full picture.
Now I wonder:
Is the actual purpose of the signed image in HAB not just integrity checking,
but also to bind the image to a specific board (or manufacturer),
such that the image only works on a device with matching keys/fuses?
For example, in my tests, the signed image only boots on Board A when written via the Secure Provisioning Tool’s Write Image function, using the original .bin (not directly flashing the signed image separately).
This behavior makes me question my earlier belief that:
"A signed image embedded in the production board should not boot on a 3rd-party board (even if copied),
regardless of whether the image has been modified or not."
Isn't this the core security goal of HAB —
to prevent unauthorized devices from executing even legitimate (but cloned) firmware?
Therefore, in my experiment with Board B (HAB not enabled),
when I write only the signed image (without burning any fuses), and it fails to boot —
isn't that the expected result which proves this security model?
I’d appreciate confirmation or correction if my interpretation is off.