Pages:
Author

Topic: How to Create a Bitcoin Receive Address from a Coin Flip - page 4. (Read 14665 times)

legendary
Activity: 1442
Merit: 1179
Awesome tutorial! I like using dice, but this would be a fun project as well, thanks for taking the time to put this together.
sr. member
Activity: 425
Merit: 253
Step by Step Tutorial

  • Create a Bitcoin address by flipping a coin in 4 easy steps
  • Create a Bitcoin address so secret, {Insert name of your Government Spy agency Here} wont even know who made it!

Quick Intro
A Bitcoin private key is a really big number that is created in a very specific format1.  Once the private key is created, it can then be pushed through a mathematical gauntlet and produce a Public Address that anyone can use to accept bitcoin payments.  Every Public Address corresponds to a Private Key and vice-versa.  If you could guess a private key, you could access and spend the Bitcoins stored at the address as if they were yours.  It is not likely that you or anyone else will ever guess a private key especially if it is created randomly. You can create your own private keys from scratch and do it randomly or you can let the wallet do it for you.  This tutorial is about creating a key safely and randomly. In the Bitcoin world, you don't actually "own" bitcoins.  What you do have in your wallet is a set of keys that allows you to do anything you want with the bitcoins assigned on the blockchain to that address.  That's it in simple form:  Private Keys unlock your access to the blockchain balance at a Bitcoin address. If you destroy the keys or the harddrive where they are stored, the Bitcoins will still be there on the blockchain.  You cannot "destroy" Bitcoins unless you destroy the entire blockchain.  Bitcoins live forever!

How to create a Bitcoin Private Key and therefore a Unique Public Address, by flipping a Coin.


Step A.
Get a coin.  Label one side as “1” and the other side as “0”
Flip the coin 256 times and record the results as you go in groups of 4.  When you are done, your binary sequence should look something like this:

Binary: (Below is four sequences of 64 bits each 4x64=256)
0010 1000 1000 1111 0011 1001 1011 1011 1111 1101 0011 0110 1101 1010 0101 1010
0001 0010 1101 0001 0110 0010 1100 1011 0001 1000 1001 0111 1100 1001 0000 0010
0010 1000 1000 1011 0011 1001 1011 1011 0011 0110 1101 1010 0101 1010 0001 0010
1101 0001 0110 0010 1100 1011 0001 1000 1001 0111 1100 1001 0000 0010 0011 1101

The grouping and spaces are not important. They are grouped this way to make them "Human Friendly."
One Technical Note:  There is an upper limit on the range of acceptable valid public keys.  If for some reason you randomly flip the coin and you get 127 "1"s in a row, you are approaching the upper limit! 2

Step B.
The next step is to convert the Binary to HEX. Finding a Binary to Hex converter on-line that will handle that sized number is no easy task.
mathsisfun.com – This one can handle 64 bits at a time. Just keep them in order and separate.  Do 64 bits at a time. (4 times)

The Binary Number above Converted to HEX: (32 bytes)
288F 39BB FD36 DA5A 12D1 62CB 1897 C902 288B 39BB 36DA 5A12 D162 CB18 97C9 023D
This HEX number is your Raw Private Key, and again the spacing is not important.
*** Note: If you owned a pair of 16 sided dice, you could roll the pair 32 times and record the results like above and save the coin tossing found in Step A. ***

Step C.
Next, Cut and paste the HEX number into Brainwallet and choose “HEX” to “B58Check.”  This will create a very large number that begins with a “5”. This number is your private key “Wallet Import Format”.

*** You cannot use the Brainwallet BIN to HEX converter if you space them out like I did, due to the fact that Brianwallet adds a “0” place holder to every 4 bit BIN sequence. e.g. “1111” converted to HEX is “F” but Brainwallet converts it as “0F.”   But if you get rid of the spaces and paste the entire sequence in at once, you can use the BIN to BASE58Check converter and skip the HEX conversion (Step B.) altogether. In other words, lining the ones and zeroes up like I did, makes it more human friendly, but it makes you do an extra step.***

The HEX above converted to B58Check WIF:
5J89cr5WGdvQWeeekN5ZGzuXVsWREbAYku6MDeUgrJTjX1ZHhCX

Step D.
Next copy the private key WIF code. Click “Generator” and paste the private key into the Private Key box.  This will create your new Public Address.

WIF Format above Converted to Bitcoin Public Address:
1Cwd7i5R6GM56njNhyyr7RRUYo6e1AMg9A

You have now created a Private Bitcoin Key and a Public Address from 256 coin flips!

EXTRA SECURITY:  Just in case you are worried about using the online generator, you can download the .zip file at the bottom of the page (off Brainwallet) and set the generator up on your computer.  You can run this program off-line with no Internet connection.  Also do not use random.org or any other online site to generate a crytographic keys.  Sites like this should only be used for educational purposes.

EXTRA SPEED:  You can go to random.org and flip four or eight coins a time.  The Polish Zloty works great because it has the shape of a 1 and a 0. The randomness of their service is top notch.  It is possible that someone working at random.org could guess you are using the service to generate bitcoin private keys. So only use this option for educational purposes.

EXTRA COINS:  The Brainwallet site is also set up to do 25 other coins in addition to Bitcoin.

EXTRA MATH:  If you want to manually convert the HEX private key to WIF format, see this article:  https://en.bitcoin.it/wiki/Wallet_import_format

EXTRA RANDOM:  It is scientifically plausible to detect bias in your coin or flip method (this is absurd, but possible). If you flip 1000's of these coins the exact same way and published the results, then possibly even a computer could read the data and find a pattern. So instead of flipping 1 coin 256 times, you could get 256 coins, all different if possible.  Then you flip half and your drinking buddy flips the other half, letting them land on as many different hard surfaces as possible in your house.  Record the results.  Then the only bias will be in your two methods of flipping,  but no one could ever crack your bias unless you publish the results with a large, sufficiently sized sampling pool.

If you follow these directions exactly and create a 256 bit binary number, you will have created a unique number, never known to mankind before and probably will never occur again!

How to Use the Address

Upgrade your Bitcoin wallet to the latest stable release “9.3”

Linux

“Bitcoind”
Add “-server” to your configuration file.
Make sure the wallet is “unlocked”
Run “./bitcoind -daemon”
After the wallet synchs run this command:

./bitcoind importprivkey "5yourveryveryveryverylongprivatekeystring" "label if you want one"

It will take about 3 or 4 minutes after you import the key.
During this time the wallet is searching the blockchain for transactions to this new address.

Online Wallets

Blockchain.info has an “Import Private Key” feature you can use to load the address to your on-line wallet if you have a wallet there.

Windows QT https://en.bitcoin.it/wiki/How_to_import_private_keys_v7%2B

More Detail Article on Importing Keys https://en.bitcoin.it/wiki/How_to_import_private_keys

Test
Send yourself a very small amount of BTC to the new address to test it before you use it.

To Do: Excel > Bitcoin Binary to Public Key
To Do: Script >  Bitcoin Binary to Public Key

A Warning About Warnings
Almost every post about importing private keys, will warn you about the "danger" of messing around with private keys. I will layout a 2 point maxim for you that will allow you to evaluate said warnings and your own actions regarding private keys:
1. If you self generate a private key - make sure your method is based on true randomness (i.e. use a coin, a pair of dice or a coin flipping service) Do not trust Key Generating sites, online or offline.
2. If you self generate a private key - make sure no one can learn about your methodology (If you use any type of assistance like "brainwallet", do it on an offline computer that is always offline, and just use them for the easy math parts like converting large numbers between formats)
If you follow these 2 rules, you will have a safe private key.
Pages:
Jump to: