You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can edit this JSON file to configure your firmware, for example by modifying `wifi_ssid` and `wifi_password` so that your device connects to your network
211
211
212
+
Note: The Wi-Fi credentials in config.json are migrated to EEPROM “secure storage” on first boot. After that, the Wi-Fi credentials are erased from config.json
213
+
214
+
Security of stored secrets:
215
+
216
+
- All sensitive values (API keys, wifi credentials, tokens, etc.) are stored in EEPROM using a device-unique obfuscation scheme
217
+
- The obfuscation key is derived from the ESP8266's MAC address, chip ID, and a salt (configurable [here](./src/main.cpp#L37) in code) using SHA-256
218
+
- The JSON payload is XORed with this derived key before being written to EEPROM, and de-obfuscated on read
219
+
- This makes it much harder to recover secrets from a raw flash dump on another device, or with only partial knowledge of the hardware
220
+
221
+
Limitations:
222
+
223
+
- This is not true encryption and does not provide hardware-backed security or protection against a determined attacker with full device access
224
+
- The public salt is not secret; if an attacker knows the salt, MAC, and chip ID, they can reconstruct the key
225
+
- There is no secure element or tamper resistance
226
+
227
+
**Do not assume confidentiality against a determined attacker**
228
+
229
+
Warning: If the salt, the chip ID or the mac address change, the eeprom secure storage is clear and reset to ensure no data leak is possible
230
+
212
231
### 3. Build the firmware and filesystem
213
232
214
233
To build the firmware you can use decontainer, docker or build it by yourself using [PlateformIO](https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html)
@@ -275,15 +294,6 @@ From there, select and flash the filesystem using the `littlefs.bin` file
275
294
276
295
Once the device reboots, the setup is complete!
277
296
278
-
Note: The Wi-Fi credentials in config.json are migrated to EEPROM “secure storage” on first boot. After that, the Wi-Fi credentials are erased from config.json
279
-
280
-
Data stored in EEPROM (or flash-based EEPROM emulation) is not secure by default
281
-
All values (API keys, Wi-Fi credentials, tokens, etc.) are currently stored in clear text and can be recovered by anyone with physical access to the device or the ability to read the flash memory
282
-
283
-
This project does not provide hardware-backed security
284
-
285
-
Do not assume confidentiality against a determined attacker
286
-
287
297
## License
288
298
289
299
This project is licensed under the **GPLv3 License** - see the [LICENSE](LICENSE) file for details
0 commit comments