Hello,
>If you follow AN12283, it will config the CMPA by using elftosb-gui like you mentioned, and then loaded the >SBKEK(sb key for sb file decryption) to device. SBKEK provisioning is depending on PUF,
>it needs PUF to generate key code for SBKEK.
As mentioned before, I did PUF and SBKEK provisioning before CMPA configuration, so our key provisioning didn't fail.
The following is the detail of our configuration step, and Step 0 to 8 were completed successfully without failure. Only the Step 9 reseive-sb-file was failed by setting BLOCK_SET_KEY in CMPA.
(0) Zero Clear CFPA and CMPA, and Clear Key Store and Write Key Store to Non-volatile, and then reboot LPC55S69 for transition to the initial non-secure and none-PRINCE state.
(1) Write CFPA with Version field increment and ROTKH_REVOKE field setting
blhost.exe -n -p COM4 -- write-memory 0x9de00 "CFPA_ROTKH_REVOKE.bin"
(2) Key Enroll
blhost.exe -n -p COM4 -- key-provisioning enroll
(3) Set SB Key
blhost.exe -n -p COM4-- key-provisioning set_user_key 3 "device_sbkek.bin"
(4) Set PRINCE 0 Key
blhost.exe -n -p COM4 -- key-provisioning set_key 7 16
(5) Write Key Non-volatile
blhost.exe -n -p COM4 -- key-provisioning write_key_nonvolatile 0
(6) Configure PRINCE 0 (Our FW binary is loaded to Addr=00000 to 2FFFFh)
blhost.exe -n -p COM4 -- fill-memory 0x20034000 4 0x50000000
blhost.exe -n -p COM4 -- fill-memory 0x20034004 4 0x00000000
blhost.exe -n -p COM4 -- fill-memory 0x20034008 4 0x00030000
blhost.exe -n -p COM4 -- configure-memory 0 0x20034000
(7) Write CPMA by elftosb-gui with the following parameters
Secure Boot : Boot signed images
Watch Dog : Disabled
Lock device on boot fail : checked
Disable sensitive ISP commands : Checked
Disable PUF enrollment : Checked
Disable PUF key code generation : Checked
TZ-M mode : From image header
Disable DICE calculation : Checked
Customer factory area in DICE calculation : Un-checked
NXP area in DICE calculation : Un-checked
Accept RSA4096 keys only : Un-checked
RKTH : Our 32bytes ASCII data bytes
(8) Reboot LPC55S69
blhost.exe -n -p COM4 -- reset
(9) Download FW and the result was failed
blhost.exe -n -p COM4 -- receive-sb-file "lpc55s69.sb2"
Ping responded in 1 attempt(s)
Inject command 'receive-sb-file'
Preparing to send 198400 (0x30700) bytes to the target.
Successful generic response to command 'receive-sb-file'
(1/1) 0%Data phase write aborted by status 0x2712 kStatus_AbortDataPhase
Possible JUMP or RESET command received.
Response status = 1 (0x1) Failure.
Wrote 1536 of 198400 bytes.
If possible, could you build successful PRINCE and SB2 environment first for your reproducing the issue?
On the receive-sb-file workable environment, we change to the BLOCK_SET_KEY configuration in CMPA enabled , and then receive-sb-file become un-workable.
Best Regards,