Background:I 've already implemented
BASH21 - A simple BASH paper wallet generator.
Yesterday, I wanted to see what would be the
easiest way to generate a paper wallet on a GUI less linux machine.
Prerequisites:1. Any machine running linux
offline.
2. An internet connected computer.
3. A usb.
Preparation:1. On your internet connected computer, download libbitcoin-explorer from here:
https://github.com/libbitcoin/libbitcoin-explorer/releases/download/v2.2.0/bx-linux-x64-mainnet. Obviously, you can build it from scratch, but this wouldn't be the
easiest way. You can also verify the binary file, which is, for me, a mandatory step.
2. Put the binary in the USB.
3. Turn on the offline Linux machine and put on the USB.
4. Open up a terminal.
5. Mount the USB.
This will return something like:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
...
sdb 8:16 0 14.8G 0 disk
`-sdb1 8:17 0 14.8G 0 part
...
So we need to
mount the USB from our /dev/sdb1 onto our file system's mount-point.
Let's create the mount-point and mount the USB there.
sudo mkdir -p /media/mount-usb
sudo mount /dev/sdb1 /media/mount-usb
6. We need to copy the binary from the USB to our filesystem, let's say onto
~/easy-paper/. We 'll also change the name to a simple
bx.
sudo mv /media/mount-usb/bx-linux-x64-mainnet ~/easy-paper/bx
7. Let's make it executable.
cd ~/easy-paper
chmod u+x bx
Actual Wallet Creation:openssl rand -hex 32 | ./bx ec-new | ./bx ec-to-wif | tee /dev/tty | ./bx wif-to-public | ./bx ec-to-address
The output will look like this:
L2pUQKGAaqZuMoU77kZpLyeM5cpM4Z6x2tFFUkuxLDzEACrrKZDS
1NhDJheRUGH3RgYYvQAajbRuv6kVBryjq7