Author

Topic: bitaddress.org - bug & concerns (Read 1731 times)

full member
Activity: 182
Merit: 100
1MCKW9AkWj3aopC1aPegcZEf2fYNrhUQVf
November 13, 2013, 04:18:36 AM
#10

it does? the page is a single html file with no other dependencies.


You are right, I was wrong. I thought it's linking to google libraries, but it was a mistake on my behalf. It's simply crediting those libraries, not linking to them. I apologize and stand corrected!
newbie
Activity: 42
Merit: 0
November 10, 2013, 04:57:26 PM
#9
What is this blockchain walet analog?  Huh or?  Roll Eyes
newbie
Activity: 40
Merit: 0
November 10, 2013, 03:40:59 PM
#8
I've responded to your post in the bitaddress.org thread.
https://bitcointalksearch.org/topic/m.3540166

I was also thinking about the RNG it uses, I quickly wrote some code where you can add your own entropy if you wish, though it requires some javascript and linux knowledge
sr. member
Activity: 261
Merit: 285
November 10, 2013, 02:17:24 PM
#7
Hi there,

My fork of bitaddress.org is virtually identical (in crypto not graphic design) except in the random number generator -- particularly the bit you're concerned about. It's not due to any crypto expertise on my own part: Gavin Andresen kindly sent me a patch to the bitaddress.org code which lets sufficiently advanced browsers use window.crypto.getRandomValues if it's available.


Here's the change:
https://github.com/cantonbecker/bitcoinpaperwallet/commit/b4c2cf68e79f9f469cd180238d9377086058aaa9

Here's the parent page:
https://github.com/cantonbecker/bitcoinpaperwallet

You can demo the generator here:
https://bitcoinpaperwallet.com

I've mentioned this amendment to pointbiz / bitaddress and I suspect it's under consideration.

- Canton
 
legendary
Activity: 2058
Merit: 1452
November 10, 2013, 12:53:12 PM
#6
So 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?
because reusing it doesn't decrease the entropy of resulting wallets.

My biggest concern at bitaddress.org is the use of external javascript files. This gives the host of those files the possibility to execute any javascript on the page. They could easily insert a function that sends the private keys to a third party website. If that's done only 1 of 10 times, it's hard to get caught.
 
it does? the page is a single html file with no other dependencies.


Yeah - all I wanted to do was modify the code a bit to add some of my own extra randomness to it for my sanity... But this has put me off completely now! I just want to create a really secure paper wallet where I don't need to trust somebody... Any ideas?

why don't you multiple the output random number by the current time code.  that'll add an extra layer of entropy
better idea: xor the output random number by the current time code. multiplying will add a bias toward bigger numbers.
full member
Activity: 209
Merit: 148
November 10, 2013, 12:33:11 PM
#5
I don't understand the code well enough to answer your specific concern.

My biggest concern at bitaddress.org is the use of external javascript files. This gives the host of those files the possibility to execute any javascript on the page. They could easily insert a function that sends the private keys to a third party website. If that's done only 1 of 10 times, it's hard to get caught.

Also, a week ago when I was trying to teach my college how to create a wallet, bitaddress.org displayed invalid security certificate -errors. Needles to say we stopped using the site immediately. Was a pretty embarrassing situation for me.

I'm taking a look at cascasius's address utility that included Bip0038 two factor encryption. This post on reddit made me curious:
http://www.reddit.com/r/Bitcoin/comments/1q7inm/this_paper_wallet_now_contains_0225_btc_and_is/

 

Yeah - all I wanted to do was modify the code a bit to add some of my own extra randomness to it for my sanity... But this has put me off completely now! I just want to create a really secure paper wallet where I don't need to trust somebody... Any ideas?

You may like the NoBrainr tool, also on this subforum. It's a little frugal but, I found it to be really easy to "review", even though I'm not a developer. It's so tiny there's little space to hide malicious code.


hero member
Activity: 896
Merit: 532
Former curator of The Bitcoin Museum
November 10, 2013, 11:01:12 AM
#4
I don't understand the code well enough to answer your specific concern.

My biggest concern at bitaddress.org is the use of external javascript files. This gives the host of those files the possibility to execute any javascript on the page. They could easily insert a function that sends the private keys to a third party website. If that's done only 1 of 10 times, it's hard to get caught.

Also, a week ago when I was trying to teach my college how to create a wallet, bitaddress.org displayed invalid security certificate -errors. Needles to say we stopped using the site immediately. Was a pretty embarrassing situation for me.

I'm taking a look at cascasius's address utility that included Bip0038 two factor encryption. This post on reddit made me curious:
http://www.reddit.com/r/Bitcoin/comments/1q7inm/this_paper_wallet_now_contains_0225_btc_and_is/

 

Yeah - all I wanted to do was modify the code a bit to add some of my own extra randomness to it for my sanity... But this has put me off completely now! I just want to create a really secure paper wallet where I don't need to trust somebody... Any ideas?

why don't you multiple the output random number by the current time code.  that'll add an extra layer of entropy
newbie
Activity: 17
Merit: 0
November 10, 2013, 08:58:37 AM
#3
I don't understand the code well enough to answer your specific concern.

My biggest concern at bitaddress.org is the use of external javascript files. This gives the host of those files the possibility to execute any javascript on the page. They could easily insert a function that sends the private keys to a third party website. If that's done only 1 of 10 times, it's hard to get caught.

Also, a week ago when I was trying to teach my college how to create a wallet, bitaddress.org displayed invalid security certificate -errors. Needles to say we stopped using the site immediately. Was a pretty embarrassing situation for me.

I'm taking a look at cascasius's address utility that included Bip0038 two factor encryption. This post on reddit made me curious:
http://www.reddit.com/r/Bitcoin/comments/1q7inm/this_paper_wallet_now_contains_0225_btc_and_is/

 

Yeah - all I wanted to do was modify the code a bit to add some of my own extra randomness to it for my sanity... But this has put me off completely now! I just want to create a really secure paper wallet where I don't need to trust somebody... Any ideas?
full member
Activity: 182
Merit: 100
1MCKW9AkWj3aopC1aPegcZEf2fYNrhUQVf
November 10, 2013, 07:48:31 AM
#2
I don't understand the code well enough to answer your specific concern.

My biggest concern at bitaddress.org is the use of external javascript files. This gives the host of those files the possibility to execute any javascript on the page. They could easily insert a function that sends the private keys to a third party website. If that's done only 1 of 10 times, it's hard to get caught.

Also, a week ago when I was trying to teach my college how to create a wallet, bitaddress.org displayed invalid security certificate -errors. Needles to say we stopped using the site immediately. Was a pretty embarrassing situation for me.

I'm taking a look at cascasius's address utility that included Bip0038 two factor encryption. This post on reddit made me curious:
http://www.reddit.com/r/Bitcoin/comments/1q7inm/this_paper_wallet_now_contains_0225_btc_and_is/

 
newbie
Activity: 17
Merit: 0
November 10, 2013, 07:29:48 AM
#1
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.jpg

So 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!
Jump to: