ESP32 + QEMU + Backend TLS Server
Figure: Overall system architecture showing ESP32 secure boot, firmware verification, mutual TLS authentication, certificate authority, revocation control, and backend authorization.
Siddarth S
This project implements an end-to-end secure IoT architecture that protects an ESP32-class device from:
- Firmware tampering
- Rogue or cloned devices
- Stolen certificates
- Man-in-the-Middle (MITM) attacks
- Unauthorized backend access
The system combines:
- Secure Boot & Root of Trust
- Firmware Manifest Signature Verification
- Mutual TLS (mTLS) Authentication
- Certificate Revocation & Authorization Logic
All security mechanisms are validated using QEMU-based ESP32 simulation and a real TLS backend server.
- ESP32 Power-On Reset
- ROM Secure Boot (Root of Trust)
- Second-Stage Bootloader
- Firmware Image Loaded
- Manifest Signature Verification
- ✅ Valid firmware → Application executes
- ❌ Invalid firmware → Boot halted
This ensures only cryptographically signed firmware can execute, even if flash memory is modified.
- A valid firmware image
- A deliberately tampered firmware image
- ✔ Valid firmware → Boots normally
- ❌ Tampered firmware → Rejected during boot
This proves real firmware integrity enforcement, not checksum validation.
- ClientHello
- ServerHello
- Server Certificate (X.509)
- Client Certificate (X.509)
- Client proves possession of private key
- Server verifies certificate (CA + CRL)
- Authorization check (CN / Device ID)
- Secure TLS channel established
- Application data exchange (
AUTH OK)
This guarantees mutual authentication, not just encrypted transport.
- Device certificates issued by Device Root CA
- Backend trusts only this CA
- Revoked devices stored in CRL / denylist
- ✔ Certificate valid & not revoked → Access granted
- ❌ Revoked or unauthorized → Connection rejected
| Threat | Mitigation |
|---|---|
| Firmware tampering | Manifest signature verification |
| Rogue device | mTLS + Device CA validation |
| Stolen certificate | Certificate revocation list |
| MITM attack | TLS encrypted channel |
| Unauthorized access | Backend authorization logic |
This section explains why each security control exists.
- ESP-IDF v5.x
- QEMU (ESP32 simulation)
- OpenSSL (TLS server & client)
- Python TLS backend
- Linux / WSL environment
Note: This design can be directly extended to real ESP32 hardware.
This project demonstrates a production-grade IoT security architecture, covering:
- Root-of-Trust boot
- Firmware integrity
- Strong device identity
- Certificate lifecycle management
- Backend authorization control
It reflects real-world practices used in industrial, automotive, and aerospace









