Table of Contents
ESP32 Security feature introduction
ESP32 provides a lot of security features that can be enabled with e-fuse. This is a short introduction of what they are. The full descriptions can be found on ESP-IDF doc website:
https://docs.espressif.com/projects/esp-idf/en/release-v5.5/esp32/security/flash-encryption.html
Flash encryption
This feature allows the encryption of select or all flash content (with the exception of NVS partition, which uses a different encryption method). Encryption prevents unauthorized parties from obtaining the binary of MicroPython app or your filesystem. Assume you developed an IoT device with MicroPython scripts. You are probably concerned with someone stealing your hard work, the scripts, and make knockoff devices. You are probably also concerned that someone may read your script and discover a bug, exploit it, and compromise your devices. AES256 filesystem encryption takes care of that. Once enabled, even if someone manages to read back the flash content, it will be scrambled.
Secure boot V2
This feature allows the developer to sign their app (in this case the MicroPython app, not your scripts). This prevents unauthorized upload to replace the current MicroPython app. This may not be as critical as flash encryption but is still an important feature. Because without it, someone else may replace the MicroPython app with their own app and read back the filesystem, in case you didn't properly disable upload of plaintext apps.