A Bitcoin wallet contains a collection of cryptographic key pairs, each consisting of a public key and a private key. The private key is a randomly generated 256-bit hexadecimal string that serves as the foundation for Bitcoin ownership. Through elliptic curve cryptography (ECC), the private key generates a public key, which in turn derives a Bitcoin address. This process is unidirectional—it's impossible to reverse-engineer a private key from an address or public key.
Private Key
A private key is essentially a 256-bit random number (comprising 0s and 1s). Its randomness ensures uniqueness and security—no two private keys should ever collide.
Example Private Key: 1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD
Key Functions:
- Ownership: Controls access to funds linked to the corresponding Bitcoin address.
- Transaction Signing: Generates digital signatures to authorize Bitcoin payments.
- Security: Must remain confidential. If compromised, the associated Bitcoin can be stolen.
👉 Best practices for securing private keys
Public Key
Derived from the private key via elliptic curve multiplication (K = k*G), where:
k= private keyG= generator point (a constant in secp256k1 cryptography)K= resulting public key
Properties:
- Irreversible: Public keys cannot be used to deduce private keys.
- Representation: Expressed as coordinates (x, y) on an elliptic curve.
Example Public Key:
x: F028892BAD7ED57D2FB57BF33081D5CFCF6F9ED3D3D7F159C2E2FFF579DC341A
y: 07CF33DA18BD734C600B96A72BBC4749D5141C90EC8AC328AE52DDFE2E505BDB Bitcoin Address
A Bitcoin address is a hashed version of the public key, created through:
- SHA-256: Hashes the public key.
- RIPEMD-160: Further condenses the result to 160 bits.
- Base58Check Encoding: Improves readability and error detection.
Formula: Address = RIPEMD160(SHA256(PublicKey))
Example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Bitcoin Wallet
A wallet is software that manages private keys and their corresponding addresses. Contrary to popular belief, wallets don’t "store" Bitcoin—they secure the keys needed to access funds on the blockchain.
Wallet Functions:
Key Management:
- Generates private keys.
- Derives addresses from keys.
Ledger Tracking:
- Monitors UTXOs (Unspent Transaction Outputs) linked to wallet addresses.
- Calculates balances by summing UTXOs.
👉 How to choose a secure Bitcoin wallet
Bitcoin Transaction Flow
- Input: References UTXOs (previous transaction outputs).
- Output: Specifies recipient address and amount.
- Signing: Uses sender’s private key to authorize the transaction.
- Broadcast: Sent to the Bitcoin network for validation.
Example:
- Input: 0.2 BTC (from Alice).
- Output: 0.15 BTC (to Bob) + 0.05 BTC change (new address in sender’s wallet).
FAQ
Q1: Can someone steal my Bitcoin if they know my address?
A: No. Addresses are public, but spending funds requires the corresponding private key.
Q2: How do miners receive Bitcoin rewards?
A: Miners add a "coinbase transaction" to blocks they mine, directing new Bitcoin to their address.
Q3: What happens if I lose my private key?
A: The associated Bitcoin becomes permanently inaccessible—backup your keys securely!
Q4: Why are addresses Base58Check-encoded?
A: To prevent ambiguous characters (e.g., 0/O) and add error-checking bytes.
Key Takeaways
- Private Key: The ultimate proof of ownership.
- Public Key: Used for address generation and signature verification.
- Wallet: A tool for managing keys, not Bitcoin itself.
- Transactions: Transfer value by referencing UTXOs and creating new outputs.
By understanding these components, users can securely navigate the Bitcoin ecosystem. Always prioritize key security and wallet best practices!