Hi all,
I’m 0xOucan. For ZECATHON (Wildcard track) I turned LeekWallet, an open-source ESP32 hardware wallet I first built for Ethereum, into a Zcash-only one. I’m posting it here to get it in front of people who know Zcash well and to hear what I got wrong.
What it is: a small signer on an ESP32-S3 board with a 128×128 OLED, a rotary knob (turn to move, press for OK) and one Cancel button. It holds the seed. Your phone or computer syncs, builds the transaction and creates the proofs. The board checks the transaction against its own keys, shows you what you’re about to sign, and signs only if you accept.
- Try it without hardware (a simulated board in the browser): https://zcash.leekwallet.xyz
- 2-minute demo on real hardware: https://www.youtube.com/watch?v=8F6_8AhsnAA
- Code (Apache-2.0): GitHub - 0xOucan/leekwallet-zcash: DIY Zcash hardware wallet on ESP32-S3: PCZT signer for Ironwood/Orchard, USB/BLE/QR/SD, with Android and CLI companions · GitHub
- Zodl fork with LeekWallet as a hardware signer (MIT): https://github.com/0xOucan/leekwallet-zcash-android
- Website Walkthrough and the Docs preview: Leek Wallet DIY Open Source Hardware Wallet on X: "The Zcash LeekWallet website walkthrough 🥬🔑 https://t.co/a67Nr7La0U: a DIY Zcash hardware wallet you can try right in your browser. No keys, nothing sent. + a first look at the docs: guides, security, diagrams, offline search. Coming soon at /d… / X
How it works
phone / PC LeekWallet board
────────── ────────────────
sync, build PCZT ── PCZT (ZIP 374) ──▶ parse, check the spends are ours,
USB · BLE · SD recompute the sighash, rebuild the notes,
show the outputs and the memo
prove, broadcast ◀── signatures ───── you press ACCEPT: RedPallas spend-auth sigs
- The board is a PCZT signer. Proving happens on the companion, so the board never needs the proving keys.
- It signs a compact view of the PCZT (~1.4 KB). It rebuilds the parts it can recompute (note commitments, value commitments, the encrypted memo) itself, so the memo it encrypts is the memo it showed you.
- It returns signatures only (~110 bytes), bound to the SHA-256 of the exact bytes it reviewed.
- Address check: before the app shows you a receive address, the board proves that address is its own. That includes rotated diversified addresses: the Orchard
pk_d = [ivk]·g_dcheck, with the index recovered by FF1. It refuses foreign or mixed addresses. - Pairing: an encrypted session (X25519, HKDF, ChaCha20-Poly1305), confirmed by a six-digit code shown on both screens.
- Pools: Ironwood (NU6.3), Orchard, and transparent inputs, so it can shield. Mainnet or testnet is a setting on the board, and it refuses requests for the other network.
The ecosystem around it
- Zodl fork: two Android apps (mainnet and testnet) with an account whose keys stay on the board, signed over USB or Bluetooth.
- Zcash LeekWallet app (Linux, Windows, macOS, Android): a full light wallet. It sends and shields with signatures from the board, supports watch-only wallets, and does ZEC swaps through NEAR Intents.
- Chrome extension: librustzcash compiled to WebAssembly, talking to the board over Web Serial and Web Bluetooth.
zeczCLI and the Rust libraries that all of the above use, plus a simulated board for testing without hardware.
It has signed real testnet transactions over USB, Bluetooth and SD card, and its first mainnet sends, a shield, and a ZEC → USDC swap.
Please read before you use it
- It is experimental and not audited.
- Flash encryption and secure boot are not enabled. On the ESP32 they are one-way eFuse burns, so I left them off for now. Anyone who holds the board can read its flash. If you store the seed on the board behind a PIN, my own audit estimates a 4–8 digit PIN falls to a GPU in minutes once the flash is dumped (the vault uses PBKDF2). Three wrong PINs on the device wipe it, but that doesn’t help against a dumped flash.
- If physical theft is in your threat model, use the stateless mode: you type the seed at each boot and nothing is stored. Or keep the seed in an encrypted file on the microSD card protected by a long passphrase.
- Use small amounts on mainnet. Testnet is the default.
- Verify downloads first. Each release ships a
SHA256SUMSsigned with my SSH key, and the firmware build is reproducible. Building it yourself is the recommended way.
How it was built: I’m a solo dev, and I wrote this with heavy help from an AI coding assistant (Claude). I review, test and flash everything on real hardware myself, and the signing code has two independent implementations (C on the device, Rust on the host) cross-checked against shared test vectors generated from librustzcash. That still doesn’t replace a review by someone who knows this cryptography. If that’s you, I’d really value your eyes on it, especially on the PCZT checks and the PIN vault.
Docs (setup, security and limits, diagrams, release verification) are coming soon at https://zcash.leekwallet.xyz/docs
Trust assumptions
To be explicit about what you’re trusting when you sign with LeekWallet today:
- You trust the firmware: open source, a reproducible build, not audited.
- You trust the ESP32-S3 and its toolchain (ESP-IDF). There is no secure element yet.
- You trust the board’s screen to show what the firmware decoded. The board rebuilds and checks the PCZT itself instead of trusting the companion, but it’s still a single screen.
- You trust librustzcash, on the companion side, for syncing, building and proving.
- You trust your lightwalletd server for the chain data (balances and history), but not for what you sign.
- You trust whoever had physical access to the board, since its flash isn’t encrypted (see above).
Vision (not a roadmap)
At ZCon7 I showed the board to a lot of community members. Thank you to everyone who gave it their time, held it and asked hard questions. Some of those conversations were about possible integrations with Zodl, Zingo and Zillions. I’ve also showcased the Ledger Nano X attack as you can see here: 0xoucan.eth 🥷 The DIY HardwareWallet Gangsta LFG on X: "Supply-chain attacks against hardware wallets aren't going away. And that's something the entire crypto industry needs to take seriously. Following the recent Ledger Nano X hardware implant research brought to public attention by @MagicalTu… / X
Those conversations also made one thing clear to me: LeekWallet isn’t ready yet in terms of standards. Today each wallet would have to integrate with my own protocol. So rather than promising dates, here is the direction, starting with the most concrete:
- Release the docs site. Setup, the security model, the protocol, diagrams, and how to verify releases. Almost done.
- A LeekWallet SDK. A clean, documented way for any Zcash wallet to talk to the board, built on standard communication formats: PCZT (ZIP 374) in and signatures out, over USB, Bluetooth and SD. The goal is for integrating LeekWallet to be a small, reviewable change instead of a fork.
- An independent transaction checker. In the spirit of safe-tx-hashes-util for Safe multisigs: an offline tool that decodes a PCZT on a separate machine and prints the network, recipients, amounts, fee and memo. It also prints a short review code that the board shows too. You check the board and the tool against each other, so you don’t depend on a single screen or a single implementation.
- Optional native tools, on and off the board: passphrase support across the companion apps, and research into multisig. For shielded Zcash that means FROST threshold signatures rather than script multisig.
- Secure element research. I have Infineon OPTIGA Trust M chips on the bench for study and testing: keeping the PIN check and key storage in a secure element instead of plain flash. This is research, not a feature yet.
- Mid to long term: a LeekWallet OS. One board, one BIP39 seed, with chains and tokens as optional add-ons or plugins: Zcash first, Bitcoin and EVM chains as modules you choose to install. Since the seed is standard BIP39, one device could hold several chains. This could bring holders of other coins over to Zcash, and give Zcash users one place to hold their other assets.
The Zcash firmware stays Zcash only and minimal. Anything multi-chain would be a separate, opt-in build, never extra code inside the signer you use for ZEC.
FAQ
Why build your own hardware wallet when Keystone and others exist?
To have an open, cheap Zcash signer that anyone can build and read end to end: about $25 of parts, every line of firmware and every companion app open source. It’s also a learning platform for PCZT-based signing. It is not a replacement for an audited commercial device holding serious funds.
Does the seed ever leave the board?
No. The companion gets only the viewing key, and the board returns only signatures. What physical access can read is covered in “Please read before you use it” above.
Why isn't flash encryption on?
On the ESP32-S3, enabling flash encryption and secure boot burns eFuses permanently, and a mistake can brick the board or lock it to one key. While the firmware is changing this fast, I chose not to burn them. Until then, the stateless and SD-card modes are the answer to physical theft.
Why PBKDF2 and not Argon2id?
The PIN vault is inherited from the original LeekWallet firmware, and the iteration count is limited by the ESP32’s speed: one unlock already takes about 1.5 s. A memory-hard KDF is the better choice. With 8 MB of PSRAM, Argon2id is feasible, and it’s on my list. Until then, with no flash encryption, a short PIN is not a strong secret against someone holding the board, so I don’t present it as one.
Which pools and transaction types?
Ironwood (NU6.3) and Orchard spends, plus transparent P2PKH inputs (for shielding), to shielded or transparent outputs, with memos. Multiple accounts on the board are not done yet.
Does it work with Zodl / Zashi?
Through our fork of Zodl, which adds LeekWallet as a hardware signer (sideloaded APKs, Android only, arm64). I’d like to offer this upstream once it has a proper account type.
Can I use it fully air-gapped?
Yes, with the SD card: the PCZT goes to the board on the card and the signatures come back the same way, with no cable or radio. QR signing works in the lab but is still research.
What hardware do I need?
An ESP32-S3-N16R8 “CAM” board, a 1.5" SH1107 128×128 I2C OLED, an EC11 rotary encoder and one push button. The wiring is in the repo, and the website has a flasher (Chrome or Edge) that runs only after the verify step.
Multisig?
Not yet. For shielded (Orchard) funds, the path is FROST threshold signatures, where several boards each hold a share of a key. It’s on the research list, not something LeekWallet does today.
Will it support Bitcoin or EVM chains?
Not in the Zcash firmware: that stays Zcash only. A multi-chain LeekWallet OS with optional plugins is a mid- to long-term idea (see Vision). It would be a separate, opt-in build.
Is there a secure element?
Not today. I’m studying Infineon OPTIGA Trust M chips as a way to protect the PIN and keys against someone who has the board in hand. Until that ships, the honest answer is that the board can be read by anyone who has it.
Is it audited? Is there a bug bounty?
Not audited, and no bounty yet. Issues and reviews on GitHub are very welcome. Security findings can go to me privately on X (@0xOucan).
Thanks for reading. Questions, criticism and “this is wrong because…” are all welcome.
X: @gmLeekWallet · @0xOucan