← Back to Glossary

Pay-to-Public-Key-Hash (P2PKH)

Pay-to-Public-Key-Hash (P2PKH) is a method used in Bitcoin transactions that allows bitcoin to be sent to the hash of the public key of another wallet’s public key, rather than directly to the public key.

Pay-to-Public-Key-Hash (P2PKH) is a method used in Bitcoin transactions that allows bitcoin to be sent to the hash of the public key of another wallet’s public key, rather than directly to the public key. In a P2PKH transaction, the sender does not need to know the recipient’s actual public key. Instead, the sender uses a hash of the recipient’s public key.

This hash acts as the address to which the sender will transfer the bitcoin. This address is what you commonly see and use in Bitcoin transactions. Additionally, the use of addresses makes transactions more user-friendly, as addresses are shorter than public keys.

P2PKH is a type of ScriptPubKey that specifies that these bitcoin can only be spent by presenting a public key that matches the hash and a signature created by the corresponding private key. A public key hash is also known as an address, and P2PKH is the most common script type at present. P2PKH is similar to P2PK transactions, except that the bitcoin is locked to the hash of the public key rather than the public key itself.

!An infographic comparing Pay-to-Public-Key-Hash (P2PKH) and Pay-to-Public-Key (P2PK) processes in cryptocurrency transactions. If Alice wants to send 1 BTC to Bob in a P2PKH transaction, Bob provides Alice with an address from his wallet. Bob’s address is included in the transaction.

When Bob tries to spend the bitcoin he receives, he must sign the transaction with the private key corresponding to the public key whose hash matches the hash provided in Alice’s transaction.

Pay-to-Public-Key-Hash (P2PKH) is a Bitcoin protocol specification that defines technical standards for how Bitcoin software operates. Onramp's Bitcoin glossary provides detailed educational resources on Pay-to-Public-Key-Hash (P2PKH) and other protocol-level concepts to help investors understand the technology underpinning their Bitcoin holdings.

Frequently Asked Questions

What is Pay-to-Public-Key-Hash (P2PKH)?

Pay-to-Public-Key-Hash (P2PKH) is a technical standard in the Bitcoin protocol that specifies how certain operations or data structures should be implemented. It helps ensure interoperability between different Bitcoin software implementations.

Why is Pay-to-Public-Key-Hash (P2PKH) important for Bitcoin?

Pay-to-Public-Key-Hash (P2PKH) improves Bitcoin's functionality, security, or efficiency. Technical standards like this ensure that all participants in the Bitcoin network follow consistent rules, maintaining network consensus.

How does Pay-to-Public-Key-Hash (P2PKH) affect Bitcoin investors?

While Pay-to-Public-Key-Hash (P2PKH) operates at the protocol level, Onramp ensures that clients benefit from these technical improvements through secure, up-to-date infrastructure for Bitcoin custody and transactions.

Multi-Institution Custody

Are you ready?

The best security available for your Bitcoin without the technical burden. It’s time to upgrade.

Sign up