I want to store a password in my ESP8266 program, but I can't figure out a way to do it that makes it inaccessible to hackers. Even if I encrypt it, I'd still need to store the private key for the encryption process somewhere. I only have two ideas and both have issues:
- As a const in program code
The compiled binary will be publicly available, so anyone who is able to spend some time interpreting the compiled file would eventually be able to find the password stored in it. - In EEPROM
This is at least safe from people who aren't users, but any user would still be able to upload their own program and read the EEPROM to find the password.
Surely this is a common issue, especially in commercial products. What is the solution that I'm not thinking of?