๐Ÿ”‘ Bitcoin Key Generator - Visual Learning

See how Bitcoin creates secure private keys, public keys, and addresses

๐ŸŽ“ What You'll Learn

Bitcoin security starts with a 256-bit random number (your private key). This demo shows you:

๐Ÿ  Think of Bitcoin Keys Like a House

๐Ÿ”‘
Private Key

Like your house key - Never give it to anyone! Anyone with your house key can enter your house and take everything.

๐Ÿ 
Public Key

Like your house address - You can share it freely. People can send you mail (Bitcoin), but they can't take anything out.

๐Ÿง‰
Hashing

Like a smoothie blender - Once you blend fruits together, you can't separate them back. One-way transformation!

1 Generate 256-Bit Private Key

๐Ÿ’ก What is a Private Key?

A private key is just a very large random number. Bitcoin uses 256 bits (256 ones or zeros). This gives us 2ยฒโตโถ possible combinations - more than atoms in the universe!

Total Bits
256
Ones Count
0
Zeros Count
256
Possible Keys
2ยฒโตโถ
๐Ÿ”ข Binary Format (256 bits):
Click "Generate" to create a private key
๐Ÿ”ค Hexadecimal Format (64 characters):
Why Hexadecimal? Hex is shorter! Each hex character represents 4 bits. So 256 bits รท 4 = 64 hex characters. (0-9 and A-F)
-

๐Ÿง  Test Your Knowledge

Q1: If I change just 1 bit in my private key, what happens?

Q2: Can someone recreate your private key from your public key?

Q3: What's the main benefit of a seed phrase over a raw private key?

2 Generate Mnemonic Seed Phrase

๐Ÿ’ก Why Use Words Instead of Numbers?

Humans are bad at remembering long numbers but good at remembering words! A seed phrase converts your private key into 12-24 easy-to-write words. You can backup your entire wallet by writing down these words.

3 Generate Public Key (Elliptic Curve)

๐Ÿ’ก What is Elliptic Curve Cryptography?

Bitcoin uses special math called "elliptic curves" to create a public key from your private key. Think of it like this:

  • Easy Direction: Private Key ร— Generator Point = Public Key
  • Impossible Reverse: You can't figure out the private key from the public key!

Bitcoin uses the secp256k1 curve. We multiply your private key by a special starting point called "G" (the generator).

? What is Hashing?

๐Ÿงฉ Hashing: A One-Way Function

A hash function is like a magic blender that:

  • Takes any input (text, number, file) and creates a unique "fingerprint"
  • Always gives the same output for the same input
  • Can't be reversed - you can't get the original input from the output
  • Even tiny changes in input create completely different outputs

๐Ÿ” Hash Example:

Input: "Hello"
SHA-256 Output: 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
Input: "hello" (lowercase!)
SHA-256 Output: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Notice: Just one letter different, but completely different output!

๐Ÿ” Why Bitcoin Uses Hashing:

  • Privacy: Your address doesn't reveal your public key
  • Security: Adds an extra layer of protection
  • Shorter: Makes addresses more manageable
  • Checksum: Detects typos in addresses

๐ŸŽฎ Try It Yourself!

Hash your name and see what happens when you make tiny changes:

4 Generate Bitcoin Address

๐Ÿ’ก From Public Key to Address Using Hashing

Now we'll use those hash functions to create your Bitcoin address:

The Process:

  1. Start: Take the public key
  2. Hash #1: Put it through SHA-256 (creates 256-bit fingerprint)
  3. Hash #2: Put result through RIPEMD-160 (creates 160-bit fingerprint)
  4. Add checksum: Prevents typos
  5. Encode: Convert to Base58 or Bech32 (human-readable)

Result: A short, safe-to-share address like: bc1q... or 1...

โš ๏ธ Critical Security Rules

๐Ÿ“ต NEVER take photos of your seed phrase

Photos can be backed up to the cloud, hacked from your phone, or accidentally shared. Use paper only!

โ˜๏ธ NEVER store seeds in the cloud

No Google Drive, Dropbox, iCloud, or email. Cloud services can be hacked or shut down. You lose your Bitcoin forever.

๐ŸŽฒ NEVER use predictable entropy

Don't create keys from your birthday, name, or common phrases. Use proper random number generators!

โœ… DO use a fireproof safe

Store your paper backup in a fireproof, waterproof safe. Consider metal backup plates for extra protection.

๐Ÿค” What If Scenarios

๐Ÿค” What if I lose my seed phrase?

Your Bitcoin is permanently lost. There's no "forgot password" button. No customer service can help. This is why backups are critical!

๐Ÿค” What if someone finds my seed phrase?

They can steal all your Bitcoin immediately. Move your funds to a new wallet with a new seed phrase right away if this happens!

๐Ÿค” What if my house burns down?

If your only backup burns, your Bitcoin is lost forever. Consider multiple backups in different locations or metal backup plates.

๐Ÿค” Can quantum computers break Bitcoin?

Not yet! Bitcoin addresses (especially unused ones) are quantum-resistant. The Bitcoin protocol can upgrade if quantum computing becomes a threat.

๐Ÿ”„ The Complete Relationship
๐ŸŽฒ Random 256 bits
Entropy
โ†’
๐Ÿ” Private Key
Keep Secret!
โ†’
๐Ÿ“ Seed Phrase
12-24 Words
โ†“
Elliptic Curve Multiplication
๐Ÿ”“ Public Key
Share Freely
โ†’
๐Ÿ“ฎ Address
Receive Bitcoin

๐Ÿ”’ Key Security Principles:

  • One-Way Function: Easy to go from private โ†’ public โ†’ address, impossible to go backward
  • Private Key: Keep this secret always! Anyone with it controls your Bitcoin
  • Public Key: Can be shared but usually not needed (address is enough)
  • Address: Share freely to receive payments
๐ŸŒณ One Seed, Many Addresses: HD Wallets

๐ŸŒฑ What are HD (Hierarchical Deterministic) Wallets?

Modern Bitcoin wallets don't just create one address. They create a whole tree of addresses from a single seed phrase!

Think of it like a tree:

๐ŸŒฑ Seed Phrase (12-24 words)
|
โ”œโ”€ Address 1: bc1q...
โ”œโ”€ Address 2: bc1q...
โ”œโ”€ Address 3: bc1q...
โ”œโ”€ Address 4: bc1q...
โ””โ”€ ... (millions more!)

๐ŸŽฏ Why Is This Useful?

  • Privacy: Use a new address for each transaction โ€” harder for others to track your balance
  • Organization: Separate addresses for different purposes (savings, spending, donations)
  • One Backup: Write down 12-24 words once, and you can recover ALL your addresses and Bitcoin!
  • Deterministic: Same seed phrase always creates the same addresses in the same order

๐Ÿ’ก How It Works (BIP32/BIP44 Standards):

Step 1: Seed phrase โ†’ Master private key (512 bits)

Step 2: Master key + index number (0, 1, 2, 3...) โ†’ Child key

Step 3: Each child key โ†’ Bitcoin address

This is a one-way mathematical process. You can't figure out the seed from the addresses!

โš ๏ธ Important Note:

In this demo, we're showing a single key generation for educational purposes. Real wallets like Sparrow, Coldcard, or Trezor use HD wallets automatically. When you write down 12 or 24 words, you're backing up an entire wallet, not just one key!

๐ŸŽ“ Ready to Practice?

Now that you understand how keys work, try generating multiple keys and see how each one is completely unique!