cancel
Showing results for 
Search instead for 
Did you mean: 

HW Cryptoprocessor in STM32F746NG does not work in AES CCM mode (Examples\CRYP example from 756-Eval board)

Wowa
Associate III

I'm trying to run AES CCM encryption on STM32F746G-Disco board in hw-accelerated mode. Tried to use CryptoLib 3.1.2 and low level Examples from 756-Eval board. For some reason there is no working example supplied by ST that implements this mode with HW acceleration on 746. CryptoLib works good, but only in FW mode (unaccelerated). Having tried to adapt HAL example (\Examples\CRYP\CRYP_AES_CCM) from 756 board, I encounter timeout in HAL_CRYPEx_AESCCM_Encrypt() call.

Is CRYP supposed to work in this mode in 746NG at all? Ref man does not tell it shouldn't. Can anybody point me to what should be adjusted for it to work, compared to 756?

Thank you!

Vladimir

1 ACCEPTED SOLUTION

Accepted Solutions

The F746 doesn't provide HW CRYPTO ​

Without, With

F746, F756

F769, F779

H743, H753

F429, F439

L152, L162

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

View solution in original post

7 REPLIES 7

The F746 doesn't provide HW CRYPTO ​

Without, With

F746, F756

F769, F779

H743, H753

F429, F439

L152, L162

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

Oops! Thank you for this info, pity that it's not obvious from ref man. And what about 723? I saw in ref man that it has some AES accelerator, but from cycle counts that are listed there, seems that it's much slower than in 756, and there are no usage examples for 723 from ST yet. Is this correct?

Wowa
Associate III

Or should I say 733? They also have the same manual, do those differ the same way - 723 without vs 733 with?

https://www.st.com/en/microcontrollers/stm32f7x3.html?querycriteria=productId=LN1904

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

Are there any examples how to use that Tiny AES? This implementation differs from CRYP. Would be great to have a working example...

If you have decided against using ST's crypto library, then Tiny AES[1] doesn't support AES in CCM mode, try to find something else it you need CCM mode.

For example, you can use Cifra[2][3] instead:

[1] https://github.com/kokke/tiny-AES-c [click show more]

[2] https://github.com/ctz/cifra

[3] https://cifra.readthedocs.io/en/latest/modes.html#ccm

Wowa
Associate III

I think w/o hw support we won't fit required timing. But anyway, thanks for the links!