cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 crypto library

brj2
Associate II
Posted on May 19, 2015 at 12:47

I am trying out some examples of the crypto library from ST, but its not working the way it should.

If I try the AES-CBC192 examples on a STM32F107 (STM3210C eval board),

I can verify that the encrypted cipher text is correct, but after decrypting

it does not entirely match the plain text (13 bytes in the middle, are wrong).

0690X00000605E3QAI.png

I have tested using IAR V6.70 and V7.10.

As the STM32F107 does not have any crypto hw, the computation is all done in sw, so I am also surprised that running the code in the simulator yields a totally different result (where even the encrypted result does not match the expected values) ?

Has anyone here been able to verify the examples ?

I know, this library is free from ST, but do they give support on it ?

Thanks.

Brian

#stm32-crypto-lib
1 REPLY 1
brj2
Associate II
Posted on May 19, 2015 at 14:02

Seems to be related to compiler optimization setting.

In the doc. it states that the lib is compiled with optimization: high,

I had it set to optimization: none for better debugging possibility.

Setting it to anything other than ''none'', seem to make it work ?