CRC engine is reseted to default when crypto lib is used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-12 1: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:
- Initialize CRC engine with specific configuration.
- Initialize crypto Lib by calling cmox_initialize
- Call cmox_ecdsa_verify to verify signature.
- Calculate some CRC of certain memory block.
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
- Labels:
-
STM32G0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-12 2: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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-12 3: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-13 4: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
