Coin Flip

How to Generate Your Own Bitcoin Address by Flipping a Coin

Cryptography is the backbone of digital security, essential not just in cryptocurrencies like Bitcoin but across various industries that require secure communication and data protection. Understanding where "trust" is built in these systems is crucial. One intriguing way to introduce the fundamentals of cryptography—and to learn the basics—is through a thought experiment: generating cryptographic keys by flipping a coin.

This exercise isn't solely about Bitcoin; it's about engaging with the core principles of cryptography in a hands-on manner. By using a simple coin flip, you can experience firsthand how randomness and mathematical algorithms come together to create secure cryptographic keys. This method gives you full control over the key generation process and illustrates the importance of true randomness in enhancing security.

BitBulla, Ballpen on Paper, A4, 2017©
1LYnaGEmimvEqSzpBJEP8ExnRLdEisTKov

What You'll Need

  • A fair coin (e.g., a standard penny)
  • Pen and paper
  • Optional: A computer with Bitcoin software (kept offline for maximum security)

A Bitcoin private key is a 256-bit number. This means it's a (big) number between 0 and 2²⁵⁶ - 1. To generate this number manually, we'll create a sequence of 256 bits (binary digits), where each bit is 0 or 1.

 

Step 1: Flip the Coin 256 Times

You'll need to flip your coin 256 times to generate the 256-bit private key.

Once you've completed all 256 flips, you'll have a sequence of 256 binary digits (bits). This is your private key in binary form.

Example:

0010 1001 1010 1110 0000 0001 0010 0011 0110 0101 0111 1000 1001 1010 1011 1101
1101 1110 1111 1011 0110 1001 0110 0011 0100 1001 0110 1011 0100 1001 0110 0111
0111 1001 0110 0011 0100 1111 0110 0011 0110 1011 0111 0011 0100 1011 1010 1011
0101 1011 0110 0011 0100 1101 0110 1011 0110 0001 0010 0011 1100 1001 0110 0011

 

Step 2: Convert Binary to Hexadecimal

  1. Group Bits: Divide your binary string into groups of 4 bits.
  2. Convert Each Group: Use a binary-to-hexadecimal conversion table or calculator to convert each 4-bit group to its hexadecimal equivalent.[0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F]
  3. Combine Hex Digits: Write down all the hex digits to form your 64-character hexadecimal private key.

Example:

0010 → 2
1001 → 9
1010 → A
1110 → E

Result:

29AE012365789ABDDEFB6963496B496779634F636B734BAB5B634D6B6123C963

To use it and generate its public counterpart most wallets need the private key to be in a WIF-Format

 

Step 3: Convert Hex Private Key to WIF

Wallet Import Format (WIF): The Wallet Import Format is a standardized way of representing private keys as a string of alphanumeric characters. It includes a checksum to detect errors and supports both compressed and uncompressed formats. WIF is widely used in many Bitcoin wallets and is compatible with various software applications.

Here is a simple Python script (LINK TO FILE) to create the WIF of Your Hexadecimal Private Key:

-> Your WIF Private Key: KxcjLbp8iwcvUfmw8b98zFSTqV3HcHJdMpz6sBnohQgCTSLVevX8

Thats it. Your private key is ready!

 

Generate the Bitcoin Address (Public)

Now that you have your private key in WIF form, you can generate the corresponding Bitcoin address. To use and test the address, you can import your private key into a Bitcoin client like Bitcoin Core or Electrum

Use Offline Tools: For maximum security, use an offline computer or a trusted offline tool to perform the following steps.

Use the Elliptic Curve Digital Signature Algorithm (ECDSA) with the secp256k1 curve parameters to generate the public key from your private key.

Electrum.app > Private Keys -> import

Example:

Our Public Bitcoin address now look like:

12wjvQXSgLNRfJaZaStSfNzN1zDGjZm28q

reverse test

Well done! Now we have our public address calculated from the WIF key we created by flipping our coin. This public address is fully functional and can be viewed on a blockchain explorer. It is now ready to receive and send funds. You can view the transactions associated with this address on the blockchain here.

-> Search Query on Blockchain.com

Why are there two addresses? Well, that's another story. BITCOIN is Open Source.
Search for BCH and "Altcoins"

 

BitBulla, Ballpen on Paper, A4, 2017©

 

Understanding the Cryptography Behind It

«VIRES IN NUMERIS»

Remember, with great power comes great responsibility. Always keep your private keys secure!

Disclaimer: This guide is for educational purposes. Handling private keys manually carries risks. Ensure you understand the process thoroughly and take all necessary precautions to protect your assets.

 

ECDSA: Ensures that only the holder of the private key can spend the Bitcoins associated with an address.

Secp256k1: A specific elliptic curve used by Bitcoin, defined by certain mathematical parameters that make it suitable for cryptographic operations.

By generating your private key through coin flips, you're directly interacting with these cryptographic principles and you learn about different presentations of numbers and their bases.

Infos about Elliptic Curves, ESDSA and Secp256k1:

 

Secure Your Private Key

Your private key is the key to your funds. Store it securely!

  • Write it Down: Keep a physical copy in a secure location.
  • Do Not Share: Never share your private key with anyone.
  • Consider Redundancy: Store backup copies in separate secure locations.

Hint! Use Seed-words instead of creating your keys by hand if possible.

Pro, use BIP39: iancoleman.io/bip39/

Easy (use with caution): bitcoinpaperwallet

BitBulla, Ballpen on Paper, A4, 2017©

 

Final Thoughts and Personal Reflections

I've been part of the cryptocurrency landscape since 2014, exploring and experimenting under the pseudonym BitBulla. Back in 2017, as Bitcoin celebrated its eighth anniversary, I created three unique drawings. Each piece wasn't just art—they each contained a public Bitcoin address that I generated by flipping coins. This method was a hands-on way to delve into cryptography and truly understand the randomness and trust embedded in the blockchain. The binary sequences from those coin flips are still handwritten on the back of each drawing, serving as a personal memento of that experiment.

During those years, I also enjoyed charting and technical analysis. As a "Chartist," I shared my insights and engaged with the trading community on TradingView under the handle BitBulla. It was a thrilling time of learning and sharing, filled with late-night charting sessions and vibrant discussions about market movements.

I also contributed to the crypto conversation through blogging on Bitcoin News, a Swiss-based Bitcoin blog. Writing allowed me to explore ideas more deeply and connect with others who were just as passionate about the potential of cryptocurrencies.

While I stopped blogging in 2018 and have since moved on from some of these activities, I cherish those formative years in the crypto space. For historical reasons, I'm leaving these links here:

Engaging with Bitcoin and cryptography through such personal projects has been an invaluable experience. It not only deepened my understanding of the technology but also highlighted the importance of trust and security in the digital age. As the industry continues to evolve, I look back with appreciation for the journey and excitement for what the future holds. (last update 2024)

2017 | Coin Flip

wedodraw.com
2024 | wedodraw.com

we do draw - do you?

Fighting Kangaroo v2
2023 | Fighting Kangaroo v2

New assembly plan and available online again

Framework
2023 | Framework

a framework to manage ibulla.com on GitHub

King Kong
2023 | King Kong

Successful Unknown

Sudor Meta
2022 | Sudor Meta

Exhibition view

2 Geese
2021 | 2 Geese

The daily madness of two geese

CryptoGoldNugget
2021 | CryptoGoldNugget

Series of 100 NFTs, ERC-721 Tokens

MicroTrainz.art
2020 | MicroTrainz.art

Upcycling Creativity for a big UFF

Pixelrun
2019 | Pixelrun

where pixels run to life

TokenTransformat.io
2019 | TokenTransformat.io

burn - transform - own

Blockexplorer.li
2019 | Blockexplorer.li

Unveiling the Story with Each Block

VeloGefahren.ch
2019 | VeloGefahren.ch

Empowering Safe Bicycling Through Crowd Intelligence

def Algorithm():
2018 | def Algorithm():

printable booklet

TC 18
2018 | TC 18

Transcultural Collaboration: "Tanhua": A Tribute to the Global Workforce / "Mass Prey": The Abyss of Desire

Fighting Kangaroo
2017 | Fighting Kangaroo

Award-winning work

1milliondrawings.com
2017 | 1milliondrawings.com

Draw your own NFT

Private Coin Flip
2017 | Private Coin Flip

Generate your private Key with a coin

Useragent.icu
2016 | Useragent.icu

ipv4 / ipv6

Ayumu Memory
2016 | Ayumu Memory

Memory game

How Trump Are You?
2016 | How Trump Are You?

Seriously, isn't that dangerous?

Hex Flower Clock
2015 | Hex Flower Clock

some code fun

TattooKurier.ch
2015 | TattooKurier.ch

order your ink 24/7 wherever you are

Addresses & Colors
2014 | Addresses & Colors

0.0.0.0 - 255.255.255.255: a comment on the conversion from ipv4 to ipv6

ibulla.com
2013 | ibulla.com

the archive

RGB Cube
2012 | RGB Cube

rgb hex cube code

ipv6{start}
2012 | ipv6{start}

Your privacy is important (to us)

Daily Cut
2010 | Daily Cut

Daily madness cut into pieces.

Startkapital
2006 | Startkapital

Hardcover book, 170pages, black and white, fine liner on A4 paper