From: iancoleman <1281387+iancoleman@users.noreply.github.com> Date: Sun, 10 Nov 2019 22:34:37 +0000 (+1100) Subject: Merge pull request #280 from mctrivia/add-hack-time-for-split-cards X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=7cfd04e318155a9a69906436b63a529aa768654f;hp=d0428a8d211dd5914c4c8547c69c75aca4cccfd6 Merge pull request #280 from mctrivia/add-hack-time-for-split-cards Add hack time calculation for Split Mnemonic Cards --- diff --git a/index.html b/index.html deleted file mode 100644 index a392b50..0000000 --- a/index.html +++ /dev/null @@ -1,960 +0,0 @@ - - - - - BIP39 - Mnemonic Code - - - - - - - - - -
- -

Mnemonic Code Converter

-

v0.3.9

-
-
-
-

Mnemonic

-
-
-
-
-

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).

-

- For more info see the - BIP39 spec. -

-
-
-
- -
-
-
- Generate a random mnemonic: - - - words, or enter your own below. - -
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
- -
- -
- -
-
-
- -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
-
- -
- -
-
-

Derivation Path

- -
-
-
-
-
-
-

- For more info see the - BIP44 spec. -

-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-

The account extended keys can be used for importing to most BIP44 compatible wallets, such as mycelium or electrum.

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-

The BIP32 derivation path and extended keys are the basis for the derived addresses.

-
-
-
- -
- -
-
-
-
-
-
-
-
-
-

- For more info see the - BIP32 spec -

-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
- -
-

- Use path m/0'/0' with hardened addresses. -

-

- For more info see the - Bitcoin Core BIP32 implementation -

-
-
-
- -
-

- Use path m/0'/0. -

-

- For more info see - MultiBit HD -

-
-
-
- -
-

- Use path m/44'/0'/0'. - Only enter the xpub extended key into block explorer search fields, never the xprv key. -

-

- Can be used with: - blockchain.info -

-
-
-
-
-
-
-
- -
-
-
-

- For more info see the - BIP49 spec. -

-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-

The account extended keys can be used for importing to most BIP49 compatible wallets.

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-

The BIP32 derivation path and extended keys are the basis for the derived addresses.

-
-
-
- -
- -
-
-
-
-
-
-
-
- -
-
-
-

- For more info see the - BIP141 spec -

-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-
-
- -
-
-
-

- For more info see the - BIP84 spec. -

-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-

The account extended keys can be used for importing to most BIP84 compatible wallets.

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-

The BIP32 derivation path and extended keys are the basis for the derived addresses.

-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
- -
-
-

Derived Addresses

-

Note these addresses are derived from the BIP32 Extended Key

-
- -
-
- - - Enabling BIP38 means each key will take several minutes to generate. -
-
- -
-
-
- - - - - - - - - - - - - - -
-
- Path   - -
-
-
- Address   - -
-
-
- Public Key   - -
-
-
- Private Key   - -
-
    
    
    
    
    
-
-
-
-
- -
-
-
-
- Show - - - starting from index - - (leave blank to generate from next index) - -
- -
-
-

More info

-

BIP39 Mnemonic code for generating deterministic keys

-

- Read more at the - official BIP39 spec -

-

BIP32 Hierarchical Deterministic Wallets

-

- Read more at the - official BIP32 spec -

-

- See the demo at - bip32.org -

-

BIP44 Multi-Account Hierarchy for Deterministic Wallets

-

- Read more at the - official BIP44 spec -

-

BIP49 Derivation scheme for P2WPKH-nested-in-P2SH based accounts

-

- Read more at the - official BIP49 spec -

-

Private Keys

-

- - Use private keys at - brainwallet.org. - - Be careful - it can be easy to make mistakes if you don't know what you're doing. -

-

Entropy

-

- Entropy values should not include the BIP39 checksum. This is automatically added by the tool. -

-

- - Entropy values must be sourced from a - strong source of randomness. - - This means flipping a fair coin, rolling a fair dice, noise measurements etc. - - Do NOT use phrases from books, lyrics from songs, your birthday or street address, - keyboard mashing, or anything you think is random, because chances are overwhelming it isn't - random enough for the needs of this tool. - -

-

- Do not store entropy. -

-

- Storing entropy (such as keeping a deck of cards in a specific shuffled order) is unreliable compared to storing a mnemonic. - Instead of storing entropy, store the mnemonic generated from the entropy. - Steganography may be beneficial when storing the mnemonic. -

-

- - The random mnemonic generator on this page uses a - cryptographically secure random number generator. - - The built in random generator can generally be trusted more than your own intuition about randomness. - If cryptographic randomness isn't available in your browser, this page will show a warning and the generate button will not work. - In that case you might choose to use your own source of entropy. -

-

- You are not a good source of entropy. -

-

License

-

- Please refer to the software license for more detail. - -

-

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

-
-
- -
- -
-
-

Alternative Tools

-

This tool is interoperable with any BIP39 wallet.

-

Some similar tools to this one (ie not consumer wallets) are

-

- - https://bip32jp.github.io/english/ - -

-
-
- -
- -
-
- -

Offline Usage

- -

- You can use this tool without having to be online. -

-

- In your browser, select file save-as, and save this page - as a file. -

-

- Double-click that file to open it in a browser - on any offline computer. -

-

- Alternatively, download the file from the repository - - - https://github.com/iancoleman/bip39 -

- -
-
- -
- -
-
- -

This project is 100% open-source code

- -

- Get the source code from the repository - - - - https://github.com/iancoleman/bip39 - -

- -

Libraries

- -

- BitcoinJS - - - https://github.com/bitcoinjs/bitcoinjs-lib - -

- -

- jsBIP39 - - - https://github.com/iancoleman/jsbip39 - -

- -

- sjcl - - - https://github.com/bitwiseshiftleft/sjcl - -

- -

- jQuery - - - https://jquery.com/ - -

- -

- Twitter Bootstrap - - - http://getbootstrap.com/ - -

- -
-
- -
- - - -
-
Loading...
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/css/app.css b/src/css/app.css index 576b7d7..c2a0294 100644 --- a/src/css/app.css +++ b/src/css/app.css @@ -31,6 +31,10 @@ body { .phrase { word-break: keep-all; } +.phraseSplitWarn { + text-align: right; + color: red; +} .generate-container .strength { /* override mobile width from bootstrap */ width: auto!important; diff --git a/src/index.html b/src/index.html index 8862904..bfb2bc1 100644 --- a/src/index.html +++ b/src/index.html @@ -177,6 +177,7 @@
+
diff --git a/src/js/index.js b/src/js/index.js index 035a2b3..9d5f8ee 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -45,6 +45,7 @@ DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); DOM.phrase = $(".phrase"); DOM.splitPhrase = $(".phraseSplit"); + DOM.phraseSplitWarn = $(".phraseSplitWarn"); DOM.passphrase = $(".passphrase"); DOM.generateContainer = $(".generate-container"); DOM.generate = $(".generate"); @@ -1448,6 +1449,18 @@ cards[i]='Card '+(i+1)+': '+wordArrayToPhrase(cards[i]); //combine words on card back to string } DOM.splitPhrase.val(cards.join("\r\n")); //make words visible + var triesPerSecond=10000000000; //assumed number of tries per second + var hackTime=Math.pow(2,wordCount*10/3)/triesPerSecond; //get number of bits of unknown data per card + if (hackTime<1) { + hackTime="<1 second"; + } else if (hackTime<86400) { + hackTime=Math.floor(hackTime)+" seconds"; + } else if(hackTime<31557600) { + hackTime=Math.floor(hackTime/86400)+" days"; + } else { + hackTime=Math.floor(hackTime/31557600)+" years"; + } + DOM.phraseSplitWarn.html("Time to hack with only one card: "+hackTime); } function isUsingOwnEntropy() {