W2QR Shamir Backup
Encrypt & Decrypt Flows
Split your mnemonic into M-of-N shares, each honey-encrypted with its own password. No account, no server — pure distributed custody.
Overview
Shamir backup splits a BIP-39 mnemonic into M-of-N Shamir shares, then honey-encrypts each share independently with its own password (or a shared password). Each share becomes a standalone QR code or encrypted text string.
There is no Google Account, no Google Drive backup, no device enrollment. The shares themselves are the only backup material. To restore, collect M shares, enter each share's password, and combine the decrypted shares to reconstruct the mnemonic.
Encryption Flow
- 1
Enter mnemonic
User provides a valid BIP-39 mnemonic (12 or 24 words). W2QR validates the checksum and extracts the raw entropy bytes (128 bits / 16 bytes for 12 words, 256 bits / 32 bytes for 24 words).
- 2
Open Shamir Split
After creating an encrypted wallet, use Tools → Shamir Split from the navigation menu, or the “Split into Shamir Shares” option on the wallet result page.
- 3
Configure M-of-N
User sets the threshold (M) and total shares (N). For example, 2-of-3 means any 2 shares can reconstruct the mnemonic. Constraints: M ≥ 2, N ≥ M, N ≤ 10.
- 4
Choose password mode
Option A — Same password
One password encrypts all N shares. Simpler to remember, but if the password is compromised, all shares are vulnerable.
Option B — Individual passwords
Each share gets its own password. Stronger security: compromising one share's password doesn't affect the others. User enters N passwords sequentially.
- 5
Shamir split
The mnemonic entropy is split into N shares using Shamir Secret Sharing over GF(256). For each byte position in the entropy, a random polynomial of degree (M−1) is generated with the entropy byte as the constant term. The polynomial is evaluated at x = 1, 2, …, N to produce N share bytes. Each share has the same length as the entropy.
- 6
Honey-encrypt each share
For each share i (1 to N):
This is identical to V2B (Basic) encryption, applied to the share data instead of the full entropy. Every password produces valid-looking share data (random bytes), preserving the honey encryption property.
- 7
Encode share payloads
Each encrypted share is encoded as a binary payload (see Share Format below) and rendered as:
- • QR code — scannable image (PNG/SVG), downloadable and printable
- • Text string — base64url-encoded payload, copyable and pasteable
- 8
Distribute shares
User downloads/prints each share QR or copies the text strings. Each share should be stored in a different location or given to a different custodian.
Share Format
Each share is encoded as a compact binary payload:
| Field | Size | Description |
|---|---|---|
| version | 1 byte | Format version = 6 (Shamir Share) |
| wordCount | 1 byte | Original mnemonic word count (12 or 24) |
| shareIndex | 1 byte | This share's index (1–N) |
| threshold | 1 byte | Minimum shares required (M) |
| totalShares | 1 byte | Total shares generated (N) |
| salt | 16 bytes | Random salt for Argon2id KDF |
| encryptedShare | 16 or 32 bytes | XOR-encrypted share data |
Total payload size: 37 bytes (12-word mnemonic) or 53 bytes (24-word). Compact enough for a small QR code.
Text format
For text representation, the binary payload is base64url-encoded with a w2qr-share: prefix for easy identification: w2qr-share:BgwBAgMr4kF2a9P...
Version detection
W2QR auto-detects format by the first byte: 4 = V2B Basic, 5 = V2A Advanced, 6 = Shamir Share. Existing V1 legacy format is detected by URL pattern.
Decryption Flow
- 1
Collect M shares
Gather at least M share QR codes (scan/upload) or text strings (paste). W2QR detects the
version = 6byte and enters Shamir restore mode automatically. - 2
Validate share compatibility
All shares must have matching threshold, totalShares, and wordCount. Duplicate share indices are rejected.
- 3
Decrypt each share
For each collected share i:
If “same password” was used during creation, one password entry suffices. If “individual passwords” were used, the user enters each share's password separately.
- 4
Combine shares
The M decrypted share data values are combined using Lagrange interpolation over GF(256) to reconstruct the original mnemonic entropy bytes.
- 5
Reconstruct mnemonic
The entropy bytes are converted back to a BIP-39 mnemonic (with checksum verification). The derived Ethereum address is shown so the user can verify correctness.
Wrong password behavior
A wrong password on any share produces different share data. When combined, the reconstructed entropy will be different — yielding a valid but incorrect mnemonic (a decoy wallet). There is no error message for a wrong password. The user verifies correctness by checking the derived address against their known wallet address.
Password Modes
Same Password for All Shares
User enters one password. Each share still gets its own random salt, so the Argon2id output differs per share. The encrypted payloads are all different.
Individual Password per Share
User enters N separate passwords, one per share. Each custodian can set their own password when receiving their share.
Security Properties
- ✓Information-theoretic security: Fewer than M shares reveal zero information about the mnemonic, even with unlimited computing power. This is a mathematical guarantee of Shamir Secret Sharing.
- ✓Honey encryption on shares: Any password on any share produces valid-looking share data (random bytes). An attacker cannot tell if they have the right password without combining M shares and checking the derived address on-chain.
- ✓No password verifier: No hash, MAC, AEAD tag, sentinel, or address is stored in the share payload. The only verification is reconstructing the mnemonic and checking the derived address.
- ✓Argon2id hardening: Each share is independently protected by Argon2id (64 MB, 3 iterations). Brute-forcing each share's password is expensive.
- ✓Fully offline: No server, no account, no network connection required. All operations run client-side in the browser.
- ✓Independent encryption: Each share has its own random salt and (optionally) its own password. Compromising one share's encryption reveals nothing about other shares.
No recovery safety net
Shamir backup has no additional recovery safety net. If fewer than M shares survive (lost, corrupted, or password forgotten), the mnemonic is permanently unrecoverable from the shares alone. This is the trade-off for maximum simplicity and decentralization. Your original encrypted QR and any Google Drive backup remain independent access paths.
Shamir Shares & W2QR Cards
W2QR Cards are pre-printed plastic cards with QR codes that become wallets when activated. A card starts with Basic honey encryption. After activation, you can upgrade it to Advanced mode, which gives it a full recovery split — its own recovery root, two recovery shares (R1 on Google Account, R2 on device), and device registrations.
Cards and Shamir Shares are independent features. You can use Shamir Shares for distributed custody of one wallet while keeping separate card-activated wallets in Advanced mode — each with its own security model.
Two kinds of “Shamir” in W2QR
W2QR uses Shamir Secret Sharing in two separate contexts. They serve different purposes and should not be confused:
Shamir Shares Mode (M-of-N mnemonic splitting)
Splits your entire seed phrase into M-of-N shares distributed across locations or people. Each share is a separate QR code with its own password. This is a standalone encryption mode — no server, no account. You choose M and N (for example, 3-of-5).
2-of-3 Recovery Root Splitting (inside Advanced mode)
Advanced mode uses a fixed 2-of-3 Shamir split of the recovery root — not the mnemonic itself. The recovery shares (R1 on the server, R2 on the device) allow password recovery if you lose your password. This happens automatically during enrollment and is not user-configurable. Card-activated wallets upgraded to Advanced mode also get this recovery split. (Recovery codes, formerly R3, are no longer generated or accepted.)
In short: Shamir Shares Mode is a way to store and distribute your mnemonic. The recovery split is a way to recover your password within Advanced mode (using Google Account + device). They can coexist — a card-activated wallet upgraded to Advanced mode uses recovery splitting internally, while the wallet could also be backed up using Shamir Shares Mode if desired.
Additional Recovery: Authenticator App (TOTP)
For Advanced mode wallets, Google Authenticator (TOTP) provides an additional recovery path. If you lose access to your registered device, a 6-digit code from your authenticator app can release the authorization secret needed to unlock your wallet.
The TOTP secret is stored server-side only — it is never included in your QR code or on your device. This gives you a recovery option without weakening the security of your Shamir shares.
Recovery Codes (Deprecated)
Earlier versions of W2QR issued recovery codes as a printed offline recovery factor. Recovery codes are no longer generated or accepted for new wallets. Existing wallets with a recovery code can still use it, but new Advanced wallets rely on Google Account + device biometric for recovery.
Why Shares Are Harder to Attack Than a Single QR
Attacking a single V2B (Basic) QR code requires brute-forcing one password and checking each candidate mnemonic on the blockchain. With Shamir Shares, the attacker faces a compounded problem:
- Must obtain M physical shares (distributed across locations/custodians)
- Must brute-force M independent passwords (each with its own Argon2id cost)
- Must try every combination of candidate passwords across M shares
- Only then can they derive a candidate mnemonic and check it on-chain
With individual passwords, the search space is PM (P = password space per share). Even with just 2-of-3 and moderate passwords, this is exponentially harder than attacking a single QR.
Why W2QR
Cold-wallet security
The same level of protection as a hardware wallet — without buying a Ledger, KeepKey, or any other device. Your QR code is your cold storage.
No installation
Fully browser-based. No app to install, no extension, no software to keep updated. Works on any device with a browser.
Nothing stored
No data saved on your device or any server. Your password and seed phrase exist only in browser memory while you use them.
Comparison: Basic vs Advanced vs Shamir Shares
| Property | Basic (V2B) | Advanced (V2A) | Shamir Shares | W2QR Cards |
|---|---|---|---|---|
| Factors required | QR + password | QR + password + auth factor | M share QRs + M passwords | Card QR + password (+ auth if upgraded) |
| Honey encryption | ✓ | ✓ | ✓ (per share) | ✓ |
| Password recovery | ✗ | ✓ (2-of-3 shares) | ✗ | ✓ (if upgraded) |
| Google Account | ✗ | ✓ (auth + R1) | ✗ | ✓ (if upgraded) |
| Google Drive backup | Optional | ✓ | ✗ | ✓ |
| Device biometric | ✗ | ✓ | ✗ | ✓ (if upgraded) |
| TOTP / Authenticator | ✗ | ✓ | ✗ | ✓ (if upgraded) |
| Works offline | ✓ | Partially | ✓ | Partially |
| Single point of failure | Password | None (2-of-3) | None (M-of-N) | Password (None if upgraded) |
| Multi-party custody | ✗ | ✗ | ✓ | ✗ |
| Plausible deniability | ✓ | ✓ | ✓ | ✓ |
| Brute-force cost | P × Argon2id | P × Argon2id × S | PM × Argon2idM | P × Argon2id |
| Output format | 1 QR code | 1 QR code | N QR codes + N text strings | 1 card / QR code |
When to Use Shamir Shares
Ideal for
- • Multi-party custody (family, business partners)
- • Geographically distributed backups
- • Dead man's switch / inheritance planning
- • High-security wallets with no single point of access
- • Air-gapped / fully offline environments
Not ideal for
- • Solo users who want forgot-password recovery → use Advanced
- • Quick one-off backups → use Basic
- • Users who want cloud backup convenience → use Advanced
Recommended Configurations
| Config | Use case | Password mode |
|---|---|---|
| 2-of-3 | Personal backup across 3 locations | Same password |
| 3-of-5 | Family members / trusted friends | Individual passwords |
| 4-of-7 | Corporate treasury / DAO multisig backup | Individual passwords |
| 2-of-2 | Split between two locations, both required | Same or individual |
What Shamir Shares Mode Does NOT Provide
- ✗No password recovery — if you forget the password(s), the shares are unusable. Choose strong, memorable passwords.
- ✗No cloud backup — shares are not backed up to Google Drive. You manage storage yourself.
- ✗No Google Account integration — no sign-in, no server storage, no authorization secret.
- ✗No device enrollment — no WebAuthn, no biometric unlock.
- ✗No disaster recovery — if fewer than M shares + passwords survive, the mnemonic is permanently lost.
- ✗No automatic format upgrade — shares cannot be upgraded to Advanced mode. Create a new Advanced QR separately if needed.
Shamir Shares vs Recovery Root Splitting
W2QR uses the term “shares” in two different contexts. They serve different purposes and should not be confused:
Shamir Shares Mode (M-of-N)
Splits your entire mnemonic into M-of-N shares using Shamir Secret Sharing. Each share becomes a standalone QR code with its own password. No server, no account. You distribute the shares yourself and need M of them to restore.
Google Drive Backup
Stores a copy of the encrypted QR data in Google Drive. Provides cloud-based redundancy — if you lose the QR code, you can restore from backup and unlock with your password. This is a convenience backup, not distributed custody.
The two systems are fully independent — you can use Shamir backup for distributed custody while also keeping a Google Drive backup for convenience. They protect against different risks.