Example:
- AES256 encrypt a message with IV and Salt
- Base64 encode it
- send a http post request to a php script
- decrypt in php
- send back a AES256 encrypted and Base64 encoded message to the ESP32
Note:
- change SSID & PW & IP-Address/foldername/scriptname
- message must be padded to a...
I took Erel's BLE example and added (as on the ESP32 side) AES256 encryption. For some reasons I wasn't able to use SPIFFS and/or WiFi parallel to BLE on the ESP32 side. Maybe you find a reason why this doesn't word (I understand WiFi & BLE using the same antenna, but SPIFFS should work but...
This is an updated example how to en-/decrypt data with AES256.
Libs needed: jRandomAccessFile only
Notes:
- As far as I know, the ESP32 doesn't support padding like PKCS5/7, so I had to do it on my own
- Other Cyphers support padding
- AES is a block cipher, so we have to build one block...
This example is based on agrahams encryption library: Encryption Lib
1. Generate a 32 byte pw (just call the sub) and store it
2. Encrypt the data by calling AES_Encrypt. Return is a byte array or a base64 encoded string
3. Salt is a random value which is added at the beginning of the encrypted...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.