Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
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
I followed the secure image tutorials as can be seen in AN4992/AN5054 or in videos made available by ST. The process takes place without errors, as can be seen in the images below (start address is 0x08000000).Smart card is valid and working:However, when trying to burn the image, either via stm32cubeprogrammer or via command line I get the following error:Error: Execution of RSS CMD failed, returned value = 0x1 Has anyone experienced this problem? Any recommendations ?Addtional information:STM32 Trusted Package Creator v2.15.0STM32CubeProgrammer v2.15.0Before programming, I followed the ST recomendation (AN5054)The flash memory is erased.No WRP zone is active, otherwise destroy it.The chip supports security (a security bit must be present in the option bytes).If the security is activated, disable itI used scripts provided by ST and I am attaching a complete log and option bytes (some info were ommited by security reasons).TZM is not enabled and RDP is AA (ok, I know it mea
Hello all,In both files sfu_kms.h and sfu_interface_crypto_scheme.h there is a header guard called SFU_KMS_H.sfu_kms.h:sfu_interface_crypto_scheme.h:Is that a bug or intentional decision?
Hello,I have not been able to debug any of my TrustZone projects. In order to see what was happening I decided to debug and run ST examples, also with TrustZone implemented, from "STM32Cube_FW_L5_V1.5.0" with the following results:- FreeRTOS_Secure_IOToggle_TrustZone:Debug and run correctly only if optimization level is not "None -O0".- UART_Trace_TrustZone_Secure:Failed to run and debug regardless of the optimization level (Error: "Break at address "0x430027240" with no debug information or outside of program code"). However, when I commented the function "printf" and "Secure_TraceMessage" I was able to debug and run correctly.- GTZC_TZSC_MPCBB_TrustZoneFailed to run and debug regardless of the optimization level (Error: "No source available for <signal handler called>() at 0xfffffffe”). When I commented the illegal access to trigger the secure fault the application ran and debugged perfectly.These are my Option Bytes: Could it be something related with entering the se
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.