1

In Bitcoin protocol, to set the output of a transaction you need a scriptPubKey which is in the following format.

scriptPubKey = OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

Is <pubKeyHash> the address of the receiver of bitcoin or is it the hash of a address of the receiver?

5

A Bitcoin address is actually an encoded public key hash. The public key is hashed with SHA-256 and RIPEMD160, a version byte is added and a checksum is created, and then the address is encoded with Base 58 which gives the normal bitcoin address you see day-to-day. The pubKeyHash is actually just the SHA256/RIPEMD160 hash of the public key, before the checksum is added or encoded with Base58. So it is not the address itself, but it can be obtained from an address. It is a hash of the public key not a hash of the address.

| improve this answer | |

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.