Skip to main content
SLuit.1
Associate III
October 1, 2021
Solved

Problem implementing cryptographic library in stm32h747

  • October 1, 2021
  • 3 replies
  • 2345 views

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.

This topic has been closed for replies.
Best answer by SLuit.1

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

3 replies

Pavel A.
Super User
October 1, 2021

>  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.

SLuit.1
SLuit.1Author
Associate III
October 1, 2021

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.

alister
Senior III
October 1, 2021
Tesla DeLorean
Guru
October 1, 2021

@Jocelyn RICARD​ 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
SLuit.1
SLuit.1AuthorBest answer
Associate III
October 1, 2021

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