Why

Most DIY fingerprint projects I've seen use a ready-made module that does the matching itself and talks to the ESP over a plain, unauthenticated UART. It's relatively easy to get access to the wiring and tell the ESP that "match is OK". A few modules do encrypt that link, but the key sits in the ESP's flash, and the same ESP still opens the door, so owning the ESP still means owning the door.

This project turns that around: the device in front of the door is deliberately dumb.

The idea

Threat model

I assume the device is physically reachable: it hangs outside, meaning it can be unplugged, replaced, opened, or have its cable and Wi-Fi intercepted.

What an attacker gets by compromising the device:

With a ready-made module, the attack takes a minute: open the case, connect to the sensor wires, send a fake "match". Here that doesn't work, because there is nothing to impersonate. The attack becomes a multi-step one:

  1. Get physical access and either tap the SPI bus or reflash the ESP to collect frames of legitimate touches.
  2. Come back (or connect remotely, if you have the token) and replay one of the collected frames.

This isn't impossible, but it takes time and preparation, and the measures below are meant to make it even harder.

What the design does about it

The server-side parts are planned, not built yet.

What remains

Hardware

Lesson learned: the sensor needs a bezel. My first board didn’t work because it had none. The chip drives the finger through a metal bezel, and without one, the frames are pure noise. The finger has to touch the bezel and the sensor at the same time.

The second board, with a homemade bezel, worked right away. It looks awful, but the images are clean. I was going to put a raw frame here, but publishing my own fingerprint to the whole internet would make the encryption on the server a bit pointless. Imagine a very clean fingerprint here :)

The version 1 board is built around the FPC1020AM, a flex-cable version that comes with the bezel already built in, so no more hand-made bezels.

Firmware

An ESPHome external component (ESP32, ESP-IDF). A FreeRTOS task polls the sensor's 12-zone finger detection, captures a frame (~43 ms at 8 MHz), and streams it to the server. Everything the component reports (finger present, result, latency) is exposed as ordinary ESPHome entities.

The prototype measured the full path from finger detection to the verdict at about 160 ms.

Server

A Dockerized ASP.NET server with SourceAFIS. The prototype already enrolls and matches fingers. The full version will add:

Status

Works

In progress

Next

Later