P2PKH why the hash and not the address itself

0

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?

ranchalp

Posted 2018-01-13T12:36:15.540

Reputation: 449

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 2018-01-13T22:01:50.880

Answers

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

Preet

Posted 2018-01-13T12:36:15.540

Reputation: 393