Post
Topic
Board Development & Technical Discussion
Merits 4 from 1 user
Re: Private keys, Public Keys and Bitcoin Addresses
by
fbueller
on 18/05/2016, 01:38:35 UTC
⭐ Merited by ABCbits (4)
When I send you money, I am only sending it to a Bitcoin address; I don't know your public key.

I know that.

Any public key that hashes to that Bitcoin address can spend the money.

But this is wrong. The public key is provided in the scriptSig, and that's what signatures are checked against. It's also how the hash is checked in the first place.

You can find a public key that collides with the hash, and pass the first part of a p2pkh script. If the hash passes, all that's left is OP_CHECKSIG, which still wouldn't pass with the dodgy key.