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?

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...) Jan 13, 2018 at 22:01

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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