X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=bip39-standalone.html;h=4a186578a992259a2224704771d4332218e92de2;hb=fef188cd1ed85b78e5f78d71e9c71f14e9e26448;hp=45380a339fb1c8a600e536416a38e1c4b18602ff;hpb=20083ab9e9ae519400447fc97c3cd1b86ffcad57;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/bip39-standalone.html b/bip39-standalone.html index 45380a3..4a18657 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html @@ -96,8 +96,15 @@ .qr-image { margin: 5px; } - .qr-hint { + .qr-hint, + .qr-warning { padding: 2px; + max-width: 150px; + } + .more-info { + cursor: help; + border-bottom: 1px dashed #000; + text-decoration: none; } @@ -169,7 +176,7 @@
- +
@@ -320,7 +327,7 @@
-

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

+

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

@@ -514,6 +521,14 @@ 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 @@ -526,6 +541,12 @@

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.

@@ -614,9 +635,12 @@
@@ -14702,7 +14726,8 @@ sjcl.hash.sha256.prototype = { // //
Test
//
keep em tag
-// +// +// // // Obtain all the phrases to be translated via js debug console: // @@ -14717,7 +14742,8 @@ sjcl.hash.sha256.prototype = { // Translate.loadForeignPhrases("es", { // "Test": "Test in Spanish", // "keep em tag": "keep em tag in Spanish", -// "Example text": "Example text in Spanish" +// "Example placeholder": "Example placeholder in Spanish" +// "Example title": "Example title in Spanish" // }); // // In your UI put a listener for clicking on the Spanish button: @@ -14768,10 +14794,21 @@ Translate = new (function() { }, } + var title = { + selector: "[data-translate-title]", + getKey: function() { + return this.getAttribute("title").trim().replace(/\s+/g, " "); + }, + setPhrase: function(p) { + this.setAttribute("title", p); + }, + } + // Get elements to be translated var allEls = getEls(text) .concat(getEls(html)) - .concat(getEls(placeholder)); + .concat(getEls(placeholder)) + .concat(getEls(title)); // Provides access to phrases from a non-default language. // See phrases_en.js for example usage. @@ -18555,15 +18592,12 @@ window.Entropy = new (function() { // Create a normalized string of the selected cards var normalizedCards = cards.join("").toUpperCase(); // Convert to binary using the SHA256 hash of the normalized cards. - // If the number of bits is more than 256, multiple rounds of hashing + // If the number of bits is more than 256, multiple hashes // are used until the required number of bits is reached. var entropyBin = ""; var iterations = 0; while (entropyBin.length < numberOfBits) { - var hashedCards = sjcl.hash.sha256.hash(normalizedCards); - for (var j=0; j -1; + var isXpubkey = !("privKey" in bip32RootKey); + if (hardened && isXpubkey) { + return "Hardened derivation path is invalid with xpub key"; + } return false; } @@ -19089,7 +19143,11 @@ window.Entropy = new (function() { DOM.seed.val(seed); var rootKey = bip32RootKey.toBase58(); DOM.rootKey.val(rootKey); - var extendedPrivKey = bip32ExtendedKey.toBase58(); + var xprvkeyB58 = "NA"; + if (bip32ExtendedKey.privKey) { + xprvkeyB58 = bip32ExtendedKey.toBase58(); + } + var extendedPrivKey = xprvkeyB58; DOM.extendedPrivKey.val(extendedPrivKey); var extendedPubKey = bip32ExtendedKey.toBase58(false); DOM.extendedPubKey.val(extendedPubKey); @@ -19123,7 +19181,10 @@ window.Entropy = new (function() { key = bip32ExtendedKey.derive(index); } var address = key.getAddress().toString(); - var privkey = key.privKey.toWIF(network); + var privkey = "NA"; + if (key.privKey) { + privkey = key.privKey.toWIF(network); + } var pubkey = key.pubKey.toHex(); var indexText = getDerivationPath() + "/" + index; if (useHardenedAddresses) { @@ -19231,6 +19292,8 @@ window.Entropy = new (function() { var closestWord = words[0]; for (var i=0; i