<p>No. The address in the format you're used to seeing it isn't encoded like that in the transaction.</p>
<p>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.</p>

CC BY-SA 4.0
2021-02-07T02:53:44.980Z
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
CC BY-SA 4.0
2021-02-07T02:59:53.297Z
@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
CC BY-SA 4.0
2021-02-07T03:02:56.267Z
@septerr Here is an question/answer about the (IMO, alleged) benefits of hashing public keys: https://bitcoin.stackexchange.com/questions/95123/what-are-the-potential-attacks-against-ecdsa-that-would-be-possible-if-we-used-r/95133#95133
Pieter Wuille
CC BY-SA 4.0
2021-02-07T02:49:43.987Z
2021-02-07T02:49:43.987Z
ieatpizza
<p>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.</p>
<p>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.</p>
<p>My question is, does a compliant mining software also perform this check when validating transactions?</p>
<p>Thanks!</p>

<bitcoin-core>
Do miners verify address checksums?
septerr
# Do miners verify address checksums?

(Asked by: username_0 on 2021-02-07)

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!

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2021-02-07. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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 :)  
> **username_1**: @username_0 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.  
> **username_2**: @username_0 Here is an question/answer about the (IMO, alleged) benefits of hashing public keys: https://bitcoin.stackexchange.com/questions/95123/what-are-the-potential-attacks-against-ecdsa-that-would-be-possible-if-we-used-r/95133#95133  

---

