<p>No, because you need the private key to spend the bitcoins. The chance you guess a private key is really, really, really small. </p>

<p>The amount of private keys is 64^16, which is 7.9228163*10^28. Written down this number looks this way:</p>

<p>79,228,163,000,000,000,000,000,000,000</p>

<p>Just to put this number into perspective, the US debt at this moment is:</p>

<p>17,193,871,000,000 $</p>

<p>If you would be able to guess and check 100 million private keys every day, it would take you (64^16)/100,000,000=7.9228163*10^20 days, which is 2.1706346*10^18 years. That is 2,170,634,600,000,000,000 years.</p>

<p>The approximate age of the earth is estimated at about 4.54*10^9 years, which is 4,540,000,000 years.</p>

CC BY-SA 3.0
2015-01-27T21:16:10.060Z
I don't think your numbers are right.  64^16 = 2^96.  A private key is a 256-bit integer, so the number of private keys is 2^256, or 1.1*10^77 - *way* bigger than you said.  An address is a 160-bit hash of a public key, so there are 2^160 or 1.4*10^48 possible addresses.  The time you estimate to find a key, while it is large, is still about 19 orders of magnitude too small!
Nate Eldredge
CC BY-SA 4.0
2019-02-22T22:24:26.057Z
Related http://i.imgur.com/gUpaqXY.jpg
PW Kad
CC BY-SA 4.0
2013-11-24T21:39:57.477Z
2019-02-22T04:53:26.587Z
2019-02-22T04:53:26.587Z
Bob
<p>It's not humans communicating in the bitcoin network, it's the clients they are using. If a client doesn't do what its user tells it to there's nothing you can do about it. In this case, using "compromised" addresses as you suggested is one way of scamming, stealing small amounts of coins from time to time could be a more subtle one.</p>

<p>Therefore to be safe, you need to trust your client not to be manipulated. Some safety precautions could be:</p>

<ul>
<li>Use an open source client</li>
<li>Download it from a trusted source over a secured connection</li>
<li>Make sure you downloaded the right file by comparing its hash with an signed, official one (see <a href="https://multibit.org/blog/2013/07/24/how-to-check-signatures.html" rel="nofollow">instructions</a> for multibit, should be similar for other wallets)</li>
<li>Keep your system safe (malicious software could replace the client with a modified version)</li>
</ul>

CC BY-SA 3.0
2013-11-24T22:53:38.540Z
2013-11-24T23:39:58.127Z
2013-11-24T23:39:58.127Z
jnnk
<p>Each time you start bitcoin-qt.exe program will generate new random address</p>

<p>But what happen if I modify source code and compile new version:</p>

<ul>
<li>instead of new random address I can hard code in source code address which already exist on the network with BTC on it ( for example <a href="http://blockchain.info/address/1933phfhK3ZgFQNLGSDXvqCn32k2buXY8a" rel="nofollow">http://blockchain.info/address/1933phfhK3ZgFQNLGSDXvqCn32k2buXY8a</a> )</li>
</ul>

<p>After I sync "new" wallet with the chain I can retrieve all BTC on it</p>

<ul>
<li>to do the same I can also modify RANDOM generator source code to generate any address which already exist on the network with BTC on it as above</li>
</ul>

<p>So the question is:</p>

<p>It's possible to modify source code, compile to EXE and generate THAT way existing BTC address with private keys inside wallet.dat (I believe that private keys are created FROM BTC address by bitcoin-qt.exe) to steal the money</p>

CC BY-SA 3.0
2013-11-24T22:04:02.733Z
white-hat question? are you trying to find possible attack vectors so that the community can help fix those bugs.
Jonas Oestman
CC BY-SA 3.0
2013-11-25T00:37:56.300Z
You have it the wrong way around.  Private keys are not created from addresses.  In fact, addresses are created from private keys, and in a manner that's designed to make it extremely difficult to reverse the process.
Nate Eldredge
<security>
Can I modify the source code of Bitcoin to generate addresses people have already used?
user9148
# Can I modify the source code of Bitcoin to generate addresses people have already used?

(Asked by: username_0 on 2013-11-24)

Each time you start bitcoin-qt.exe program will generate new random address

But what happen if I modify source code and compile new version:

* instead of new random address I can hard code in source code address which already exist on the network with BTC on it ( for example <http://blockchain.info/address/1933phfhK3ZgFQNLGSDXvqCn32k2buXY8a> )

After I sync "new" wallet with the chain I can retrieve all BTC on it

* to do the same I can also modify RANDOM generator source code to generate any address which already exist on the network with BTC on it as above

So the question is:

It's possible to modify source code, compile to EXE and generate THAT way existing BTC address with private keys inside wallet.dat (I believe that private keys are created FROM BTC address by bitcoin-qt.exe) to steal the money

**Tags:** security

> **Comments:**
> **username_1**: white-hat question? are you trying to find possible attack vectors so that the community can help fix those bugs.  
> **username_2**: You have it the wrong way around.  Private keys are not created from addresses.  In fact, addresses are created from private keys, and in a manner that's designed to make it extremely difficult to reverse the process.  

---

## 2 answers

### Answer by username_3 on 2013-11-24. Score: 2

No, because you need the private key to spend the bitcoins. The chance you guess a private key is really, really, really small.

The amount of private keys is 64^16, which is 7.9228163\*10^28. Written down this number looks this way:

79,228,163,000,000,000,000,000,000,000

Just to put this number into perspective, the US debt at this moment is:

17,193,871,000,000 $

If you would be able to guess and check 100 million private keys every day, it would take you (64^16)/100,000,000=7.9228163\*10^20 days, which is 2.1706346\*10^18 years. That is 2,170,634,600,000,000,000 years.

The approximate age of the earth is estimated at about 4.54\*10^9 years, which is 4,540,000,000 years.

> **Comments:**
> **username_2**: I don't think your numbers are right.  64^16 = 2^96.  A private key is a 256-bit integer, so the number of private keys is 2^256, or 1.1*10^77 - *way* bigger than you said.  An address is a 160-bit hash of a public key, so there are 2^160 or 1.4*10^48 possible addresses.  The time you estimate to find a key, while it is large, is still about 19 orders of magnitude too small!  
> **username_4**: Related http://i.imgur.com/gUpaqXY.jpg  

---

### Answer by username_5 on 2013-11-24. Score: 0

It's not humans communicating in the bitcoin network, it's the clients they are using. If a client doesn't do what its user tells it to there's nothing you can do about it. In this case, using "compromised" addresses as you suggested is one way of scamming, stealing small amounts of coins from time to time could be a more subtle one.

Therefore to be safe, you need to trust your client not to be manipulated. Some safety precautions could be:

* Use an open source client
* Download it from a trusted source over a secured connection
* Make sure you downloaded the right file by comparing its hash with an signed, official one (see [instructions](https://multibit.org/blog/2013/07/24/how-to-check-signatures.html) for multibit, should be similar for other wallets)
* Keep your system safe (malicious software could replace the client with a modified version)


---

