Skip to content

🐒 The hardware heart of TurtlPass β€” firmware for passwords born in hardware, offline and reproducible (RP2040 / RP2350).

License

Notifications You must be signed in to change notification settings

TurtlPass/turtlpass-firmware-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Logo

πŸ”— TurtlPass Ecosystem

🐒 Firmware β€’ πŸ’Ύ Protobuf β€’ πŸ’» Host β€’ 🌐 Chrome β€’ πŸ“± Android


🐒 TurtlPass Firmware

TurtlPass is a hardware-based password generator built for simplicity, security, and portability. It deterministically derives passwords from encrypted seeds stored directly in the microcontroller’s flash, keeping all sensitive data self-contained and offline.

With a single button and integrated LED feedback, TurtlPass can generate and type passwords directly into any device β€” no software required. For advanced management, account-specific passwords, or seamless integration, TurtlPass connects with companion tools:


⚑ Features

πŸ” Hardware Password Generator

  • Deterministic & unique: Generates reproducible passwords directly on the device β€” perfect for multiple accounts.
  • Flexible length & complexity: Passwords can be 1–128 characters (default 100) and include numbers, letters, or symbols, like any password generator.
  • Instant input: Passwords are typed automatically into any active field via the device β€” no software required.
  • Offline & secure: Completely offline β€” no cloud, no sync, no leaks.

🧬 Seed Management

  • Secure & encrypted: Each seed is stored in emulated EEPROM and encrypted with ChaCha20.
  • Multiple slots: Each LED color represents a unique seed, allowing multiple identities or accounts.
  • Reliable backups: Backup-friendly β€” reflash, duplicate, or mnemonic restore.
  • Self-contained storage: Seeds never leave the device β€” no cloud storage required.

πŸ”Œ Plug & Play Simplicity

  • Instant usability: Connect via USB and long press the device button to type your default password automatically.
  • Intuitive controls: Single press cycles through seed slots; long press types the password. LED colors provide clear visual feedback.
  • Secure convenience: Provides decoy passwords for curious onlookers while keeping strong, unique passwords at your fingertips.
  • Cross-platform ready: Works anywhere with USB support β€” no drivers or software installation required.

🧠 Mnemonic-Based Seeds

The TurtlPass Host (Python CLI) allows you to create or restore 512-bit seed from 24-word BIP-39 mnemonics β€” the same standard used by many hardware wallets.

This provides several benefits:

  • Reproducibility: Generate the same deterministic passwords across multiple devices.
  • Safe backups: Store your seed securely offline on paper or metal.
  • Device recovery: Restore your TurtlPass device if it’s lost or damaged, using only the mnemonic.

🧩 Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User Interaction (Button / Touch)                            β”‚
β”‚        β”‚                                                     β”‚
β”‚        β–Ό                                                     β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚ β”‚   🐒 TurtlPass Core (RP2040 / RP2350 Microcontroller)   β”‚  β”‚
β”‚ │─────────────────────────────────────────────────────────│  β”‚
β”‚ β”‚ πŸ” Seed Storage (Encrypted Flash / EEPROM)              β”‚  β”‚
β”‚ β”‚    └─ Encrypted with ChaCha20                           β”‚  β”‚
β”‚ β”‚    └─ Salt = Unique Board ID                            β”‚  β”‚
β”‚ β”‚                                                         β”‚  β”‚
β”‚ β”‚ βš™οΈ Password Derivation                                  β”‚  β”‚
β”‚ β”‚    └─ Inputs: {Seed, Domain, Account ID, PIN}           β”‚  β”‚
β”‚ β”‚    └─ Deterministic generator                           β”‚  β”‚
β”‚ β”‚                                                         β”‚  β”‚
β”‚ β”‚ 🌈 LED Controller (FastLED)                             β”‚  β”‚
β”‚ β”‚    └─ Indicates seed slot & status                      β”‚  β”‚
β”‚ β”‚                                                         β”‚  β”‚
β”‚ β”‚ ⌨️ USB HID Keyboard Interface                           β”‚  β”‚
β”‚ β”‚    └─ Types password into host system                   β”‚  β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚        β”‚ USB / Serial Connection                             β”‚
β”‚        β–Ό                                                     β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚ β”‚                    Host Integrations                    β”‚  β”‚
β”‚ β”‚  πŸ’» Python CLI  |  🌐 Chrome Extension  |  πŸ“± Android  β”‚  β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚        β”‚                                                     β”‚
β”‚        β–Ό                                                     β”‚
β”‚ Websites / Apps / Login Fields (Password typed automatically)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’‘ LED Behavior

Each LED color corresponds to a unique seed slot, providing visual feedback for selection and activity.

Color Seed Slot
🟒 Green 1
🟑 Yellow 2
πŸ”΄ Red 3
πŸ”΅ Blue 4
βšͺ White 5
🟣 Violet 6
🟠 Orange 7
🩡 Aqua 8
🩷 Pink 9

Touch Controls:

  • Single press: Switch to the next seed/color.
  • Long press: Type the default password for the current seed.

✨ LED States

LED State Meaning
πŸ’‘ ON Idle
🌟 PULSING Password ready
⚑ BLINKING Typing in progress
⚫️ OFF No power

πŸ’Ύ Backups

  • Redundant storage: Flash the same seed to multiple devices to ensure availability in case of loss or failure.
  • Offline mnemonic: Optionally, keep a mnemonic of the seed offline for secure recovery.
  • Device-first security: Keeping seeds only on the device is the most secure option, minimizing exposure to online threats.

πŸ›‘οΈ Security Notes

  • Strong, deterministic passwords: Even with physical access, extracting the seed alone is not enough to reproduce passwords.
  • Unique per account: Passwords are derived from a combination of seed, domain, account ID, and user PIN, ensuring uniqueness and irrecoverability.
  • Offline-first security: All cryptographic operations occur on-device, eliminating cloud exposure and minimizing attack surfaces.
  • Optional backups: Redundant seeds or offline mnemonics provide recovery options without compromising security.

πŸ“₯ Cloning the RP2040

The RP2040 firmware can be extracted using picotool:

$ picotool save firmware.uf2
Saving file: [==============================]  100%
Wrote 369000 bytes to firmware.uf2

Note: Extracting the firmware does not allow backup of the seed, as it is encrypted using the unique board ID. Passwords also cannot be recreated from the firmware alone, since they are derived from a combination of seed, domain, account ID, and user PIN, ensuring irrecoverability.


⬇️ Download

If you own a Raspberry Pi Pico (RP2040 or RP2350), you can download the precompiled UF2 file for your board from the Releases page.

UF2 files are shipped with TurtlPass-specific USB VID/PID settings. You may customize these values if you build TurtlPass Firmware from source, but do not distribute binaries using a VID/PID you do not own.

Note: The VID 0x1209 and PID 0xFA55 are registered to TurtlPass. Changing them allows custom identification but must comply with USB VID/PID regulations.


πŸ§‘β€πŸ’» Building from Source

TurtlPass Firmware uses PlatformIO for building, flashing, and dependency management. Power users and developers can build and flash custom versions tailored to their boards or preferences.

For step-by-step instructions, see the full guide: BUILD.md


πŸ“š Dependencies

TurtlPass Firmware relies on the following libraries and platforms:

Credits: Thanks to the maintainers of these open-source projects for enabling secure, portable, and efficient firmware development.


πŸ“œ License

This repository is licensed under the GPL 3.0 license.