Skip to main content
Associate II
Oct 15, 2026 9:17 AM UTC
Question

Clarification on STM32MP257 Secure Boot and Firmware Encryption Behavior

I am working on secure boot and firmware encryption on a custom STM32MP257F board based on the STM32MP257F-DK.

I have already provisioned the encryption key material into OTP and am testing encryption through Yocto using ENCRYPT_ENABLE = "1", with a 128-bit key for FSBL and a 256-bit key for FIP.

I noticed that when I use the correct encryption keys, the board boots successfully.
When I use a wrong key, flash fails with a decryption error.
But when I remove the encryption settings from local.conf, the board still boots even though the keys are already provisioned in OTP.

I want to understand why this happens. I thought that once the encryption keys are provisioned, the board should not boot without the correct keys.

Could someone please clarify a few things?

  1. Is it normal for the board to boot with an unencrypted image even after the encryption keys are provisioned into OTP?
  2. Does provisioning the keys into OTP only store the keys, or is there a way to enforce encryption at boot?
  3. What is the recommended way to ensure that the board boots only with properly encrypted and authenticated firmware?

1 reply

ST Employee
Oct 21, 2026 2:18 PM UTC

Hello ​@_Vanshika,

  1. Is it normal for the board to boot with an unencrypted image even after the encryption keys are provisioned into OTP?
    Yes. If the SSP procedure is not completed after provisioning, the chip stays in the non-closed state.
  2. Does provisioning the keys into OTP only store the keys, or is there a way to enforce encryption at boot?
    No. Provisioning alone is not enough to enforce secure boot. You must also complete the SSP procedure.
  3. What is the recommended way to ensure that the board boots only with properly encrypted and authenticated firmware?

Did you complete all the steps of the SSP procedure to close the chip? In particular, did you set the following OTP values?

  • OTP8 = 0xFF

  • OTP18 = 0xFF (not 0xF0F)

  • OTP124 = 0x100000

These values are set at the end of the SSP procedure. The procedure is explained on the wiki page linked below, and also in AN5510.

[How to deploy SSP using a step-by-step approach - stm32mpu].

Thank you.



Best Regards,
Zakaria

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.