2020-04-11 08:10 AM
Hi, I'm new in the forum and I would like to have your technical support.
Unfortunately regarding this topic I was not able to found info in internet, and I don't know if I'm trying to do something not allowed by the ST libraries.
For my application I need the SHA256 and RS2048 algorithms.
The mcu is an ECOM10, while the IDE is IAR v.8.3.
Considering that ECOM10 integrate a Cortex M4F, I tried to use the libraries for the STM32F4 family. Is that choice right?
In particular I tried to use without success both:
1) STM32_Cryptographic_Library_V2.0.6
2) STM32CubeExpansion_Crypto_V3.1.0
For the "STM32_Cryptographic_Library_V2.0.6", I was able to build the project only using the "M4_CryptoHW_2_0_6.a", i.e. with the hw accelleration.
While for the "STM32CubeExpansion_Crypto_V3.1.0", I was able to build the project using both "STM32CryptographicV3.1.1_CM4_IARv8" and "STM32CryptographicV3.1.1_CM4_IARv8_otnsc.a".
For all cases, I've used as reference the sha256 project example, but unfortunately all the test failed, I always got a wrong digest value.
Aspected digest: 248D6A61D20638B8E5C026930C3E6039A33CE45964FF2167F6ECEDD419DB06C1
Calculed digest: DE455CD3C0D51251E2A2066AF6ACE2554FA67B4E3500EDE374AEA19D4FE0B5EC
Any suggestions is more than welcome.
Thanks in advance.
2020-04-11 08:44 AM
The libraries are locked to STM32 parts, they fail if the detect other hardware.
2020-04-11 08:52 AM
Hi thanks for the fast reply. It seems that is not failing, because the error status returned is HASH_SUCCESS. Only the calculated value is wrong. Or do you think that this could happen also in case of other hardware detection?
2020-04-11 09:03 AM
I'd class returning the wrong hash a mode of failure.
You'll need to use your own library, or discuss the issue with the ST support engineers responsible for your account.
2020-04-11 09:06 AM
Ok thanks a lot.