I’ve been working with ESP8266 for a while, building some devices, and one of the features that lacked for a while was encryption. Upon a brief search on “ESP8266 encryption” I stumbled upon this Hackaday article by Sean Boyce. It was implemented using the old Lua/NodeMCU, and since I thought it was well explained I decided to port it to Arduino.
Encryption scheme
I won’t explain in details the encryption theory since it’s covered by the original article. Long story short, messages are encrypted using AES-128-CBC which requires two additional pieces of data to produce ciphertext: an encryption key and an initialization vector (iv).
Continue reading “Practical IoT Cryptography on the ESP8266 using Arduino”