Problem with implementing AES on the ESP8266
Posted: Mon Aug 22, 2016 7:05 am
I've been trying to implement AES encryption on the ESP8266 using the Spaniakos AES library for Arduino and RPi (https://github.com/spaniakos/AES). The example code "aes" from the library does not run on the ESP as it involves a few avr library includes in the source code, but I isolated the main encryption and decryption parts of the library and managed to get a code compiling and running.
With my code I am able to define a plain text string, encrypt it with AES using a predefined key and IV and decrypt the result back into plain text (identical to the original plain text string). However, when I try to convert the same cypher text with online AES encryptors/decryptors with the same key the resulting text does not decrypt to the same original plain text. I also tried running the default "aes" example code on an arduino Uno, but got the same results.
Any help with this problem would be greatly appreciated.
With my code I am able to define a plain text string, encrypt it with AES using a predefined key and IV and decrypt the result back into plain text (identical to the original plain text string). However, when I try to convert the same cypher text with online AES encryptors/decryptors with the same key the resulting text does not decrypt to the same original plain text. I also tried running the default "aes" example code on an arduino Uno, but got the same results.
Any help with this problem would be greatly appreciated.