Content originally posted in LPCWare by kiryat8 on Tue May 28 05:46:05 MST 2013
I am trying to communicate with a custom protocol encrypted in AES 256 on the LPC1768 and the other end using a C# DotNet server. I am using the NXP AN11241_1 example code. On the PC side I use the C# code in the attachment.
When I encrypt a buffer with a single 16 byte block, both sides encrypt/decrypt the same way and all works. When I fill a 48 byte buffer with data 0 through 47 and encrypt the buffer on both ends, only the first 16 encrypted bytes are the same. So when I send more than one 16 byte block, the decrypting always fails.
I also did a test where I encrypted the 48bytes and then decrypted them on the same side (PC and LPC) and verified that the results which also worked.
I conclude that PC and the LPC are using different AES modes.
Any help would be appreciated.
Thanks