cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 crypto library package (X-CUBE-CRYPTOLIB)

FForm
Associate II

Hi, I’m trying to use the cryptographic library on a board based on STM32L152CBT6-A to encrypt data to be sent. I tried to replace the files inside the “Driver�? folder but it did not work. Does anyone know how to use the library and import it correctly on System Workbench?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

​You have to add the Library path in the include configuration.

Please check the thread https://community.st.com/s/question/0D50X0000AAGtwqSQD/how-to-include-crypto-library-in-sysytem-workbench-project

Regards,

Amir 

View solution in original post

9 REPLIES 9
Amir NEIFAR
Associate III

​Hi Fabriformo,

Please porvide détails about the package you are using. We recommend to use the version 3.0.0 https://www.st.com/en/embedded-software/x-cube-cryptolib.html which include examples for every algorythm and which is including projects for IAR, Keil and Atollic.

Regards,

Amir

Amir NEIFAR
Associate III

Hi Fabriformo,

Could you please feedback if you still having issue with crypto library?

​Regards,

Amir

Hi, Amir. My problem is another. I would like to import the library into a project that already exists in System Workbench. Within the library for each board there are the folders Utilities, Projects, Middlewares, Drivers, Documentation. I tried to copy files within Middlewares and Drivers in my project but when I do "Build Project" there are errors.

If I import a project for System Workbench from the Project folder, I still have errors.

How can I import the library into my existing project?

Hi,

​You have to add the Library path in the include configuration.

Please check the thread https://community.st.com/s/question/0D50X0000AAGtwqSQD/how-to-include-crypto-library-in-sysytem-workbench-project

Regards,

Amir 

Thank you, Amir. I have included libraries and the project builds successfully. Now how do I use the functions of the libraries? Currently there are no files like "crypto.h" and "aes.h" within the project. Do I have to copy the files inside the Inc folder? If so, which and where?

​Hi,

You can find in the Cube cryptolib examples on how to use cryptolib, including how to manage header files ...

you can found these détails in the below path:

STM32CubeExpansion_Crypto_V3.1.0\Fw_Crypto\STM32L1\Projects\STM32L152RE-Nucleo\AES\AES128_CCM\TrueSTUDIO

Regards,

Amir

Thank you very much for your availability, Amir. Finally I was able to import the libraries correctly into my project.

​Hi,

Your are welcome. Happy to  know that.

Good luck in your project realization.

Please mark the ticket as answered to be helpful for the community.

Regards,

Amir

YLAZREG
Associate

hello,

This is an old thread but I hope to get an answer here.

I'm using NUCLEO-L496ZG-P, and I have data de decrypt (AES128 CBC).

I'm using a Makefile generated by STM32CubeIDE to compile and my college is using the STM32CubeIDE to do so.

I'm trying to use th Cryptolib but didnt het how to do so. I did download "en.patchx_cryptolib.zip" and "en.x-cube-cryptolib.zip"

I copied the folder ST/ under Middleware to compile the library -llibSTM32CryptographicV3.0.0_CM4_GCC_FPU.a but I get

ld: cannot find -llibSTM32CryptographicV3.0.0_CM4_GCC_FPU.a

Is there a document to follow ? Any suggested guide lines ?