Introduction
Welcome to our Foundations series, where we simplify the technical aspects of blockchain technology. This article dives into the world of cryptocurrency addresses, exploring how Bitcoin and Ethereum addresses are generated, their types, and their significance in blockchain transactions.
Key Concepts Covered:
- Public-Private Key Pairs
- Externally Owned Accounts (EOA) vs. Smart Contracts
- "Not Your Keys, Not Your Crypto" Principle
- Cold vs. Hot Wallets
- Vanity Addresses & ENS (Ethereum Name Service)
Cryptocurrency Addresses
An address is the fundamental "identity" unit in blockchain networks, enabling all interactions—from simple transfers to complex DeFi transactions. Although different blockchains have slight variations in address formats, they universally serve as identifiers for on-chain assets.
Who "Owns" an Address?
- A single address ≠ a single user (could be a group, a person, or a smart contract).
- True ownership lies with whoever controls the private key.
Ethereum Addresses
Ethereum addresses are 20-byte unique sequences, offering 2160 possible combinations. They typically appear as a 40-character hexadecimal string prefixed with "0x" (e.g., 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045).
Types of Ethereum Addresses:
- Externally Owned Accounts (EOA): Controlled by private keys (e.g., MetaMask wallets).
- Smart Contracts: Code-governed accounts activated by EOAs.
How Are Ethereum Addresses Generated?
EOA Addresses:
- Private Key: A 256-bit random number (kept secret).
- Public Key: Derived via ECDSA (Elliptic Curve Digital Signature Algorithm).
- Address: Last 20 bytes of the Keccak-256 hash of the public key.
Smart Contract Addresses:
- Deployed by EOAs via transactions to
0x0. - Address = Last 20 bytes of
Keccak-256(RLP(sender_address, nonce)).
Ethereum Address Distribution:
- ~100M EOA addresses hold ETH.
- ~30M smart contracts exist (e.g., USDC at
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48).
Bitcoin Addresses
Bitcoin uses four primary address types:
1. Legacy (P2PKH):
- Starts with "1".
Generated via:
- SHA-256 + RIPEMD-160 hashing of public key.
- Encoded in Base58Check.
2. Pay-to-Script-Hash (P2SH):
- Starts with "3".
- Used for multi-signature scripts.
3. SegWit (Bech32):
- Starts with "bc1".
- Improves block space efficiency.
4. Taproot:
- Starts with "bc1p".
- Enhances privacy and efficiency.
Advanced Topics
1. Hot vs. Cold Wallets:
- Hot Wallet: Internet-connected (e.g., MetaMask).
- Cold Wallet: Offline storage (e.g., Ledger).
2. Vanity Addresses & ENS:
- Vanity Addresses: Custom prefixes (e.g.,
1googLemzFVj8ALj6mfBsbifRoD4miY36v). - ENS: Human-readable names (e.g.,
vitalik.eth).
FAQs
Q1: Can two people generate the same address?
A: Practically impossible due to cryptographic randomness (2160 combinations).
Q2: Are smart contract addresses reversible?
A: No—they’re deterministically derived from the deployer’s address and nonce.
Q3: Why does Bitcoin use multiple address formats?
A: Legacy (P2PKH), P2SH, and SegWit/Taproot reflect protocol upgrades optimizing fees and privacy.
Q4: How secure are vanity addresses?
A: Risky if generated via untrusted tools (private keys could be stolen).
Q5: What’s the difference between ENS and DNS?
A: ENS maps names to Ethereum addresses (e.g., vitalik.eth), while DNS maps to IPs.
Conclusion
Understanding address types and their generation mechanisms is crucial for secure blockchain interactions. Whether you're sending ETH to an EOA or deploying a Bitcoin Taproot address, private key security remains paramount.
For further reading:
👉 Bitcoin & Ethereum security best practices
Disclaimer: This guide is for educational purposes only. Always verify security practices with trusted sources.