cancel
Showing results for 
Search instead for 
Did you mean: 

Problem implementing cryptographic library in stm32h747

SLuit.1
Associate III

I am using STM32H747BI MCU and I have one project to write the data to flash memory. I am using core 7 to write the data to flash. While writing, I have to encrypt the data. So I requested cryptographic library software expansion from STM32 and they provided me the software.

From that software, I copied four files:

  • stm32h7xx_hal_cryp.c
  • stm32h7xx_hal_cryp.h
  • stm32h7xx_hal_cryp_ex.c
  • stm32h7xx_hal_cryp_ex.h

After that, I put these files in respective inc and src folders and I uncommented

#define HAL_CRYP_MODULE_ENABLED  from stm32h7xx_hal_conf.h.

After doing all of these, I started to encrypt the data but in the project it could not find CRYP_HandleTypeDef .

It shows the error unknown type name 'CRYP_HandleTypeDef'.

Could anybody suggest me what the problem is because I don't know how to solve this issue as I have done all the things that needs to be done.

1 ACCEPTED SOLUTION

Accepted Solutions
SLuit.1
Associate III

Sorry guys. I found out the answer at last. It's really hard to find some documentation about something in STM32. I finally found the getting started guide and it's working now. Here is the link if somebody have the same problem again :

https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Security:Getting_started_with_the_Cryptographic_Library#Select_a_library

View solution in original post

5 REPLIES 5
Pavel A.
Evangelist III

>  I copied four files

These 4 files are not enough. they are only façade for concrete crypto modules.

Please refer to the documentation provided with the library.

>  unknown type name 'CRYP_HandleTypeDef'

This is because H747 does not have the CRYP hardware accelerator.

Use software-only variant of the crypto library or get STM32H757.

Is there any tutorial or guideline how to use software-only variant of the crypto library. I am using STM32 MCU for the first time and I tried to find the tutorial regarding encryption but I could not get any.

@Jocelyn RICARD​ 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SLuit.1
Associate III

Sorry guys. I found out the answer at last. It's really hard to find some documentation about something in STM32. I finally found the getting started guide and it's working now. Here is the link if somebody have the same problem again :

https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Security:Getting_started_with_the_Cryptographic_Library#Select_a_library