Inspiration
The inspiration behind FOSS49Key stems from a growing frustration with cloud-dependent password managers, subscription lock-ins, and the constant exposure of sensitive credentials to third-party servers. In an era where data breaches, supply-chain vulnerabilities, and telemetry tracking threaten digital privacy, we wanted to build a truly sovereign, trustless alternative. FOSS49Key was envisioned as an air-gapped, open-source hardware security key and offline password vault—giving users absolute ownership of their cryptographic secrets without relying on external servers or risky software extensions.
What it does
FOSS49Key is an offline, hardware-based credential vault and physical authenticator built around an ESP32-S3 microcontroller.Air-Gapped Encrypted Storage: Secures usernames and passwords locally inside an encrypted file using lightweight symmetric cryptography (SECRET_KEY XOR cipher mapping).Tactile Hardware Interface: Features a 128x64 SSD1306 I2C OLED display paired with a KY-040 rotary encoder to allow users to smoothly scroll through and inspect stored accounts completely offline. Direct USB HID Keystroke Injection: Utilizing the native USB capabilities of the ESP32-S3, the device acts as a trusted USB HID keyboard. When a user highlights an account and presses the tactile pushbutton, FOSS49Key automatically types the credentials directly into any connected computer (username \t password \n) without installing software drivers or exposing raw data to the host operating system.
How we built it
The development of FOSS49Key integrated embedded MicroPython systems with physical hardware layout design:Microcontroller & Firmware: Powered by an ESP32-S3 DevKit running a custom MicroPython firmware build, leveraging its native USB stack for hardware-level keyboard emulation. Peripherals & Wiring: Interfaced the ESP32-S3 with a 128x64 SSD1306 OLED display via SoftI2C (GPIO 8 for SDA, GPIO 9 for SCL), a KY-040 rotary encoder (GPIO 5 for CLK, GPIO 7 for DT, GPIO 6 for Switch), and a discrete physical pushbutton (GPIO 4) anchored to common ground rails (GND.1, GND.2). Software Architecture: Developed a page-by-page framebuffer rendering engine (framebuf) to overcome I2C buffer limits on the OLED, alongside an interrupt-driven state machine to ensure lightning-fast rotary navigation and zero missed button clicks.
Challenges we ran into
ESP32-S3 Bootloader Flash Mapping: Early in development, our compiled MicroPython binaries fell into silent boot loops. We discovered that flashing full partition images required explicitly defining the offset = 0x0000 parameter in our Wokwi/VS Code configuration so the bootloader aligned correctly with the chip's memory vectors. SSD1306 I2C Buffer Saturation: Attempting to dump the entire 1025-byte screen buffer in a single write operation caused intermittent display corruption and dropped frames in simulation. We resolved this by rewriting the graphics routine to push data strictly page-by-page (8 horizontal rows at a time). Physical Input Debouncing: Rotary encoders and mechanical pushbuttons inherently produce electrical noise and signal bounce. We engineered custom software debounce checks and dual-edge interrupt handlers to guarantee crisp, reliable menu navigation.
Accomplishments that we're proud of
True Air-Gapped Security: Successfully engineered a self-contained device that operates entirely off-grid, ensuring zero exposure of master credentials to network stacks or cloud endpoints. Seamless USB HID Emulation: Successfully configured the ESP32-S3 to dynamically interface with any host machine as a standard plug-and-play keyboard, automating multi-field logins instantly with a single hardware click.Robust Embedded UI: Built a responsive, multi-line scrolling menu system inside constrained microcontroller memory limits, giving users a smooth, desktop-like navigation experience on a tiny 0.96-inch OLED screen.
What we learned
Native USB Stack Integration: Gained profound insights into low-level USB HID device classes and how microcontrollers can safely emulate peripherals like keyboards. Optimizing I2C Communication Limits: Mastered memory-efficient framebuffer manipulation and register-level display commands for SSD1306 displays without relying on heavy external graphics libraries. Hardware-Software Co-Design: Learned how to tightly couple electronic schematic layout (diagram.json) with asynchronous event-driven Python logic (main.py) for robust embedded system reliability.
What's next for FOSS49Key
Advanced Cryptography: Upgrading the symmetric XOR encryption layer to full hardware-accelerated AES-256 encryption backed by the ESP32-S3's internal secure key storage.
Biometric Integration: Adding a low-cost fingerprint sensor (such as the R307 module) as a physical unlock gate, requiring biometric verification before the device permits credential decryption and typing.
Custom Enclosure & PCB Design: Designing a custom, pocket-sized PCB integrating a rechargeable LiPo battery management circuit (TP4056) to make FOSS49Key a fully portable keychain hardware security token.
Built With
- deepgram
- esp-32
- micropython
- tailscale