cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of STM32 crypto library (UM1924) on STM32WB

PADAM.1
Associate III

Hello,

one question (or feature request):

I try to use the STM32 crypto library (v1.3.1 software implementation) on STM32WB.

I activated the RNG and CRC but the calculated results (encryption/decryption, cmac) are not ok. Are there other things to do?

Is there an hardware implementation using directly using the AES/PKA peripherals of STM32WB? Or will be there a new version of the library package?

As I understood, there are only examples to use directly HAL drivers. It would be great, if the crypto library (executing on AES/PKA hardware) would be optimized using LL drivers...

Is there a user manual "how to use crypto lib on STM32WB"?

Best regards

Paul

3 REPLIES 3
Jocelyn RICARD
ST Employee

Hello,

regarding the X-Cube-Crypto lib, you have the support of STM32WB with examples in the patch 3.1.3.

The support of the hardware implementation is only done through HAL in the CubeFW WB.

The LL implementation is very close to the actual hardware implementation.

For crypto operation, the complexity of usage would be too high compared to the gain in footprint.

For using cryptolib you have the UM1924 decribing the API and then the examples providing typical usage of the API.

Best regards

Jocelyn

PADAM.1
Associate III

Hi Jocelyn,

thanks for the answer, but it is hard to accept.

The HAL driver has many instruction ( "best example" would be configuration of DMA with setting pointer to call back functions) to execute each time of calculation of may be only 1 or 2 blocks (when serializing information handling).

The usage of STM32 crypto library has the advantage, that the customer code is very easy to port between MCUs (with or without HW acceleration).

The software distributed by ST should be in "production quality" (in terms of code size and execution time) with simplest API (and I can guarantee you that this is possible).

Best regards

Paul

Jocelyn RICARD
ST Employee

Hello Paul,

Well I'm not sure I catch your point about HAL vs LL.

Did you solve your original issue using crypto lib on WB?

Best regards

Jocelyn