How to implement encryption between Arduino and database

Hi everyone,

In my project, I am using an Arduino Mega together with an Ethernet Shield which communicates with a MySQL database. One of my goals is to capture the packets from the network and check if it is possible to read the content, but yes, the Arduino is possible. does not implement any encryption.

Now I want to encrypt this data (this communication), could anyone help me with this task by showing me some examples of how to implement this?

NOTE: But without the need for a PHP system for example to broker communication. I would not want to have to use this.

Look up this library in library manager:

THiNX AESLib (ESP32, ESP8266)

Codacy Badge

An ESP32/ESP8266/Arduino library for Arduino IDE to wrap AES encryption with Base64 support. This project is originally based on AESLib by kakopappa. This fork actually works, will be maintained at least for a while, and provides optimized methods that do not require using Arduino's flawed String objects (even though those are still in examples).

AESLib provides convenience methods for encrypting data to byte arrays and Strings, with optional additional base64 encoding to return strings instead of bare data.

While Arduino Core 2.5.1 is already out, this should be updated to use AES implementation from BearSSL (to save more RAM in larger projects).