]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE html> | |
2 | <html> | |
3 | <head lang="en"> | |
4 | <meta charset="utf-8" /> | |
5 | <title>BIP39 - Mnemonic Code</title> | |
6 | <link rel="stylesheet" href="css/bootstrap.min.css"> | |
7 | <meta content="Mnemonic code for generating deterministic keys" name="description"/> | |
8 | <meta content="width=device-width, initial-scale=1.0" name="viewport" /> | |
9 | <meta content="bitcoin mnemonic converter" name="description" /> | |
10 | <meta content="Ian Coleman" name="author" /> | |
11 | ||
12 | <style> | |
13 | body { | |
14 | padding-bottom: 32px; | |
15 | } | |
16 | .form-control[readonly] { | |
17 | cursor: text; | |
18 | } | |
19 | .feedback-container { | |
20 | position: fixed; | |
21 | top: 0; | |
22 | width: 100%; | |
23 | text-align: center; | |
24 | z-index: 4; | |
25 | } | |
26 | .feedback { | |
27 | display: table; | |
28 | padding: 0.5em 1em; | |
29 | background-color: orange; | |
30 | margin: 0 auto; | |
31 | font-size: 2em; | |
32 | color: #444; | |
33 | border: 2px solid #555; | |
34 | border-top: 0; | |
35 | border-bottom-left-radius: 20px 20px; | |
36 | border-bottom-right-radius: 20px 20px; | |
37 | } | |
38 | .no-border { | |
39 | border: 0; | |
40 | box-shadow: inset 0 1px 1px rgba(0,0,0,.0); | |
41 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.0); | |
42 | } | |
43 | .phrase { | |
44 | word-break: keep-all; | |
45 | } | |
46 | .strength { | |
47 | /* override mobile width from bootstrap */ | |
48 | width: auto!important; | |
49 | display: inline-block; | |
50 | } | |
51 | .languages * { | |
52 | padding-left: 10px; | |
53 | } | |
54 | .monospace { | |
55 | font-family: monospace; | |
56 | } | |
57 | </style> | |
58 | </head> | |
59 | <body> | |
60 | <div class="container"> | |
61 | ||
62 | <h1 class="text-center">Mnemonic Code Converter</h1> | |
63 | <hr> | |
64 | <div class="row"> | |
65 | <div class="col-md-12"> | |
66 | <h2>Mnemonic</h2> | |
67 | <form class="form-horizontal" role="form"> | |
68 | <div class="form-group"> | |
69 | <div class="col-sm-2"></div> | |
70 | <div class="col-sm-10"> | |
71 | <p>You can enter an existing BIP39 mnemonic, or generate a new random one. Typing your own twelve words will probably not work how you expect, since the words require a particular structure (the last word is a checksum)</p> | |
72 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a></p> | |
73 | </div> | |
74 | </div> | |
75 | <div class="form-group generate-container"> | |
76 | <label class="col-sm-2 control-label"></label> | |
77 | <div class="col-sm-10"> | |
78 | <div class="form-inline"> | |
79 | <div class="input-group-inline"> | |
80 | <button class="btn generate">Generate</button> | |
81 | <span>a random</span> | |
82 | <select id="strength" class="strength form-control"> | |
83 | <option value="3">3</option> | |
84 | <option value="6">6</option> | |
85 | <option value="9">9</option> | |
86 | <option value="12">12</option> | |
87 | <option value="15" selected>15</option> | |
88 | <option value="18">18</option> | |
89 | <option value="21">21</option> | |
90 | <option value="24">24</option> | |
91 | </select> | |
92 | word mnemonic, or enter your own below. | |
93 | </div> | |
94 | </div> | |
95 | </div> | |
96 | </div> | |
97 | <div class="entropy-container hidden"> | |
98 | <label for="entropy" class="col-sm-2 control-label">Entropy</label> | |
99 | <div class="col-sm-10"> | |
100 | <input id="entropy" class="entropy form-control" placeholder="Accepts binary, base 6, 6-sided dice, base 10, hexadecimal"> | |
101 | <span class="help-block"> | |
102 | <div class="text-danger"> | |
103 | This is an advanced feature. | |
104 | Your mnemonic may be insecure if this feature is used incorrectly. | |
105 | <a href="#entropy-notes">Read more</a> | |
106 | </div> | |
107 | <div class="text-danger entropy-error"></div> | |
108 | </span> | |
109 | </div> | |
110 | </div> | |
111 | <div class="form-group"> | |
112 | <div class="col-sm-2"></div> | |
113 | <div class="col-sm-10 checkbox"> | |
114 | <label> | |
115 | <input type="checkbox" class="use-entropy"> | |
116 | Supply my own source of entropy | |
117 | </label> | |
118 | </div> | |
119 | </div> | |
120 | <div class="form-group"> | |
121 | <label class="col-sm-2 control-label"></label> | |
122 | <div class="col-sm-10 languages"> | |
123 | <a href="#english">English</a> | |
124 | <a href="#japanese" title="Japanese">日本語</a> | |
125 | <a href="#spanish" title="Spanish">Español</a> | |
126 | <a href="#chinese_simplified" title="Chinese (Simplified)">中文(简体)</a> | |
127 | <a href="#chinese_traditional" title="Chinese (Traditional)">中文(繁體)</a> | |
128 | <a href="#french" title="French">Français</a> | |
129 | <a href="#italian" title="Italian">Italiano</a> | |
130 | </div> | |
131 | </div> | |
132 | <div class="form-group"> | |
133 | <label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label> | |
134 | <div class="col-sm-10"> | |
135 | <textarea id="phrase" class="phrase form-control"></textarea> | |
136 | </div> | |
137 | </div> | |
138 | <div class="form-group"> | |
139 | <label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label> | |
140 | <div class="col-sm-10"> | |
141 | <textarea id="passphrase" class="passphrase form-control"></textarea> | |
142 | </div> | |
143 | </div> | |
144 | <div class="form-group"> | |
145 | <label for="seed" class="col-sm-2 control-label">BIP39 Seed</label> | |
146 | <div class="col-sm-10"> | |
147 | <textarea id="seed" class="seed form-control" readonly="readonly"></textarea> | |
148 | </div> | |
149 | </div> | |
150 | <div class="form-group"> | |
151 | <label for="network-phrase" class="col-sm-2 control-label">Coin</label> | |
152 | <div class="col-sm-10"> | |
153 | <select id="network-phrase" class="network form-control"> | |
154 | <!-- populated by javascript --> | |
155 | </select> | |
156 | </div> | |
157 | </div> | |
158 | <div class="form-group"> | |
159 | <label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label> | |
160 | <div class="col-sm-10"> | |
161 | <textarea id="root-key" class="root-key form-control"></textarea> | |
162 | </div> | |
163 | </div> | |
164 | </form> | |
165 | </div> | |
166 | </div> | |
167 | ||
168 | <hr> | |
169 | ||
170 | <div class="row"> | |
171 | <div class="col-md-12"> | |
172 | <h2>Derivation Path</h2> | |
173 | <ul class="derivation-type nav nav-tabs" role="tablist"> | |
174 | <li id="bip44-tab" class="active"> | |
175 | <a href="#bip44" role="tab" data-toggle="tab">BIP44</a> | |
176 | </li> | |
177 | <li id="bip32-tab"> | |
178 | <a href="#bip32" role="tab" data-toggle="tab">BIP32</a> | |
179 | </li> | |
180 | </ul> | |
181 | <div class="derivation-type tab-content"> | |
182 | <div id="bip44" class="tab-pane active"> | |
183 | <form class="form-horizontal" role="form"> | |
184 | <br> | |
185 | <div class="col-sm-2"></div> | |
186 | <div class="col-sm-10"> | |
187 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p> | |
188 | </div> | |
189 | <div class="form-group"> | |
190 | <label for="purpose" class="col-sm-2 control-label"> | |
191 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> | |
192 | </label> | |
193 | <div class="col-sm-10"> | |
194 | <input id="purpose" type="text" class="purpose form-control" value="44"> | |
195 | </div> | |
196 | </div> | |
197 | <div class="form-group"> | |
198 | <label for="coin" class="col-sm-2 control-label"> | |
199 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a> | |
200 | </label> | |
201 | <div class="col-sm-10"> | |
202 | <input id="coin" type="text" class="coin form-control" value="0"> | |
203 | </div> | |
204 | </div> | |
205 | <div class="form-group"> | |
206 | <label for="account" class="col-sm-2 control-label"> | |
207 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a> | |
208 | </label> | |
209 | <div class="col-sm-10"> | |
210 | <input id="account" type="text" class="account form-control" value="0"> | |
211 | </div> | |
212 | </div> | |
213 | <div class="form-group"> | |
214 | <label for="change" class="col-sm-2 control-label"> | |
215 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a> | |
216 | </label> | |
217 | <div class="col-sm-10"> | |
218 | <input id="change" type="text" class="change form-control" value="0"> | |
219 | </div> | |
220 | </div> | |
221 | <div class="form-group"> | |
222 | <label for="bip44-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | |
223 | <div class="col-sm-10"> | |
224 | <input id="bip44-path" type="text" class="path form-control" value="m/44'/0'/0'/0" readonly="readonly"> | |
225 | </div> | |
226 | </div> | |
227 | </form> | |
228 | </div> | |
229 | <div id="bip32" class="tab-pane"> | |
230 | <form class="form-horizontal" role="form"> | |
231 | <br> | |
232 | <div class="col-sm-2"></div> | |
233 | <div class="col-sm-10"> | |
234 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">BIP32 spec</a></p> | |
235 | </div> | |
236 | <div class="form-group"> | |
237 | <label for="bip32-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | |
238 | <div class="col-sm-10"> | |
239 | <input id="bip32-path" type="text" class="path form-control" value="m/0"> | |
240 | </div> | |
241 | </div> | |
242 | <div class="form-group"> | |
243 | <div class="col-sm-2"></div> | |
244 | <label class="col-sm-10"> | |
245 | <input class="hardened-addresses" type="checkbox"> | |
246 | Use hardened addresses | |
247 | </label> | |
248 | </div> | |
249 | <div class="form-group"> | |
250 | <label class="col-sm-2 control-label">Hive Wallet</label> | |
251 | <div class="col-sm-10"> | |
252 | <p class="form-control no-border"> | |
253 | Use path <code>m/0'/0</code>. | |
254 | For more info see the <a href="https://www.hivewallet.com/" target="_blank">Hive Wallet homepage</a> | |
255 | </p> | |
256 | </div> | |
257 | </div> | |
258 | <div class="form-group"> | |
259 | <label for="mycelium-path" class="col-sm-2 control-label">Mycelium Wallet</label> | |
260 | <div class="col-sm-10"> | |
261 | <p class="form-control no-border"> | |
262 | Use path <code>m/44'/0'/0'/0</code>. | |
263 | For more info see the <a href="http://www.mycelium.com/" target="_blank">Mycelium Wallet homepage</a> | |
264 | </p> | |
265 | </div> | |
266 | </div> | |
267 | <div class="form-group"> | |
268 | <label for="core-path" class="col-sm-2 control-label">Bitcoin Core</label> | |
269 | <div class="col-sm-10"> | |
270 | <p class="form-control no-border"> | |
271 | Use path <code>m/0'/0'</code> with hardened addresses. | |
272 | For more info see the <a href="https://github.com/bitcoin/bitcoin/pull/8035" target="_blank">Bitcoin Core BIP32 implementation</a> | |
273 | </p> | |
274 | </div> | |
275 | </div> | |
276 | <div class="form-group"> | |
277 | <label class="col-sm-2 control-label">Block Explorers</label> | |
278 | <div class="col-sm-10"> | |
279 | <p class="form-control no-border"> | |
280 | Use path <code>m/44'/0'/0'</code>. | |
281 | Only enter the <code>xpub</code> extended key into block explorer search fields, never the <code>xpriv</code> key. | |
282 | </p> | |
283 | </div> | |
284 | </div> | |
285 | </form> | |
286 | </div> | |
287 | </div> | |
288 | <form class="form-horizontal" role="form"> | |
289 | <div class="form-group"> | |
290 | <label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Key</label> | |
291 | <div class="col-sm-10"> | |
292 | <textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly"></textarea> | |
293 | </div> | |
294 | </div> | |
295 | <div class="form-group"> | |
296 | <label for="extended-pub-key" class="col-sm-2 control-label">BIP32 Extended Key (addresses only)</label> | |
297 | <div class="col-sm-10"> | |
298 | <textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly"></textarea> | |
299 | </div> | |
300 | </div> | |
301 | </form> | |
302 | </div> | |
303 | </div> | |
304 | ||
305 | <hr> | |
306 | ||
307 | <div class="row"> | |
308 | <div class="col-md-12"> | |
309 | <h2>Derived Addresses</h2> | |
310 | <p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p> | |
311 | <table class="table table-striped"> | |
312 | <thead> | |
313 | <th> | |
314 | <div class="input-group"> | |
315 | Path | |
316 | <button class="index-toggle">Toggle</button> | |
317 | </div> | |
318 | </th> | |
319 | <th> | |
320 | <div class="input-group"> | |
321 | Address | |
322 | <button class="address-toggle">Toggle</button> | |
323 | </div> | |
324 | </th> | |
325 | <th> | |
326 | <div class="input-group"> | |
327 | Public Key | |
328 | <button class="public-key-toggle">Toggle</button> | |
329 | </div> | |
330 | </th> | |
331 | <th> | |
332 | <div class="input-group"> | |
333 | Private Key | |
334 | <button class="private-key-toggle">Toggle</button> | |
335 | </div> | |
336 | </th> | |
337 | </thead> | |
338 | <tbody class="addresses monospace"> | |
339 | <tr><td> </td><td> </td><td> </td></tr> | |
340 | <tr><td> </td><td> </td><td> </td></tr> | |
341 | <tr><td> </td><td> </td><td> </td></tr> | |
342 | <tr><td> </td><td> </td><td> </td></tr> | |
343 | <tr><td> </td><td> </td><td> </td></tr> | |
344 | </tbody> | |
345 | </table> | |
346 | </div> | |
347 | </div> | |
348 | <span>Show next </button> | |
349 | <input type="number" class="rows-to-add" value="20"> | |
350 | <button class="more">Show</button> | |
351 | ||
352 | <hr> | |
353 | ||
354 | <div class="row"> | |
355 | <div class="col-md-12"> | |
356 | <h2>More info</h2> | |
357 | <h3>BIP39 <span class="small">Mnemonic code for generating deterministic keys</span></h3> | |
358 | <p> | |
359 | Read more at the | |
360 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki">official BIP39 spec</a> | |
361 | </p> | |
362 | <h3>BIP32 <span class="small">Hierarchical Deterministic Wallets</span></h3> | |
363 | <p> | |
364 | Read more at the | |
365 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">official BIP32 spec</a> | |
366 | and see the demo at | |
367 | <a href="http://bip32.org/" target="_blank">bip32.org</a> | |
368 | </p> | |
369 | <h3>BIP44 <span class="small">Multi-Account Hierarchy for Deterministic Wallets</span></h3> | |
370 | <p> | |
371 | Read more at the | |
372 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a> | |
373 | </p> | |
374 | <h3>Private Keys</h3> | |
375 | <p> | |
376 | Use private keys at | |
377 | <a href="https://web.archive.org/web/20150707020924/https://brainwallet.org/" target="_blank">brainwallet.org</a>, | |
378 | but be careful - it can be easy to make mistakes if you | |
379 | don't know what you're doing | |
380 | </p> | |
381 | <h3 id="entropy-notes">Entropy</h3> | |
382 | <p> | |
383 | Entropy values must be sourced from a | |
384 | <a href="https://en.wikipedia.org/wiki/Random_number_generation" target="_blank">strong source of randomness</a>. | |
385 | This means flipping a fair coin, rolling a fair dice, noise measurements etc. Do <strong>NOT</strong> use | |
386 | phrases from books, lyrics from songs, your birthday or steet address, keyboard mashing, or anything you <i>think</i> | |
387 | is random, because chances are <em>overwhelming</em> that it isn't random enough for the needs of this tool. | |
388 | </p> | |
389 | <p> | |
390 | The random mnemonic generator on this page uses a | |
391 | <a href="https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues" target="_blank">cryptographically secure random number generator</a>, | |
392 | and can generally be trusted more than your own intuition about randomness. | |
393 | If cryptographic randomness isn't available in your browser, this page will show a warning and <i>will not generate | |
394 | random mnemonics</i>. | |
395 | </p> | |
396 | <p> | |
397 | <a href="https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309" target="_blank">You are not a good source of entropy.</a> | |
398 | </p> | |
399 | </div> | |
400 | </div> | |
401 | ||
402 | <hr> | |
403 | ||
404 | <div class="row"> | |
405 | <div class="col-md-12"> | |
406 | ||
407 | <h2>Offline Usage</h2> | |
408 | ||
409 | <p> | |
410 | You can use this tool without having to be online. | |
411 | </p> | |
412 | <p> | |
413 | In your browser, select file save-as, and save this page | |
414 | as a file. | |
415 | </p> | |
416 | <p> | |
417 | Double-click that file to open it in a browser | |
418 | on any offline computer. | |
419 | </p> | |
420 | <p> | |
421 | Alternatively, download it from | |
422 | <a href="https://github.com/iancoleman/bip39"> | |
423 | https://github.com/iancoleman/bip39 | |
424 | </a> | |
425 | ||
426 | </div> | |
427 | </div> | |
428 | ||
429 | <hr> | |
430 | ||
431 | <div class="row"> | |
432 | <div class="col-md-12"> | |
433 | ||
434 | <h2>This project is 100% open-source code</h2> | |
435 | ||
436 | <p> | |
437 | <span>Get the source code at - </span> | |
438 | <a href="https://github.com/iancoleman/bip39" target="_blank"> | |
439 | https://github.com/iancoleman/bip39 | |
440 | </a> | |
441 | </p> | |
442 | ||
443 | <h3>Libraries</h3> | |
444 | ||
445 | <p> | |
446 | <span>BitcoinJS - </span> | |
447 | <a href="https://github.com/bitcoinjs/bitcoinjs-lib" target="_blank"> | |
448 | https://github.com/bitcoinjs/bitcoinjs-lib | |
449 | </a> | |
450 | </p> | |
451 | ||
452 | <p> | |
453 | <span>jsBIP39 - </span> | |
454 | <a href="https://github.com/iancoleman/jsbip39" target="_blank"> | |
455 | https://github.com/iancoleman/jsbip39 | |
456 | </a> | |
457 | </p> | |
458 | ||
459 | <p> | |
460 | <span>sjcl - </span> | |
461 | <a href="https://github.com/bitwiseshiftleft/sjcl" target="_blank"> | |
462 | https://github.com/bitwiseshiftleft/sjcl | |
463 | </a> | |
464 | </p> | |
465 | ||
466 | <p> | |
467 | <span>jQuery - </span> | |
468 | <a href="https://jquery.com/" target="_blank"> | |
469 | https://jquery.com/ | |
470 | </a> | |
471 | </p> | |
472 | ||
473 | <p> | |
474 | <span>Twitter Bootstrap - </span> | |
475 | <a href="http://getbootstrap.com/" target="_blank"> | |
476 | http://getbootstrap.com/ | |
477 | </a> | |
478 | </p> | |
479 | ||
480 | </div> | |
481 | </div> | |
482 | ||
483 | </div> | |
484 | ||
485 | <div class="feedback-container"> | |
486 | <div class="feedback">Loading...</div> | |
487 | </div> | |
488 | ||
489 | <script type="text/template" id="address-row-template"> | |
490 | <tr> | |
491 | <td class="index"><span></span></td> | |
492 | <td class="address"><span></span></td> | |
493 | <td class="pubkey"><span></span></td> | |
494 | <td class="privkey"><span></span></td> | |
495 | </tr> | |
496 | </script> | |
497 | <script src="js/jquery.min.js"></script> | |
498 | <script src="js/bootstrap.min.js"></script> | |
499 | <script src="js/levenshtein.js"></script> | |
500 | <script src="js/bitcoinjs-1-5-7.js"></script> | |
501 | <script src="js/bitcoinjs-extensions.js"></script> | |
502 | <script src="js/sjcl-bip39.js"></script> | |
503 | <script src="js/wordlist_english.js"></script> | |
504 | <script src="js/wordlist_japanese.js"></script> | |
505 | <script src="js/wordlist_spanish.js"></script> | |
506 | <script src="js/wordlist_chinese_simplified.js"></script> | |
507 | <script src="js/wordlist_chinese_traditional.js"></script> | |
508 | <script src="js/wordlist_french.js"></script> | |
509 | <script src="js/wordlist_italian.js"></script> | |
510 | <script src="js/jsbip39.js"></script> | |
511 | <script src="js/entropy.js"></script> | |
512 | <script src="js/index.js"></script> | |
513 | </body> | |
514 | </html> |