SnowDog2003 (OP)
Jr. Member
Offline
Activity: 41
Merit: 1
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 04:21:52 PM |
|
Many of these wallets, and other tools, generate random bitcoin addresses. From someone who started programming in the 1970s, we learned quickly then that computers are deterministic machines. There is no such thing as a random number. So, people started seeding their random number generators with certain random things, like the number of milliseconds at which time the program ran. This generally solved the random number problem.
However! The degree of precision at which random number generators, are seeded, could be extremely important for bitcoin. If the degree of precision of the seeds that these random number generators use in bitcoin wallets, is not large enough, (or random enough), then bitcoin addresses could be expected to be repeated much more often than we might expect when we calculate a very large degree of entropy in the final bitcoin address.
So, in each wallet, it is crucial to find out how, and to what degree of precision, the random number generators are being seeded, that are used to create the bitcoin addresses that we use.
Does anyone have any idea as to how these number generators work in some of the common wallets like Satoshi, or Electrum? If not, then I think it's crucial that we find out.
|
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 04:24:41 PM |
|
Many of these wallets, and other tools, generate random bitcoin addresses. From someone who started programming in the 1970s, we learned quickly then that computers are deterministic machines. There is no such thing as a random number. So, people started seeding their random number generators with certain random things, like the number of milliseconds at which time the program ran. This generally solved the random number problem.
However! The degree of precision at which random number generators, are seeded, could be extremely important for bitcoin. If the degree of precision of the seeds that these random number generators use in bitcoin wallets, is not large enough, (or random enough), then bitcoin addresses could be expected to be repeated much more often than we might expect when we calculate a very large degree of entropy in the final bitcoin address.
So, in each wallet, it is crucial to find out how, and to what degree of precision, the random number generators are being seeded, that are used to create the bitcoin addresses that we use.
Does anyone have any idea as to how these number generators work in some of the common wallets like Satoshi, or Electrum? If not, then I think it's crucial that we find out.
I asked this question a while back. I think there were 6 different factors that were used in generation of random addresses to ensure sufficient entropy. Hopefully someone will chime in with exactly what those were, but it definitely satisfied me that the addresses are extremely random.
|
|
|
|
BurtW
Legendary
Offline
Activity: 2646
Merit: 1137
All paid signature campaigns should be banned.
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 04:25:18 PM |
|
I recall this being discussed in this thread: https://bitcointalk.org/index.php?topic=133122.0And many other threads.
|
Our family was terrorized by Homeland Security. Read all about it here: http://www.jmwagner.com/ and http://www.burtw.com/ Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 04:43:09 PM |
|
Here's the thread I was looking for in which theymos describes the entropy: https://bitcointalk.org/index.php?topic=109092.0Last time I checked, Bitcoin used: - Microsecond time. - GUI events - /dev/urandom if available - HKEY_PERFORMANCE_DATA on Windows So essentially 3 different random things. And even if the user isn't utilizing the GUI (a server instance, for example), the OS-specific ones (urandom and HKEY_) are sufficiently removed from the microsecond time as to be unreproducible, AFAIK.
|
|
|
|
SnowDog2003 (OP)
Jr. Member
Offline
Activity: 41
Merit: 1
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 04:50:56 PM |
|
Here's the thread I was looking for in which theymos describes the entropy: https://bitcointalk.org/index.php?topic=109092.0Last time I checked, Bitcoin used: - Microsecond time. - GUI events - /dev/urandom if available - HKEY_PERFORMANCE_DATA on Windows So essentially 3 different random things. And even if the user isn't utilizing the GUI (a server instance, for example), the OS-specific ones (urandom and HKEY_) are sufficiently removed from the microsecond time as to be unreproducible, AFAIK. This answer is for the Satoshi client. But the answer does show the point that the number of addresses from which the Satoshi client chooses, when it chooses a bitcoin address, is far less than the 10^38 degrees of entropy possible in the final bitcoin addresses. This question needs to be addressed by developers of each wallet. I looked through some of the code for the Electrum wallet, and it appears to use the Python random number generator. I could be wrong, but that would create even a smaller pool of Electrum wallet 'seeds'. Imagine installling a new wallet on your computer to find that there's already money in it!
|
|
|
|
Humanxlemming
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 04:52:21 PM |
|
Here's the thread I was looking for in which theymos describes the entropy: https://bitcointalk.org/index.php?topic=109092.0Last time I checked, Bitcoin used: - Microsecond time. - GUI events - /dev/urandom if available - HKEY_PERFORMANCE_DATA on Windows So essentially 3 different random things. And even if the user isn't utilizing the GUI (a server instance, for example), the OS-specific ones (urandom and HKEY_) are sufficiently removed from the microsecond time as to be unreproducible, AFAIK. Got to love the guy that invented bitcoin wallet generation ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) no homo :|
|
|
|
|
flatfly
Legendary
Offline
Activity: 1092
Merit: 1016
760930
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 05:42:25 PM |
|
This question needs to be addressed by developers of each wallet. I looked through some of the code for the Electrum wallet, and it appears to use the Python random number generator. I could be wrong, but that would create even a smaller pool of Electrum wallet 'seeds'. Imagine installling a new wallet on your computer to find that there's already money in it!
Are you sure? IIRC, Electrum uses the OpenSSL RNG, not Python.
|
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 05:46:18 PM |
|
Here's the thread I was looking for in which theymos describes the entropy: https://bitcointalk.org/index.php?topic=109092.0Last time I checked, Bitcoin used: - Microsecond time. - GUI events - /dev/urandom if available - HKEY_PERFORMANCE_DATA on Windows So essentially 3 different random things. And even if the user isn't utilizing the GUI (a server instance, for example), the OS-specific ones (urandom and HKEY_) are sufficiently removed from the microsecond time as to be unreproducible, AFAIK. This answer is for the Satoshi client. But the answer does show the point that the number of addresses from which the Satoshi client chooses, when it chooses a bitcoin address, is far less than the 10^38 degrees of entropy possible in the final bitcoin addresses. This question needs to be addressed by developers of each wallet. I looked through some of the code for the Electrum wallet, and it appears to use the Python random number generator. I could be wrong, but that would create even a smaller pool of Electrum wallet 'seeds'. Imagine installling a new wallet on your computer to find that there's already money in it! Can you show some maths to support your degrees of entropy claim? I don't think you're wrong, I just want to see a more exact estimate.
|
|
|
|
zefiris
Newbie
Offline
Activity: 4
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 07:06:31 PM |
|
Yes, using a normal random generator would indeed be insecure. Luckily, cryptographic random number generators have been developed specifically to avoid this problem. They typically use inputs like mouse movement and keyboard key presses, which are not deterministic, to generate the numbers.
|
|
|
|
greyhawk
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 13, 2013, 09:06:30 PM |
|
Wasn't one of the vanity wallet generators shut down because the wallets being generated ended up not being random at all?
|
|
|
|
SnowDog2003 (OP)
Jr. Member
Offline
Activity: 41
Merit: 1
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 14, 2013, 12:27:18 AM |
|
Can you show some maths to support your degrees of entropy claim? I don't think you're wrong, I just want to see a more exact estimate.
My 3.4 x 10^38 number is the number of combinations possible by which the Electrum deterministic 12 word seed can be ordered. The Electrum 12 words are picked out of a dictionary of 1626 seeds. So the total possible number is 1626^12, or possibly 1626! / (1626-12)!, depending on if you can reuse the words in the seed. I was wrong in attributing this number to the Satoshi client.
|
|
|
|
|