Introduction to Manufacturing for STM32H5

Revision as of 09:53, 29 March 2024 by Registered User
Under construction.png Coming soon

1. Introduction

During the product development process, the original equipment manufacturers (OEMs) can subcontract the manufacturing to an OEM contract manufacturing (OEM CM). The OEM CM can manage the programming tools or call for a third party programmer. The manufacturing therefore takes place in a untrusted environment putting proprietary assets at risk. Since the OEM CM works with the OEM intellectual property (IP), IPs might be exposed or be appropriated by other customers. This is referred to as Untrusted Manufacturing.

To meet the new market security requests and protect customers against any leakage of their IPs, STMicroelectronics introduces new security concepts and tools, permitting programming of OEM firmware into STM32 MCU internal Flash memory or external non-volatile memories in a secure way (with confidentiality, authentication and integrity checks).

On the other hand, when the OEM owns the full chain of development/manufacturing we are in a context of Trusted Manufacturing. However, even products manufactured in such an environment can still be vulnerable to security threats once deployed in the field. To enhance the device's resistance to such threats, the STM32H5 Series provides solutions that enable firmware authentication and secure firmware updates using cryptography and memory protection mechanisms. These measures help protect critical operations and data from unauthorized access.

2. Trusted Manufacturing

2.1. STiRoT

Since devices deployed in the field operate in an untrusted environment, they are susceptible to various security risks. To mitigate these risks, it is crucial to ensure that only authentic firmware runs on the device. While updating firmware is a common practice for connected devices, it can also introduce security vulnerabilities if not done securely. Therefore, it is essential to execute firmware updates in a secure manner to prevent security breaches.

To address these issues, STMicroelectronics developed the STiRoT which stands for ST immutable (unchangeable) Root Of Trust and acts as a first boot stage. This is a ROM code targeting a SESIP level 3 certified implementation. STiRoT provides two services:

  • The Secure Boot (root of trust services) is an immutable code, which is always executed after a system reset. It activates runtime protections and then, it verifies the integrity of the application code and data before every execution.
  • The Secure Firmware Update application is an immutable code that detects that a new application code or data image is available. It checks its authenticity, then checks the integrity of the new image before installing it after the decryption phase allowing the confidentiality.

The STiRoT activation is done by configuring the related option byte and defining the STiRoT configuration. STiRoT is activated in two different use case :

  • One boot stage: The STiROT manages directly the user application.
  • Two boot stages: The STiROT manages an updatable boot stage (uROT) located in the user flash memory which manages the user application. The updatable boot stage can be customized to fit customer needs.

The STiRoT configuration provides the possibility to define the number of managed images (firmware images only, or firmware and data images), the location of the images, and the cryptographic keys.
Once the configuration is done an image is generated and the device can be programmed with the option bytes, the OBKeys and the generated image.

For more general information about the STiRoT please refer to the dedicated chapter and for more information focused on the STM32H5 series please refer to the STiRoT for STM32H5 article.

2.2. OEMiRoT

Instead of using the Root of Trust provided by STMicroelectronics, the STM32H5 series allows the OEM to develop and use their own Root of Trust solution.

OEMiRoT which stands for OEM immutable (unchangeable) Root of Trust is an example based on the MCUboot open-source software (refer to mcuboot) provided with STM32CubeH5. The OEMiRoT can be modified by the OEM to be tailored to their own application.

The given example also features the Secure Boot and the Secure Firmware Update as for the STiRoT. An OEM updatable RoT (OEMuRoT) can be generated from the OEMiRoT to act as a second boot stage after STiRoT.

For more information about the OEMiRoT for STM32H5 please refer to the dedicated chapter.

3. Untrusted Manufacturing

3.1. SFI / SFIx

The secure firmware install (SFI) solution provides security when programming devices in a non-trusted facility owned by a Contract Manufacturer (CM). SFI addresses the two main issues at a non-trusted facility:

  • OEM application confidentiality against CM during STM32 programming.
  • Avoid CM overproduction of OEM devices.

Without the use of Secure Firmware Install (SFI), the STM32 is programmed with unencrypted code and data, leaving the application code vulnerable to security breaches or unauthorized copying. In such cases, the OEM must rely on the trustworthiness of the Contract Manufacturer (CM), hoping that their application code is not stolen or tampered with, and that the CM does not produce more parts than authorized.
SFI offers a complete solution with the STM32 Trusted Package Creator software package to encrypt the OEM application (including code and data), the STM32CubeProgrammer to flash the STM32 securely, and the STM32-HSM to transfer OEM credentials to the programming partner (CM).
For more general information about the secure firmware install please refer to the SFI dedicated chapter.
The STM32CubeProgrammer software package is delivered under the SLA0048.

The STM32H5 series provides a security framework with a trusted execution environment: the Secure Manager, simplifying the security development cycle of embedded applications. The OEM can choose to develop its application using the Secure Manager or not, this choice impacting the SFI procedure to be followed
These two procedures are described within the SFI for STM32H5 dedicated article.

SFIx extends the SFI solution to support external memories connected to the STM32 device, using the same tools as the regular SFI.

3.2. Secure Manager

The Secure Manager is an STMicroelectronics trusted execution environment security framework that is compliant with Arm® Platform Security Architecture (PSA) specifications for Cortex®-M (Armv8-M).

Secure Manager is an easy-to-use proprietary implementation of the PSA API, which is specifically optimized for STM32H5 MCUs. Easy to install on STM32 products, Secure Manager provides a way to manage the entire security ecosystem on the STM32 device.

During the manufacturing flow, the OEM gets the encrypted image of the Secure Manager from STMicroelectronics and prepares its encrypted firmware image containing its nonsecure application image, its secure module images, the OEM secrets.
The OEM can configure the Secure Manager during the installation phase or after, defining parameters such as the non-secure application installation key, the number of modules, and the ITS storage size.
The Secure Manager and the firmware can then be securely installed by the OEM, using keys defined during the process.

For more general information about the Secure Manager please refer to the dedicated chapter.

The Secure Manager is delivered with a complete ecosystem in order to manage the product life cycle. This ecosystem is composed of :

  • The Secure Manager access kit (SMAK): used to develop nonsecure applications using the Secure Manager services.
  • The Secure Module development kit (SMDK): used to develop secure modules and associated APIs to access these modules from nonsecure applications.

For more information on developing nonsecure applications using the Secure Manager services, refer to SMAK for STM32H5 article.
For more information about Secure Manager manufacturing, refer to SMAK for STM32H5 article.
For more information on developing secure modules, refer to SMDK for STM32H5 article.