How to enable Flash Encryption when using Arduino
Posted: Wed Sep 17, 2025 2:39 pm
Hi everyone,
I’m working on an ESP32 project using Arduino IDE (the standard Arduino core for ESP32). I want to enable flash encryption to protect the firmware, but most of the documentation I can find (and the menuconfig options) are for ESP-IDF projects.
What I’ve tried so far:
Looked into ESP-IDF docs about flash encryption (idf.py menuconfig → Security features).
I understand how the efuse keys are burned and how flash encryption works in ESP-IDF, but I can’t find a clear workflow for Arduino-only projects.
Tried searching if the Arduino core exposes flash encryption options or scripts, but no luck so far.
My questions:
Is it possible to enable flash encryption when programming the ESP32 from Arduino IDE directly?
Do I need to use espefuse.py or esptool.py manually after flashing Arduino firmware?
Is the recommended approach to switch to ESP-IDF, or is there a safe way to combine Arduino builds with flash encryption?
My goal is to keep working in Arduino IDE (simpler for my project) but still secure the firmware with Espressif’s flash encryption feature.
Has anyone here done this successfully, or is it mandatory to go through ESP-IDF for this feature?
I’m working on an ESP32 project using Arduino IDE (the standard Arduino core for ESP32). I want to enable flash encryption to protect the firmware, but most of the documentation I can find (and the menuconfig options) are for ESP-IDF projects.
What I’ve tried so far:
Looked into ESP-IDF docs about flash encryption (idf.py menuconfig → Security features).
I understand how the efuse keys are burned and how flash encryption works in ESP-IDF, but I can’t find a clear workflow for Arduino-only projects.
Tried searching if the Arduino core exposes flash encryption options or scripts, but no luck so far.
My questions:
Is it possible to enable flash encryption when programming the ESP32 from Arduino IDE directly?
Do I need to use espefuse.py or esptool.py manually after flashing Arduino firmware?
Is the recommended approach to switch to ESP-IDF, or is there a safe way to combine Arduino builds with flash encryption?
My goal is to keep working in Arduino IDE (simpler for my project) but still secure the firmware with Espressif’s flash encryption feature.
Has anyone here done this successfully, or is it mandatory to go through ESP-IDF for this feature?