TeachMeBitcoin

P2PK (Pay-to-Public-Key): The Anchor Guide to Bitcoin's First Script

From TeachMeBitcoin, the free encyclopedia Reading time: 5 min

P2PK (Pay-to-Public-Key): The Anchor Guide to Bitcoin's First Script

IMPORTANT

Executive Summary: Pay-to-Public-Key (P2PK) was the original locking script used in the earliest versions of Bitcoin. Unlike modern transactions that send funds to a "hash" of a key (an address), P2PK locks coins directly to the raw bytes of a public key. While largely obsolete for daily use, P2PK remains historically significant as it secures the Genesis Block and the earliest mining rewards from Satoshi Nakamoto.


🔍 Why This Module Matters

To understand where Bitcoin is going, you must understand where it started. P2PK is the "Primal" script of the network. It represents a simpler time before the complexity of Base58 addresses and P2SH nested scripts. This module will deconstruct the "Raw Key" locking mechanism, explain why Satoshi eventually moved toward hashing (P2PKH), and analyze the security trade-offs of exposing public keys directly on the ledger. Understanding P2PK is essential for any blockchain historian or technical auditor.


🏛️ The Logic of the Raw Lock: Key vs. Hash

In modern Bitcoin, we use "Addresses" as a layer of abstraction. In P2PK, there is no abstraction.

1. Direct Ownership

In P2PK, the "Lock" (ScriptPubKey) contains the actual public key of the owner.

2. The Identity Problem

Because P2PK locks to the raw key, there is no "Address."


⚙️ Why P2PK Was Phased Out (The Move to P2PKH)

Within the first year, Satoshi introduced P2PKH (Pay-to-Public-Key-Hash). This upgrade was driven by three critical engineering factors:

1. Blockspace Efficiency

2. Typo Protection (Checksums)

Raw public keys are just strings of hex. If a user mistyped one character in a 65-byte key, the coins would be lost forever. By creating the "Address" standard (Base58Check), Bitcoin added a 4-byte checksum that catches human errors instantly.

3. Quantum Resistance (The "Hash" Shield)

In P2PK, your public key is published the moment you receive funds.


🛠️ The Legacy of the Genesis Block

The most famous P2PK script in existence is the Coinbase of the Genesis Block.

Metric P2PK P2PKH (Modern)
Lock Target Raw Bytes 20-Byte Hash
Visibility Public Key is always exposed. Public Key is hidden until spend.
Safety High risk of manual typos. High safety (Base58 Checksums).
Usage Mining rewards (v0.1 - v0.3). Default for 99% of legacy transactions.

🎯 Learning Objectives for this Module

By the end of this module, you will be able to:

  1. Define P2PK and its role as the first Bitcoin script type.

  2. Describe the physical difference between locking to a key vs. a hash.

  3. Identify three reasons why the network moved from P2PK to P2PKH.

  4. Understand the "Quantum Shield" property of hashed addresses.

  5. Locate the Genesis Block public key and explain its significance.


🗺️ Module Roadmap: What's Next?

Now that we've seen the "Primitive" lock, we will explore the math of the modern lock:

  1. P2PK Script Structure: A byte-level breakdown of the OP_CHECKSIG command.

  2. The Move to P2PKH: How Base58Check addresses were invented.

  3. Quantum Security Deep Dive: Why hashing protects against future threats.

  4. Comparing Script Types: P2PK vs. P2PKH vs. P2SH.


🎓 Summary

P2PK is the "First Draft" of Bitcoin sovereignty. It demonstrated that money could be locked to a mathematical identity without a bank. While we have since developed more efficient and secure ways to transact, P2PK remains the bedrock upon which the entire history of the blockchain is built.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!