2025-09-30 12:45 AM
TL;DR:
On STM32G0B1 with SBSFU + SECoreBin, I want to design a secure crypto/key enclave for the user APP.
Enclave should be WRP/PCROP/MPU protected.
Only accessible via SVC/gateway from the unprivileged APP.
Should remain updateable through SBSFU (included in .sfb).
Is this approach feasible, and what is the recommended way to implement it?
Hello,
I am designing a product based on the STM32G0B1KEU6 MCU. I have integrated my project into SBSFU to harden security as much as possible.
Currently, secure boot and secure update are protected by design (RDP, WRP and PCROP for flash, MPU for RAM). I tried to access SECoreBin crypto services from the user application but that results in a HardFault (SBSFU is configured to forbid this, by design).
My question: what is the most secure approach to provide crypto operations and key storage to the user application itself?
Can I mimic a kind of “custom SECoreBin” dedicated to AES/ECC operations and key management for the APP?
Conceptually, my idea is:
In addition:
Would this “custom enclave” be updateable through SBSFU in the same way as the application image (e.g. included inside the .sfb package)?
Or is there a better recommended way to structure such a service?
Thank you in advance,
Gorka
2025-10-07 2:40 PM
Hello @Gorka3 ,
You can have an application that starts in privilege, setup MPU to authorise only a part of the memory to be privilege and other part non privilege.
Access to "secure" service would be done by calling SVC to raise level and access to specific service.
SBSFU provides example how to do that indeed, but this is standard cortex feature, so you should be able to find resources, and maybe use AI to help you on this.
If you want to have part of your application to be updatable separately you can enable a second slot.
Now you will need to find a way to link things together. It may be easier to use this second slot only for data and keep master slot for application.
Best regards
Jocelyn