Automates the process of setting up flash encryption on ESP32 devices using PlatformIO. This script handles key generation, eFuse burning, binary encryption, and flashing in a single workflow.
This script performs irreversible hardware operations:
- Burns encryption keys into eFuses (cannot be changed later)
- Sets FLASH_CRYPT_CNT (permanently enables encryption)
- Write-protects security eFuses
- Improper use may permanently brick your device!
- 🔑 Generates secure flash encryption keys
- 🔥 Burns encryption keys and security eFuses
- 🔒 Encrypts bootloader, partitions, and firmware
- ⚡ Flashes encrypted binaries to device
- ⚙️ Supports both development and production modes
- ✅ PlatformIO project integration
-
Hardware:
- ESP32 development board
- USB serial connection
-
Software:
- Python 3.7+
- PlatformIO CLI
- ESP-IDF tools (
esptool.py,espsecure.py,espefuse.py)pip install esptool
# Download the script
curl -O https://raw.githubusercontent.com/yourusername/esp32-encryption/main/esp32_encrypt.py
chmod +x esp32_encrypt.pyAcknowledgement
*This README documentation was generated with the assistance of a Large Language Model (LLM).