Bitcoin's address system has evolved significantly since its inception in 2009. This guide explores how Bitcoin addresses work, covering different types—legacy, SegWit, and Taproot—along with their technical nuances.
How Bitcoin Public Keys Are Generated
Bitcoin keypairs consist of a public key and private key. The private key undergoes elliptic curve multiplication to generate the public key. This process, known as key derivation, ensures the same private key always produces the same public key. The public key is then hashed and encoded into a readable address.
👉 Explore Bitcoin keypair generation in-depth
Deterministic Wallets Explained
A Bitcoin wallet typically manages multiple private keys. Modern wallets use deterministic (predictable) key generation, replacing older random-key methods.
Hierarchical Deterministic (HD) Wallets
- Root Seed: Generates a "master" private key.
- Child Keys: Derived hierarchically for better organization.
- Recovery: Losing a private key isn’t catastrophic—the seed regenerates all keys.
Mnemonics (BIP 39)
Most wallets use 12–24-word seed phrases (e.g., Trezor, Ledger) for easier backup. These phrases must be stored securely.
Legacy Bitcoin Addresses
The original Bitcoin addresses start with "1" and support two transaction types:
1. P2PKH (Pay-To-Public-Key-Hash)
- Function: Locks funds to a hashed public key.
- Spending: Requires a signature from the private key owner.
2. P2SH (Pay-To-Script-Hash)
- Function: Locks funds to a script hash (e.g., multi-sig).
- Flexibility: Custom rules govern fund release.
👉 Compare legacy vs. modern Bitcoin addresses
SegWit Addresses (2017 Upgrade)
Segregated Witness (SegWit) introduced cheaper transactions via new address types:
P2WPKH (Pay-to-Witness-Public-Key-Hash)
- Similar to P2PKH but uses Witness fields for lower fees.
P2WSH (Pay-to-Witness-Script-Hash)
- Analogous to P2SH but optimized for SegWit.
Note: SegWit isn’t fully backward-compatible. New wallets should default to SegWit or Taproot.
Taproot Upgrade (2021)
Taproot enhanced privacy, scalability, and smart contracts:
P2TR (Pay-to-Taproot)
- Benefits: Lower fees, indistinguishable multi-sigs.
- Tech: Uses Schnorr Signatures (BIP 340) for efficiency.
Schnorr Signatures
- Advantages: Smaller size, faster verification, and batch support for multi-sigs.
How Enterprises Leverage Bitcoin with Turnkey
👉 Turnkey provides an API-driven solution for:
- Generating Bitcoin addresses (all types).
- Programmatic wallet creation.
- <50ms signing latency at scale.
Use Case: Embed thousands of wallets seamlessly into Bitcoin apps.
FAQ Section
1. What’s the safest Bitcoin address type?
Taproot (P2TR) offers the best privacy and lowest fees.
2. Can I recover lost Bitcoin keys?
Only if you use an HD wallet with a backed-up seed phrase.
3. Why are SegWit transactions cheaper?
They reduce data load by separating signatures (witness data).
4. How do Schnorr signatures improve Bitcoin?
They enable signature aggregation, cutting transaction size.
5. Is Turnkey suitable for small developers?
Yes—its modular pricing scales from startups to enterprises.
6. Are legacy addresses obsolete?
No, but newer types optimize cost and privacy.