Post
Topic
Board Beginners & Help
Re: Collisions on private addresses? Balances?
by
nc50lc
on 30/06/2022, 03:23:39 UTC
Hi, is the hash 160 for legacy addresses?
Yes, it's one of the address type that uses "HASH160" or RIPEMD160[SHA256(PubKey)] for P2PKH.
P2SH also uses HASH160 of the redeem script to derive the address, P2WPKH also uses it, the rest of the steps are just difference in encoding.
So when pointlessly bruteforcing addresses, you can derive all those address types from each 160bit number result.

The figures above are quoted to cycle through the entire range of addresses from start to finish.
If I wrote a computer program that generates private btc addresses and then generated the public address,
There's no "private BTC address" and "public address".
Only "Private Key" and its "Public Key" pair, then the "Bitcoin address" generated from the public key.
It's a one way process "PrvKey->PubKey->Address", not the other way around.

As an analogy, let' use a "lock" and "key" scenario:
  • Let the "lock" be the HASH160.
  • Let the "key" be the Private Key.
  • In your scenario, your theoretical computer program cycles through all the "locks" which can only unlocked by the "key".
  • Even if you can generate all the locks, it's pointless since you can't unlock them without their keys.
  • So, if you want "collision", you need search through the keys which have an extremely larger search space than the locks.