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
How can it be, that the CMOX library implements `append` functions for hashes (like cmox_hash_append) but the equivalent for verification or signing of ECC algorithms does not exist?How should we check the signature of a 10 MB update package on a device which just has 512 kB RAM?We are using EDDSA, which already includes SHA-512 hashing. One workaround would be to sign the hash of the binary file, but that goes against the idea of EDDSA.
Hi, I am working on NUCLEO-H533RE board. I am checking all the configurations before start of my work. As attached below, The datasheets says that PKA is supported when i opened .ioc file, It is visible as greyout. I am not able to activate it. Even i configured the clock configurations for the board. I am not able to find documentation regarding H533RE. mostly it was written about H563 or H573 series. Could you please also help me out regarding the documents.
Hi, I would like to work with the security features of STM32H533RE microcontroller. For that,1.Do I need to enable anything or install any libraries files in order to work with it.2. If there is any example projects available?3. The path for Installation and documents .Please help me out.
Hello,I would like to replace ECC public key in SE_Key_region_ROM region from my application in runtime. My device has no protection enabled (RDP, PCROP, WRP). I am able to read and write in the region via CubeProgrammer.I dumped the 256 bytes of SE_Key_region_ROM but I am unable to identify the public key associated to the ECC private key ECCKEY1.txt. How can I retrieve and identify the public key based on the default private key provided by STM (SE_Key_region_ROM region starts at address 0x08000400) ?This is my use case :I have a device is running with default SBSFU configuration (ECCKEY1.txt and OEM_KEY_COMPANY1_key_AES_CBC.bin used to sign and encrypt the firmware). My device supports firmware update OTA by cellular.I would like to test this procedure :- Sign a firmware with a new ECC private key and update the device with this firmware.- After download and before rebooting, the first firmware would copy the ECC public key to SE_Key_region_ROM- After reboot, the
Hello TeamI'm facing below error in STM32CubeIDE while compiling the source code in "Release" mode:"Unable to Generate Command Line in STM32CubeIDE" And it's getting stuck at below point:# Each subdirectory must supply rules for building sources it contributesSrc/%.o Src/%.su Src/%.cyclo: ../Src/%.c Src/subdir.mk$(error unable to generate command line)Issue snap as below: Further I disabled the "Cyclomatic complexity" setting as well to resolve this issue, but not get any success: So could you please support in this case.- regards
Hello,We want to use the STM Crypto Library " X-CUBE-CRYPTOLIB" for a project at our company. Since we will only be using a portion of it, the question arises whether it is possible to customize the static ".a" file ourselves (to make it smaller) or to provide a customized one from STM. The reason is that the memory on the microcontroller is very limited, so saving a few kilobytes would be very helpful.We look forward to your feedback.Kind regards,Rojeda
Hi All,Does the SBSFU reserve all of the DTCM in an H7 (stored state information, etc., expected to be stable across Core resets) such that the application shouldn't touch any of it after beginning execution? The "Protected RAM ..." note in AN5056 Figure 12 implies this, or am I reading it wrong?Thanks!
Hello everyone,I would like to implement a project using TrustZone on the STM32 L562 Discovery board. To get started, I based my work on the STM32Cube_FW_U5_V1.4.0\Projects\NUCLEO-U575ZI-Q\Examples\FLASH\FLASH_EraseProgram_TrustZone\ example, which is often referenced in the forum for similar questions.When I try to write from the secure world to the secure world, everything works fine. However, when I try to write from the secure world to the non-secure world, I encounter an error with the SECWRPERR flag. This is puzzling because I haven't set any write protection on the memory areas I'm trying to access.While trying to understand the cause of this issue, I checked the STM32L562xx Reference Manual and found something interesting. On page 189, it mentions the following: Additionally, if I understand correctly, the table on page 212 states that the secure world cannot perform write-erase operations in the non-secure world. However, this seems to contradict the general principl
If this thread was not read only i would bring it to life again. @Jocelyn RICARD @EEdwa.1 @Bubbles @Arno1 @Denish_Ribadiya @cyril After succesfull compiling (NUCLEO-G474RE) SBSFU and uploading UserApp troguh (TERATERM) \en.x-cube-sbsfu-v2-7-0\STM32CubeExpansion_SBSFU_V2.7.0\Projects\NUCLEO-G474RE\Applications\2_Images I decided time to do the same in linux, the issue is teraterm doesnt work for linux.Trying to use minicom:Adding the simbol for minicom special compilation and recompiling SBSFUinstalling minicom sudo apt install minicom Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: lrzszminicom uses by default YMODEM lrzsz implementationThe FW update is VERY SLOW (for only 24K) and ends up with incomplete half update: full update, it says incomplete: and the SBSFU console says FW too big======================================
I am trying to run the Secure Boot examples from STM32CubeL5 and have everything built, but on step 2 where I run `TFM_SBSFU_Boot\STM32CubeIDE\regression.sh` I am having an error where I cannot program the option bytes.(Another similar thread was with someone who bought a counterfeit part so I'll also mention that I bought the kit from ST.)This is the script output$ ./regression.sh regression script started Regression to RDP 0, enable tz ------------------------------------------------------------------- STM32CubeProgrammer v2.19.0 ------------------------------------------------------------------- ST-LINK SN : 004600313137510B33333639 ST-LINK FW : V3J13M4 Board : STM32L562E-DK Voltage : 3.29V SWD freq : 8000 KHz Connect mode: Hot Plug Reset mode : Software reset Device ID : 0x472 Revision ID : Rev Z Device name : STM32L5xx Flash size : 512 KBytes (default) Device type : MCU Device CPU : Cortex-M33 BL Version : -- UPLOADING OPTION BYTES DATA ... Bank : 0x00 Address : 0x50022
Hello,I am trying to upload the user firmware using BFU(1 slot) and Linux minicom, it always failed to complete to transfer a UserApp.sfu. I have read the UM2767 and followed all steps. But it works well on Windows Tera Term.I am testing on both of Nucleo55 eval board and custom board and using STM32Cube_FW_WL_V1.0.0(SBSFU version 2.4.0), not succeed.I have looked for the similar issues, couldn't get the workaround.There are some similar issues:https://community.st.com/s/question/0D53W00000HMk4nSAD/for-sbsfu-v240-send-firmware-file-by-linux-minicom-ymodem-failedhttps://community.st.com/s/question/0D53W00000Eba1XSAR/download-firmware-by-ymodem-failed-at-linuxLast article tells me this issue would be fixed in SBSFU v2.4.0, but I am failing.This is what I've done:defined MINICOM_YMODEM in app_sfu.hErase flash and upload the BFU.binset minicom 115200bps, 8N1, HW flow control: None.ymodem protocol setting:+------------------------------------------------------------------------------+ | Nam
Hi We are developing a product that uses an STM32 microcontroller. In the microcontroller’s firmware, we have implemented a password that the user must enter at startup. If the user forgets the password, how will the program run? (Note: No software or hardware fallback has been implemented for this issue, and the source code is not accessible.)
Hello,HAL driver for CRYP peripheral of STM32H7RSxx series generates invalid AES GCM TAG.According specs, header should be 0-padded to 16 bytes, but in the function CRYP_GCMCCM_SetHeaderPhase() the HeaderSize field is assumed to be expressed in words.This leads to errors when header is, for example, 5 bytes long (as in TLS handshake). cfr. STM32H7xx series implementation STM32Cube FW_H7RS V1.2.0 Alessandro
Hi,I am using the STM32H7S78-DK. I want to upload an encrypted application to the external 1-Gbit Octo-SPI flash memory connected to XSPI2.I am using the explanation in this video: https://www.youtube.com/watch?v=JxhKmVUB2Ws&list=PLnMKNibPkDnFQXYK0ztHV9iMVS6EAtKpD&index=10as well as the example code linked in the video description: https://github.com/ST-TOMAS-Examples-ExtMem/stm32h7rs_ospi_mce?tab=readme-ov-file As I am using XSPI2, I configure MCE2 to use the Noekeon encryption. My code looks like this:MCE_HandleTypeDef hmce2; uint32_t Key[4]= {0x23456789, 0xABCDEF01, 0x23456789, 0xABCDEF01}; hmce2.Instance = MCE2; if (HAL_MCE_Init(&hmce2) != HAL_OK){ Error_Handler(); } { MCE_NoekeonConfigTypeDef NoekeonConfig ; MCE_RegionConfigTypeDef RegionConfig ; NoekeonConfig.KeyType = MCE_USE_MASTERKEYS; NoekeonConfig.pKey = Key; if (HAL_MCE_ConfigNoekeon(&hmce2, &NoekeonConfig) != HAL_OK){ Error_Handler(); } /* Set the MCE Region configuration*
Hello ST team,I am currently working on NUCLEO-N657X0-Q (STM32N6) device using a FSBL (Secure Bootloader) an APPSecure and an AppNS (Non-Secure Application).The FSBL is correctly loaded first and then jumps to the AppSecure which jumps to the AppNS. Everything is working well when I prog all the apps separately using STM32CubeProgrammerHowever, I'm facing difficulty debugging the AppNS easily (which is actually my end application) with STM32CUBEIDEMy questions:What is the ST recommended method to debug an AppNS project ?Is it recommended to boot directly into AppNS during development (bypassing FSBL temporarily)?(= Should I move my AppNS temporarily to the boot address, and later re-add the FSBL before production?)Any other ways ? Any official guidance, best practices, or documentation references would be very helpful!Thanks a lot for your support,Best regards,Johan
Hi all, I am trying to make my NUCLEO N657X0 board working with : FSBLAPPSecureAppNonSecure I am having issue in understanding how to get the things done : I have created a new STM32 project on STM32CubeIDE, ending with having 4 differents projects in the IDE - AppliNonSecure, AppliSecure, ExtMemLoader, FSBL I selected generate demo code, and everything works fine in debugging FSBL following the jumpers indications etc...Until there, no problem. Now I want to run in the XIP template to execute my code from External Flash. I found the template STM32Cube_FW_N6_V1.1.0\Projects\NUCLEO-N657X0-Q\Templates\Template_Isolation_XIPIs there any documentation on how to use this ? There is no STM32CubeIDE project, its just src and inc folders. Shall I copy paste the source and include files in my previously created projects ? I am getting a bit lost on how I could start having my NSApp running and start developping my solution
hi, I'm using stmf103c8T6. Recently it got RDP enabled while trying to flash a program. ever since then I'm not able to connect through cube programmer or cube ide. I tried to mass erase and write RDP=0xaa through stm programmer cli. all though I'm getting "mass erase successful" and "option byte successfully programmed", when I try to display it again it's still showing RDP enabled. I tried different boot mode also while trying to set the RDP but still not workingkindly help me to find a solution
Hi, we are developping a projet with TFM activated on STM32U585 device (by the way, we don't really need the full TFM but at least Secure boot and SBSFU). We would want to declare a Flash page to store some configurations parameters, so we created a dedicated page for these data in the memory mapping. But I would want to know if it's allowed for the embedded user application code to write on this page without violating TFM rules. Or if have to use the SBSFU + teraterm (etc..) to update these configuration parameters. Another question linked to the previous one, once the TFM is activated the complete memory seems to be used (from HASH REF to Local Loader memory area) so the 2 MB are allocated. Is it possible to reduce the complete footprint and keep some memory pages free to put some data out of the TFM control ? I didn't find these informations in the UM2851 Thanks in advance for your support. C.S.
Need assistance on generation of the ECC key pair using crypto library. Can you guide on how to link the required .a files to the project tool (IAR embedded workbench) so that the function declarations present in .h files without .c files will execute. Also do we need to initialize the input parameters i.e structure members before passing them to the function?
Device details :ST-LINK SN : 30001100140000363132524EST-LINK FW : V2J45S7Board : --Voltage : 3.25VSWD freq : 4000 KHzConnect mode: Hot PlugReset mode : Software resetDevice ID : 0x483Revision ID : Rev ZGet the next error during SFI performing via STM32CubeProgrammer v 2.17.0 using license file:11:12:18 : Error: SECURITY State Fail11:12:18 : Error: Invalid state after SFI install !11:12:18 : Error: RSS internal system error or License is invalid ! SFi creation:License generation:STM32CubeProgrammer SFI tab: Full log:11:11:24 : UR connection mode is defined with the HWrst reset mode11:11:24 : ST-LINK SN : 30001100140000363132524E11:11:24 : ST-LINK FW : V2J45S711:11:24 : Board : --11:11:24 : Voltage : 3,25V11:11:24 : SWD freq : 4000 KHz11:11:24 : Connect mode: Hot Plug11:11:24 : Reset mode : Software reset11:11:24 : Device ID : 0x48311:11:24 : Revision ID : Rev Z11:11:24 : Debug in Low Power mode is not supported for this device.11:11:24 : UPLOADING OPTION BYTES DATA ...1
STM32U585 When TrustZone is enabled, X-CUBE-CRYPTOLIB produces incorrect SHA256 hash values.Additionally, mbedTLS generates incorrect public keys when creating ECDSA key pairs, and this issue is 100% reproducible.Neither hardware acceleration is enabled, and both mbedTLS and X-CUBE-mbedTLS have been correctly configured.When TrustZone is not enabled, both libraries work correctly without any issues.I have searched the internet, but I couldn't find any information related to this issue.I have submitted a support ticket, but they directed me to seek help through the community.I believe this is a technical issue, but I am unable to resolve it myself. What should I do next?Thank you.
HiI have a design using STM32H523 and I've managed to ensure that my firmware switches PRODUCT_STATE to 'Closed', and sets a valid debug password, the first time it runs. This works well.In the Flash I have a bootloader, application, and configuration data. I'd like to be able to manipulate the write protect bits, such that normally everything is protected unless there's a reason to change it. So, for example, if a setting needs to be changed, the user can issue an 'unlock' command which unprotects the configuration area, and it can be locked again next time the unit boots up. Or, when the bootloader is entered, it can unprotect the application code area, but protect the configuration.I already do this on other platforms and it works well.However: on the H523 I can manipulate the write protect bits just fine, provided PRODUCT_STATE = 'Open'. If I allow the code to switch to 'Closed', then any subsequent attempts to change the FLASH_WRPSG bits appear to have no effect, and obviously I c
Hello, I am asking for help from the community. My application is completely written, but I can't set read protection. I tried to do all the steps in this guide, but it led to bricking one of my boards. The second board is still in product state = 17? but I can't install the obk file or remove protection, returning it to the ED state. Cube programmer did not give me the choice "Change the PRODUCT_STATE option to 17, then press [Apply]. A window appears asking if the default DA-Config should be applied, press [NO]." it just set the state to 17 without asking.I did not find any sensible information on the network on how to set or remove protection. Maybe it is possible to do this directly from the application? in state 17 I can flash h503, but I can't switch to debugging.I really ask for help, my project is completely ready, but it needs to be protected.
Hello,I am currently working with the STM32CubeN6 MCU Package and I noticed something surprising:For NUCLEO-N657X0-Q templates like Template_FSBL_LRUN and Template_FSBL_XIP, STM32CubeIDE projects are provided directly (under /STM32CubeIDE/).For Template_Isolation_XIP and Template_Isolation_LRUN, however, only the ExtMemLoader project is provided for STM32CubeIDE.The main sub-projects (FSBL, AppliSecure, and AppliNonSecure) are only available as source files, and not as ready-to-import STM32CubeIDE projects.This is different from the Keil (MDK-ARM) and IAR (EWARM) folders, where full projects are available for all parts.Why are the STM32CubeIDE projects missing for the main FSBL, Secure, and NonSecure applications?Is it planned to provide full STM32CubeIDE projects for these templates in a future update?Or is there a recommended workflow for setting up these projects manually in STM32CubeIDE?Thanks in advance for your support and clarification!Best regards,
Colleagues.I recently implemented Proprietary code readout protection (PCROP) according to AN4758 on the STM32G473CEU MCU in IAR v.9.50.1. The project I was protecting was quite large and did not fit into one flash bank. As soon as the project no longer fit into the first bank, I had to do a full chip clear via CubeProgrammer before each upload. Otherwise, IAR would return an error. And if I uploaded short programs, the error did not occur. Accordingly, a full chip clear kills the protected constant area, which significantly changes the brilliant concept of end-user file updates. In addition, the command line in the Build Action menu "$TOOLKIT_DIR$\bin\isymexport.exe" --edit "$PROJ_DIR$\steering_file.txt" "$TARGET_PATH$" "$PROJ_DIR$\fir_filter.o"creates the fir_filter.o symbol definition file from the file with the same name at level N, according to the steering_file.txt file. So the fir_filter.o file at level N also needs to be passed to the end user and included in the IAR project tr
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.