2024-10-10 05:39 AM
Hi,
is there a possibility to do the complete chain to product state "closed" by non secure user code ?
I have a custom bootloader which usually did a set of the old RDP Level.
Now, with a STM32H57 device we have to use the new product state.
I'm able to set the state to provisioning. But when i use
2024-10-21 01:48 AM
Hello @martinhaefner9,
I confirm that today, with STM32H573 you cannot provision the Debug Authentication through the firmware when TrustZone is disabled.
The reason behind is that DA is encrypted in secure state when you use the provisioning process through programmer.
As your code runs with TZ disabled in non secure state, the derived key generated by DHUK is not the same.
This issue is fixed on more recent STM32H533. It will also be fixed on STM32H573 but on next cut but it is not planned yet.
Here are the possible solutions I can think of:
1) Use the "standard" provisioning process provided by programmer. This provisioning is now supported by many third party programmers. This would be the less impacting for your firmware but depends on actual support by your programming tool.
2) Enable TrustZone. In this case, you will need to make adaptations to your firmware. Either you leave all your firmware on secure side or Secure + non secure
I think the first solution : full secure is the easiest way to go. With such solution, the DA encryption by the firmware will work because it will use same DHUK as the one used when launching regression.
3) Use STM32H563: This chip does not use encryption, so no issue. But I guess you are using STM32H573 for its hardware cryptography capabilities
4) Use STM32H533: Here it depends if your firmware first inside 512 KB flash which I guess again is unlikely.
Best regards
Jocelyn
2024-11-15 01:30 AM
thanks for the clarification.
So I deciced to go for having a secure application which will do the provisioning and then jump to the non secure app.
Unfortunately i struggling enabling TZ in the user option bytes.
Are there any steps to do beside/before ?
Device is in non secure "Open" mode.
Thanks in advance
2024-11-18 03:16 AM
Ignore my last question please, that was an failure done by myself
2024-11-18 03:48 AM
@Jocelyn RICARD am I right if i have enabled TZ i have to use DA by certificates ?
2024-11-18 09:49 AM
Hi @martinhaefner9 ,
Yes you get it right.
TZ Disabled: only password possible, and only regression can be triggered using DA
TZ enabled: only certificates possible: Regression/Partial regression/Debug reopening can be triggered
Best regards
Jocelyn