Securely sending data to API over unsecured networks using http and crypto #6471
Unanswered
espruino-discuss
asked this question in
ESP8266
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2024-07-10 by Jurand
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/
Beta Was this translation helpful? Give feedback.
All reactions