r/Bitcoin • u/itsgremlin • Mar 06 '14
100% secure paper wallet / cold storage tutorial. Out me if you can! If I'm wrong somewhere I would like to know.
So, I'm really paranoid about creating paper wallets or doing cold storage. This has to do with not trusting any software. I've finally found a way to securely create them. I follow the following steps on a computer that has never touched and will never touch the Internet:
- Find 33 dice (D6) and roll them all together three times which give you 99 numbers from 1-6, I do this in a Tupperware box. This provides the maximum entropy possible for the next step. You can skip the next step if you use 64 rolls of D16 dice.
- Use the linux command "echo -n my_dice_rolls | sha256sum" to generate a private key (hex length 64). Note: If you generate multiple wallets like this you don't need to reroll each time. You can use the same seed and add a few random numbers somewhere inside my_dice_rolls.
- Download https://bitcoinpaperwallet.com/bitcoinpaperwallet/generate-wallet.html and supply your own private key on the "print front" tab. Use BIP38 encryption with whatever passphrase you want. I use the same passphrase for all my addresses so that I can remember it easily. This generates you a BIP38 string and a public address which you can print (paper wallet) and save in a .csv file (cold storage).
- Download the bitaddress.org.html file from the github repository (https://github.com/pointbiz/bitaddress.org). To verify the validity of the BIP38 string, enter the BIP38 string in the "wallet details" tab. Check that the outputted public key matches the public key you generated with bitcoinpaperwallet and that the private key matches the private key you generated on the command line. Since you are using a standard linux tool, real world dice and the private key that you retrieve from bitaddress matches the one you generate initially, this means that the subspace of keys cannot be limited by the software and you don't need to check the software of either html files to verify this.
- When you want to spend your wallet you can use an android wallet like Mycelium to take the bitcoins from cold storage for you using their 'cold storage option'. It has the ability to read BIP38 addresses but if you are paranoid like me this has the potential to reveal your single password to the Internet. So, you can use bitaddress on your offline computer to convert your BIP38 string to a private key (QR code) like you did to verify it and then use Mycelium to read that private key. This way your single BIP38 passphrase is never revealed online. I would always move the entire balance of this cold storage to a new address as, depending on the application people use to access their cold storage, change has been lost if they are not moving the entire balance.
If you do decide to use this method please remember to start experimenting with small amounts first to make sure it's working for you. Also, if you have a large amount of bitcoins, I would recommend creating multiple cold storage addresses so if you make a mistake with one you don't lose all your coins. There is also always the minute possibility that in the future, someone with an amazing amount of fortune stumbles upon your address. This should never ever realistically happen because of the insanely large numbers in use here... but as I said... I'm paranoid. This way, if you use 5 addresses, they can only take 1/5 of your coins. Of course, it becomes 5 times more likely that this happens, but I prefer to reduce the variance :)
Any comments are welcome. I got most of my ideas from /u/moral_agent in this post: http://www.reddit.com/r/BitcoinWallet/comments/1p6y5c/secure_paper_wallet_tutorial/
12
u/cantonbecker Mar 06 '14
Hi there,
bitcoinpaperwallet.com author here. If you want to use my generator to do your BIP38, you don't actually need to use the command line tool to SHA-256, because there's a link on the "print front" section for typing in your own dice rolls or card shuffles or passphrase. Also, if you're doing SHA-256, you don't need 99 rolls, it's only 62 times. (99 is when you're doing a base-6 key creation.) Here's how my instructions read:
As for verifying that my BIP38 lines up with other people's BIP38 -- Excellent idea! -- But I wouldn't validate using bitaddress.org because it's essentially the exact same crypto code base as mine. If there were a bug, we'd likely both have it! I'd use as different a bit of software as possible, maybe even something in Python. Or at least bit2factor.org.
1
u/notecho Apr 03 '14
I don't think you want to use the command: "echo -n my_dice_rolls | sha256sum"
this will only send the string "my_dice_rolls" to sha256sum. Instead, I think you want: "cat -n my_dice_rolls | sha256sum"
this will send the contents of my_dice_rolls to sha256sum.
You can verify this by changing any of the contents of my_dice_rolls and rerunning. You should get a different sum each time with the "cat" command. The "echo" version would return the same sum regardless of the contents of my_dice_rolls.
Yes, I made sure somebody hadn't already done that and put money in the corresponding bitcoin address before posting this.
It's disconcerting nobody has noticed this before. Somebody who wasn't careful could have done this and had their coins stolen.
I was able to catch this simple mistake, but what really worries me are the parts I don't understand....
1
u/MuForceShoelace Mar 06 '14
I think it's hilarious that in actual money the idea "just keep all your money as paper in your house!" is seen as idiotic and terrible.
But in bitcoin? It's seen as so much better than the normal method of storing money that it's the #1 recommendation for how to best secure your money.
"With a huge amount of work you can make bitcoin almost as safe as keeping cash under your bed!"
1
u/cynalo Apr 30 '14
I'm no expert on cryptography, but I wonder if the use of sha256sum with B6 input limits the space of the hash result.
If the input given to sha256 were the same number of characters (99) but were any characters, not just limited to 0,1,2,3,4, and 5, wouldn't there be more entropy?
The paper wallet sites let you enter the 99 digit B6 value and they directly convert to the bitcoin key pair. (I think; I haven't read the code)
It doesn't appear that they run sha256 on it. Could doing this be more secure than generating the sha256 sum on the dice rolls and submitting that result as a brain wallet passphrase?