<blockquote>
  <p>Is it possible for someone to “scavenge” for bitcoin by generating random key pairs and checking if the derived bitcoin address has any coins ?</p>
</blockquote>

<p>Yes.</p>

<blockquote>
  <p>Is this likely to be profitable at any time in the future?</p>
</blockquote>

<p>No.</p>

<p>The number of possible addresses is extremely massive, much much too large for the human brain to comprehend.</p>

<p>For starters, there are 2^160 possible P2PKH addresses. Then there are 2^160 possible P2SH addresses. There are also 2^160 possible P2WPKH addresses and 2^256 P2WSH addresses. This means that the current total address space is 3(2^160)+2^256. The probability that you would randomly choose generate an address that has Bitcoin associated with it is so small that it is basically zero.</p>

<p>If we were to assume that 100 billion addresses have Bitcoin associated with them or will be in the future (that's an extremely generous estimate), then the probability that you would be able to find one of those is 8.636 × 10^-67. This probability is so small and so unlikely that it will never be profitable or have any probability of an address collision ever occurring.</p>

CC BY-SA 3.0
2017-11-10T12:10:07.837Z
If bitcoin were to equal visas processing rate ( someday) ,it would consume 100 billion addresses in 579 days (100e9/(2000*3600*24) . Assume 1 trillion addresses and 2^96 possible private keys, the number of trials required to encounter any one used address is 2^96/1e12 =7.92e16 trials . The current bitcoin hashrate is 7.3e21 H/s . If that hashrate were diverted to scavenging bitcoin, it would find bitcoin in 1.08e-5 s for 1 trillion addresses and 1.08e-2 s for 1 billion addresses. Do we need to trust that the network will follow the honour code for miners?
Ashutossh
CC BY-SA 3.0
2017-11-10T15:17:25.787Z
Your math is wrong. There are 2^256 possible private keys, not 2^96, where did you get that number? Because of the hash functions used in Bitcoin, the 2^256 is reduced to 2^160 possible addresses. With 2^160 possible P2PKH addresses, it would require 1.46e36 trials, assuming that 1 trillion had Bitcoin. Using your hashrate number, it would actually take 2e14 seconds to find a collision. Lastly, hashrate is not directly convertible to generating addresses. Mining ASICs can only do one thing, sha256d. They cannot be converted to do anything else like searching addresses.
Ava Chow
CC BY-SA 3.0
2017-11-10T04:29:30.387Z
2017-11-10T04:29:30.387Z
Ava Chow
<p>The number of BIP39 addresses is close to 2^132. The current utxo set size is close to 60 mill. The number of trials required to encounter any one used address is 2^132/60e6 =9e31 trials. With current hashrate it would find bitcoin in 12.4 trillion seconds ~ 400 years to find non-empty address if the hashrate could be diverted to lookup the utxo set. </p>

CC BY-SA 3.0
2017-11-27T02:37:38.377Z
2017-11-27T02:37:38.377Z
Ashutossh
<p>As the number of transactions in the bitcoin network grows, the number of addresses with bitcoin will also grow. Is it possible for someone to “scavenge” for bitcoin by generating random key pairs and checking if the derived bitcoin address has any coins ? Is this likely to be profitable at any time in the future? 
Even if the profitability of this attack is low, it could impact confidence in the bitcoin network, if a few bitcoin were stolen in this manner. </p>

<address><security><private-key>
Querying UTXOs with random key pairs
Ashutossh
# Querying UTXOs with random key pairs

(Asked by: username_0 on 2017-11-10)

As the number of transactions in the bitcoin network grows, the number of addresses with bitcoin will also grow. Is it possible for someone to “scavenge” for bitcoin by generating random key pairs and checking if the derived bitcoin address has any coins ? Is this likely to be profitable at any time in the future?
Even if the profitability of this attack is low, it could impact confidence in the bitcoin network, if a few bitcoin were stolen in this manner.

**Tags:** address, security, private-key


---

## 2 answers

### Answer by username_1 on 2017-11-10. Score: 3

> Is it possible for someone to “scavenge” for bitcoin by generating random key pairs and checking if the derived bitcoin address has any coins ?

Yes.

> Is this likely to be profitable at any time in the future?

No.

The number of possible addresses is extremely massive, much much too large for the human brain to comprehend.

For starters, there are 2^160 possible P2PKH addresses. Then there are 2^160 possible P2SH addresses. There are also 2^160 possible P2WPKH addresses and 2^256 P2WSH addresses. This means that the current total address space is 3(2^160)+2^256. The probability that you would randomly choose generate an address that has Bitcoin associated with it is so small that it is basically zero.

If we were to assume that 100 billion addresses have Bitcoin associated with them or will be in the future (that's an extremely generous estimate), then the probability that you would be able to find one of those is 8.636 × 10^-67. This probability is so small and so unlikely that it will never be profitable or have any probability of an address collision ever occurring.

> **Comments:**
> **username_0**: If bitcoin were to equal visas processing rate ( someday) ,it would consume 100 billion addresses in 579 days (100e9/(2000*3600*24) . Assume 1 trillion addresses and 2^96 possible private keys, the number of trials required to encounter any one used address is 2^96/1e12 =7.92e16 trials . The current bitcoin hashrate is 7.3e21 H/s . If that hashrate were diverted to scavenging bitcoin, it would find bitcoin in 1.08e-5 s for 1 trillion addresses and 1.08e-2 s for 1 billion addresses. Do we need to trust that the network will follow the honour code for miners?  
> **username_1**: Your math is wrong. There are 2^256 possible private keys, not 2^96, where did you get that number? Because of the hash functions used in Bitcoin, the 2^256 is reduced to 2^160 possible addresses. With 2^160 possible P2PKH addresses, it would require 1.46e36 trials, assuming that 1 trillion had Bitcoin. Using your hashrate number, it would actually take 2e14 seconds to find a collision. Lastly, hashrate is not directly convertible to generating addresses. Mining ASICs can only do one thing, sha256d. They cannot be converted to do anything else like searching addresses.  

---

### Answer by username_0 on 2017-11-27. Score: 0

The number of BIP39 addresses is close to 2^132. The current utxo set size is close to 60 mill. The number of trials required to encounter any one used address is 2^132/60e6 =9e31 trials. With current hashrate it would find bitcoin in 12.4 trillion seconds ~ 400 years to find non-empty address if the hashrate could be diverted to lookup the utxo set.


---

