1

I understand how the checksum included in Bitcoin addresses can help prevent someone from sending coins to a wrong address. Or at least make it highly improbable.

And I read in answers to another question Stackoverflow about how compliant Bitcoin clients will verify the checksum and prevent you from sending to wrong addresses.

My question is, does a compliant mining software also perform this check when validating transactions?

Thanks!

2

No. The address in the format you're used to seeing it isn't encoded like that in the transaction.

When you send a Bitcoin transaction to someone, your wallet will verify that their address is formatted correctly by validating its checksum, then it decodes the public key hash or script hash that is encoded in the address, and this hash is what is included in the transaction output. The purpose of the address checksum is just to prevent typos; it is not included in the transaction itself.

4
  • Thank you!! I was in a presentation where they said when you send bitcoin you use addresses instead of public keys to prevent exposing public keys (apart from the error detection and easy of entry benefits) ...since a future quantum computer could derive private key from a public key. And for similar reasons after you send from an address, you move rest of the coins at that address to another address...since your public key is revealed when you send coins. Would you be able to comment to that, thanks! Also feel free to point me to any docs. Much appreciate the help :)
    – septerr
    Feb 7 at 2:53
  • 1
    @septerr Right! The actual public key is not revealed until you spend from that address. The address is just a hash of the public key along with a checksum. When you send to an address, your wallet decodes the address into the hash and its checksum, the checksum is stripped off after being validated and the hash itself is included in the transaction.
    – ieatpizza
    Feb 7 at 2:59
  • 2
    @septerr Here is an question/answer about the (IMO, alleged) benefits of hashing public keys: bitcoin.stackexchange.com/questions/95123/… Feb 7 at 3:02
  • thanks yall, that helped clear things up a lot!
    – septerr
    Feb 7 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.