Skip to content

Commit a985377

Browse files
committed
Working BIP-39 backup
1 parent 4723903 commit a985377

23 files changed

+510
-219
lines changed

App.org

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Bitcoin, Ethereum, etc. wallets.
3131
The best practice for using these wallets is to load this "Seed" into a secure hardware device, like
3232
a [[https://shop.trezor.io/product/trezor-model-t?offer_id=15&aff_id=10388][Trezor "Model T"]] hardware wallet. SLIP-39 Mnemonic cards contain the recovery words, which are
3333
typed directly into the Trezor device to recover the Seed, and all of its Cryptocurrency accounts.
34+
For the [[https://shop.ledger.com/pages/ledger-nano-x?r=2cd1cb6ae51f][Ledger Nano]] and other hardware wallets supporting only BIP-39 Mnemonics, you can now use the
35+
SLIP-39 App to securely and reliably back up these BIP-39 phrases.
3436

3537
The [[https://github.com/pjkundert/python-slip39/releases/latest][macOS and win32 SLIP-39 App (download here -- .dmg for macOS, .msi for Windows)]] helps you
3638
generate Mnemonic cards and back up this Seed, securely and reliably, by distributing Mnemonic cards
@@ -147,16 +149,43 @@ related to the Seed.
147149
#+END_EXPORT
148150

149151
#+BEGIN_EXPORT html
150-
<!-- Javascript Ad Tag: 1083 -->
151152
<div id="trezor1083SycVfv"></div>
152153
<script src="http://trezor.go2cloud.org/aff_ad?campaign_id=1083&aff_id=10388&format=js&divid=trezor1083SycVfv" type="text/javascript"></script>
153-
<!-- // End Ad Tag -->
154154
#+END_EXPORT
155155

156156
We recommend the Trezor "Model T" for this reason. No other hardware wallet yet supports direct,
157157
on-screen SLIP-39 Seed recovery. This feature is, simply, so fundamentally important for
158158
Cryptocurrency Seed security and reliability that we consider it a necessity.
159-
159+
160+
If you already have one of the less expensive Trezor wallets that only support BIP-39 backup, we
161+
also support those, using the same BIP-39 Seed Entropy backup via SLIP-39 as for the Ledger, and
162+
other traditional hardware wallets.
163+
164+
** Ledger
165+
166+
The Ledger hardware wallets are also very popular -- but they can be recovered only using BIP-39
167+
Mnemonics. However, you can now use the SLIP-39 App to backup your BIP-39 Seed Entropy!
168+
Therefore, we now support the Ledger hardware wallets.
169+
170+
If you already have a BIP-39 Mnemonic, and would like back it up using SLIP-39 for more security
171+
and recovery reliability, you can use the Pro Controls to do so. Later, when you need to recover
172+
your BIP-39 Mnemonic, use the SLIP-39 App, select the Pro Controls, enter the SLIP-39 card
173+
Mnemonics, and click "Using BIP-39" to reveal your original BIP-39 Mnemonic phrase. Then,
174+
proceed with Ledger wallet recovery as normal, using the BIP-39 Mnemonic.
175+
176+
The [[https://shop.ledger.com/pages/ledger-nano-s-plus?r=2cd1cb6ae51f][Ledger Nano S Plus]] has a large screen, at a reasonable price point, and connects via USB-C.
177+
178+
#+BEGIN_EXPORT html
179+
<a href="https://shop.ledger.com/pages/ledger-nano-s-plus?r=2cd1cb6ae51f"><img width=728 height=90 src="http://affiliate.ledger.com/image/728/90"></a>
180+
#+END_EXPORT
181+
182+
The [[https://shop.ledger.com/pages/ledger-nano-x?r=2cd1cb6ae51f][Ledger Nano X]] has a large screen and supports connectivity via Bluetooth, for much easier
183+
connectivity with mobile phone and laptop wallet software.
184+
185+
#+BEGIN_EXPORT html
186+
<a href="https://shop.ledger.com/pages/ledger-nano-x?r=2cd1cb6ae51f"><img width=728 height=90 src="http://affiliate.ledger.com/image/728/90"></a>
187+
#+END_EXPORT
188+
160189
** Netcoins.app
161190

162191
In Canada, one of the more highly regulatory-compliant Cryptocurrency exchanges is [[https://netcoins.app/r?ac=5YO1MZ][Netcoins.app

App.pdf

1.97 KB
Binary file not shown.

App.txt

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ Table of Contents
4444
..... 1. Walking-Around Money
4545
2. Affiliate Links
4646
.. 1. Trezor
47-
.. 2. Netcoins.app
48-
.. 3. Crypto.com
49-
.. 4. Protecting your SLIP-39 Cards
47+
.. 2. Ledger
48+
.. 3. Netcoins.app
49+
.. 4. Crypto.com
50+
.. 5. Protecting your SLIP-39 Cards
5051
3. Privacy Policy
5152

5253

@@ -186,12 +187,48 @@ Windows)] <https://github.com/pjkundert/python-slip39/releases/latest>
186187
feature is, simply, so fundamentally important for Cryptocurrency Seed
187188
security and reliability that we consider it a necessity.
188189

190+
If you already have one of the less expensive Trezor wallets that only
191+
support BIP-39 backup, we also support those, using the same BIP-39
192+
Seed Entropy backup via SLIP-39 as for the Ledger, and other
193+
traditional hardware wallets.
194+
189195

190196
[Trezor "Model T"]
191197
<https://shop.trezor.io/product/trezor-model-t?offer_id=15&aff_id=10388>
192198

193199

194-
2.2 Netcoins.app
200+
2.2 Ledger
201+
──────────
202+
203+
The Ledger hardware wallets are also very popular – but they can be
204+
recovered only using BIP-39 Mnemonics. However, you can now use the
205+
SLIP-39 App to backup your BIP-39 Seed Entropy! Therefore, we now
206+
support the Ledger hardware wallets.
207+
208+
If you already have a BIP-39 Mnemonic, and would like back it up using
209+
SLIP-39 for more security and recovery reliability, you can use the
210+
Pro Controls to do so. Later, when you need to recover your BIP-39
211+
Mnemonic, use the SLIP-39 App, select the Pro Controls, enter the
212+
SLIP-39 card Mnemonics, and click "Using BIP-39" to reveal your
213+
original BIP-39 Mnemonic phrase. Then, proceed with Ledger wallet
214+
recovery as normal, using the BIP-39 Mnemonic.
215+
216+
The [Ledger Nano S Plus] has a large screen, at a reasonable price
217+
point, and connects via USB-C.
218+
219+
The [Ledger Nano X] has a large screen and supports connectivity via
220+
Bluetooth, for much easier connectivity with mobile phone and laptop
221+
wallet software.
222+
223+
224+
[Ledger Nano S Plus]
225+
<https://shop.ledger.com/pages/ledger-nano-s-plus?r=2cd1cb6ae51f>
226+
227+
[Ledger Nano X]
228+
<https://shop.ledger.com/pages/ledger-nano-x?r=2cd1cb6ae51f>
229+
230+
231+
2.3 Netcoins.app
195232
────────────────
196233

197234
In Canada, one of the more highly regulatory-compliant Cryptocurrency
@@ -208,7 +245,7 @@ Windows)] <https://github.com/pjkundert/python-slip39/releases/latest>
208245
<https://netcoins.app/r?ac=5YO1MZ>
209246

210247

211-
2.3 Crypto.com
248+
2.4 Crypto.com
212249
──────────────
213250

214251
Use my referral link for [Crypto.com (referral code: 2x4hk92dnf)] to
@@ -222,7 +259,7 @@ Windows)] <https://github.com/pjkundert/python-slip39/releases/latest>
222259
<https://crypto.com/app/2x4hk92dnf>
223260

224261

225-
2.4 Protecting your SLIP-39 Cards
262+
2.5 Protecting your SLIP-39 Cards
226263
─────────────────────────────────
227264

228265
Protect your printed SLIP-39 cards from water damage by laminating

README.org

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ by entering the mnemonics right on the device.
5959

6060
* Security with Availability
6161

62-
For both BIP-39 and SLIP-39, a 128-bit random "seed" is the source of an unlimited sequence of
63-
Ethereum and Bitcoin HD (Heirarchical Deterministic) derived Wallet accounts. Anyone who can
64-
obtain this seed gains control of all Ethereum, Bitcoin (and other) accounts derived from it, so
65-
it must be securely stored.
62+
For both BIP-39 and SLIP-39, a 128- or 256-bit random "seed" is the source of an unlimited
63+
sequence of Ethereum and Bitcoin HD (Heirarchical Deterministic) derived Wallet accounts. Anyone
64+
who can obtain this seed gains control of all Ethereum, Bitcoin (and other) accounts derived from
65+
it, so it must be securely stored.
6666

6767
Losing this seed means that all of the HD Wallet accounts are permanently lost. It must be /both/
6868
backed up securely, /and/ be readily accessible.
@@ -78,15 +78,19 @@ by entering the mnemonics right on the device.
7878

7979
[[https://github.com/satoshilabs/slips/blob/master/slip-0039.md][Satoshi Lab's (Trezor) SLIP-39]] uses SSSS to distribute the ability to recover the key to 1 or
8080
more "groups". Collecting the mnemonics from the required number of groups allows recovery of
81-
the seed. For BIP-39, the number of groups is always 1, and the number of mnemonics required for
82-
that group is always 1.
81+
the seed.
8382

84-
For SLIP-39, a "group_threshold" of how many groups must bet successfully collected to recover
85-
the key. Then key is (conceptually) split between 1 or more groups (not really; each group's
86-
data alone gives away no information about the key).
83+
For BIP-39, the number of groups is always 1, and the number of mnemonics required for that group
84+
is always 1. This selection is both insecure (easy to accidentally disclose) and unreliable
85+
(easy to accidentally lose), but since most hardware wallets, *only* accept BIP-39 phrases, we
86+
also provide a way to /backup your BIP-39 phrase/ using SLIP-39!
87+
88+
For SLIP-39, you specify a "group_threshold" of /how many/ of your groups must be successfully
89+
collected, to recover the seed; this seed is (conceptually) split between 1 or more groups
90+
(though not in reality -- each group's data /alone/ gives away /no information/ about the seed).
8791

8892
For example, you might have First, Second, Fam and Frens groups, and decide that any 2 groups can
89-
be combined to recover the key. Each group has members with varying levels of trust and
93+
be combined to recover the seed. Each group has members with varying levels of trust and
9094
persistence, so have different number of Members, and differing numbers Required to recover that
9195
group's data:
9296

@@ -103,17 +107,18 @@ by entering the mnemonics right on the device.
103107
The account owner might store their First and Second group data in their home and office safes.
104108
These are 1/1 groups (1 required, and only 1 member, so each of these are3 1-card groups.)
105109

106-
If the account needs to be recovered, collecting the First and Second cards from the home and
107-
office safe is sufficient to recover the seed, and re-generate the HD Wallet accounts.
110+
If the seed needs to be recovered, collecting the First and Second cards from the home and
111+
office safe is sufficient to recover the seed, and re-generate all of the HD Wallet accounts.
108112

109-
Only 2 Fam member's cards must be collected to recover the Fam group's data. So, if the HD
110-
Wallet owner loses their home and First group card in a fire, they could get the Second group
111-
card from the office safe, and 2 cards from Fam group members, and recover the wallet.
113+
Only 2 Fam group member's cards must be collected to recover the Fam group's data. So, if the HD
114+
Wallet owner loses their home (and the one and only First group card) in a fire, they could get
115+
the one Second group card from the office safe, and also 2 cards from Fam group members, and
116+
recover the seed and all of their wallets.
112117

113-
If catastrophe strikes and the owner dies, and the heirs don't have access to either the First
114-
(at home) or Second (at the office), they can collect 2 Fam cards and 3 Frens cards (at the
115-
funeral, for example), completing the Fam and Frens groups' data, and recover the seed, and all
116-
derived HD Wallet accounts.
118+
If catastrophe strikes and the wallet owner dies, and the heirs don't have access to either the
119+
First (at home) or Second (at the office) cards, they can collect 2 Fam cards and 3 Frens cards
120+
(at the funeral, for example), completing the Fam and Frens groups' data, and recover the seed,
121+
and all derived HD Wallet accounts.
117122

118123
Since Frens are less likely to persist long term, we'll produce more (6) of these cards.
119124
Depending on how trustworthy the group is, adjust the Fren group's Required number higher (less

slip39/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class RippleMainnet( cryptocurrencies.Cryptocurrency ):
177177
"HARDENED": True
178178
})
179179

180-
PUBLIC_KEY_ADDRESS = 0x00 # Results in the prefix r..., when used w/ the Ripple base-58 alphabet
180+
PUBLIC_KEY_ADDRESS = 0x00 # Results in the prefix r..., when used w/ the Ripple base-58 alphabet
181181
SEGWIT_ADDRESS = cryptocurrencies.SegwitAddress({
182182
"HRP": None,
183183
"VERSION": 0x00
@@ -205,7 +205,7 @@ class RippleMainnet( cryptocurrencies.Cryptocurrency ):
205205
WIF_SECRET_KEY = 0x80
206206

207207

208-
class XRPHDWallet( hdwallet.HDWallet ) :
208+
class XRPHDWallet( hdwallet.HDWallet ):
209209
"""The XRP address format uses the standard p2pkh_address formulation, from
210210
https://xrpl.org/accounts.html#creating-accounts:
211211

slip39/api_test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- mode: python ; coding: utf-8 -*-
22
import json
33
import pytest
4-
import codecs
54

65
try:
76
import eth_account
@@ -52,7 +51,6 @@ def test_account():
5251
assert acct.path == "m/84'/0'/0'/0/0"
5352
assert acct.pubkey == '038f7fa5776f5359eb861994bee043f0b16a5ca24b66eb38696a7325d3e1717e72'
5453

55-
5654
acct = account( SEED_XMAS, crypto='Litecoin' )
5755
assert acct.address == 'ltc1qfjepkelqd3jx4e73s7p79lls6kqvvmak5pxy97'
5856
assert acct.path == "m/84'/2'/0'/0/0"
@@ -69,7 +67,6 @@ def test_account():
6967
assert acct.address == 'DQCnF49GwQ5auL3u5c2uow62XS57RCA2r1'
7068
assert acct.path == "m/44'/3'/0'/0/0"
7169

72-
7370
acct = account( SEED_ONES, crypto='Ripple' )
7471
assert acct.path == "m/44'/144'/0'/0/0" # Default
7572
assert acct.address == 'rsXwvDVHHPrSm23gogdxJdrJg9WBvqRE9m'
@@ -83,15 +80,15 @@ def test_account():
8380
assert acct.address == 'rDTXLQ7ZKZVKz33zJbHjgVShjsBnqMBhmN'
8481
acct.hdwallet.compressed = lambda: '03e2b079e9b09ae8916da8f5ee40cbda9578dbe7c820553fe4d5f872eec7b1fdd4'
8582
assert acct.address == 'rhq549rEtUrJowuxQC2WsHNGLjAjBQdAe8'
86-
acct.hdwallet.compressed = lambda: '0282ee731039929e97db6aec242002e9aa62cd62b989136df231f4bb9b8b7c7eb2'
83+
acct.hdwallet.compressed = lambda: '0282ee731039929e97db6aec242002e9aa62cd62b989136df231f4bb9b8b7c7eb2'
8784
assert acct.address == 'rKzE5DTyF9G6z7k7j27T2xEas2eMo85kmw'
8885
acct.hdwallet.compressed = compressed_save
8986

9087
# Test values from a Trezor "Model T" w/ root seed 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' loaded.
9188
# The Trezor Suite UI produced the following account derivation path and public address for:
9289
acct.from_mnemonic( 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' )
9390
assert acct.path == "m/44'/144'/0'/0/0" # Default
94-
assert acct.address == 'rUPzi4ZwoYxi7peKCqUkzqEuSrzSRyLguV' # From Trezor "Model T" w/
91+
assert acct.address == 'rUPzi4ZwoYxi7peKCqUkzqEuSrzSRyLguV'
9592
assert acct.pubkey == '039d65db4964cbf2049ad49467a6b73e7fec7d6e6f8a303cfbdb99fa21c7a1d2bc'
9693

9794

slip39/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
LAYOUT = 'Basic'
8888
LAYOUT_OPTIONS = [
8989
'Basic',
90-
'Extra',
90+
'Recover',
9191
'Pro',
9292
]
9393

slip39/gui/SLIP-39-AS-BIP.org

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#+title: Using BIP-39
2+
#+OPTIONS: toc:nil title:nil author:nil
3+
4+
#+BEGIN_ABSTRACT
5+
SLIP-39 support for Hardware Wallets that require BIP-39 Mnemonics for Seed recovery.
6+
7+
| Controls | Description |
8+
|----------+--------------------------------------------------------------------|
9+
| Basic | Generate SLIP-39 Cards, "Using BIP-39" to recover hardware wallet |
10+
| Recover | Use SLIP-39 to recover Seed Entropy, then "Using BIP-39" on wallet |
11+
| Pro | Convert existing BIP-39 Mnemonic to SLIP-39 Cards for safer backup |
12+
#+END_ABSTRACT
13+
14+
* Using BIP-39
15+
16+
To support older or less expensive existing hardware wallets that *only* support BIP-39 recovery,
17+
*or* to convert existing BIP-39 Mnemonic backups to SLIP-39 (to avoid moving all of your old
18+
BIP-39 Seed derived wallets to new SLIP-39 Seed derived wallets), click the "Using BIP-39"
19+
checkbox.
20+
21+
This will do two things:
22+
23+
** Output BIP-39 Mnemonics
24+
25+
You will see your BIP-39 Mnemonic, which encodes the Seed Source (and optionally any Seed Extra
26+
Randomness) you've specified.
27+
28+
We'll even include one BIP-39 card in the output PDF. You can store this card (very safely and
29+
securely), but we recommend you destroy it, and use the SLIP-39 App with your SLIP-39 Card
30+
Mnemonics to recover it when needed, instead.
31+
32+
** Use BIP-39 Seed Generation
33+
34+
Any Cryptocurrency wallet QR codes and Paper Wallets will use BIP-39 Seed generation.
35+
36+
Since BIP-39 uses the Seed Entropy *differently* than SLIP-39 does, this produces *different*
37+
wallets in the hardware wallet device! In other words, exactly the same 128- or 256-bit entropy
38+
produces different wallets in a [[https://shop.trezor.io/product/trezor-model-t?offer_id=15&aff_id=10388][Trezor "Model T"]] recovered directly from SLIP-39 Mnemonics,
39+
compared to the same Trezor or [[https://shop.ledger.com/pages/ledger-nano-x?r=2cd1cb6ae51f][Ledger Nano X]] recovered from BIP-39.
40+
41+
This is usually not a problem: just ensure that if you're intending to use a hardware wallet that
42+
natively supports SLIP-39, *do not select* "Using BIP-39". Then, the QR codes and Paper Wallets
43+
printed will match those produced in the hardware wallet after SLIP-39 recovery.
44+
45+
If your hardware wallet only supports BIP-39 (or you're just backing up an existing BIP-39
46+
Mnemonic using SLIP-39, and you want to continue using the original BIP-39 wallets), then *do
47+
select* "Using BIP-39". Then, when you recover your Trezor or Ledger from BIP-39, the printed QR
48+
codes and Paper Wallets will use the BIP-39 Seed generation standard, and will match those
49+
produced in the hardware after BIP-39 recovery.
50+

slip39/gui/SLIP-39-AS-BIP.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
SLIP-39 support for Hardware Wallets that require BIP-39 Mnemonics for
2+
Seed recovery.
3+
4+
Controls Description
5+
------------------------------------------------------------------------------
6+
Basic Generate SLIP-39 Cards, "Using BIP-39" to recover hardware wallet
7+
Recover Use SLIP-39 to recover Seed Entropy, then "Using BIP-39" on wallet
8+
Pro Convert existing BIP-39 Mnemonic to SLIP-39 Cards for safer backup
9+
10+
11+
1 Using BIP-39
12+
==============
13+
14+
To support older or less expensive existing hardware wallets that
15+
*only* support BIP-39 recovery, *or* to convert existing BIP-39
16+
Mnemonic backups to SLIP-39 (to avoid moving all of your old BIP-39
17+
Seed derived wallets to new SLIP-39 Seed derived wallets), click the
18+
"Using BIP-39" checkbox.
19+
20+
This will do two things:
21+
22+
23+
1.1 Output BIP-39 Mnemonics
24+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
25+
26+
You will see your BIP-39 Mnemonic, which encodes the Seed Source (and
27+
optionally any Seed Extra Randomness) you've specified.
28+
29+
We'll even include one BIP-39 card in the output PDF. You can store
30+
this card (very safely and securely), but we recommend you destroy it,
31+
and use the SLIP-39 App with your SLIP-39 Card Mnemonics to recover it
32+
when needed, instead.
33+
34+
35+
1.2 Use BIP-39 Seed Generation
36+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37+
38+
Any Cryptocurrency wallet QR codes and Paper Wallets will use BIP-39
39+
Seed generation.
40+
41+
Since BIP-39 uses the Seed Entropy *differently* than SLIP-39 does,
42+
this produces *different* wallets in the hardware wallet device! In
43+
other words, exactly the same 128- or 256-bit entropy produces
44+
different wallets in a [Trezor "Model T"] recovered directly from
45+
SLIP-39 Mnemonics, compared to the same Trezor or [Ledger Nano X]
46+
recovered from BIP-39.
47+
48+
This is usually not a problem: just ensure that if you're intending to
49+
use a hardware wallet that natively supports SLIP-39, *do not select*
50+
"Using BIP-39". Then, the QR codes and Paper Wallets printed will
51+
match those produced in the hardware wallet after SLIP-39 recovery.
52+
53+
If your hardware wallet only supports BIP-39 (or you're just backing
54+
up an existing BIP-39 Mnemonic using SLIP-39, and you want to continue
55+
using the original BIP-39 wallets), then *do select* "Using BIP-39".
56+
Then, when you recover your Trezor or Ledger from BIP-39, the printed
57+
QR codes and Paper Wallets will use the BIP-39 Seed generation
58+
standard, and will match those produced in the hardware after BIP-39
59+
recovery.
60+
61+
62+
[Trezor "Model T"]
63+
<https://shop.trezor.io/product/trezor-model-t?offer_id=15&aff_id=10388>
64+
65+
[Ledger Nano X]
66+
<https://shop.ledger.com/pages/ledger-nano-x?r=2cd1cb6ae51f>

0 commit comments

Comments
 (0)