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
Hello,I have a problem with the operation of my firmware in "closed" state of PRODUCT_STATE. When my device is in "open" mode (ED code) my firmware works perfectly fine, but when i do provisioning procedure and change state to closed (72 code), my firmware works for a second and then hangs. In that state i cannot attach a debbuger to see what going on, so I have no idea why it doesn't work. My device has trust zone disabled, it is a custom PCB with STM32H523CET6.Thanks in advance for any help.
Hi,In the past we've always produced 'release' firmware for STM32F4 which checks the RDP level (memory read / debug protection) at boot up, and ensures it's automatically set to RDP1 (read protection enabled). This ensures that our code can't be easily read out of the device by 3rd parties, but if necessary I can connect a debugger, reset the option bytes (which performs a full erase), and reprogram the chip. This works well. We also have our own secure bootloader which deals with encrypted firmware updates and which is well supported by our production equipment and staff.I'm now working on porting a design to STM32H523, which has an enormously more complicated security system.What I've figured out so far is that:- I think the closest behaviour it's capable of would be to have TrustZone disabled, to set a password for Debug Authentication, and to have the product in the "CLOSED" state when shipped.- This would ensure the product is read protected, but it can be fully erased and set bac
Hi Team,I am new to SBSFU, and our team requires two image examples. To reduce boot time, I need to eliminate the complete swap region, and I am currently working on this.I will flash the SBSFU binary, including only the SBSFU application, using the user button to update the firmware from a local download.After the download, I will decrypt the data and attempt to start the application from the download slot.Could you please suggest the best approach to eliminate the swap region?Regards,Rahul
Hello,I am using the Nucleo-STM32F411RE development board and require support for cryptographic functions, particularly ECC Point Generation.input: w0, N output: Y, y Begin generate random scalar y on chosen curve Y=y×G+w0×N (G as defined NIST P-256) return Y endTo achieve this, I downloaded the X-CUBE-CRYPTOLIB v4.3.0 package, But I could not find any API's suitable for above operations like (ECC scalar multiplication or addition) which are very basic operations in ECC algorithm.Could anyone please help me with suggestions are feedback.Best regards,Akash M@Imen.D Please help.
Hi,I've tested freertos when trustzone is enabled, the freeRTOS can work.I've tested PSA API in "TFM_Appli\NonSecure" when freertos not used, also can work.When I try to access PSA API in "TFM_Appli\NonSecure", when freertos is used, it will trigger MCU reboot.Please advise how to access PSA API in "TFM_Appli\NonSecure" when free rtos used."uint8_t TRU_TRNG(uint8_t *aucRand, uint8_t ucNumOfByte) {psa_status_t status = PSA_SUCCESS; status = psa_generate_random(aucRand, ucNumOfByte);if (status != PSA_SUCCESS)return FAIL;elsereturn 0;}"
After the build process for the project, I get a file.bin that I want to encrypt to be protected and decrypted in my chip via the bootloader. How is this done, knowing that I use stm32 cube ide?
Hello,I have successfully executed the default OEMiROT and Application projects in STM32CubeH5\Projects\NUCLEO-H563ZI\ on our prototype board based on STM32H563 1MB variant. Slight adaptations were needed for which I got plenty of support in this thread: Solved: STM32CubeProgrammer Default DA Configuration, TZ E... - STMicroelectronics CommunityI would now like the OEMiROT to "skip" Secure application image altogether and directly boot into Non-Secure application image (We have developed our FW entirely in Non-Secure domain and would like to continue with it, with Secure Boot achieved through OEMiROT).Naturally, I started with modifying "flash_layout.h" in OEMiROT_Boot project. Our flash layout configuration in "flash_layout.h" looks like this currently after changes:... /* Flash layout configuration : begin ****************************************/ /* #define MCUBOOT_OVERWRITE_ONLY */ /* Defined: the FW installation uses overwrite method. UnDefined: The FW installation
Hi everyone,We're working with STiROT and TrustZone on an STM32H5 (NUCLEO-H533RE), and during the provisioning process we generate the STiRoT_Config.obk file from the STiRoT_Config.xml using the Trusted Package Creator (TPC).Our question is whether the .obk file itself is encrypted or signed during generation, and if so, which keys are used for that purpose?We're trying to determine if we need to protect any additional private keys used during .obk creation, beyond those already defined for firmware encryption and authentication.Any insight on whether the .obk file is cryptographically protected (encrypted or signed), or if it's simply a binary container holding the public and private keys for secure boot, would be greatly appreciated.Thanks in advance!
When I use mbedtls on my STM32U585 core board without enabling hardware acceleration, it works fine. However, when I follow the instructions in some posts and copy examples, such as the rsa_alt from SBSFU under STM32U5Cube, many errors appear, and it seems difficult to fix. I noticed that the mbedtls in STM32CubeU5 seems to be several versions behind. I also tried using H5 for porting, but the result is still not satisfactory. Will there be new hardware acceleration examples for STM32U585 using STM32-MW-MBEDTLS? Thank you."
Hi,I am trying to get the OEMiROT example projects running on STM32H563 from "STM32CubeH5\Projects\NUCLEO-H563ZI\Applications\ROT". The provision.bat script fails after writing option bytes (probably after enabling TZ) and tries to reconnect to the MCU, which is where the script fails.To get around this, I am trying to do what "provisioning.bat" does manually. I compiled the "OEMiROT_Boot", "OEMiROT_Appli_TrustZone" apps (secure and non-secure) in STM32CubeIDE and the expected .hex are generated. Here are the steps I followed next in STM32CubeProgrammer:Product state set to "Provisioning". At this stage, STM32CubeProgrammer confirms if default DA configuration is to be used. I select yes. Successful.Enable TrustZone. Successful.Write "OEMiROT_Config.obk". Successful.Flash all .bin and .hex compiled in "STM32CubeH5\Projects\NUCLEO-H563ZI\Applications\ROT".Set product state to "iROT Provisioned". MCU disconnects, reset problems reported, debugger cannot reconnect.I try DA. DA is in
Hi, I have a firmware I wan't to give already flashed protected by PCROP to a customer. Insidie my firmware I use some standart library functions line strlen(), vsprintf and some HAL functions to manage peripherals.What is the best way to call these functions from pcrop area?Should I include all needed functions in the pcrop area? Regards,Miguel
Hi everyone,I am trying to use the X-Cube-Cryptolib library to decrypt an array encrypted by an external application.The original data has been encrypted with the AES-GCM 128 using a key of 16 bytes and an IV of 1 byte.Now, I am getting an error where trying to set the IV to a length other than 12 byte.Can you confirm that the method "cmox_cipher_setIV" only accept an IV of 12 byte? It is strange that the method documentation does not contain such info..I tried with an other library that perform a GHASH padding of the IV and it can decrypt my input data.Is there any similar implementation of a standard compliant method to perform an IV padding to be used with the ST library?Thanks,regardsArianna
Hi, We are using STM32u585 device on our board, we want to use a part of internal flash memory for permanent data storage. Please clarify the following. 1)is it possible to use internal flash access using LevleX (non RTOS)?2)is there any reference available?Thanks in advanceG.Vaikundam
Intergrated USB in SBSFU for FW update, and adapting it to work with YMODEM protocol. Only half of the package is downlaoding to microcontroller. Getting error. I will highly appreciate for any help. = [SBOOT] STATE: HANDLE CRITICAL FAILURE= [EXCPT] COM ERROR DURING DOWNLOAD != [SBOOT] STATE: REBOOT STATE MACHINE========= End of Execution ==========with regardsJitu
When using the RAM self-test feature in X-CUBE-STL, I enabled the RAM backup buffer in the application by not defining STL_DISABLE_RAM_BCKUP_BUF. I also allocated a section in the scatter file:; 128KB DTCM RW_STL_TM_RAM 0x20000000 0x20 { ; Place STL RAM TM backup buffer outside tested subsets (i.e., beginning of RAM) *(backup_buffer_section) } This section is explicitly excluded from the self-test region. My question is: How is the integrity of the RAM backup buffer itself ensured? If it is not tested, could errors in this buffer compromise the self-test process or data recovery? Do I need additional measures to guarantee its reliability?
Hello everyone,I'm experimenting PCROP activation on stm32h743 following this ST-tutorial: https://youtu.be/7Wr90XFA8_Q?si=tDpqUtMdin9Oyn-PThe activation works fine but i cannot disable PCROP using CubeProgrammer.I did a RDP1 to RDP0 regression with DMWP1 checked but the PCROP is still activeAfter RDP regression i can se that the unprotected flash are is erase:But not the protected one:I can also not change the option bytes anymore, even RDP0 to RDP1 does not workHow can i recover from this situation ?@Jocelyn RICARD, @Fred
Hello everyone,I've spent a considerable amount of time trying to change the default AES and ECDSA (ECCKEY1) keys, but I can't figure out why it always results in a 'Fw header authentication error' during the firmware image update process.The project is built with STM32CubeIDE under Windows, all paths and necessary modifications needed for the scripts to work from the new project location (prebuild, postbuild, and the encryption scripts) are done and I can confirm 'se_key.s' is updated with the same data as in 'OEM_KEY_COMPANY1'. SeCoreBin compiles without any issues, the same also applies to SBSFU and the UserApp project.I followed the instructions found here:\Middlewares\ST\STM32_Secure_Engine\Utilities\KeysAndImages\readmeand looks like the prepareimage.exe works and generates the 'ECCKEY1', which also when used instead of the one that comes delivered with the package causes the firmware to be rejected immediately. Changing the AES key either manually using a Hex Editor or by u
The documentation I have says the Ethernet calculation with 0x4C11DB7... but I don't get results matching what I get from any other calculator. To remove any endianess or mirroring questions I've tried 0x00000000 and 0x66666666 (e.g.). All calculators I have produce 2144_DF1C and E425_C810 for those 2 inputs. From the CRC unit I get 6904_BB59 and 7B91_8196 (which don't seem to be related by combinations -- on the final value -- of bit flipping and reflection).Yes I asked what the results are -- because I can't imagine what I' don't see in the 1 -> CR; XXXX -> DR; Result <- DR sequence.TIA,Brett
Moved from MPUs forum: STM32C0 is an MCU - not an MPU. Hi, I am not sure if STM32 cryptographic firmware library can run on STM32C071 because this microcontroller does not have embedded Crypto (Hardware) ? Thanks Gregory Saint-Jean
In the SBSFU reference code for the STM32H753ZI controller, I came across the following function:FLOW_CONTROL_CHECK(uFlowProtectValue, FLOW_CTRL_RUNTIME_PROTECT);This function compares whether the two values are the same. In my implementation for the STM32H753ZI MCU, the uFlowProtectValue is set to 0x000030F1U.Now, I am implementing the same logic for the STM32H733 controller, but the uFlowProtectValue variable is set to 0x00005776U.So can you please guide me why I am getting different value for H733, means where this value is updated?
Hello all,I have been working on a bare-metal implementation of the PKA engine in the STM32WBA55CG microcontroller using Rust. So far, I have been able to run modular addition and subtraction, modular exponentiation, arithmetic operations, ECC point check, ECC Multiplication and ECDSA sign and verify. However, there is an issue with the modular multiplication. Whenever I try to multiply operand_a * operand_b mod N, I get zero as a result (or some incorrect value). According to the datasheet:Simple modular multiplication A x B mod na) Compute r2modn using Montgomery parameter computation.b) Compute AR = A x r2modn mod n. Output is in the Montgomery domain.c) Compute AB= AR x B mod n. Output is in natural domainAnd the memory addresses are as follow:I have tried two approaches:1. Loading into the memory operand_a and operand_b and perform the multiplication using mode 0x102. Perform the steps mentioned above, i.e., compute AR, and then AB using AR.In both cases, I get a zero result in th
Good morning, I am Paul Goulpié, technical expert at Smile ECS - integrator of open source embedded solutions. I am contacting you because I have some questions related to the secure boot solution (mcuboot).I am using the following evaluation board: B-U585I-IOT02A.I am using the following reference project: https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/B-U585I-IOT02A/Applications/SBSFU Currently I see that the key format used to create the signature is RSA2048. I would have liked to use an RSA4096 key.Can you tell me if there is a hardware restriction that would prevent it from being used. I am well aware that software modifications at different levels are necessary, however I would have liked to know in advance if a blockage on the hard side (bootRomCode or other) prevents this implementation from being carried out.Are you aware of the completion of this integration (on an internal or external project).On a similar project I have the signing step which is outsou
Hello.With a STM32H563, i can change the product state to 0x17 (provisoring), reconnect with HotPlug,start provisoring with my OBK-File and change the production state to closed (0x72) without any problems.I don't use TrustZone.A full regression after this with STMCubeProgrammer and the password.bin file is possible without problems. I use the explanation from the knowledge base here: https://community.st.com/t5/stm32-mcus/how-to-enable-rdp-like-product-state-flash-protection-in-stm32h5/ta-p/708082 If I try the same thing with an STM32H533 and with the same OBK file i used on the STM32H563 ( <DoEncryption>0</DoEncryption> in XML-File : just as stated in the knowledge base for all STM32H5, because the STM32H533 has crypto), i can do the provisoring, can change product state to closed.But after this a full regression is not more possible.Testet with 2 eval boards and with STMCubeProgrammer V2.18 and STMCubeProgrammer V2.19 If i read out the OBK-K
Porting SBSFU 2.6.2 to STM32G0B1CEU6 (512K FLASH and 144K RAM) based on Nucleo-G071RB example.See the history of my previous Solved: SBSFU 2.6.2 firmware swapping issue - STMicroelectronics CommunityAfter I solved the firmware swapping issue, I went on and test all the other security features. All are good until I turned SFU_MPU_PROTECT_ENABLE on. Now I have hard fault as below: @7:8000000 size:e sub:c0 perm:5 exec:0 @6:20000000 size:b sub:0 perm:1 exec:1 @5:20000000 size:10 sub:0 perm:3 exec:1 @4:8010000 size:a sub:0 perm:1 exec:1 @3:8000000 size:f sub:0 perm:6 exec:0 @2:8000000 size:12 sub:0 perm:3 exec:1 @0:40000000 size:1c sub:0 perm:3 exec:1 @1:40021000 size:9 sub:0 perm:1 exec:1 = [SBOOT] RuntimeProtections: 100 = [SBOOT] System Security Check successfully passed. Starting... ====================================================================== = (C) COPYRIGHT 2017 STMicroelectronics = = = = Secure Boot and Secure Firmware Update = ====
Hi Team,I've updated only the UserApp RAM region. I came across a post stating that SBSFU and the application are independent, so I followed that approach. However, after modifying the RAM region and uploading the sbsfu.bin file to the MCU, I get an "No valid FW found in the active slots" debug log and the system enters Local Download mode. When I try to upload from Local Download, I'm encountering a firmware decryption error.Has anyone faced a similar issue or have suggestions for resolving this?Regards,Prakash Attached the log below: -= [SBOOT] System Security Check successfully passed. Starting...======================================================================= (C) COPYRIGHT 2017 STMicroelectronics == == Secure Boot and Secure Firmware Update ======================================================================== [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL= [SBOOT] STATE: CHECK STATUS ON RESETINFO: A Reboot has been triggered by a Hardware reset!= [SBOOT] STATE: CHEC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.