It generates a html file with three parts of one paper wallet.
I've tested it for bitcoin and peercoin. Whatever vanitygen can generate is supported.
Linux Dependencies: vanitygen ssss qrencode (zbar-tools)
CTR=1
# generate 2 of 3 secret
#remove old keys if file exists
echo "" > paperwallet.keys
#generate new bitcoin address
vanitygen -q -o paperwallet.keys 1
#generate new peercoin address
#vanitygen -X 55 -q -o paperwallet.keys P
#generate QR code for bitcoin address
echo "bitcoin:" > paperwallet.pub
cat paperwallet.keys | sed '4d' | sed '1,2d' | sed 's/^Address: //' >> paperwallet.pub
cat paperwallet.pub | tr -d '\n'| qrencode -o "paperwallet.pub.png"
#start html output
echo "" > paperwallet.html
echo "
#split private key into 3 keys
cat paperwallet.keys | sed '1,3d' | sed 's/^Privkey: //' | ssss-split -t 2 -n 3 -w privatekeypart -q | while read -r line; do
echo $line | qrencode -o "paperwallet.priv.part$CTR.png"
echo "This is part $CTR of a bitcoin paper wallet. two of three parts are needed to recover the original secret
" >> paperwallet.html
echo "
Public Key: " >> paperwallet.html cat paperwallet.pub >> paperwallet.html echo " | " >> paperwallet.html echo "Private Key (one among three): " >> paperwallet.html echo $line >> paperwallet.html echo " |
" >> paperwallet.html echo "" >> paperwallet.html echo " | " >> paperwallet.html echo "" >> paperwallet.html echo " |
echo "use linux command ssss-combine -t 2 to recover original private key from two paper wallets
" >> paperwallet.html
CTR=$[CTR+1]
done
echo "" >> paperwallet.html
use the following lines to test recovery
zbarimg --raw -q paperwallet.priv.part2.png | tr -s '\n' > testjoin.part2
cat testjoin.part1 testjoin.part2 | ssss-combine -q -t 2
be aware that the files generated contain your private key and are not cleaned up by this script. Only generate paper wallets on an offline computer running LiveCD.