Introduction
Bitcoin ownership is established through digital keys, addresses, and signatures. These cryptographic elements form the backbone of Bitcoin’s security model, enabling decentralized control and trustless verification.
Cryptographic Foundations
Public-Key Cryptography
- Asymmetric Encryption: Uses key pairs (public and private).
- Elliptic Curve Multiplication: Bitcoin employs secp256k1 for irreversible key generation.
- Digital Signatures: Prove ownership without revealing private keys.
Key Components
Private Key: A 256-bit random number.
- Example (Hex):
1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD
- Example (Hex):
Public Key: Derived via elliptic curve math.
- Uncompressed Prefix:
04 - Compressed Prefix:
02or03(indicates y-coordinate parity).
- Uncompressed Prefix:
Bitcoin Address: A Base58Check-encoded RIPEMD160(SHA256(public key)).
- Example:
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
- Example:
Key Formats
Private Key Representations
| Format | Example |
|---|---|
| Raw (Hex) | 1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD |
| WIF (Uncompressed) | 5J3mBbAH58CpQ3Y5RNJpUKPE62SQ5tfcvU2JpbnkeyhfsYB1Jcn |
| WIF (Compressed) | KxFC1jmwwCoACiCAWZ3eXa96mBM6tb3TYzGmf6YwgdGWZgawvrtJ |
Public Key Compression
- Purpose: Reduces transaction size by 50%.
- Method: Store
xcoordinate + 1-bityparity (prefix02or03). - Example Compressed Key:
03F028892BAD7ED57D2FB57BF33081D5CFCF6F9ED3D3D7F159C2E2FFF579DC341A
Base58Check Encoding
Features
- Human-Friendly: Omits ambiguous chars (
0,O,I,l). - Error Detection: Includes 4-byte checksum.
- Version Bytes: Prefixes (e.g.,
0x80for WIF) identify data types.
Decoding Example
$ bx base58check-decode 5J3mBbAH58CpQ3Y5RNJpUKPE62SQ5tfcvU2JpbnkeyhfsYB1JcnOutput:
- Payload:
1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD - Version:
128(WIF)
FAQs
Q1: Why use compressed public keys?
A: Smaller transactions = lower fees + efficient blockchain storage.
Q2: Can a private key generate multiple addresses?
A: Yes! Uncompressed and compressed public keys yield different addresses.
Q3: How to safely store private keys?
A: Use hardware wallets or encrypted backups (WIF format).
Q4: What’s the risk of key loss?
A: Irrecoverable—funds are permanently locked.
Pro Tips
👉 Secure your keys with hardware wallets
👉 Explore advanced key management