From 07b64959caabaef712124b5aee97f03dfb264d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Wed, 2 Jul 2014 21:29:46 +0200 Subject: [PATCH] /!\ fix a security failure where a wallet was generated too early, that lead to the PRNG to be initialized with less entropy than it should. If you used walletgenerator.net before with an old browser, please regenerate your wallets as they might be unsafe. If your browser is older than the date mentioned below, entropy provided by the OS is not available, and the PRNG was initialized with data collection from the browser, time and Math.random(), but NOT with the mouse input that is asked to the user, nor the OS provided entropy. firefox 21: may 2013 chrome 11: april 2011 ie 11: october 2013 opera 14: july 2013 safari 3.1: march 2008 --- index.html | 4 +++- src/janin.currency.js | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 58ff3c8..cc9f337 100644 --- a/index.html +++ b/index.html @@ -10264,10 +10264,13 @@ janin.currency = { document.title = janin.currency.name() + "'s paper wallet generator"; document.getElementById("siteTitle").alt = janin.currency.name() + " Paper Wallet Generator"; + if(ninja.seeder.isDone()) + { // Regenerate a new wallet when not expensive ninja.wallets.singlewallet.generateNewAddressAndKey(); ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value); ninja.wallets.brainwallet.view(); + } // Reset wallet tab when expensive or not applicable document.getElementById("bulktextarea").value = ""; @@ -10292,7 +10295,6 @@ janin.currency = { janin.doge.stop(); janin.doge = null; } - }, }; diff --git a/src/janin.currency.js b/src/janin.currency.js index 5448c19..8cccab0 100644 --- a/src/janin.currency.js +++ b/src/janin.currency.js @@ -42,11 +42,14 @@ janin.currency = { // Update title depending on currency document.title = janin.currency.name() + "'s paper wallet generator"; document.getElementById("siteTitle").alt = janin.currency.name() + " Paper Wallet Generator"; - - // Regenerate a new wallet when not expensive - ninja.wallets.singlewallet.generateNewAddressAndKey(); - ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value); - ninja.wallets.brainwallet.view(); + + if(ninja.seeder.isDone()) + { + // Regenerate a new wallet when not expensive + ninja.wallets.singlewallet.generateNewAddressAndKey(); + ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value); + ninja.wallets.brainwallet.view(); + } // Reset wallet tab when expensive or not applicable document.getElementById("bulktextarea").value = ""; @@ -71,7 +74,6 @@ janin.currency = { janin.doge.stop(); janin.doge = null; } - }, };