Author

Topic: Is it possible to generate existing BTC private & public key pair? (Read 902 times)

legendary
Activity: 1512
Merit: 1012
is it theoretically possible to generate a private key of an existing btc address ?

No.

Proof : https://www.youtube.com/watch?v=ZloHVKk7DHk
legendary
Activity: 4466
Merit: 3391
Here is another analogy:

There are approximately 1x1044 molecules of air in the atmosphere.
There are 1.46x1048 bitcoin addresses.

Suppose I pick a single molecule of air and I generate a single bitcoin address. If you also pick a molecule of air and generate a bitcoin address, you are 15000 times more likely to pick the same molecule than to generate the same bitcoin address.
legendary
Activity: 4466
Merit: 3391
Here is another analogy:

There are around 5x1046 water molecules on the earth (1.4x1021 liters according to the USGS)
There are 1.46x1048 bitcoin addresses.

Suppose I pick a single water molecule somewhere on the earth and I generate a single bitcoin address. If you also pick a water molecule and generate a bitcoin address, you are 30 times more likely to pick the same water molecule than to generate the same bitcoin address.
full member
Activity: 134
Merit: 100
That would be REALLY, REALLY hard to do, but not impossible. Danny's post explains it all. It's really hard to happen.
sr. member
Activity: 364
Merit: 250
is it theoretically possible to generate a private key of an existing btc address ?

That really depends on what you mean when you say "possible", and how the existing BTC address was generated.  As long as the private key for the BTC address was generated from a sufficiently random source, nobody else is ever going to generate the same number.  If the private key was generated fro something without enough entropy such as a person choosing a password, or faulty random number generating software, then it becomes much more likely that the same private key could be generated.

the private key is basically just a random 256bit number,

This is true.  However, as jordant and Amph have both attempted to explain...

2256 is a VERY big number.  Much bigger than most people are able to comprehend.  The odds of generating the same random 256 bit number as someone else isn't just small, it's astronomically small.  It's so small that any reasonable person would consider it impossible.

so if I'd know that number I could just create a new private key in WIF form, from which I'd create public key and btc address,

Yes.  This is wy it is very important to keep your private keys secure.  If anyone else gains access to your private keys, then they can spend or steal your bitcoins.

or is there something more to this and one 256bit number can have multiple public keys and btc addresses?

So, while there is only a 1 in 2256 chance of generating the exact same private key as was originally used to create the P2PKH address, there is actually a 1 in 2160 chance of generating any 1 of the 296 different private keys that can all be used to spend bitcoins that are received at that address.

Fortunately, while not nearly as big of a number as 2256, 2160 is still a VERY big number.  Big enough that there shouldn't be any concern of anyone generating any of the private keys as long as the private key is originally generated from a random enough source.
i didnt know bitcoin addresses can have multiple private keys, i always thought it was oner per address lol. thanks for the info.
hero member
Activity: 532
Merit: 500
In the matrix we would call this an anomaly which is of course possible.

Yes, yes... it is possible for you to generate the same address as someone else... But I mean.. so is time travel..   Cool
legendary
Activity: 1862
Merit: 1004
I will use metaphor to answer this: It is 100% certain from scientific point of view that there are life in universe somewhere. But did you see the aliens?
It is the same with BTC public and private keys.
legendary
Activity: 1512
Merit: 1000
Theoretically possible, but damn hard to get it done in practice. So I'd say at the current commercially available technical level it's nearly impossible.
legendary
Activity: 2294
Merit: 1182
Now the money is free, and so the people will be
the number of possibilities is TOO damn high !
sr. member
Activity: 266
Merit: 250
Grow SMALL amount of BTC by earning it
that number is certanly impressive but there are more atom in the universe than the possible private key, so this lead me to think that in a very distant future sha256 will be broken

for the OP... it was asked already and it is not possible
SHA256 is already broken.
There is currently no weakness in SHA256 and ECDSA. SHA1 however, is weak and has collisions. Private keys can be calculated if quantum computing can break ECDSA. This means that private keys can be derived from public key. Public keys are broadcasted with a transaction. This isn't a huge threat since a fork can be done easily.
legendary
Activity: 3472
Merit: 4801
is it theoretically possible to generate a private key of an existing btc address ?

That really depends on what you mean when you say "possible", and how the existing BTC address was generated.  As long as the private key for the BTC address was generated from a sufficiently random source, nobody else is ever going to generate the same number.  If the private key was generated from something without enough entropy such as a person choosing a password, or faulty random number generating software, then it becomes much more likely that the same private key could be generated.

the private key is basically just a random 256bit number,

This is true.  However, as jordant and Amph have both attempted to explain...

2256 is a VERY big number.  Much bigger than most people are able to comprehend.  The odds of generating the same random 256 bit number as someone else isn't just small, it's astronomically small.  It's so small that any reasonable person would consider it impossible.

so if I'd know that number I could just create a new private key in WIF form, from which I'd create public key and btc address,

Yes.  This is wy it is very important to keep your private keys secure.  If anyone else gains access to your private keys, then they can spend or steal your bitcoins.

or is there something more to this and one 256bit number can have multiple public keys and btc addresses?

If we are talking about P2PKH bitcoin addresses (the addresses that start with a "1"), then a single private key can actually be used for two different bitcoin addresses.  When converting the random number into WIF, you can choose compressed or uncompresses.  Compressed will result in a different address than uncompressed.  Once you have the private key in WIF, there is only 1 bitcoin address associated with that key.

Note that the opposite is not true.

There are 2256 different private keys.  However, P2PKH bitcoin addresses are a representation of a 2160 bit hash.  This means that an address can have multiple private keys.  If we divide the total number of keys by the total number of possible addresses we find that:

2256 / 2160 = 296

On average each possible P2PKH bitcoin address has 296 different private keys that can each spend any bitcoins that are received at that address.

So, while there is only a 1 in 2256 chance of generating the exact same private key as was originally used to create the P2PKH address, there is actually a 1 in 2160 chance of generating any 1 of the 296 different private keys that can all be used to spend bitcoins that are received at that address.

Fortunately, while not nearly as big of a number as 2256, 2160 is still a VERY big number.  Big enough that there shouldn't be any concern of anyone generating any of the private keys as long as the private key is originally generated from a random enough source.
full member
Activity: 238
Merit: 100
that number is certanly impressive but there are more atom in the universe than the possible private key, so this lead me to think that in a very distant future sha256 will be broken

for the OP... it was asked already and it is not possible
SHA256 is already broken.
legendary
Activity: 3248
Merit: 1070
that number is certanly impressive but there are more atom in the universe than the possible private key, so this lead me to think that in a very distant future sha256 will be broken

for the OP... it was asked already and it is not possible
member
Activity: 90
Merit: 10
is it theoretically possible to generate a private key of an existing btc address ?

the private key is basically just a random 256bit number, so if I'd know that number I could just create a new private key in WIF form, from which I'd create public key and btc address, or is there something more to this and one 256bit number can have multiple public keys and btc addresses?
member
Activity: 101
Merit: 10
is it theoretically possible to generate a private key of an existing btc address ?

the private key is basically just a random 256bit number, so if I'd know that number I could just create a new private key in WIF form, from which I'd create public key and btc address, or is there something more to this and one 256bit number can have multiple public keys and btc addresses?
Jump to: