DIY Projects

ESP32 LED Pin Uses Cryptography to Prove Your Video Isn’t a Deepfake

ESP32 LED Pin Uses Cryptography to Prove Your Video Isn’t a Deepfake

Picture a thesis defense recorded on a phone, a short clip of a student explaining her robot, posted to a class group chat. A week later a doctored version shows up with words she never said. How would anyone prove which clip is the original? A YouTuber called The Information Syndicate asked a version of that question and answered it with a blinking pin.

What they built

The device is called The Protector, a small badge you clip to your shirt before you hit record. Its face is a grid of 20 RGB LEDs that shows a new pattern every second. The idea came from paper money: banknotes carry watermarks and security threads that are hard to fake, so why not give a person on camera something similar? The first prototypes were bulky LED-strip collars, and investors in San Francisco were not keen on people wearing collars. The creator shrank everything down to a pin and, with help from a friend who knows electrical engineering, laid out a custom PCB.

How they built it

The board holds a small compute module, a real-time clock, a touch pad for control, and the LED matrix. The build photos show an ESP32 dev board handling the heavy lifting during development. Each pin stores its own private key. Once per second, the firmware combines the current time with that key to pick a pattern. Each LED can be red, green, blue, or off, so 20 LEDs give 4^20, about 1.1 trillion combinations. A forger would need the key to fake the right sequence, not just a convincing face.

Verification runs in the browser. You load the video, mark the four corners of the pin, confirm the detected LED states, then enter the pin ID and the rough time of filming. The tool searches for a matching sequence, and the video never leaves your machine. The honest gotcha: someone could paste real footage of the pin into a fake video, so a match proves the pin was there, not that every frame is untouched.

The takeaway for your bench

You can prototype the core idea this weekend with parts you may already own. An ESP32, a DS3231 RTC module on SDA/SCL (GPIO 21 and 22 on most DevKit boards), and a 5×4 patch of WS2812B LEDs on one data pin is enough. Use an HMAC-SHA256 of the Unix time and a secret key, then map each pair of output bits to one LED colour. The mbedtls library ships with the ESP32 Arduino core, so no extra install is needed. Keep brightness low; 20 LEDs at full white can pull over 1 A. The finished pin sells for 120 US dollars on pre-order, and the full write-up lives at Hackster.

Frequently Asked Questions

How does The Protector prove a video is real?

Each pin has its own private key. Every second it combines that key with the current time to light a unique pattern on 20 RGB LEDs. A browser-based tool reads the pattern from the video and checks it against the pin ID and filming time. Without the key, faking the correct sequence is extremely hard.

Can I build a similar LED authentication pin myself?

Yes, a rough version. An ESP32, a DS3231 real-time clock over I2C, and 20 WS2812B LEDs cover the hardware. In firmware, compute an HMAC-SHA256 of the current Unix time with a secret key and map pairs of bits to red, green, blue, or off. You will also need a way to read the pattern back from video, which is the harder software side.

What will I learn if I build this?

You will practice I2C wiring with an RTC, driving addressable LEDs from a single GPIO, and using a real cryptographic library on a microcontroller. You also get a hands-on lesson in time-based one-time codes, the same idea behind authenticator apps, plus the limits of what a verification scheme can and cannot prove.

This article was inspired by reporting from Hackster. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.