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 all,we would implement SBSFU (Secure Boot and Secure Firmware Update) on STM32U585.Our goals are:application do not use TrustZone feature (TZ_EN = 0)we want to avoid access to MCU on field (Device protection, for exapmle RDP = 1)question: if on field MCU is protected with RDP = 1 or 2 or whatever how could a firmware update take place? we need a regression before firmware update?at start up "mcu boot" check the security/integrity of application firmware: is that right?we want to upload the new firmware via USB connection: we think we should develop our custom bootloader. Correct?in our understading we will develop 2 projects (one project for application + bootloader and one project for mcu boot)how we could "join" the two binaries into a single one? is it possible?A possible scenario for our could be that one:user connects to our device via USB.user want to update the firmware: then from the application we start our custom bootloader.bootloader copy new firmware into a dedicate "upd
Hello all.I have a question about how to use KMS_GenerateKeyPair() function. There are no examples in the code, and API description is not really enough for my little brain. Could somebody provide me an example on how it should be used? What kind of parameters, how to initialize them and so on. I would be grateful!
Hi,My question is about project structure.To implement SBSFU what is the best or correct approach if I have a project that I would like to flash to a target incorporating SBSFU?Import four project folders (SBSFU, SECoreBin, UserApp and MyProject) into a workspace in SMM32CubeIDE / Eclipse, compile individually to confirm clean builds then copy the source and header files into the UserApp project folder, then alter my project code and edit the makefile to blend the projects?OrSetup SBSFU for serial comms only (as detailed in - MOOC - Security Part6: STM32 security ecosystem)and use Y-modem to flash MyProject.bin to the target (having signed MyProject.bin) using external tools.AlsoIn the tutorial, batch scripts are used for post build processing which fail to run if the project folder setup is incorrect and requires a lot of editing. Is it best to start with the SBSFU folder structure and import MyProject into the “2_Images�? folder (presuming a 2 image bootloader is required)?Any help/a
Hello .According to the reference manual, the default RDP level is set to level 1. However, after performing a full erase with ST-Link and then writing the hex file, the RDP level was found to be set to 0.I would like to set the RDP level to 1 at the stage of writing the hex file with ST-Link without using software to control the registers. Could you please tell me how to do this?Best regards, aki
The project uses Trustzone with a secure bootloader (based on mcuboot) and non-secure application.The application enters STOP3 mode, waiting for interrupt, with EXTI configured on a GPIO line to trigger an interrupt.Waking up from stop mode works perfectly, unless readout protection is enabled (tested with level 0.5 and level 1).In the documentation or the errata I can find no relation between RDP and stop mode behaviour.
Hi,While using the STM32Cube_FW_H5_V1.1.1 repository to explore secure boot on the STM32H5, I saw that the configuration file to generate OEMiRoT_Data.obk is missing. As I want to use my own keys and certificates for the OEMiRoT example application, I think I should regenerate the OEMiRoT_Data.obk file, but I can't find how to do this.Am i missing something, or is the OEMiRoT_Data.xml file missing from the repository?Best,Jens
So, I want to modify provisioning.bat and/or XML files to create an SFI that contains our developed non-secure app instead of default one, Secure Manager, and the various (especially DA one) OBKs.This will then be downloaded into factory-fresh (only STiRoT and STuRoT installed) STM32H573-based custom boards via ST-Link/V3.Note: at the end should be in CLOSED product stateOur project dir is a little different from the SMAK directory layout: <project_root_dir> Binaryappli.binappli_enc_sign.binappli_enc_sign.hexROT_Provisioning (basically copied from SMAK)DASMSTiROT
Hello,RM0444.Rev5 page 98 says that it is possible to reset it only when:• RDP is set to Level 0, or• RDP is set to Level 1, while Level 0 is requested and a full mass-erase is performed.I supposed that if RDP is changed from level1 to level0 then the BOOT_LOCK is also automatically removed after the mass-erase triggered by that RDP change.Is that correct?This is not what I see with STM32CubeProgrammer v2.10.0 and stm32g031 chip because I have to manually remove it in a successive step.Thank you.
Hello all,I have a question about additional MPU protection provided by enabling SFU_MPU_PROTECT_ENABLE.What are the main benefits of that?How much "protection value" do we miss if it's disabled?
Hi all,I am using STM32F769I DISCO Board, STM32 CUBEIDE,X-CUBE-SBSFU 2.6.2 , WINDOWS Environment for checking new features in security i.e. secure bootloader.I am newbie to this topic and I have followed compilation procedure as per the readme file, but I am getting file missing error in MDK-ARM IDE SE_CoreBin.s(19): error: A1270E: File "..\..\1_Image_SECoreBin\MDK-ARM\STM32F769I_Discovery_1_Image_SECoreBin\SECoreBin.bin" not foundand in CUBEIDE :"../prebuild.sh" "../"prepareimage with python scriptpython /prepareimage.py conf ..//../Inc/se_crypto_config.hpython: can't open file 'C:\\prepareimage.py': [Errno 2] No such file or directoryselected../prebuild.sh: line 54: can't create ..//Application/Startup/se_key.s: nonexistent directory../prebuild.sh: line 55: can't create ..//Application/Startup/se_key.s: nonexistent directory../prebuild.sh: line 56: can't create ..//Application/Startup/se_key.s: nonexistent directory../prebuild.sh: line 135: can't create ..//Application/Sta
Hello,please I need a confirmation about RDP level2 and WRP combination on stm32g031 chip.Based on RM0444.Rev5 Table 19, if I use my own bootloader and I write-protect the flash sectors, I have to avoid activating RDP level2 or I'll loose the opportunity to update any firmware (application and/or bootloader itself) even from inside the microcontroller.Is that correct?If it was correct: so why, generally speaking, one should go with RDP level 2 when RDP level 1 is enough to prevents useful data to be read-out from the main flash?Just to avoid any firmware update from the outside world? Thank you
I am building a secure bootloader on the STM32H755, but I've bricked a couple of boards now trying to get the secure areas working.I intended to use a "recovery" function on a button press to do a mass erase with protection removal. Then I can test enabling the secure areas via resetAndInitializeSecureAreas, and get back to square 1 nice and easy. Except, it didn't work - I mass erased by device but the debugger doesn't work... So I assume the secure area is still present.Before I brick yet another board, I'd like to check my assumptions. If I follow the steps in "Flash mass erase with automatic protection-removal sequence", on the STM32H755, will that get me back to a "blank" device, with no secure regions?Additionally, can I place the code that does that in RAM - IE in a non secure region? I ask because it feels wrong to erase flash while running from flash.
Hi all,One small doubt on the tamper configuration, is it possible to configure both active and Passive tamper in the Same project/API, or both should be in different project/API. why this doubt is as Seed is not required for Passive tamper, so does it effect the passive tamper implantation if we implement in the same project.
Hi,Where can I find a documentation for the version 4 of X-CUBE-CRYPTOLIB ?Regards,Fred.
Hello As in the title, for my project I'd like to know exactly what is the maximum storage capability/size of the device NV memory.The TPM used is ST33TPHF2XI2C.I wasn't able to find anything in ST documentation (datasheet, application notes).Waiting for your kind advice.
Hello for allIn last days i was begin to implementation AES to work on stm32f423I am using example in NIST Special Publication 800-38A to take key-128 bit, input data that plain text , encryption and decryption data.but nothing seems to work , when i print HAL_CRYP_GetError(&hcryp)it return 0.I hope my question clear enough.Any tips for this.best regard.
Hello,There is No-Stretch GetCheckSum command in I2C bootloader command, Does someone know what the CRC algorithm used in the bootloader?Many thanks.B.R.Frank
Hello support team,Have a Nice day.I am working on STM32U585ZIT6 Controller and investigating SBSFU for firmware upgrading.I list our specifications for a custom bootloader below.Enable TrustZoneEnable Dual bankRun time firmware write in the second bankAfter successfully doing it swap bank I do not find specific this series SBSFU related document Can you provide me integration document for STM32U5 Series? https://www.st.com/resource/en/application_note/an5056-integration-guide-for-the-xcubesbsfu-stm32cube-expansion-package-stmicroelectronics.pdfThanksHiren R. Thumar
Hi, with MCU STM32U585QII6QTR we encrypted an AES key using SAES engine and stored it in Internal Flash in RDP Level 0 and then moved to RDP Level 1. When we decrypt the key that was encrypted in RDP Level 0 using SAES engine, we didn't get our original key. We kindly request you to support us in solving this issue.
Hi TeamGreetingsI have some general queries with respect to the usage of the TFM Application provided in firmware package.(Some of them were asked previously but to get a clear understanding)1. For calling a secure module(example UART or ADC) - can i create a secure nsc.c file(in TFM_Appli_Secure)-> initialise the module and for usage(for example uart tx function) in the non secure area(using CMSE_NS_ENTRY and CMSE_NS_CALL) to the functions that will be called from the TFM_Appli_Non_Secure project) - is this method a correct approach.2. I need to implement some crypto modules in the secure area(TFM_Appli_Secure) and access them from the non Secure Area(TFM_Appli_Non_Secure). Can i use the implementation directly from the mbedtls library -> initialise them in the TFM_Appli_Secure project and use the above secure_nsc.c file to give a function to use the encrypt and decrypt functionality, from the TFM_Appli_Non_Secure project. 3. I saw some reference implementation of crypto sc
If LL_CRC_INDATA_REVERSE_WORD is set and 8-bit data is provided via LL_CRC_FeedData8(), the resulting CRC is not what is expected. It appears the combination of word-reversal and byte-submission mangles the submitted data in some way, when I had expected it to fall back to byte reversal.The datasheet does not indicate this is a concern, and the HAL code freely mixes word, half-word, and byte sizes, giving results that do not match third party calculators when dealing with data that isn't a multiple of 4 bytes in length. For example, these three all give correct results (22C644CD): uint8_t data8[8] = {0x1F, 0x52, 0x41, 0x9C, 0xB6, 0xAF, 0, 0}; uint16_t * data16 = (uint16_t *)data8; uint32_t * data32 = (uint32_t *)data8; LL_CRC_SetInputDataReverseMode(CRC, LL_CRC_INDATA_REVERSE_BYTE); LL_CRC_ResetCRCCalculationUnit(CRC); LL_CRC_FeedData8(CRC, data8[0]); LL_CRC_FeedData8(
Hello all,Quick question. Why does Secure Engine (SE) consume so much RAM for projects supporting KMS and X509? In sample projects, by default it's around 120 [kB] of RAM assigned for SE. For purely "building" purposes we decreased it down to 36 [kB] and it builds successfully, but still wondering why by default it's so much? PS. Yes, that question might seem dumb, but we are trying to find out what's the RAM consumption by SE.
Hi all,I was hoping someone could advise me on the key storage feature of the part number STSAFE-A110 (STSAFA110S8SPL02).We have a device in the market-place at present which is currently undergoing a redesign. The device itself is a network security orientated product, to which we would like to add en/decryption.In order to ensure our device can be updated in the field, and during the process of development, we were hoping the 16-slot secure key storage fields that the ATSAFE-A110 offers, would be a rewritable area of memory, or is this memory bank one-time-programmable (OTP) only?Should the key storage only be OTP; can this device be used to encrypt/decrypt data when provided with a key from an MCU, to lessen the processing load of the MCU?Or does ST offer any devices that could perform such a role?Many thanks for taking the time to read this, and kind regards,Josh.
Hello, What is the status of the OEMKEY1 and OEMKEY2 when the RDP regression happens. Are those keys are also erased ? Thanks in advance.Best Regards,Surya S
Hey,I tried to activate the HDP feature / secure software area on H753 following this documentation HDP secure area for STM32H7B3xx microcontrollers - Application note. I did only activate the security option byte not the secure software area itself. But I cannot connect via ST32 Cube Programmer anymore .- Error: No STM32 target found.My procedure so far:- Clear Flash- Activate Security option byte to get access to the RSS code- Implement jump in Bootloader via RSS_exitSecureArea - 0x1FF0 9514 (controller dependent)- Flashed Bootloader and Application- Cannot connect via Debugger Hot plug (and under reset as well)- Did not activate secure software areas yet Whats strange is, my display shows, that the application is started. Means, the jump via exitSecureArea does work. The application itself does as well works as expected. My understanding of the security option is, that it - forces the boot through RSS (therefore the need to connect as hot plug)- gives you access
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.