2018-08-17 03:30 AM
I am using the STM32F071RB microcontroller and trying to use the en.stm32-cryp-lib to encrypt and decrypt using AES128-CBC. The encryption and decryption functions return expected data when using data that is a multiple of 16 bytes, but don't when the data isn't a multiple of the block size.
I read in the user manual that the library uses Cipher-text stealing when the data isn't a multiple of the block size, but in my application, the data to be sent/received should be padded with 0x00's. I even tried padding the data with 0x00's to make it a multiple of the block size, but that didn't work, either.
Any suggestions?