From 434caecd96740bbec488429026830b5ad24f628a Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Thu, 22 Dec 2016 15:44:07 +1100 Subject: [PATCH] Card entropy changes compiled into standalone --- bip39-standalone.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/bip39-standalone.html b/bip39-standalone.html index ca18ea8..2888d03 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html @@ -521,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 @@ -18584,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