A YubiKey costs about as much as a nice dinner, but the ESP32 can be covered for well under the cost of dessert. With the right board, a cable that actually carries data, and a few minutes in a browser, this tiny dev board can sign you into websites with passkeys.
The catch is that the ESP32 is more a family of boards than a single one, and the one running your smart home sensors probably isn’t the same one you’d want to use for a security key. This is also where the differences in the newer ESP32 boards shine the best.
Pick a board that can pretend to be a USB key
Native USB, a data cable, and no C3 or C6 wishful thinking
For this particular build, you can’t get away with just any board. You need an ESP32 that has a USB connection wired directly to the chip. A lot of ESP32 variants, including the original ESP32 V1 devkit, place a USB-to-serial bridge between the USB port and the chip. This allows you to program the chip, but the chip itself isn’t visible to the computer as a USB device.
More capable boards like the ESP32-S2 or ESP32-S3 (or its Seeed Studio XIAO counterpart if you want a more compact option) come with either a USB port connected directly to the chip or two USB ports that allow both USB and serial interfaces. If your board has two connectors, look for the one marked USB or OTG rather than UART or COM.
The C3 and C6 don’t count, even though their product pages say “native USB.” On those chips, the USB port is a fixed serial/debug interface, so it can’t present itself as a security key. If you want a more hardened key rather than a use for a spare board, Pico Keys recommends the Raspberry Pi Pico 2 (RP2350) or the ESP32-S3, and warns against the RP2040, whose stored keys can be easily dumped.
Additionally, use a cable that you know carries data. A charge-only cable only powers up an ESP32 and lets it run whatever firmware is already on the chip, but you can’t flash it using one.
Flash Pico FIDO without leaving Chrome
Hold BOOT, tap RESET, and pray your cable carries data
On the firmware side, all you need to do is flash the firmware from a browser. But before that, you need to put your board into download mode. This can be done by holding down the BOOT button, pressing and releasing RESET, then releasing BOOT. Your board might have the buttons labelled differently or have a different sequence. Regardless, check your board’s datasheet before proceeding.
Once the board is in download mode, open the Pico Keys ESP32 Flasher in a Chromium-based browser such as Chrome or Edge. Select Pico FIDO, click Connect, and choose the board in the browser’s serial-port picker. Start the flash and wait for it to finish before unplugging anything. If the board doesn’t reboot on its own, tap RESET and you should be good to go.
If your board doesn’t appear in the browser’s serial-port picker, try the BOOT and RESET sequence again, a different USB cable, or a direct connection to your computer’s USB ports. If flashing succeeds but your browser can’t read the security key, check that you’re using the right USB port and that the board itself has booted out of download mode. On Linux, running the fido2-token -L command from libfido2 is another option for checking if your system sees it.
Flashing isn’t the last step, however. Pico Keys recommends setting the board’s USB vendor and product IDs after flashing. Without that, third-party tools such as OpenSC, ykman, and GnuPG may not recognize the key. The official PicoKey App does this. PicoForge is a free, open-source alternative, but check that it supports the firmware version you just flashed.
Register a passkey, then prove it actually works
A WebAuthn test site is cheaper than a lockout
Your freshly made passkey is useless until you register it. Start with a WebAuthn test site or a throwaway account. WebAuthn is the browser standard that lets a site register and use a credential from an authenticator like the one you just made. In the registration prompt, choose the option for an external USB security key rather than saving the passkey to your phone or password manager. Then set a security-key PIN when prompted and follow the physical confirmation prompt. On the XIAO ESP32-S3 setup, the BOOT button doubles as the confirmation button once the firmware is running.
Once the registration succeeds, sign out and sign back in with the board. Just having a security key isn’t enough. You need to verify that you can actually use the credentials you just registered. The site stores the public key, and the authenticator uses the corresponding private key to sign a challenge during login. Your PIN verifies you to the authenticator, but it isn’t a website password.
It’s also good to have a recovery plan before you start using your newly flashed key everywhere. Losing or resetting the board can get you locked out of your account, and an alternative log-in method comes in handy in such situations.
Don’t hand it your inbox on day one
A homemade security key earns trust one throwaway account at a time
With the right configuration, you can have yourself a pretty secure USB passkey. The ESP32 may not be the most secure board out of the box, but it’s still useful as a security key just as long as you harden it properly. On the ESP32-S3, that means Secure Boot and Secure Lock, which write one-time eFuses and can’t be undone.
Just make sure you can repeat the sign-in process without guessing which prompt or button comes next. Once you’ve got your key configured and a backup working, you’ve built something useful and learned where its limits are. That’s a better first outing for a homemade security key than handing it the keys to your inbox.
