<blockquote>
  <p>If two people running vanitygen 1abcdefg What is the chance that both of the person will get the same public key &amp; private key?</p>
</blockquote>

<p>If a billion supercomputers each tried a billion keys per second for a billion years, the odds of a key collision would still be less than one in a billion.</p>

<blockquote>
  <p>I hope that the answer is less than 0.0000001.</p>
</blockquote>

<p>Yes, much less.</p>

<blockquote>
  <p>But for this vanigygen need to use random algorithm (not simple while(true){ i++; test()}).</p>
</blockquote>

<p>It just needs a random starting place. You can increment from there if you want to. The number of possible starting places has 77 digits when expressed in decimal notation.</p>

CC BY-SA 3.0
2016-07-27T13:01:01.183Z
How computer can get genreate random starting place, that have 77 digits...?
If it is just `new Date().valueOf()` it is not real random
Aminadav Glickshtein
CC BY-SA 3.0
2016-07-27T15:27:07.353Z
@Aminadav: You may want to read about [cryptographically secure pseudorandom number generators](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator).
Nate Eldredge
CC BY-SA 3.0
2016-07-27T16:12:55.180Z
@Aminadav This is a very well understood problem! Getting randomness right is hard and extremely important and the developers or crypto-currency software (at least, the competent ones) are *very* careful to get it right. Often sources of real physical randomness are used such as shot noise, microscopic zone temperature variations, and turbulent shear forces. (Real computers are not theoretically perfect machines, they meet the analog physical world in measurable ways.)
David Schwartz
CC BY-SA 3.0
2016-07-27T18:09:13.143Z
That my question if I can trust this open source software vanitygen. How the choose a random problem?  What is it based on?
Aminadav Glickshtein
CC BY-SA 3.0
2016-07-27T18:12:53.633Z
@nate. I have read the wiki. It tally about security. It doesn't explain how machine computer can Behar the forest initial state random number
Aminadav Glickshtein
CC BY-SA 3.0
2016-07-27T18:14:45.570Z
@Aminadav Vanitygen follows current best practices, including using the system's entropy pool on platforms that have one. The system's entropy pool mines physical randomness caused by things like jitter in the CPU clock signal caused by temperature variations in its quartz crystal. (Vanitygen didn't implement this themselves, that would have been foolish.)
David Schwartz
CC BY-SA 3.0
2016-07-27T18:24:32.290Z
@Aminadav It also uses multiple sources of randomness and an algorithm that ensures the result is as at least as strong as its *strongest* input. So you can mix in system memory information, disk timing, and all kinds of other things without fear that using too many weak sources will produce a weak result.
David Schwartz
CC BY-SA 3.0
2016-07-27T20:15:29.027Z
I have found that it is a real secret how those random number generators works.
But some people reverse engineer this:
https://en.wikipedia.org/wiki/CryptGenRandom#Method_of_operation
Aminadav Glickshtein
CC BY-SA 3.0
2016-07-27T12:42:03.870Z
2016-07-27T12:42:03.870Z
David Schwartz
<p>If two people running <code>vanitygen 1abcdefg</code> What is the chance that both of the person will get the same public key &amp; private key?</p>

<p>I hope that the answer is less than <code>0.0000001</code>. But for this <code>vanigygen</code> need to use random algorithm (not simple <code>while(true){ i++; test()}</code>).</p>

<p><strong>My question is:</strong> Usually when I create wallet, using <a href="http://bitaddress.org" rel="nofollow">http://bitaddress.org</a> I need to <em>Move your mouse around to add some extra randomness</em>, but <em>vanitgygen</em> do not do this method.</p>

<p>By inspecting the code of <code>vanitygen</code> in GitHub I see that they use random functions. Can I trust it? Is it really random? How it can be secure? Is it use the machine time or what?</p>

CC BY-SA 3.0
2016-07-27T08:22:35.023Z
http://bitcoin.stackexchange.com/questions/46538/vanity-generator/46540#46540
hartmut
<wallet><security><private-key><vanity-address><random>
The randomness of vanitygen is secure enough?
Aminadav Glickshtein
# The randomness of vanitygen is secure enough?

(Asked by: username_0 on 2016-07-27)

If two people running `vanitygen 1abcdefg` What is the chance that both of the person will get the same public key & private key?

I hope that the answer is less than `0.0000001`. But for this `vanigygen` need to use random algorithm (not simple `while(true){ i++; test()}`).

**My question is:** Usually when I create wallet, using <http://bitaddress.org> I need to *Move your mouse around to add some extra randomness*, but *vanitgygen* do not do this method.

By inspecting the code of `vanitygen` in GitHub I see that they use random functions. Can I trust it? Is it really random? How it can be secure? Is it use the machine time or what?

**Tags:** wallet, security, private-key, vanity-address, random

> **Comments:**
> **username_1**: http://bitcoin.stackexchange.com/questions/46538/vanity-generator/46540#46540  

---

## 1 answers

### Answer by username_2 on 2016-07-27. Score: 2

> If two people running vanitygen 1abcdefg What is the chance that both of the person will get the same public key & private key?

If a billion supercomputers each tried a billion keys per second for a billion years, the odds of a key collision would still be less than one in a billion.

> I hope that the answer is less than 0.0000001.

Yes, much less.

> But for this vanigygen need to use random algorithm (not simple while(true){ i++; test()}).

It just needs a random starting place. You can increment from there if you want to. The number of possible starting places has 77 digits when expressed in decimal notation.

> **Comments:**
> **username_0**: How computer can get genreate random starting place, that have 77 digits...? If it is just `new Date().valueOf()` it is not real random  
> **username_3**: @username_0: You may want to read about [cryptographically secure pseudorandom number generators](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator).  
> **username_2**: @username_0 This is a very well understood problem! Getting randomness right is hard and extremely important and the developers or crypto-currency software (at least, the competent ones) are *very* careful to get it right. Often sources of real physical randomness are used such as shot noise, microscopic zone temperature variations, and turbulent shear forces. (Real computers are not theoretically perfect machines, they meet the analog physical world in measurable ways.)  
> **username_0**: That my question if I can trust this open source software vanitygen. How the choose a random problem?  What is it based on?  
> **username_0**: @username_3. I have read the wiki. It tally about security. It doesn't explain how machine computer can Behar the forest initial state random number  
> **username_2**: @username_0 Vanitygen follows current best practices, including using the system's entropy pool on platforms that have one. The system's entropy pool mines physical randomness caused by things like jitter in the CPU clock signal caused by temperature variations in its quartz crystal. (Vanitygen didn't implement this themselves, that would have been foolish.)  
> **username_2**: @username_0 It also uses multiple sources of randomness and an algorithm that ensures the result is as at least as strong as its *strongest* input. So you can mix in system memory information, disk timing, and all kinds of other things without fear that using too many weak sources will produce a weak result.  
> **username_0**: I have found that it is a real secret how those random number generators works. But some people reverse engineer this: https://en.wikipedia.org/wiki/CryptGenRandom#Method_of_operation  

---

