davetcc / tcMenu

Menu library for Arduino, mbed and ESP with designer UI and remote control capabilities.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/
Apache License 2.0
271 stars 25 forks source link

Allow encryption for any socket based stream, device or remote API #476

Open davetcc opened 3 weeks ago

davetcc commented 3 weeks ago

Is your feature request related to a problem? Please describe. This will put in place the ability for a stream to be entirely encrypted. The default encryption shall be AES and will be available were either the Arduino AES library is available, or when mbedtls is available, this covers nearly all boards, and is even accelerated on a wide range.

Describe the solution you'd like AES base encryption as an option between device and API connections. It will need a small generator change to be able to generate keys, and also to write them out in code generator.

Additional context Arduino and Java supports AES out of the box at 128 and 256 bits, as do most other languages and environments. The initial target will be Java and Arduino.

davetcc commented 3 weeks ago

This facility works by wrapping the regular message in an encrypted "packet" as follows:

0..1 : encrypted length 2..length+2 : cyphertext