Is it possible to store ether on paper wallets or generate printable private keys offline somehow?
6 Answers
Cold storage has been discussed in the past on Ethereum's subreddit.
Just to give my 2 cents, on Ubuntu I use the following on the command line:
cat ~/.ethereum/keystore/<key_file> | qrencode -o qr_image.png
Add option -l H
to get a code that is easier to decode. The qrencode
tool uses the open source libqrencode
library, and can be installed using:
sudo apt-get install qrencode
Once you have the image file, you can then print it off. (Using a wired connection to a printer, unless you're happy with the printer's levels of wireless security.)
A command line tool to decode a scanned QR code or image file is included in the zbar-tools package, e.g. zbarimg --quiet qr_image.png
The general disclaimer: You'll need to ensure you're happy with piping your keys into someone else's utility... The source code is available, but you'd need to be familiar enough with C to be able to check it isn't taking a copy of the key and then sending it back to the mothership.
MyEtherWallet.com
There is a paper wallet generator available at myetherwallet.com.
If you don't trust it, you can download it from github and run it offline.
EthAddress.org
There is another paper wallet generator available at ethaddress.org.
Source code on github.
Printing the private key for ethereum in geth.
This is done for creating a real *secure offline paperwallet in your own WM which afterwards stores the money independent from a program *.
Based on this posts and another post that points out that the source code of geth can easily be changed to print out the private key. Here it how it goes.
- Create a virtual machine with a linux. I took VirtualBox and an old Ubuntu minimal version (old because the minimal Installation without GUI is ease and fast done.)
Building geth from source (i.e. Follow this tutorial github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu)
-Note switch to a stable version of geth: git checkout
Check if geth can be executed (and thereby update the latest nodes, not shure if this is required) type /build/bin/geth console --fast
- Shutdown the VM,
- Disable the network-Adapters in VirtualBox
- Restart the VM
- Modify the SourceCode as displayed in the pictures below. (The file to be modified can be seen on the headerline in the pictures.)
- Rebuild geth (make geth) as descipted in the Installation-Instructions in Step 2. Check if the Random-Number will be a good random value by executing cat /proc/sys/kernel/random/entropy_avail I have a Value above 3000 that is okay. (Google rng-utils to find how to increase the entrophy if below 200.)
- Create a new account via /build/bin/geth account new (the private key will be displayed after password was entered.).
- After created all accounts recheck if entrophy is still above 200 by execution the command from 8.
- cd ~/.ethereum/keystore/
- The private key and the public key is written in the filenames of the accounts in the keystore.
- Add 0x as prefix before the public key, because most programs expect it.
- To create the paperwallets from the filenames, easily the list of the keystores can be written to a file with ls ~/.ethereum/keystore/ >> paperwallet.txt and sent it to a printer. Note: The public key requires the prefix 0x to intend the usage as hex.
- Test some of the paperwallets **with small amounts of money. (Recive and Send Money)
- Note: The paperwallets are save until the day you used the private key for the first time for a transaction.
- If the tests succeed, and you have the wallets printed out, erase the VM.
Modify the Source-Code:
On the first picture: Make a Copy of the function keyFileName and name it keyFileNamePlusPK. Uncomment tx (this is important) and expand the fmt.Sprintf command.
On the second picture: Search the function storeNewKey and call keyFileNamePlusPK inside the method. Also add fmt.Println(„storeNewKey... Good Luck. !!!And Note i am not responsible for any problems comming from this post!!!
Based on Richard's answer I created a bash script to build a more readable paper backup. As shown in the following example , the paper contains the address (to not confuse multiple keyfiles/papers) and the keyfile in both plain JSON and QR-code.
Such paper wallet is just a backup with same security as backed up keyfiles on a normal USB stick. In contrast to paper wallets produced by MyEtherWallet, the paper does not contain the unencrypted private key. I don't think anyone should ever print a private key on paper anyway.
#!/bin/bash
# Create paper wallet of ethereum keyfile
# requires qrencode, jq, and pdflatex
set -e
for keyfile in $@; do
[ -f "$keyfile" ] || {
echo "file not found: $keyfile" >&2
exit 1
}
echo "$keyfile"
dir=$(dirname "$keyfile")
qrcode="$dir/$keyfile.png"
latex="$dir/$keyfile.tex"
# pretty-print JSON
json=$(jq . "$keyfile")
# address
address=$(jq -r .address "$keyfile")
# QR-code
cat "$keyfile" | qrencode -l M -o "$qrcode"
cat > "$latex" <<- TEX
\\documentclass{article}
\\usepackage{graphicx,listings,fullpage}
\\renewcommand{\\familydefault}{\\ttdefault}
\\begin{document}
\\section*{$address}
\\small\\noindent
\\includegraphics[width=0.5\\textwidth]{$qrcode}
\\begin{lstlisting}
$json
\\end{lstlisting}
\\end{document}
TEX
pdflatex --quiet "$latex"
# only keep the PDF
rm "$qrcode" "$latex" "$dir/$keyfile.aux" "$dir/$keyfile.log"
done
Here's a new one with user customizable background artwork:
Memory Paper Wallet - Ethereum Customizable Paper Wallet https://bitcointalk.org/index.php?topic=3335760.0