SFI is a secure mechanism implemented in STM32 microcontrollers. It allows secure and counted installation of original equipment manufacturer (OEM) firmware in an untrusted production environment, such as an OEM contract manufacturer. The SFI process prevents the OEM firmware code from being accessed by the contract manufacturer, extracted, or disclosed.
A detailed description of SFI is provided in AN4992
List of applicable products:
| Type | Products |
|---|---|
| Microcontroller | STM32G554xx, STM32G564xx |
1. Introduction
The STM32G5 microcontrollers support secure firmware install (SFI) only on internal flash memory by means of a dedicated RSSe (secure firmware extension) delivered in the X-CUBE-RSSe STM32Cube expansion package.
The SFI procedure on STM32G5 microcontrollers is similar to the SFI procedure applied to other platforms. To run the SFI procedure on STM32G5 microcontrollers, follow the SFI Step-by-step on STM32 boards.
2. Preparation flow
Once the OEM application is developed, the OEM must prepare and test the SFI image for installation during manufacturing.
To do this, the OEM must use the STM32 Trusted Package Creator tool.
This step aims to:
- Prepare the encrypted firmware image for installation. The SFI image consists of the OEM application and additional components, including OEM secrets and OEM option bytes.
- Provision the OEM key used to encrypt the firmware image within a hardware security module (HSM).
2.1. SFI image generation
The OEM must provide the following inputs:
- OEM application: The OEM must provide the application binary.
- OEM secrets: The OEM secrets are the OEM data and the OEM keys.
- OEM option bytes configuration.
The Trusted Package Creator encrypts the SFI image inputs with the OEM key and generates the SFI image.
The SFI image is an encrypted image containing the OEM application, the OEM secrets, and the OEM option bytes.
2.1. OEM key provisioning
The OEM must provide the OEM key to the contract manufacturer (CM) in a way that prevents the CM from reading or extracting the OEM key. Only the STM32 can process the OEM key. In the SFI solution, the OEM provisions the OEM key by using the Trusted Package Creator in a hardware security module ( HSM). Then:
- Only STMicroelectronics STM32 microcontrollers can securely install the SFI image.
- The authenticity, integrity, and confidentiality of the SFI image content are ensured.
When using the HSM, the number of STM32 microcontrollers to program can be counted.
3. Installation flow
The installation procedure is similar to the standard SFI installation procedure deployed on other STM32 products that support SFI.