@@ -5985,7 +5987,7 @@ body { font-family: Arial; }
Generating Bitcoin Address...
MOVE your mouse around to add some extra randomness...
- OR type some random characters into this textbox
+ OR type some random characters into this textbox
@@ -6278,7 +6280,7 @@ body { font-family: Arial; }
MOVE your mouse around to add some extra randomness...
- OR type some random characters into this textbox
+ OR type some random characters into this textbox
- Version History (v2.7.6)
+ Version History (v2.8.0)
(PGP)
527B 5C82 B1F6 B2DB 72A0
ECBF 8749 7B91 6397 4F5A @@ -6653,41 +6655,73 @@ ninja.seeder = { })(), seedCount: 0, // counter + lastInputTime: new Date().getTime(), + seedPoints: [], // seed function exists to wait for mouse movement to add more entropy before generating an address seed: function (evt) { if (!evt) var evt = window.event; - // seed a bunch (minimum seedLimit) of times - SecureRandom.seedTime(); - // seed key press character - if (evt.which) { - SecureRandom.seedInt8(evt.which); - } - // seed mouse position X and Y - else if (evt) { - SecureRandom.seedInt16((evt.clientX * evt.clientY)); - } - ninja.seeder.seedCount++; // seeding is over now we generate and display the address if (ninja.seeder.seedCount == ninja.seeder.seedLimit) { + ninja.seeder.seedCount++; ninja.wallets.singlewallet.open(); // UI document.getElementById("generate").style.display = "none"; document.getElementById("menu").style.visibility = "visible"; + ninja.seeder.removePoints(); } - var poolHex; + else if (ninja.seeder.seedCount < ninja.seeder.seedLimit) { + var timeStamp = new Date().getTime(); + // seed key press character + if (evt.which) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt8(evt.which); + var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime; + SecureRandom.seedInt8(keyPressTimeDiff); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + // seed mouse position X and Y when mouse movements are greater than 40ms apart. + else if (evt && (timeStamp - ninja.seeder.lastInputTime) > 40) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt16((evt.clientX * evt.clientY)); + ninja.seeder.showPoint(evt.clientX, evt.clientY); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + } + + var poolHex; if (SecureRandom.poolCopyOnInit != null) { - var poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpool").innerHTML = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpooldisplay").innerHTML = poolHex; - } - else { - var poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); document.getElementById("seedpool").innerHTML = poolHex; document.getElementById("seedpooldisplay").innerHTML = poolHex; } - document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + else { + poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + document.getElementById("seedpool").innerHTML = poolHex; + document.getElementById("seedpooldisplay").innerHTML = poolHex; + } + }, + + showPoint: function (x, y) { + var div = document.createElement("div"); + div.setAttribute("class", "seedpoint"); + div.style.top = y + "px"; + div.style.left = x + "px"; + document.body.appendChild(div); + ninja.seeder.seedPoints.push(div); + }, + + removePoints: function () { + for (var i = 0; i < ninja.seeder.seedPoints.length; i++) { + document.body.removeChild(ninja.seeder.seedPoints[i]); + } + ninja.seeder.seedPoints = []; } }; diff --git a/package.json b/package.json index decaec7..283cce1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitaddress.org", - "version": "2.7.5", + "version": "2.8.0", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { diff --git a/src/bitaddress-ui.html b/src/bitaddress-ui.html index bf12c9b..fb4fd32 100644 --- a/src/bitaddress-ui.html +++ b/src/bitaddress-ui.html @@ -110,7 +110,7 @@ //main.css - +
ECBF 8749 7B91 6397 4F5A @@ -6653,41 +6655,73 @@ ninja.seeder = { })(), seedCount: 0, // counter + lastInputTime: new Date().getTime(), + seedPoints: [], // seed function exists to wait for mouse movement to add more entropy before generating an address seed: function (evt) { if (!evt) var evt = window.event; - // seed a bunch (minimum seedLimit) of times - SecureRandom.seedTime(); - // seed key press character - if (evt.which) { - SecureRandom.seedInt8(evt.which); - } - // seed mouse position X and Y - else if (evt) { - SecureRandom.seedInt16((evt.clientX * evt.clientY)); - } - ninja.seeder.seedCount++; // seeding is over now we generate and display the address if (ninja.seeder.seedCount == ninja.seeder.seedLimit) { + ninja.seeder.seedCount++; ninja.wallets.singlewallet.open(); // UI document.getElementById("generate").style.display = "none"; document.getElementById("menu").style.visibility = "visible"; + ninja.seeder.removePoints(); } - var poolHex; + else if (ninja.seeder.seedCount < ninja.seeder.seedLimit) { + var timeStamp = new Date().getTime(); + // seed key press character + if (evt.which) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt8(evt.which); + var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime; + SecureRandom.seedInt8(keyPressTimeDiff); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + // seed mouse position X and Y when mouse movements are greater than 40ms apart. + else if (evt && (timeStamp - ninja.seeder.lastInputTime) > 40) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt16((evt.clientX * evt.clientY)); + ninja.seeder.showPoint(evt.clientX, evt.clientY); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + } + + var poolHex; if (SecureRandom.poolCopyOnInit != null) { - var poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpool").innerHTML = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpooldisplay").innerHTML = poolHex; - } - else { - var poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); document.getElementById("seedpool").innerHTML = poolHex; document.getElementById("seedpooldisplay").innerHTML = poolHex; } - document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + else { + poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + document.getElementById("seedpool").innerHTML = poolHex; + document.getElementById("seedpooldisplay").innerHTML = poolHex; + } + }, + + showPoint: function (x, y) { + var div = document.createElement("div"); + div.setAttribute("class", "seedpoint"); + div.style.top = y + "px"; + div.style.left = x + "px"; + document.body.appendChild(div); + ninja.seeder.seedPoints.push(div); + }, + + removePoints: function () { + for (var i = 0; i < ninja.seeder.seedPoints.length; i++) { + document.body.removeChild(ninja.seeder.seedPoints[i]); + } + ninja.seeder.seedPoints = []; } }; diff --git a/package.json b/package.json index decaec7..283cce1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitaddress.org", - "version": "2.7.5", + "version": "2.8.0", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { diff --git a/src/bitaddress-ui.html b/src/bitaddress-ui.html index bf12c9b..fb4fd32 100644 --- a/src/bitaddress-ui.html +++ b/src/bitaddress-ui.html @@ -110,7 +110,7 @@ //main.css - +
@@ -137,7 +137,7 @@
Generating Bitcoin Address...
MOVE your mouse around to add some extra randomness...
- OR type some random characters into this textbox
+ OR type some random characters into this textbox
@@ -430,7 +430,7 @@
MOVE your mouse around to add some extra randomness...
- OR type some random characters into this textbox
+ OR type some random characters into this textbox
- Version History (v2.7.6)
+ Version History (v2.8.0)
(PGP)
527B 5C82 B1F6 B2DB 72A0
ECBF 8749 7B91 6397 4F5A diff --git a/src/main.css b/src/main.css index 118120e..5e5d93d 100644 --- a/src/main.css +++ b/src/main.css @@ -24,9 +24,11 @@ body { font-family: Arial; } #btcaddress, #btcprivwif, #detailaddress, #detailaddresscomp, #detailprivwif, #detailprivwifcomp { font-family: monospace; font-size: 1.25em; } #seedpoolarea { display: none; } -#seedpooldisplay { font-family: monospace; font-size: 0.75em; width: 600px; padding: 10px; word-wrap: break-word; } +#seedpooldisplay { font-family: monospace; font-size: 1em; width: 640px; padding: 15px 5px; word-wrap: break-word; } +.seedpoint { width: 6px; height: 6px; border-radius: 3px; background-color: green; position: absolute; z-index: 10; } #generate { font-family: monospace; font-size: 1.25em; height: 275px; text-align: left; position: relative; padding: 5px; border: 2px solid green; } #generate span { padding: 5px 5px 0 5px; } +#generatekeyinput { position: relative; z-index: 20; } #keyarea { height: 250px; } #keyarea .pubaddress { float: none; display: block; padding: 0; height: auto; } #keyarea .label { text-decoration: none; } diff --git a/src/ninja.misc.js b/src/ninja.misc.js index 928c3b3..7aea5ea 100644 --- a/src/ninja.misc.js +++ b/src/ninja.misc.js @@ -6,41 +6,73 @@ ninja.seeder = { })(), seedCount: 0, // counter + lastInputTime: new Date().getTime(), + seedPoints: [], // seed function exists to wait for mouse movement to add more entropy before generating an address seed: function (evt) { if (!evt) var evt = window.event; - // seed a bunch (minimum seedLimit) of times - SecureRandom.seedTime(); - // seed key press character - if (evt.which) { - SecureRandom.seedInt8(evt.which); - } - // seed mouse position X and Y - else if (evt) { - SecureRandom.seedInt16((evt.clientX * evt.clientY)); - } - ninja.seeder.seedCount++; // seeding is over now we generate and display the address if (ninja.seeder.seedCount == ninja.seeder.seedLimit) { + ninja.seeder.seedCount++; ninja.wallets.singlewallet.open(); // UI document.getElementById("generate").style.display = "none"; document.getElementById("menu").style.visibility = "visible"; + ninja.seeder.removePoints(); } - var poolHex; + else if (ninja.seeder.seedCount < ninja.seeder.seedLimit) { + var timeStamp = new Date().getTime(); + // seed key press character + if (evt.which) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt8(evt.which); + var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime; + SecureRandom.seedInt8(keyPressTimeDiff); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + // seed mouse position X and Y when mouse movements are greater than 40ms apart. + else if (evt && (timeStamp - ninja.seeder.lastInputTime) > 40) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt16((evt.clientX * evt.clientY)); + ninja.seeder.showPoint(evt.clientX, evt.clientY); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + } + + var poolHex; if (SecureRandom.poolCopyOnInit != null) { - var poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpool").innerHTML = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpooldisplay").innerHTML = poolHex; - } - else { - var poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); document.getElementById("seedpool").innerHTML = poolHex; document.getElementById("seedpooldisplay").innerHTML = poolHex; } - document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + else { + poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + document.getElementById("seedpool").innerHTML = poolHex; + document.getElementById("seedpooldisplay").innerHTML = poolHex; + } + }, + + showPoint: function (x, y) { + var div = document.createElement("div"); + div.setAttribute("class", "seedpoint"); + div.style.top = y + "px"; + div.style.left = x + "px"; + document.body.appendChild(div); + ninja.seeder.seedPoints.push(div); + }, + + removePoints: function () { + for (var i = 0; i < ninja.seeder.seedPoints.length; i++) { + document.body.removeChild(ninja.seeder.seedPoints[i]); + } + ninja.seeder.seedPoints = []; } };
ECBF 8749 7B91 6397 4F5A diff --git a/src/main.css b/src/main.css index 118120e..5e5d93d 100644 --- a/src/main.css +++ b/src/main.css @@ -24,9 +24,11 @@ body { font-family: Arial; } #btcaddress, #btcprivwif, #detailaddress, #detailaddresscomp, #detailprivwif, #detailprivwifcomp { font-family: monospace; font-size: 1.25em; } #seedpoolarea { display: none; } -#seedpooldisplay { font-family: monospace; font-size: 0.75em; width: 600px; padding: 10px; word-wrap: break-word; } +#seedpooldisplay { font-family: monospace; font-size: 1em; width: 640px; padding: 15px 5px; word-wrap: break-word; } +.seedpoint { width: 6px; height: 6px; border-radius: 3px; background-color: green; position: absolute; z-index: 10; } #generate { font-family: monospace; font-size: 1.25em; height: 275px; text-align: left; position: relative; padding: 5px; border: 2px solid green; } #generate span { padding: 5px 5px 0 5px; } +#generatekeyinput { position: relative; z-index: 20; } #keyarea { height: 250px; } #keyarea .pubaddress { float: none; display: block; padding: 0; height: auto; } #keyarea .label { text-decoration: none; } diff --git a/src/ninja.misc.js b/src/ninja.misc.js index 928c3b3..7aea5ea 100644 --- a/src/ninja.misc.js +++ b/src/ninja.misc.js @@ -6,41 +6,73 @@ ninja.seeder = { })(), seedCount: 0, // counter + lastInputTime: new Date().getTime(), + seedPoints: [], // seed function exists to wait for mouse movement to add more entropy before generating an address seed: function (evt) { if (!evt) var evt = window.event; - // seed a bunch (minimum seedLimit) of times - SecureRandom.seedTime(); - // seed key press character - if (evt.which) { - SecureRandom.seedInt8(evt.which); - } - // seed mouse position X and Y - else if (evt) { - SecureRandom.seedInt16((evt.clientX * evt.clientY)); - } - ninja.seeder.seedCount++; // seeding is over now we generate and display the address if (ninja.seeder.seedCount == ninja.seeder.seedLimit) { + ninja.seeder.seedCount++; ninja.wallets.singlewallet.open(); // UI document.getElementById("generate").style.display = "none"; document.getElementById("menu").style.visibility = "visible"; + ninja.seeder.removePoints(); } - var poolHex; + else if (ninja.seeder.seedCount < ninja.seeder.seedLimit) { + var timeStamp = new Date().getTime(); + // seed key press character + if (evt.which) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt8(evt.which); + var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime; + SecureRandom.seedInt8(keyPressTimeDiff); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + // seed mouse position X and Y when mouse movements are greater than 40ms apart. + else if (evt && (timeStamp - ninja.seeder.lastInputTime) > 40) { + // seed a bunch (minimum seedLimit) of times + SecureRandom.seedTime(); + SecureRandom.seedInt16((evt.clientX * evt.clientY)); + ninja.seeder.showPoint(evt.clientX, evt.clientY); + ninja.seeder.seedCount++; + ninja.seeder.lastInputTime = new Date().getTime(); + } + document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + } + + var poolHex; if (SecureRandom.poolCopyOnInit != null) { - var poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpool").innerHTML = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); - document.getElementById("seedpooldisplay").innerHTML = poolHex; - } - else { - var poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit); document.getElementById("seedpool").innerHTML = poolHex; document.getElementById("seedpooldisplay").innerHTML = poolHex; } - document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount); + else { + poolHex = Crypto.util.bytesToHex(SecureRandom.pool); + document.getElementById("seedpool").innerHTML = poolHex; + document.getElementById("seedpooldisplay").innerHTML = poolHex; + } + }, + + showPoint: function (x, y) { + var div = document.createElement("div"); + div.setAttribute("class", "seedpoint"); + div.style.top = y + "px"; + div.style.left = x + "px"; + document.body.appendChild(div); + ninja.seeder.seedPoints.push(div); + }, + + removePoints: function () { + for (var i = 0; i < ninja.seeder.seedPoints.length; i++) { + document.body.removeChild(ninja.seeder.seedPoints[i]); + } + ninja.seeder.seedPoints = []; } };