cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 hardware AES GCM is not working properly

Nk k
Associate II

using the STM32 Crypt processor I could successfully encrypt and decrypt plaintext using AES GCM (STM32 cryptographic library version V1.5.0). The stm contoller that I am using is STM32F479NIHx.

Simultaneously, there is another crypto project in the PC side using the polarssl library (Version polarssl-1.2.15) with the same AES GCM encrypt/decrypt parts. It also working fine.

However, the problem is that when using the same AES256 key, IV array (size 12), plaintext, header (AAD), the STM32F4 and the PC generates different ciphers and tags. Their lengths are the same across the platforms but the content is totally different.So it becomes impossible to encrypt in PC and try to decrypt the cipher in STM32F4.

5 REPLIES 5
Amir NEIFAR
Associate III

​Hi Navas,

Thank you for using the cryptolibrary.

We recommend to use the new cryptolib version 3.1.0 which is NIST certified.

Please find the below link to download it.

https://www.st.com/en/embedded-software/x-cube-cryptolib.html

Regards,

Amir

Thanks Amir

Amir NEIFAR
Associate III

​Hi Navas,

Could you please update if you success to use the cryptolibrary?

Regards,

Amir

​Hi Navas,

Could you please update if you success to use the cryptolibrary?

Regards,

Amir

Nk k
Associate II

Hi Amir,

I didn't check AES GCM with recommended new library . In our case we have no option to use new library in our project. What is the real problem in old library?