<p>You can also do Pay-to-Public-Key.</p>

<p>But public keys are bigger in size that public key's hash. Thus, Pay-to-Public-Key-Hash was invented by  Satoshi to make bicoin addresses shorter.</p>

<p>Compressed public key - 33 bytes</p>

<p>Public key hash - 20 bytes</p>

CC BY-SA 3.0
2018-01-13T12:45:16.537Z
2018-01-13T12:51:01.970Z
2018-01-13T12:51:01.970Z
Preet
<p>In a pay-to-public-key-hash script, what is the reason of storing the hash of the address and not the address itself, since anybody can copy the hash from a previous tx resolved by the same hash (i.e. Security is not one of the reasons)?</p>

<p>Is it maybe just to encumber the identity of the payer if he wants to show the hash of his address rather than his address? </p>

CC BY-SA 3.0
2018-01-13T22:01:50.880Z
On privacy: the P2PKH script is having just a hash of 20 bytes, which can be easily converted into a bitcoin address (base58 encoding). So there is no hiding of your bitcoin address, or of the payer, if address was used before, and can be linked to buyer. (More privacy is provided by P2SH transactions...)
pebwindkraft
<bitcoin-core><input-script>
P2PKH why the hash and not the address itself
ranchalp
# P2PKH why the hash and not the address itself

(Asked by: username_0 on 2018-01-13)

In a pay-to-public-key-hash script, what is the reason of storing the hash of the address and not the address itself, since anybody can copy the hash from a previous tx resolved by the same hash (i.e. Security is not one of the reasons)?

Is it maybe just to encumber the identity of the payer if he wants to show the hash of his address rather than his address?

**Tags:** bitcoin-core, input-script

> **Comments:**
> **username_1**: On privacy: the P2PKH script is having just a hash of 20 bytes, which can be easily converted into a bitcoin address (base58 encoding). So there is no hiding of your bitcoin address, or of the payer, if address was used before, and can be linked to buyer. (More privacy is provided by P2SH transactions...)  

---

## 1 answers

### Answer by username_2 on 2018-01-13. Score: 1

You can also do Pay-to-Public-Key.

But public keys are bigger in size that public key's hash. Thus, Pay-to-Public-Key-Hash was invented by Satoshi to make bicoin addresses shorter.

Compressed public key - 33 bytes

Public key hash - 20 bytes


---

