TODAY | STM32 Summit 2026
Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
Hi,We are using an STM32U585 with the application running from external flash, on an octospi bus. We are also using external SRAM. The external memory architecture on our board is heavily influenced by the B-U585I-IOT02A design (same ports, slightly different parts used).We have successfully experimented with the SBSFU solution here and we have a couple of questions:Is there a flow diagram anywhere that clearly shows the boot sequence for this example/solution? We understand this is difficult because of all the configuration options, but we are still trying to understand if the application images are authenticated on every boot, or only when being copied to the primary slot by the bootloader and how exactly the MCUBOOT_USE_HASH_REF functionality plays into this.We do not need a secure app. Is it possible to remove this and have the bootloader run the non-secure app directly? Any pointers on how to achieve this? This is not a major issue, but it would make the memory map a bit simpler,
Hi there, I'm under mass production with yours STM32L051x8 device. I use the internal EEPROM to keep some data. Note that is not en emulation eeprom on flash, is just 512bytes on internal EEPROM. In addition, I protect my code with ReadOutProtection Level =1. Seems that when I update the version of customer firmware, the EEPROM data is erased. Seems that jumping from Level1 to Level0 produce a mass erase, and in consequence, the EEPROM is erased as well. I would like to know if I'm right. Jumping from Level1 to Level0 produce a mass erase, that produce erase the internal EEPROM as well? Thanks a lot.
I am conducting operational verification of the sample application of X-CUBE-SAFEA1 by connecting NUCLEO-L476RG and X-NUCLEO-SAFEA1B.I have some questions regarding the operation of the sample application "STSAFEA1_WRAP_UNWRAP".My questions are as follows:I demonstrated the sample applcation of "STSAFEA1_WRAP_UNWRAP" with a logic analyzer observing the I2C communication. According to that, it seems that the encryption and decryption processes are performed on the NUCLEO-L476RG side. Is this correct behavior?Is it possible to perform encryption and decryption processes on the STSAFE-A110 side (and with secret keys stored in STSAFE-A110)? If so, how can this be implemented? DetailsBelow are the steps I have taken:1. Execution of the sample codeI created a project on STM32CubeIDE via STM32CubeMX and executed the sample application "STSAFEA1_WRAP_UNWRAP" from X-CUBE-SAFEA1. The UART output results appear to be functioning without errors. 2. Step execution with a debugger and obse
Hello,Thanks for all of the help so far. Another question, this one regarding SFI process for the STM32U5 series. In AN4992 section 3.3.1 for STM32L/U/W series, it describes a secure bootloader that is split into 2 parts, one of which is responsible for executing the SFI process. Are these secure bootloader parts pre-installed in system memory by ST as part of your manufacturing & provisioning process?If yes, is the code for this secure bootloader available to ST Micro customers for analysis?When we install our own SBSFU to be used for future OTA updates, does that overwrite and/or disable the SFI capability?
Dear ST Community,I am currently using the STM32F407G-DISCOVERY board for my project and would like to implement the SBSFU (Secure Boot and Secure Firmware Update) bootloader on this board. However, upon reviewing the X-CUBE-SBSFU package, I noticed that it supports only a limited number of specific boards (approximately 15), and the STM32F407G-DISCOVERY is not among them.As the package lacks direct support for this board, I am unable to use the SBSFU functionality out of the box. I would greatly appreciate it if you could provide the following:Documentation or Guidelines: Detailed instructions on how to port or adapt the SBSFU bootloader to a custom board, such as the STM32F407G-DISCOVERY.Possible Methods: Suggested approaches or workflows to bring up SBSFU on unsupported boards.Additional Resources: Links to relevant documentation, example projects, or tools that can assist in implementing SBSFU on custom hardware.Your guidance will help me better understand the process and successfu
Hii Sir,Recently I have got Nucleo-H563ZI nucleo board and i was trying to do programming for blinking led present on the board with the trust zone activated, but i am unable to get how to do it.The process i follow is;1) Created new stm32 project -> Give the name of the project -> selected with TrustZone -> Finish. As the onboard LED was already defined in the .ioc file. Therefore generated the project with the default configuration, under main folder, two more folder were generated secure and non-secure. in nonsecure folder -> Core -> Src -> main.c in this main.c file searched for while loop and added toggleing of led code in it and build the code. As there was confusion which code to be uploaded first i tried to upload the nonsecure folder but the led was not blinking (only the led was on ) during this when I press the reset button the led was off. second time, I build the secure folder code and flash it in the microcontroller toggleing was working but t
Hello all,I have been working on a bare metal Rust implementation of the PKA engine in the STM32WBA55CG microcontroller. So far, I managed to properly initialize the PKA engine, and run both modular addition and subtraction by writing and reading the PKA RAM memory. However, when trying to run modular multiplication and exponentiation, the operation simply never ends (PROCENDF never clears). I am not sure why could this be, since I am just modifying the mode and the in/out memory offsets to which I write in the RAM. Below I show the corresponding code.The PKA RAM memory can be found in page 82 of rm0493 (https://www.st.com/resource/en/reference_manual/rm0493-multiprotocol-wireless-bluetooth-le-and-ieee802154-stm32wba5xxx-armbased-32bit-mcus-stmicroelectronics.pdf) #![no_std] #![no_main] use stm32wba::stm32wba55::{self}; use {defmt_rtt as _, panic_probe as _}; use cortex_m_rt::entry; use cortex_m::asm; use defmt::info; use core::{ mem::size_of, ptr::{read_volatile, w
Hello,We are using an STM32H573 with the Secure Manager provided by ST running in the secure environment. In the non-secure environment, we are calling PSA functions. These calls work before ThreadX is launched but fail afterward.According to the page Introduction_to_THREADX#STM32_integration, when TrustZone is enabled, I need to use a secure stack for each thread calling functions from the secure environment. To implement secure stacks, the functions defined in tx_thread_secure_stack.c should be added to the secure environment.The example STM32Cube_FW_H5_V1.4.0/Projects/NUCLEO-H563ZI/Applications/ThreadX/Tx_SecureLEDToggle_TrustZone illustrates this but without using the Secure Manager.However, I need to use the Secure Manager. Can you provide some guidance ?Are the functions from the file tx_thread_secure_stack.c included in the Secure Manager ? If so, how can I call them ?Should I create a secure module with the SMDK for this ?Thank you in advance for your
Greetings,I would like to know, in summary, what are the key main differences between RDP (ReadOut Protection) and PcROP (Proprietary Code Readout Protection), which one is safer and use cases.Thank you!
Hi,I am working on the SBSFU default code, which handles swapping content from the download slot to the active slot. However, I need to skip the swapping process and after Decryption download slot boot directly from the download slot.Could you please guide me on how to boot directly from the download slot?please find the attached flowchart for reference.Regards,RajaI have made changes in the SFU_BOOT_SM_ExecuteUserFw state and after application is not launching after changesstatic void SFU_BOOT_SM_ExecuteUserFw(void){SFU_ErrorStatus e_ret_status = SFU_ERROR;SE_StatusTypeDef e_se_status = SE_KO;uint32_t i; TRACE("\r\n= [SBOOT] STATE: EXECUTE USER FIRMWARE"); /* Reload Watchdog */(void) SFU_LL_SECU_IWDG_Refresh(); /* Verify if authentication and integrity controls performed at SFU_STATE_VERIFY_USER_FW_SIGNATURE */FLOW_CONTROL_CHECK(uFlowCryptoValue, FLOW_CTRL_INTEGRITY);for (i = 0U; i < SFU_NB_MAX_ACTIVE_IMAGE; i++){/* Slot configured ? */if(SlotStartAd
Hi ST team,We are using STM32H573VI controller for our product development, here we are facing an issue to develop JTAG locking mechanism, As we gone through reference manual of STM32H5 controller, we observed that in FLASH_OPTSR_PRG register contains the PRODUCT STATE, in which at first we made PRODUCT STATE to 0x17 as provisioning state later we made PRODUCT STATE to 0x5C as locking state. after implementing these we are not able to lock the JTAG. Please share any reference code to lock the JTAG or apart from this we need to configure any other FLASH OB register to make JTAG to be locked.Kindly let us know as early as possible.
Hi,I am evaluating/learning the SBSFU application example on STM32WBA55CG. I have disabled the MCUBOOT_HW_ROLLBACK_PROT and generated the signed confirmed image sbsfu_app_init.bin using the imgtool.exe without the security counter TLV using the below command. imgtool.exe sign -k root-rsa-2048.pem -S 229376 -e little -H 0x400 --pad-header --align 8 --overwrite-only -v 1.0.0 --confirm --pad sbsfu_app_init.bin The only change I made to the above command is to remove the "-s auto" and +0 from the version to ensure TLV for the security counter isn't added. However, when I run the application, the image validation fails within the bootutil_tlv_iter_begin as shown below i.e if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) {// fails with info.it_magic = 0x6907 if (hdr->ih_protect_tlv_size != info.it_tlv_tot) { return -1; } if (LOAD_IMAGE_DATA(hdr, fap, off_ + info.it_tlv_tot, &info, sizeof(info))) { return -1; } } else if (hdr->ih_pr
How can I generate the sfu_se_mpu.s file for the STM32H753ZI and STM32H733 controllers in SBSFU?
I’ve successfully compiled the SBSFU (Secure Boot Secure Firmware Update) code for the STM32H753ZI and updated the firmware. Now, I would like to use it with the STM32H733VGT6 MCU.Previously, I was using the STM32H753ZI controller, which did not utilize the IOC configuration file. I need guidance on how to migrate and adapt the IOC configuration specifically for the STM32H733VGT6 MCU.I’ve already referred to the AN5056 and UM2606 documents, but in these documents there is not mention any instructions on how to configure the IOC file for this type of migration.Could anyone provide guidance or relevant documentation for integrating the STM32H733VGT6 controller?
Hello,I am having some trouble understanding what bootloader (if any) is installed by ST from the factory for the STM32U5x and what AES key sizes that bootloader supports for secure firmware update. UM2851 only lists AES-CTR-128 (I interpret 128 to be the key size) but mcuboot docs lists support for 256-bit keys.Ultimately, I need to be able to encrypt my software using a 256-bit AES key. Is this possible with STM32U5A5 and the ST provided tooling? If so, is there documentation describing how to achieve this configuration? Thank you
STM32H743 - Does RDP protection gives 128 bit flash protection?How to configure for 128 bit.We want to implement read and write protection on the internal flash of the MCU/MPU to avoid unauthorized access through debug ports.
I am using STM32L452RE for an application.I want to implement firmware signing feature on the board so only authenticated firmware is allowed by bootloader to flash on the board. Can i conclude that mbedtls library is popular, but it cannot be used on the board since there is no hardware accelerator?I wonder that shouldn't be the case. However, I saw this example library where data signing is implemented. I feel something can be done on similar lines. Please guide on how to implement this. https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/NUCLEO-L452RE/Examples/CRYP/CRYP_AESModes
Good afternoon,we are facing issue with AES GCM Tag generated with STM32U585.In particular we compare the results generated by the microcontroller with the ones generated by an application developed with C#.This is the code running on the microcontrollerKey size is 256 Bit set to all 0 just to speed operations. Tag size is 128 bit. I know that the IV vector must have the last byte set as 2 an I dit it as requested. uint32_t pKeyAES[8] = {0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}; uint32_t pInitVectAES[4] = {0x00000000,0x00000000,0x00000000,0x00000002}; __ALIGN_BEGIN static const uint32_t HeaderAES[4] __ALIGN_END = { 0x24825602,0xbd12a984,0xe0092d3e,0x448eda5f}; Plaintext is a simple 48 bytes buffer (so a multiple of 16).The EncryptedText is identical to the one generated by the application: good.On the other hand the generated Tag is always different....maybe we are doing something wrong....could
Can recognize the chip, but can not burn and read the flash problem. In this case, is the chip broken or the chip locked? There is also a case that the chip can be identified as burning, but it cannot run the normal working program
In my project, I intend to use an external serial flash to hold UI assets as recommended by TouchGFX.I have followed this: https://community.st.com/t5/stm32-mcus/how-to-implement-and-use-your-own-external-flash-loader-an/ta-p/597752 but I only get flash erase errors from the STM32CubeProgrammer.The main issue that I see is that this project also needs to have the secure flash feature active, which is where I believe that the problem lies.Does anyone know if external flash loaders works with Secure Flash enabled? If so is there a white paper or document describing how to make both work?Thank you.
We are planning to use an external flash memory connected via QuadSPI to the OCTOSPI peripheral of a STM32H735 (at a later stage that would be STM32H733).This will be used to run firmware and store downloaded firmware updates with SBSFU. For that we will need the OTFDEC peripheral to ensure date is encrypted for storage.What I need to know is whether the Quad SPI interface of OCTOSPI will be able to work with OTFDEC in memory mapped mode? The memory also does not support HyperFlash.It is my understanding (from AN5050 and AN5281) that OTFDEC and OCTOSPI are independent peripherals in operation but where OTFDEC comes in between OCTOSPI and the AXI bus so it should be possible.
Good Morning,I am working on the Secure Boot using STM32U5 with this repository : https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/B-U585I-IOT02A/Applications/SBSFUI am trying to add a kind of "Dev. Mode" which authorise the boot even if the Application's flash is corrupted.Are there any restriction from the SBSFU_Boot code or ROM code that prevents this feature ?Moreover, do you have any links to the SBSFU_Boot.bin sources, especially the main.c or this part is private and can't be shared ?Best Regards,Loïc
Hello there,I am practicing with the STM32H573I-DK demo board, STiROT demo project and the chain of certificate feature.I have built a chain of certificates as described in https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Security:How_to_start_with_STiRoT_on_STM32H573.It seems that I cannot execute a regression a regression or other action by supplying the INTERMEDIATE key and certificate. For Instance, Full regression works with ROOT or LEAF credentials, but not the INTERMEDIATE.Am I doing something wrong ? or is it that intermediate certificates are only meant to generate leaf certificates, and cannot be used to re-open a device.Thanks for your feedback.Christian
Hi, I have locked out my MCU. I generated a Debug Authentication file with certificate (DA_Config.obk) and provisioned that into the MCU. However, I think I have regenerated a private key without regenerating a certificate. I am no longer able to do a regression on the MCU for DA authentication. I have tried multiple of certificates and regenerated certificates based on the root private key I used for generating the .obk file but nothing works. Also I don't quite understand the difference between the root, intermediate and leaf keys/certificates pairs. Which ones is used in regression? Any help would be appreciated. Thanks in advance :)
Hello ST Community,I’m working on a project using STiROT with TrustZone on an STM32H533, based on the example STiROT_Appli_TrustZone provided in the STM32Cube_FW_H5_V1.5.0 firmware package for the STM32H573. I adapted this example to the H533 and generated the project using CubeMX.CubeMX successfully created the ROT_Provisioning folder with all necessary scripts (postbuild.bay, XML files, etc.), and I’m using Keil uVision5 for building the project.However, I’m facing two key issues:Provisioning and Postbuild Issues:When running the provisioning.bat script, I get this error:"Error: appli_enc_sign.hex does not exist use TPC to generate it."Checking the log file (ob_flash_programming.log), this suggests the postbuild process isn’t properly generating the encrypted and signed image.The postbuild.bat script also reports:"Imgtool :: Input file not found"The binary is being generated in this directory: "C:\ProjectRoot\Binary\appli_s.bin"But my project is located here: "C:Proj
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.