STM32 Crypto Lib on STM32L051C8
Hello,
I'm trying to integrate latest crypto lib (v. 3.1.2, FW implementation) into my TrueSTUDIO project but encryption with AES-CBC-128 fails.
Example project in Fw_Crypto\STM32L0\Projects\STM32L053R8-Nucleo\AES\AES192_CBC fails both encryption and decryption phases.
Digging into the issue I reduced key size to 128bits and set Key, IV and Plaintext as all 0's (16B long): encryption works correctly (according to various online AES calculators).
Changing a single bit in Plaintext will break encryption: it looks like some data are ignored and some other are read multiple times (always comparing result with online calculators).
If I split the 16B of plaintext into 4 groups (4B each - let's call them p1 p2 p3 p4), library behaves as if plaintext was p2 p1 p1 p1: changing bits in p3 and p4 does not change ciphertext (!).
What am I missing?
Alessandro
