Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
Hello,I am working on an IoT security project, where a TPM like STSAFE-A110 is required for signature verification and data decryption. The latter fails with the mentioned chip and the static (non-ephemeral) private key.Setup:X-NUCLEO-SAFEA1 board (with STSAFE-A110 TPM), pairing doneB-U585I-IOT02A MCU boardWindows 10 PCTera TermSTM32CubeIDEI have successfully run the Establish_Secret demo project, it shows ephemeral key usage: As I need the TPM's private key to survive the power cycle, I replace the ephemeral slot with the static slot 1, also on StSafeA_GenerateKeyPair call: The call to StSafeA_EstablishKey then fails with code 17 (STSAFEA_UNSATISFIED_ACCESS_CONDITION): Why does it fail? The documentation for STSAFE A110 clearly states that this feature is supported for slot 1 (document dm00675324): Thanks.
Hello,I am trying to start a debug session with STM32CubeIDE v1.11.2 on my board locked on RDP 0.5.I loaded a valid secure firmware which jumps into the non-secure firmware before setting RDP 0.5.I could connect STM32CubeProgrammmer and flash the non-secure flash memory with the non-secure firmware, that works fine.Now I am trying to start to debug the non-secure application with STM32CubeIDE, but I got the following error when I start the debug:Error message from debugger back end:Error finishing flash operationFailed to execute MI command:load /home/ooueslati/STM32CubeIDE/workspace_1.11.2/som_u5_user_br/sample_app/Debug/sample_app.elf Could you help me?FWI, I set my ".gdbinit" file as follows:-set remotetimeout 50-set tcp connect-timeout 50In my debug configuration>Debugger tab, I set "Reset type" = "None"I joined here the .srec file of the non-secure application.Thank you.
Hey guys, I want to perform a firmware upgrade over the air. And use a UART to connect to IoT device.I use stm32l431xx and it contains hardware for symmetric encryption. And the host device which sends the binary uses stm32l496 has SBSFU.So I have a constraint now, I don't want to make many changes to the bootloader apart from boot entry points logic. I want to use only the SFU package in SBSFU. Is this possible?Regards,Vmere.
STM32 Trusted Package Creator v2.12.0 creates incorrect option bytes which have 8 rows and no "reserved" last row As per AN5054, it should have exactly 9 rows The option bytes csv created from STPC v2.12 This leads to SFI programming failure. Am I missing something here? or there is a bug in exporting option bytes using STPC
A packet with CRC error has both SUBGHZ_IT_RX_CPLT and SUBGHZ_IT_CRC_ERROR flag set.In stm32wlxx_hal_subghz.c, this leads to both RxCpltCallback() and CRCErrorCallback() being called.https://github.com/STMicroelectronics/STM32CubeWL/blob/main/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_subghz.c#L1244I believe that only CRCErrorCallback() should be called. That is what is done in the drivers provided by semtech for the sx126x:https://github.com/Lora-net/LoRaMac-node/blob/master/src/radio/sx126x/radio.c#L1282
I have an existing STM32L433 project (CubeIDE 1.8.0) to which I want to add AES functionality via the CMOX crypto stack (https://www.st.com/en/embedded-software/x-cube-cryptolib.html). I am unclear as to where I am supposed to put the .a file, and also what changes, if any, that I need to make in the .ioc configuration.How can I add this library to my project?
It seems that 32 bytes (256 bits) is the maximum key size. If so, is there a list of elliptic curves that will work with keys of this size?
Hello guys, how are you?Currently i have an interesting problem happening with my STM32WB5M. I have a project that uses SBSFU alongside with a firmware that uses the BLE peripheral with CPU2 and etc. I don't use the BLE loader, i developed i customize USB loader. The only peripheral that is shared between bootloader and my user app are 3 GPIOS that i use for a RGB led. The thing is, when i share this resource, sometimes CPU2 get stuck in my main firmware and it doesn't initialize. I need my WDT to kick in and reset the firmware, then CPU2 initializes. The only way things work smooth is when i have my debug connected to the board (i tought this very very weird). If i remove the GPIO from my bootloader, everything works fine with or without my debug probe. I think the CPU2 behaviour on STM32WB5M very strange. CPU2 get stuck sometimes because of a problem that is not even related to it.Any suggestion about what this could be? Is there something relevant that i should do to "share" this GP
I have made a FUOTA project and I want to add security to it. I found SBSFU but I see that they must connect the ship in order to update it, and that's not what I want.So my question : is it possible to do a FUOTA with a SBSFU example ? is so how ?
Hi, i am looking for a small MCU with ARM trust zone, ROT, SFI and other security features similar to STM32L552.also fast SPI timing req similar to 401 family ( 401 reference only for timing)STM32F401CBU6, does not have the mentioned security features, please confirm am i correct.
When I compile a simple programm, using the CRC feature I get the following warning:In file included from ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h:30, from ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h:29, from ../Core/Inc/stm32f3xx_hal_conf.h:199, from ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:30, from ../Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_crc.c:46:../Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_crc.c: In function 'HAL_CRC_DeInit':../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:193:41: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'volatile
I'm trying to become familiar with the security options for STM MCU's before picking an MCU. Where is the best place to learn about what security options exist, what they do, and how/if they impact the price of the MCU? Does a table exist that compares the different security options across all MCU's, what they do, and the price?
In the eLearning course 'STM32L4 Training' (community.st.com - Academy) there is an error in the content : when you open the section 'STM32L4 training: 02.4 - Hands-on CRC unit', it actually plays contents about I2C, not about CRC. Please correct this so I can complete the training. Thank you
I tried disable ROP level 1 to level 0 by ST-LINK Utility and STM32CubeProgrammer, but it is not success.Thanks in advance.
Hi i have a STM32G474. I want to build a pmbus on that. The stm has a default CRC32 module.In pmbus for the pec calculation crc8 is using. Can i change my default crc32 module to crc8 for the usage on pmbus?
The SBSFU framework allows users to employ multiple image signing keys, ECCKEY1, ECCKEY2, and ECCKEY3.Is there a method to blacklist ECCKEY1 and replace it with ECCKEY4, which may be transmitted via a key replacement update package if the private key for ECCKEY1 is leaked/compromised?Keys are compiled into code and stored in the SE Key region ROM, which is secured by MPU-RX + WRP + PCROP.Please advise what options I have to replace the key which is compromised?Assuming bootloader enhanced to differentiate between .sfb and key replacement package.
We have STM32H755XI6 Controller, and we trying to incorporate the secure boot in our current secure boot with RDP level 1 and secure user memory (HDP protection) but our controller is getting locked up and not able to access (using IAR JTAG and ST LInk JTAG CPU is not getting connected ).after seeing some HDP examples code, the code with HDP protections (some particular functions) is running from RAM, Is my understanding correct? And we need to run the HDP-protected code from RAM.IS Secure Boot code should run in Privileged mode ??Please kindly help with this.
I complie STM32F769I-Discovery 2_Images. the final SBSFU_UserApp image's size is 532kb, It's size will increase to 131,669 kb if ITCM used. I add below code to UserApp.sct ;ITCM 16k ITCMRAM_region 0x00000200 0x00004000 { fw_update_app.o (+RO-CODE) }COMPILE:MDK 5.32,SBSFU:2.6.1.project:STM32F769I-Discovery 2_Images
Hello,How can I add STM32CryptographicV4.0.1 in the STM32CubeExpansion_SBSFU_V2.6.1 middleware for SBSFU application ?The current STM32CubeExpansion_SBSFU_V2.6.1 is used libSTM32CryptographicV3.1.1_STM32H7_GCC ST crypto library for STM32H7 boards. I want to used STM32CryptographicV4.0.1 library in the SBSFU. What is the process to implement the above.Look forward for your support.Thanks & Regards,Ikbal
Hi,I want to test RSA signing and verification on the STM32. I found STM32CubeExpansion_Crypto_V4.0.1 with some RSA signing and verification example for NUCLEO-H743ZI. I want to port this application for NUCLEO-H7A3ZI.How can I port the application for NUCLEO-H743ZI ? Please share porting documents if available.Thanks,Ikbal
I'm using SBSFU v2.6.2 on a Windows 10 x64 machine with CubeIDE v1.11.0I was recently modifying the postbuild script in an SBSFU-based project and noticed it has a bug setting the PATH variable when looking for prepareimage executable:export PATH=$basedir"\win\prepareimage";$PATH > /dev/null 2>&1The semicolon makes PATH to be equal only to path to prepareimage, and for example toolchain's objcopy cannot be used later in the script.Also you don't need to export the PATH as the variable is already in the environment and any change of the value of the variable is reflected in the environment anyway.My suggestion is to change the above line to:PATH=$basedir"\\win\\prepareimage":$PATH > /dev/null 2>&1This is present in all 3 variations of postbuild script for different crypto schemes
I'm using an STM32L4A6ZG (as a nucleo board). This is the code I am using:#include "err_codes.h" #include "sk.h" #include "aes_common.h" #include "aes_cbc.h" #define AES_BLOCK 16 #define IV_LENGTH 16 #define SIZE 32__ALIGN_BEGIN static const uint8_t pKeyAES[16] __ALIGN_END = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}; __ALIGN_BEGIN static const uint8_t pInitVectAES[16] __ALIGN_END = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}; // Test Data and some return values for debugging // 19 32 4b 64 7d 96 c8 fa 18 31 4a 63 7c 95 19 18 0 1 5 9 6d 1d 63 58 6c 6b 3b 1e 9 6 3 39 uint8_t Plaintext[SIZE] = {25,50,75,100,125,150,200,250, 24,49,74,99,124,149,25,24, 0, 1, 5, 9, 109, 29, 99, 88, 108, 107, 59, 30, 9, 6, 3, 57}; uint8_t tx[SIZE] = {0};AESCBCctx_stt AESctx; uint32_t error_status = AES_SUCCESS; int32_t outputLength = 0; /* Set flag field to default value */ AESctx.mFlags = E_SK_DEFAULT; //AccHw_E_
Hi support team,i am testing the sbsfu code in P-NUCLEO-WB55 but i missed out to disable security ips SECBOOT_DISABLE_SECURITY_IPS and flash into the board it set RDP level to 1 also set SFU_WRP_PROTECT_ENABLE, SFU_TAMPER_PROTECT_ENABLE,SFU_DAP_PROTECT_ENABLE,SFU_MPU_PROTECT_ENABLE... . now i want to remove this code and flash other application but i can not debug or run as application via IDE(AC6 or cubeide) it through error: write protection detected check RDP and WRP protection options.Please help me out to resolve above issue.I have change RDP from 1(BB) to 0(AA) but issue is not resolve.Thanks,Arjun
Hi,I forgot to comment the protections set in app_sfu.h and tried debugging the code. Later I realized and commented everything and it is not allowing me to flash the program on the device. I made RDP level 0 from cube programmer, but still write protection is enabled which is not allowing me to format the device. Could anyone please let me know how can i remove write protections in cube programmer.Thanks,Ankush
..
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.