I replied this same info on the main bitaddress.org thread about 12 hours ago but am yet to get a response.
Disclaimer: I am no expert especially with Javascript.
I have been digging through the bitaddress.org code and I have a couple of concerns in generating the paper wallet addresses.
I've noticed that on the paper wallet page you have the option to choose how many wallets you wish to create. The problem is that the "random" secureRandom object is used for ALL of the wallets which you create on that page. Why is the object not refreshed on each wallet creation?
Let me show this with screenshot.
https://i.imgur.com/96ppaNM.jpgSo this random object value is used for ALL of the wallets when creating them in bulk. Surely the secureRandom should be recreated for each wallet?
Also please could somebody explain this bit of logic for randomising the 256 digits in this bit of code:
while (sr.pptr < sr.poolSize) { // extract some randomness from Math.random()
t = Math.floor(65536 * Math.random());
sr.pool[sr.pptr++] = t >>> 8;
sr.pool[sr.pptr++] = t & 255;
}
What is the reasoning of the bitand and the >>> 8? Couldn't this be a bit shift to a different integer? Why 8? Please explain to me.
Thanks!