Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
Tips:
For a full reference visit the Markdown syntax.
Posted by @Jurand
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I wanted to share with you where I ended with my research how to send data securely over untrusted unsecured networks using only http and sha1 - because that is all we have on those limited in memory boards. And that is what I've got.
KEY is the same on ESP and API used only to calculate SHA1.
API calculates SHA1 from data + KEY and compares it to signature.
If it is the same - that is our board.
Also it is good to have Date.now() somewhere in data to prevent API from being hacked and receive multiple copies of the same correct request. Date will prevent adding duplicated data to DB with the same date.
CLOAK is used to have little more complex API endpoint route than some obvious one.
If this helps someone, I'd be glad that I could help :)
Big thanks goes to CanyonCasa for the idea: https://forum.espruino.com/comments/13462885/