How likely is it that someone could guess your Bitcoin private key? (2024)

There are 2¹⁶⁰ possible Bitcoin addresses out there. And yes, that is a lot.
1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976 to be precise…

So if you wanted to get reassurance that you don’t need to panic sell your precious HODL’ed bitcoins, then I can tell you “Hakuna Matata”. No need to worry.

I found the answer on the Bitcoin wiki about the (un)likeliness of hash collisions not very satisfactory…

Because the space of possible addresses is so astronomically large it is more likely that the Earth is destroyed in the next 5 seconds, than that a collision occur in the next millenium.

Large numbers are fascinating, but there must be a better way to quantify the risk someone would randomly guess your Bitcoin private key. After all, computing power rises exponentially, so is it really correct to assume this will not happen in the foreseeable future?

“There are more Bitcoin addresses than atoms in the universe.”

There are an estimate 10⁸² atoms in the observable universe. That includes all galaxies and blackholes in a 46.5 billion light year radius. Even though it sounds plausible that there are more Bitcoin addresses than atoms in the universe, after all 2¹⁶⁰ sounds larger than 10⁸², the statement is in fact very wrong. It just illustrates how bad the human brain is at imagining vast numbers.

When writing out 10⁸² it becomes a little bit more visible

10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

There are ~ 6.8 *10³³ less Bitcoin addresses than atoms in the universe. But again it is difficult to imagine how much less. Written in full, it might become a bit more clear : 6,842,277,657,836,020,854,119,773,355,907,794. But let’s face it, big numbers are hard to imagine.

To avoid being deceived when comparing large numbers it helps to express them on the same base : 2¹⁶⁰ =10^(log2)*160 ~10⁴⁸. Comparing the amount of Bitcoin addresses to the size of the universe does not really help to appreciate how large a number 2¹⁶⁰ really is.

Let’s imagine a lot of sand… 2¹⁶⁰ grains to be precise

For arguments’ sake, the other popular statement “there are more bitcoin addresses than grains of sand on earth” is indeed true. There is an estimated 2⁶³ (~ 9.2*10¹⁸) grains of sand on earth, so for each grain of sand there are 2⁹⁷ (~1.5*10²⁹) bitcoin addressess. Well that doesn’t make it much easier to imagine now, does it? Let’s try it in a different way.

Imagine you’re walking on a beautiful beach and you’re watching all those grains of sand. Now imagine all the grains of sand on the entire coastline, even those under the water, for as far as you can see . This is not even close to where we’re heading. Imagine you zoom out from where you’re standing to imagine all the sand from all beaches in the country, the continent and eventually the entire planet.

Now line up all these grains of sand in an endless row and imagine each grain of sand is an entire new earth with the same amount of grains of sand. Since earth has a radius of 6,371km, this row would be 3.1*10²¹ light years long. The observable universe has a diameter of 93 billion light years, so this row of earths would stretch 33.5 billion times the entire diameter of the observable universe.

Are we getting close? Not really… We now have reached 2⁶³ * 2⁶³= 2¹²⁶. This amount of sand would still only be 0.0000000058% of the amount of Bitcoin addresses in existence. The remaining part a factor of 2³⁴ (2¹³⁶*2³⁴ = 2¹⁶⁰). This would correspond to the surface of a square with a length of 2¹⁷ earths (131,072) stacked next to each other. This is ~11 times the distance between the earth and the sun.

So there we have it. The amount of possible bitcoin addresses would correspond to the amount of sand grains in a square of 131,072 x 131,072 earths next to each. One edge of this square would cover the distance between the earth and the sun ~11 times. Then stacking this square of earths on top of each other to reach 33.5 billion times the lenght of the entire observable universe. That’s the closest I could come to imagine how to visualize the vast amount of possible Bitcoin addresses out there.

I don’t know about you, but I actually enjoyed trying to visualize how astronomically large 2¹⁶⁰ really is. Maybe it’s because I like spending time on the beach…

How likely is it that someone could guess your Bitcoin private key? (3)

How safe is your bitcoin address?

The risk of someone finding the private key of a wallet which contains any Bitcoin will depend mainly on two things : how many wallets with bitcoin exist and how many wallets can be generated in a reasonable time.

In February 2020 there were a reported 615,463,205 Bitcoin addresses with a non-zero balance. Since there will only be a total of 21 million Bitcoins each consisting of 10⁸ satoshis, the absolute maximum of addresses that can contain any Bitcoin at the same time is 2.1*10¹⁵. This is about 29 million times more than addresses currently in use.

For the sake of argument let’s assume this worst case scenario. The highest possible amount of Bitcoin addresses that can each contain 1 satoshi is 2.1*10¹⁵. This is 4392 times less than the amount of sand on earth.

Since the surface area of earth is 510 million km2, 1/4392th would be 116,120 km2. This is more or less equivalent to the surfce area of Greece (131,057 km2)

So the probability of finding a bitcoin address with 1 satoshi in a perfectly distributed situation, would be equivalent to the amount of sand in Greece on 1 of those earths in the vast beam of earths that streches 33.5 billion times the observable universe.

Now since you probably have only 1 or 2 bitcoin addresses with a substantial amount, the chances of someone randomly guessing the private key to your address, would be equivalent to finding 1 specific grain of sand.

Extremely unlikely.

… but wait, there is Moore !

Ok, bad joke. But I genuinly wondering with all the computing power we have right now which is growing exponentially, how safe are we really from someone accidentally stumbling on your unique grain(s) of sand?

The total hashrate of the entire BTC network stands right now at 144 EH/s = 144*10⁶ TH/s = 144*10¹⁸ H/s. Let’s assume that this is the rate at which bitcoin addresses can be generated and checked if they have a balance or not. In reality this will be a lot slower, because bitcoin uses a double hash and the checking of the balance also will take a bit of time. But anyway, let’s see where this would take us.

The approach to calculate the probability of any search generated key in an address containing bitcoin would be to assume we have a large bucket of sand with white and black grains. Each white grain represents an address with balance (max 2.1*10¹⁵) and each black grain represents a possible address (2¹⁶⁰).

Let’s calculate how many attemps would be needed to have a 10% change of finding at least 1 white grain of sand (address with a balance). This can be expressed as :

probability of finding at least one white grain
= 1- (probability of finding a black grain)^(number of attempts)

probability of finding a black grain
= 1 - #addresses with non-zero balance / # max number of addresses
= 1- (2.1*10¹⁵ / 2¹⁶⁰)
= 0.9999999999999999999999999999999986

10% probability of finding a white grain means(probability of finding a black grain)^(number of attempts) = 0.9

number of attempts = log(0.9) / log( 0.9999999999999999999999999999999986 ) = 7.52575E+31

Assuming all bitcoin miners in the world would start to generate addresses at a hashrate of 144*10¹⁸ H/s it would take about 16572 years to have a 10% chance of finding 1 address with 1 satoshi.

Using the same principle, finding the key of 1 particular address would a bit longer. It would take 4882 billion billion billion billion years for a 10% chance to find 1 specific key.

How likely is it that someone could guess your Bitcoin private key? (4)

Moore’s law states computing power doubles every 18 months. The fastest miner currently achieves a hashrate of ~100TH/s. Let’s assume the hashrate increases another 100 fold in the next 10 years bringing it to 10000 TH/s. And now lets assume population has grown to 10 billion people and we give each person 1000 of these miners. This would bring the global hashrate to approximately 10²⁹ H/s.

How long would it take to find 1 address with 1 satoshi?

10% probability to find at least one address would take ~12 minutes
90% probability to find at least one address would take ~4.5 hours

Well there we have it. But then again this last scenario isn’t going to happen anytime soon. The current electricity computer of all bitcoin miners combined adds up to the power of ~7 nuclear power plants. Assuming the energy efficiency for the hashrate gets a 1000x more efficient, the above scenario would still require ~4.8 million nuclear powerplants each generating 1 GW.

Moreover, it would be far far easier if this were to become reality to fork bitcoin to an enhanced protocol using a different hash function bringing it for instance to 2²⁵⁶ …

How random is random?

One major consideration I do need to mention is the randomness of random. If the private key to derive the bitcoin address from is not purely random but only covers a subset of the 2¹⁶⁰ possible combinations, the probability of collissions would dramatically increase. Obviously simple passphrases like sha-256(‘bitcoin’) would be very easy to find.

To illustrate it you can try it.

from hashlib import sha256
passphrase = 'bitcoin'
sha256(passphrase.encode('utf-8')).hexdigest()
>>>6b88c087247aa2f07ee1c5956b8e1a9f4c7f892a70e324f1bb3d161e05ca107b

If you generate a bitcoin address from this private key you get the address 1E984zyYbNmeuumzEdqT8VSL8QGJi3byAD … and yes this address is empty but it has been used in the past and we all have access to it.

How likely is it that someone could guess your Bitcoin private key? (5)

Conclusion

The cryptography of Bitcoin is extermely strong. You can rest assured that if your Bitcoins are stored on a secure hardware wallet, the chances that they get stolen through a random guess of your private key is close zero.

Close to… but not absolute zero.

The question is also how random is random, so maybe not all addresess in the 2¹⁶⁰ address space can be generated by current software.

If you have a large amount of Bitcoin, I would consider to split it over more than one wallet with independent private keys.

You never know…

happy HODL’ing.

Note — if you spot any errors, please share them in the comments and I’d be happy to correct them. If you would like to try the calculations on your own I used this online calculator.

Join Coinmonks Telegram Channel and Youtube Channel get daily Crypto News

Also, Read

How likely is it that someone could guess your Bitcoin private key? (2024)

FAQs

How likely is it that someone could guess your Bitcoin private key? ›

The probability of guessing a valid Bitcoin private key is 1 in 2²⁵⁶. Said like that, it might seem like a relatively simple task. But you might be very surprised to learn how futile such an attempt would be.

What are the odds of guessing a Bitcoin private key? ›

The Bitcoin private key is a 256-bit number, which means there are 2^256 possible combinations. This number is so large that it is considered practically impossible to guess a private key by brute force methods.

Can someone guess a Bitcoin private key? ›

Is it possible for someone to guess a private key to a Bitcoin wallet and steal the coins? Yes, it is possible. Though, very and very unlikely. Computational process to derive a single key pair is demanding.

How safe is Bitcoin private key? ›

Anyone who knows your private key can access your bitcoins, so it is very important to keep it safe. You can do this by storing it offline, using a hardware wallet, or a paper wallet. You should never share your private key with anyone.

Is it possible to crack a Bitcoin private key? ›

The security mechanisms of Bitcoin, from its private keys to the blockchain network, are designed to offer robust protection against hacking and cracking attempts. While the theoretical possibility of hacking a Bitcoin private key exists, the practicality of such an endeavor is virtually nil with current technology.

Is it possible to find Bitcoin private key? ›

It is not possible for bitcoind to know the private key from the address unless they are both stored in the wallet. Tip: The dumpprivkey command does not generate a private key from an address, as this is impossible.

How do I sweep my private key Bitcoin? ›

Tap the three vertical dots on the top right of the toolbar and then tap Sweep Private Key. This will launch the sweep camera. Focus the camera onto the QR code of the private key until it scans. If the private key is encrypted with a password you will be prompted to enter the password before being able to continue.

What happens if a BTC private key is lost? ›

Your crypto assets are distributed across a network of computers via blockchain technology. So losing a PIN isn't a disaster because a bank can provide a new one, but losing a private key means you won't be able to access your cryptocurrencies forever. Many cryptocurrencies are lost because of simple mistakes.

How many Bitcoin private keys are possible? ›

A private key is a 256-bit number. This means that it is represented in binary in 256 numbers of 0 or 1. In total, this means there are a total of (almost) 2^256 combinations of private keys. This number can also be expressed as 10^77 for simplicity.

Has a seed phrase ever been guessed? ›

To guess your seed phrase, you not only need 12 correct words. You will also need to put them in the correct order. With a current, most up-to-date computer, it will take a few billion years to find that combination.

What are the risks of private key? ›

Stolen Private Keys

Intruders can use stolen keys to impersonate users, access sensitive data, and take total control of a system. They also allow attackers to press lateral movement attacks and move onto other systems quickly and quietly.

How much does a private key cost? ›

How much does it cost to get a private key for Bitcoin (BTC)? You do not need the key to receive bitcoins, but you must have the key associated with the address to spend the coins (send them to another address). creating a private/public key and bitcoin address is free. any wallet provides that function.

Should I write down my private key? ›

This way, you hold the keys yourself, so you'll always have control over your crypto and access to your own funds. The most basic way of doing this would be to have a paper wallet – where you write down the keys on a piece of paper, laminate it, and guard it with your life.

How hard is it to guess a Bitcoin private key? ›

The probability of guessing a valid Bitcoin private key is 1 in 2²⁵⁶. Said like that, it might seem like a relatively simple task. But you might be very surprised to learn how futile such an attempt would be.

How long does it take to guess a private key? ›

This number is so large that it is considered practically impossible to guess a private key by brute force methods. To put it into perspective, even if you had a computer that could generate a billion keys per second, it would still take approximately 3.671 x 1057 years to guess a single private key.”

How hard is it to brute force a private key? ›

In order to brute force a specific Bitcoin private key, an attacker would have to guess each of the 256 bits correctly, and since each bit has two possible values (1 or 0), the attacker must guess from a range of 2^256 (roughly 10^77) possible values.

What are the chances of someone guessing my seed phrase? ›

With this number of words, there are 2,048 to the power of 12 (more than a decillion) possible seed phrase combinations, which is such a large number that the odds of someone guessing your phrase are almost zero.

What is the value of a private key in Bitcoin? ›

In Bitcoin, a private key in standard format is simply a 256-bit number, between the values: 0x01 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140, representing nearly the entire range of 2256-1 values.

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5931

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.