Is it possible to continuously create new wallets until you “create” an already existing wallet

private-keypublic-keywallets

This question is inspired after reading How are ethereum addresses generated?

This is the section of interest

There are three main steps to get from private -> address:

  1. Create a random private key (64 (hex) characters / 256 bits / 32 bytes)
  2. Derive the public key from this private key (128 (hex) characters / 512 bits / 64 bytes)
  3. Derive the address from this public key. (40 (hex) characters / 160 bits / 20 bytes)

From this simplified explanation, it seems that if you create a random private key that someone previously generated, you would be able to gain access to their account. This is clearly not the case since many accounts have been created and I have never heard of this happening. So, what exactly am I missing here?

Best Answer

Everything is about probably of collision to happen. Fast answer, no you can't find a collision by chance (an existing randomly generated private key) as the probability is far too small.

See this Reddit thread where people give some comparisons of the numbers and probability to find one by chance.

The entire cryptographic world, almost every robust cryptographic algorithm ever written in computer code, relies on pure chance to avoid key collisions. The key space is simply chosen to be large enough to make collisions unlikely before the heat death of the universe. But unlikely is not the same as impossible. It's not something I'm worried about at all but I've always found it fascinating.

An interesting non technical article for you could be https://www.wired.com/story/blockchain-bandit-ethereum-weak-private-keys/

the odds of guessing a randomly generated Ethereum private key is 1 in 115 quattuorvigintillion. (Or, as a fraction: 1/2256.) That denominator is very roughly around the number of atoms in the universe. Bednarek compares the task of identifying a random Ethereum key to choosing a grain of sand on a beach, and later asking a friend to find that same grain among a "billion gazillion" beaches.

But note that even not by chance, even if you try hard to find one, it would take you so much time that you would be dead long before even having as much chance to find one than for the entire humanity to find a winning lottery number at the same time.