If you find this useful, please consider buying me a coffee:
A hands-on exploration of embedded cryptography using the Microchip ATECC608A/B/C secure element, driven by an ATtiny85 (via V-USB) and an ESP32. Features a working U2F hardware security key as the centrepiece demo.
Hardware:
- Microchip ATECC608A/B/C — ECC P-256 secure element (SOIC-8, I²C)
- ATtiny85 — 8-bit AVR microcontroller (SOIC-8 or DIP-8)
- ESP32 — 32-bit Xtensa MCU with Wi-Fi/Bluetooth
Toolchain: PlatformIO + VS Code
| Directory | Purpose |
|---|---|
attiny85/ |
ATtiny85 firmware — U2F key, V-USB, ATECC608A driver |
esp32/ |
ESP32 firmware — I²C master, signing demos, serial interface |
docs/ |
Wiring diagrams, architecture, notes, and blog material |
scripts/ |
Host-side Python utilities (provisioning, verification) |
- PlatformIO (VS Code extension or CLI)
- An ATECC608A/B/C on a SOIC-8 breakout board
- An ATtiny85 (SOIC-8 or DIP-8)
- An ESP32 development board
- A spare ESP32 or Arduino to act as ISP programmer for the ATtiny85
See docs/wiring/ for circuit diagrams for each configuration.
# ESP32 target
cd esp32
pio run
# ATtiny85 target
cd attiny85
pio run- Provision — generate an ECC P-256 key pair inside the ATECC608A, lock the slot
- Sign & verify — send data to the chip, receive a signature, verify on the host over serial
- ESP32 ↔ ATECC608A — ESP32 as I²C master; sign and verify end-to-end
- U2F hardware key — ATtiny85 + V-USB presenting as a USB HID security key, ATECC608A doing the crypto
docs/architecture/tiny-crypt.drawio is the source for the diagram above.
The SVG is auto-regenerated on commit by the pre-commit hook in .githooks/pre-commit.
To activate the hook after cloning:
git config core.hooksPath .githooksIf you find this useful, please consider buying me a coffee:
