How to create a secure encrypted bitcoin paper backup
Tags: Security, Bitcoin, Paperwallet, Bitcoin Wallet, Cryptocurrency

It’s a good practice to back up your wallet on paper because disk or other digital backups can easily crash. But having a seed as is on the paper is a bad idea because if someone will be able to look at it (for example, you got robbed), he’ll have access to your wallet.

In this article, we’ll create an encrypted version of a seed that is used to access your addresses (for Electrum, but should work for any client) using the open-source tool gpg

I recorded all the steps on the video, you can watch it if you’re stuck at some point:

Video version of encrypting your paper wallet

1. Installing gpg

Ubuntu:

sudo apt install gpg

MacOS:

brew install -v gpg

2. Encrypt your seed

To get your seed in Electrum go to Wallet -> Seed . For example, your seed is

length intact cereal lounge gold shoulder swift distance win nation tomato spoon

# For MacOS only, enter this in terminal before the next command export GPG_TTY=$(tty)

Type the following in the terminal

echo length intact cereal lounge gold shoulder swift distance win nation tomato spoon | gpg --symmetric --cipher-algo AES256 | base64 > seed.txt.gpg.b64

Some explanation

echo prints our seed to the stdout, gpg encrypts the seed using a symmetric algorithm AES256, base64 converts the resulting bytes to human-readable text. > seed.txt.gpg.b64 puts everything to the file

You’ll be asked for the password, for testing purposes let’s use test but for a real wallet, you should choose long enough password with 8 letters/numbers at least.

Be aware, that starting from this point you won’t be able to access your wallet without password, so use something you can recall in the future

With password test the content of the file will be:

jA0ECQMCRtzGOcwUaTr/0nsB4rIi0o6P9Un64ps29WcV9/r9ZwgVlBtbjoPp0TtkpbXhAqeBzUeZ

ddgTtnPGAtastBN3YyJafy2Ky1KHa1o0/Nqm6Q5ia4pJiM44q5BTs2vI7HwKqZxDZD3A0nP6Ettd

qvtA+CsPd5ER4/KI8o4MMSTUZJyoRch1Jlc=

3. Generate QR code

You can use your favorite QR code generator, even the online version will be acceptable because without password this is just a bunch of bytes. For Ubuntu, I used qtqr

sudo apt install qtqr

Now you can save this image, print it on paper, and put it in several safe places. This is an encrypted version of your seed. Even being stolen this picture won’t let to access your wallet without your password. I would recommend saving encrypted version somewhere in the cloud too.

4. Testing and restoring your wallet

It’s important to test that everything went well and your seed can be restored. Also, don’t forget to bookmark this article to recall how to do this

Scan this image using your mobile phone. You should get a base64 version of encrypted seed, send it somehow to yourself. You also can just use the Decode from file button in qtqr or any QR encoder/decoder. Make sure you’re getting the same result as in step2 . If you used the password test the result would be:

jA0ECQMCRtzGOcwUaTr/0nsB4rIi0o6P9Un64ps29WcV9/r9ZwgVlBtbjoPp0TtkpbXhAqeBzUeZ

ddgTtnPGAtastBN3YyJafy2Ky1KHa1o0/Nqm6Q5ia4pJiM44q5BTs2vI7HwKqZxDZD3A0nP6Ettd

qvtA+CsPd5ER4/KI8o4MMSTUZJyoRch1Jlc=

Save this content into a file seed.txt.gpg.b64 Pay attention, the content should be exactly the same without extra symbols

# For MacOS only, enter this in terminal before the next command export GPG_TTY=$(tty)

Now to convert this to your seed use the following command

cat seed.txt.gpg.b64 | base64 --decode | gpg -d

Type your password, and see the output:

length intact cereal lounge gold shoulder swift distance win nation tomato spoon