Skip to main content
Associate
January 14, 2025
Question

encryption file.bin then

  • January 14, 2025
  • 1 reply
  • 642 views

After the build process for the project, I get a file.bin that I want to encrypt to be protected and decrypted in my chip via the bootloader. How is this done, knowing that I use stm32 cube ide?

1 reply

Technical Moderator
April 24, 2025

Hi Mahmoud

The question is general, no information provided on the STM32 Family, the installation environment .... There are many possible answers. I suggest the following as first guidelines: 

- For trusted solution, the best way is to follow the ST SFI solution which provides security when programming devices in non-trusted environment. Then, use SBSFU which is an ST implementation of the secure boot and secure firmware update security feature.

Note that for test you can use openssl or python scripts to encrypt the binary, then use the same keys to decrypt the firmware.

Best regards