Home / Learn Chip Programming / ESP32 Security: Secure Boot, Flash Encryption, TLS
ESP32 Security: Secure Boot, Flash Encryption, TLS
Protect firmware, keys and communication in a connected device.
Theory in plain words
What it is
Secure boot verifies a signature on the bootloader and app. Flash encryption encrypts flash contents with a key held in eFuse. NVS encryption protects stored secrets. TLS protects network traffic.
Why we use it
Connected devices get attacked. Stolen Wi-Fi credentials or cloned firmware hurt customers and companies.
How it works
Generate a signing key, enable secure boot v2 and flash encryption in menuconfig (release mode burns eFuses, irreversible), use mbedTLS with certificate pinning, never hard-code secrets.
Where it is used
- Commercial IoT products
- Medical and industrial devices
- Preventing cloning
Threat checklist
Tick the protections your project already has. Anything unchecked is a realistic attack path.
Quick quiz
1. Which feature stops unsigned firmware?
The ROM verifies the signature.
2. Where should Wi-Fi passwords not be?
Source code leaks.
Common questions
Which feature stops unsigned firmware?
Secure boot. The ROM verifies the signature.
Where should Wi-Fi passwords not be?
Hard-coded in the source on GitHub. Source code leaks.