cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 Generating AuthTag for AES gcm crypto is not working with a length not a multiple of 4!

NStro.2
Associate II

looks like the same issue like in: 

STM32F423 Generating AuthTag for AES crypto is not working

4 REPLIES 4
Billy OWEN
ST Employee

Hi @NStro.2​ 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

Regards,

Billy

Jocelyn RICARD
ST Employee

Hello @NStro.2​ ,

From what I can see, there was a fix in release 1.16.1 of the STM32CubeF7:

  • Support of message head no multiple of word for GCM and CCM algorithms.

But it concerns only the header.

Is your issue concerning header or payload ?

Thank you

Best regards

Jocelyn

NStro.2
Associate II

Hello Jocelyn,

it concerns only the payload the header is working fine.

Best regards

Norbert

Jocelyn RICARD
ST Employee

Hello Norbert,

I'm sorry I answered you with STM32F7 instead of STM32H7.

For STM32H7, there are different versions of the crypto accelerator depending on the variant.

STM32H75x have hw crypto version < 2.2 and STM32H7Bx and STM32H73x have version 2.2

Also, STM32H75x have a hardware fix related to this topic starting from Rev B.

Normally all the cases are handled in HAL code with regard to payload size alignment but it is done in different way for STM32H75x before Rev B.

So, could you please share what version of STM32H7 you are using and also check if you are using the right define to use the right configuration.

Thank you

Best regards

Jocelyn