2024-06-12 01:25 PM
Hello st forum,
I'm currently working on mcu STM32G0B1VCI6; the part of the code that I'm using is considering the setup of the crypto lib and the CRC engine. However, I noted that the CRC configuration is being changed automatically when some crypto functions are invoked. Example:
The result in step 4 is different than the expected (compared against an online tool) but if the CRC is calculated between step 2 and 3, the CRC matches.
I wonder if crypto library forces a reset in the CRC registers for its own purposes.
Is this a bug in the crypto lib or is expected? if it is expected how can I use the desired CRC configuration without impacting crypto lib?
I hope you can help,
regards.
José Daniel
2024-06-12 02:13 PM
>>Is this a bug in the crypto lib or is expected?
Yes, it locks things to the STM32 architecture. They basically use it to do a pattern test, and xor against obfuscated constants.
Massive PITA
2024-06-12 03:05 PM
Thanks for the reply @Tesla DeLorean
So, would be ok to call HAL_CRC_Init just one line before calling HAL_CRC_Calculate? or this would impact crypto lib for further operations?
Thanks
2024-06-13 04:17 PM
Hello @JDaniel1
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Regards,
Roger