Skip to content

Security and limits

This page is deliberately frank. Knowing what a design doesn’t protect against is as useful as knowing what it does.

  • A computer infected with malware can’t steal the seed. The seed is entered on the device and never leaves it. Only public keys and signed transactions go to the computer.
  • The computer can’t lie about what you’re signing. The device works out the amounts, fee and change itself, and you approve on its own screen. See How it works.
  • Nothing flows back to the camera. The camera link is one wire in one direction.
  • The seed doesn’t survive a session. It is never saved, and it is wiped from memory when you lock the device or leave it untouched for 5 minutes.

Both boards have Wi-Fi and Bluetooth hardware. On the classic ESP32, the radio can only be switched off by the firmware, not removed.

  • The firmware contains no radio code. The source code was searched for Wi-Fi, Bluetooth and networking libraries at the end of Phase 4 and again in the Phase 5 code audit. That audit also searched the compiled firmware for the functions that start the radios. None were found.
  • That is a promise from the software, not a physical guarantee. Different firmware could use the radio. Phase 9 adds an automatic check that fails the build if radio code ever appears.
  • The camera board has a radio too, and it sees everything it scans, including a SeedQR. The one-way wire protects the signer, not the camera board.

Commercial hardware wallets usually have a secure element, a tamper-resistant chip for secrets. Many also use secure boot, which only starts firmware signed by its maker. This prototype has neither.

  • The board can’t prove which firmware it runs. Anyone with the device in hand can flash different firmware through its USB port.
  • The chip’s memory isn’t protected against physical attacks. Flash encryption and secure boot are off. Published research has shown fault-injection attacks against them on the classic ESP32 anyway.
  • Turning them on can’t be undone on the ESP32: it permanently burns settings into the chip. So Phase 9 only researches and documents the procedure, to be tried on a spare board and only with the project owner’s explicit approval.

The device works hard to remove secrets from memory once they’re no longer needed.

  • The Bitcoin library was patched to wipe the temporary copies of the seed and keys that it used to leave behind. (“Library patches” in the build guide covers this.)
  • After deriving keys, the device overwrites its unused stack memory. An on-device check then searched that memory for copies of the seed and master key, and found none. A self-test showed the check does find a copy when one is deliberately planted.
  • “Wipe & lock” stops the user interface and zeroes its whole working memory, the camera link’s buffers and all free memory, then restarts.
  • Crash dumps to flash are disabled. A code audit found that a crash could have written memory, including secrets, to a flash area. That area was removed and both boards’ flash was erased and read back to confirm.

The limits:

  • The memory check looks for exact byte copies only. Secrets held in other forms during the maths wouldn’t be found, although the overwrite still covers them.
  • Memory that is still allocated when the lock fires isn’t zeroed, only free memory. The firmware’s rule is to keep no secrets in such memory across user input.
  • After a crash, the chip prints a register dump on its serial port, which could contain fragments of secrets. Phase 9 plans a release build with all serial output switched off.
  • None of this stops someone who can read the chip’s RAM directly while a seed is loaded.

Not every test passed. Two of the camera scanner’s tests (Phase 3) were waived by the project owner, not passed:

  • Reading a single QR code of 300 or more characters. The largest single code read in that phase was 118 bytes. Real transactions now arrive as animated QR codes with small frames, which have worked, but a dense single code is still untested.
  • Two minutes of continuous scanning without a brownout (a reset caused by the power supply dipping). This hasn’t been verified.

Other open problems:

  • Random restarts. The DevKit has occasionally reset itself while being tapped, including once during a transaction review (nothing was signed). It’s thought to be loose wiring or the USB supply, but that isn’t confirmed.
  • 5V on a 3.3V pin. The tested USB-TTL adapter sends 5V signals into one of the camera board’s pins, above what the chip is rated for. A resistor divider is recommended but wasn’t fitted on the tested build.
  • The Bitcoin library has known weaknesses with hostile data, including a memory-safety bug. The device works around them by never giving the scanned data to the library (see Signing a rebuilt PSBT and Known issues).

Put together: no secure element, no secure boot, radios kept off only by software, a few unverified tests, no independent audit and no reproducible build. Any one of these is a reason not to trust it with real money. The firmware uses test-network keys and addresses throughout, and the real network (mainnet) stays disabled until the checklist below is complete.

Phase 9: hardening, still on the ESP32

  • A build check that fails if radio code is ever included.
  • A release build with no serial output at all.
  • An optional session PIN, required again after the idle lock (nothing stored).
  • A boot screen showing the firmware version and a hash of the running firmware, to compare with a published one.
  • Advice to power the device from a battery or a power-only USB cable after flashing.
  • A written threat model, and documentation (only) of secure boot and flash encryption.

Phase 10: a plan for the final hardware, not a build

  • A security-oriented chip, such as an STM32 with TrustZone, and a secure element.
  • Which parts of the code carry over, and new camera options.
  • Reproducible builds and signed firmware updates.
  • A mainnet readiness checklist: an independent audit, all test fixtures passing, a reproducible build, and the project owner’s explicit sign-off.