Private Keys, Public Keys, Addresses, and Wallets in Bitcoin

·

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:

👉 Best practices for securing private keys


Public Key

Derived from the private key via elliptic curve multiplication (K = k*G), where:

Properties:

Example Public Key:

x: F028892BAD7ED57D2FB57BF33081D5CFCF6F9ED3D3D7F159C2E2FFF579DC341A  
y: 07CF33DA18BD734C600B96A72BBC4749D5141C90EC8AC328AE52DDFE2E505BDB  

Bitcoin Address

A Bitcoin address is a hashed version of the public key, created through:

  1. SHA-256: Hashes the public key.
  2. RIPEMD-160: Further condenses the result to 160 bits.
  3. 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:

  1. Key Management:

    • Generates private keys.
    • Derives addresses from keys.
  2. 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

  1. Input: References UTXOs (previous transaction outputs).
  2. Output: Specifies recipient address and amount.
  3. Signing: Uses sender’s private key to authorize the transaction.
  4. Broadcast: Sent to the Bitcoin network for validation.

Example:


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

By understanding these components, users can securely navigate the Bitcoin ecosystem. Always prioritize key security and wallet best practices!