SBSFU legacy

This wiki page depicts the SBSFU legacy, which is an ST implementation of the secure boot and secure firmware update security feature.
SBSFU legacy stands for the initial version of secure boot secure firmware update that was not based on an open-source solution (mcuboot) . Open-source software (refer to mcuboot).

Examples of the SBSFU legacy are provided in the X-CUBE-SBSFU expansion package.
The X-CUBE-SBSFU expansion package comes with examples running on the STM32L4 series, STM32F4 series, STM32F7 series, STM32G0 series, STM32G4 series, STM32H7 series, STM32L0 series, STM32L1 series, and STM32WB series.
On STM32WL series, an example is provided within STM32CubeWL firmware package.

A detailed description of the SBSFU legacy is provided in UM2262

1. Product security overview

A device deployed in the field operates in an untrusted environment and it is therefore subject to threats. To mitigate this risk, the goal is to allow only authentic firmware to run on the device. Allowing the update of firmware images to fix bugs, or introducing new features or countermeasures, is common place for connected devices, and must be executed in a secure way.

Security solutions must be designed to protect sensitive data (potentially even the firmware itself) and critical operations.

Typical countermeasures are based on cryptography (with an associated key) and on memory protections:

  • Cryptography ensures integrity (the assurance that data has not been corrupted), authentication (the assurance that a certain entity is what it claims to be) and confidentiality (the assurance that only authorized users can read sensitive data) during firmware transfer.
  • Memory protection mechanisms limiting nongenuine external accesses (for example, by accessing the device physically through JTAG) and nongenuine internal accesses from other embedded nonsecure processes.

2. SBSFU presentation

SBSFU example provides two services:

  • The secure boot (root of trust services) is an immutable code, which is always executed after a system reset (1). It activates STM32 runtime protections and then, it verifies the authenticity and integrity of the application (2) code before every execution (3).

Security SBSFU Legacy SB.png


  • The secure firmware update application is an immutable code that detects that a new firmware image is available. It checks its authenticity (1), then checks the integrity (2) of the code before installing it after decryption (3).

Security SBSFU Legacy SFU.png


Cryptography is used to ensure confidentiality, integrity, and authentication.

  • Confidentiality is implemented to protect the firmware image, which may be a key asset for the manufacturer. The firmware image sent over the untrusted channel is encrypted so that only the devices having access to the encryption key can decrypt the firmware package.
  • Integrity is verified to check that the received image is not corrupted.
  • Authenticity checks that the firmware image is coming from a trusted and known source to prevent unauthorized entities to install and execute the code.

Keys dedicated to authentication and confidentiality are OEM assets and can be customized by the OEM during the provisioning process.
Refer to UM2262 for more details on cryptography operations

3. Protection measures and security strategy

Cryptography ensures integrity, authentication, and confidentiality. However, the use of cryptography alone is not enough: a set of measures and system-level strategies are needed for protecting critical operations and sensitive data (such as a secret key), and the execution flow, to improve security robustness.

The security strategy is based on the following concepts:

  • Ensure a single entry point at reset: force code execution to start with SBSFU code.
  • Make an SBSFU code and secrets immutable: no possibility to modify or alter them once security is fully activated.
  • Create a protected and isolated enclave to store secrets.
  • Limit surface execution to SBSFU code during his execution.
  • Remove JTAG access to the device.
  • Monitor the system: intrusion detection and SBSFU execution time.

Depending on the STM32 series, different hardware mechanisms can be configured to implement the security strategy such as: Firewall, PCROP, HDP, WRP, tampers, security option bytes, OB keys, RDP, MPU. Refer to the reference manual of the series for a detailed presentation of the mechanisms.

Refer to UM2262 for more details hardware mechanisms configured for each series.

4. SBSFU: next

There is no longer evolutions on the SBSFU legacy, which is now replaced by OEMiRoT/OEMuRoT based on MCUboot open-source software (refer to mcuboot) for all new series.

One of the major additional features of the OEMiRoT/OEMuRoT implementation, is the possibility to boot in a one or two stage strategy:

  • 1 boot stage (iRoT): The Root of Trust is immutable
  • 2 boot stages (iRoT + uRoT): The Root of Trust is based on one immutable part + one updatable part

Another advantage is the usage of a well-known open-source software.

Refer to OEMiRoT/OEMuRoT wiki articles of each series for more details.