Difference between revisions of "How to set up a secure offline savings wallet"

From Bitcoin Wiki
Jump to: navigation, search
(Notes: Replaced reference to specific paper wallet services with link to main paper wallet page)
(Nineteen-line-item American/British English grammar-only changes—Not steps, not meaning, and not-intent: just grammar, because the nature of and detailed steps on this page are critical.)
(30 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== Why set up an offline savings wallet? ==
+
= Why Set up an Offline Savings Wallet? =
  
Modern operating systems are getting more and more complex. The flip side of all this complexity is that they generally have a large [http://en.wikipedia.org/wiki/Attack_surface attack surface] and constantly leak information without the user’s knowledge or consent.  No matter how many precautions you take, your [[wallet]]s will never be 100% safe on a computer that is connected to the internet.
+
Modern operating systems are highly complexity, leading to a large [http://en.wikipedia.org/wiki/Attack_surface attack surface]. They also constantly leak information without the user’s knowledge or consent.   
 
 
Because bitcoins are stored directly on your computer and because they are real money, the motivation for sophisticated and targeted attacks against your system is higher than in the pre-bitcoin era, when only large organizations normally had to worry about such attacks.   
 
  
This guide will instruct you on how to create an offline wallet, a wallet that never even touches the internet in its plaintext form.  Another term for this is [[cold storage]]. This security measure is also referred to as being an air gap.  For all practical purposes, this wallet is safe from all online threats, such as viruses and hackers. It is however still exposed to offline threats, such as [http://en.wikipedia.org/wiki/Hardware_keylogger hardware keyloggers], extortion, or people looking over your shoulder. A best practice is to keep the majority of your bitcoins in the offline wallet and only to use the online wallet for everyday expenses/earnings.
+
No matter how many precautions you take, it is very hard to ensure your [[wallet]] is reasonably secure on an Internet connected computer.
  
The below procedure may seem tedious, but remember that security almost always comes at the cost of convenience.  When you deposit money at a bank, you let them worry about security.  Bitcoins, however, are stored on '''your''' computer and that means '''you''' are fully responsible for securing them. The bitcoin ecosystem is still very young and unfortunately no user friendly tools for creating  highly secure wallets have been developed yet (though some members of the Bitcoin community are [http://forum.bitcoin.org/?topic=7357.0 working hard at this]).
+
Because Bitcoins can be stored directly on your computer and because they are real money, the motivation for sophisticated and targeted attacks against your system is very high. Previously, only large organizations had to worry about advanced attacks.
  
== How to deposit funds ==
 
  
# Set up a [http://www.wuala.com/en/bitcoin Wuala] account, or other cloud backup service of your choice.
+
 
# Create a strong and unique password offline (manually).  This password should be at least 20 characters long; it should contain numbers, upper and lower case letters, and symbols. It should be as random as possible, ie it should look something like this: Zr%8qL03&cvwS9@05AatdP71. Never use this password elsewhere.   
+
= Overview of existing solutions =
# '''Do not forget this password'''. Recite it several times a day.  It is easy to overestimate your ability to remember a password several months in the future. To be on the safe side, write it down and store the piece of paper in a safety deposit box.
+
 
# Download [http://www.bitcoin.org/ Bitcoin Linux binary] and save it on a USB drive.
+
The bitcoin ecosystem is still relatively young and unfortunately not many user friendly and highly secure wallets have been developed yet.
# Shut down your computer, and boot [http://www.ubuntu.com/ Ubuntu] (or Linux distribution of you choice) from a [http://www.ubuntu.com/download/ubuntu/download liveCD]. This will not affect your current operating system.  
+
 
# '''Disconnect machine from the internet'''. Unplug any network cables and disable wireless. Verify that wireless is disabled in the icon on the upper right corner (Ubuntu).  Double check that machine is disconnected by opening the web browser.
+
Today these are the two best ways to secure your bitcoins against theft:
 +
 
 +
1. Using a [[hardware wallet]] such as [[TREZOR]].
 +
 
 +
A hardware wallet has two functions - it stores your Bitcoins in a hardened device that is designed to be simple and highly resistant to the usual range of attacks (viruses, hackers, keyloggers).
 +
 
 +
2. Create a [[cold storage]] wallet using [[BitKey]].
 +
 
 +
Cold storage wallets generate and store private wallet keys on a clean [https://en.wikipedia.org/wiki/Air_gap_(networking) air-gapped] computer.
 +
 
 +
Used correctly, an air-gapped wallet is safe from all online threats, such as viruses and hackers. It is however still exposed to offline threats, such as [http://en.wikipedia.org/wiki/Hardware_keylogger hardware keyloggers], extortion, or people looking over your shoulder.
 +
 
 +
To spend funds from cold storage securely, an unsigned transaction is generated on an Internet-connected computer. An unsigned transaction is akin to an unsigned check. The unsigned transaction is then transferred to the air-gapped computer to be verified & signed with the wallet keys.
 +
 
 +
Using a cold storage wallet on an air-gapped computer may seem tedious, but remember that security almost always comes at the cost of convenience. 
 +
 
 +
== Security warning ==
 +
 
 +
When you deposit money at a bank, you let them worry about security.  Bitcoins, however, are stored on '''your''' computer and that means '''you''' are fully responsible for securing them.
 +
 
 +
Unfortunately, most people are not security experts, which means it's very hard for them to fully understand the risks. They usually don't. This increases the risk of making a fatal mistake that will result in Bitcoin theft.
 +
 
 +
For example, paper wallets are typically generated by potentially compromised PCs connected to the Internet, then printed for offline storage. This is not enough as malware running on the computer may steal your private keys and then later steal any Bitcoin you send to that address. Many Internet connected printers also save printed documents to memory.
 +
 
 +
= Setting up an offline wallet from scratch =
 +
 
 +
There used to be no other way to set up an offline wallet than to do it from scratch. Today there are solutions such as [[BitKey]] that can help simplify the process.
 +
 
 +
If you're still interested in doing things the hard way, the rest of this guide will instruct you on how to create an offline wallet by hand.
 +
 
 +
== How to Deposit Funds ==
 +
 
 +
# Sign up for a few different cloud drive accounts such as Dropbox or Google drive.
 +
# Create a strong and unique passphrase offline (manually).  This passphrase should be TRULY random. [http://world.std.com/~reinhold/diceware.html Diceware] is a good way of generating the passphrase. It should be at least twelve words long.  
 +
#      Never use this passphrase elsewhere, especially not on the web.   
 +
# '''Do not forget this passphrase'''. Recite it several times a day.  It is easy to overestimate your ability to remember a passphrase several months in the future. To be on the safe side, write it down and store the piece of paper in a safe deposit box.
 +
# Download [https://bitcoin.org/en/download Bitcoin-Core Linux binary] and save it on a USB drive.
 +
#      '''Verify''' the software's release signatures from an alternative device and internet connection (e.g., your smartphone). This makes sure you are not using a malicious program that poses as the bonafide Bitcoin-Core client.
 +
# Shut down your computer, and boot [http://www.ubuntu.com/ Ubuntu] (or Linux distribution of your choice) from a [http://www.ubuntu.com/download/ubuntu/download liveCD]. This will not affect your current operating system.  
 +
# '''Disconnect machine from the internet'''. Unplug any network cables and disable wireless. Verify that wireless is disabled in the icon on the upper right corner (Ubuntu).  Double-check that the machine is disconnected by opening the web browser.
 
# Run bitcoin while disconnected to the internet. The client will show 0 connections and 0 blocks, but it will still generate a wallet.dat file and a bitcoin address.  
 
# Run bitcoin while disconnected to the internet. The client will show 0 connections and 0 blocks, but it will still generate a wallet.dat file and a bitcoin address.  
 
#      Encrypt your wallet using the strong and unique password from step 2 above. (Bitcoin Client > Settings > Encrypt wallet)
 
#      Encrypt your wallet using the strong and unique password from step 2 above. (Bitcoin Client > Settings > Encrypt wallet)
# Copy wallet.dat (found in hidden folder .bitcoin in your home directory) to USB drive.
+
# Copy wallet.dat (found in hidden folder .bitcoin in your home directory) to a USB drive.
# Save bitcoin address to a text file and copy it to USB drive.
+
# Save bitcoin address to a text file and copy it to a USB drive.
# Shut down system and turn off computer.  Before switching your computer on again, remove all power sources for about 1 minute. Physically remove battery from laptop.
+
# Shut down system the and turn off the computer.  Before switching your computer on again, remove all power sources for about 1 minute. Physically remove battery from the laptop.
 
# Backup encrypted wallet.dat file in several places:  
 
# Backup encrypted wallet.dat file in several places:  
#*Send it to your 5 best friends by email attachment and ask them to save it for you.
+
#*Send it to your five best friends by email attachment and ask them to save it for you.
#*Save it on your Wuala account created in step 1.
+
#*Save it on your cloud drive accounts created in step 1.
 
#*Save it on several USB drives and CDs and store them in different geographic locations.
 
#*Save it on several USB drives and CDs and store them in different geographic locations.
#Send bitcoins to the address saved on the USB drive.  Double check in the [[Bitcoin Block Explorer|block explorer]] that they have been sent.
+
#Send bitcoins to the address saved on the USB drive.  Double-check in the [[Bitcoin Block Explorer|block explorer]] that they have been sent or you can add Watch Bitcoin Address in [https://blockchain.info/wallet/ BlockChain Wallet].
  
==How to retrieve funds ==
+
==How to Retrieve Funds ==
  
 
#Boot from Ubuntu liveCD, as in step 5 above.  
 
#Boot from Ubuntu liveCD, as in step 5 above.  
#Insert USB drive.
+
#Insert the USB drive.
 
#Run bitcoin client and close it again.
 
#Run bitcoin client and close it again.
#Replace wallet.dat in ~/.bitcoin directory with wallet.dat from USB drive.
+
#Replace wallet.dat in ~/.bitcoin directory with wallet.dat from the USB drive.
 
#Connect to the internet.
 
#Connect to the internet.
 
#Restart bitcoin client.
 
#Restart bitcoin client.
 
#Wait for blocks to download (optional).
 
#Wait for blocks to download (optional).
 
#Send bitcoins.
 
#Send bitcoins.
 +
 +
==How to Setup Watch Bitcoin Address==
 +
 +
Watch Bitcoin address is a way for you to check your cold storage balance online without exposing your private key.
 +
#Create an wallet account at https://blockchain.info/wallet/
 +
#Go to import/export.
 +
#At "Add Watch Only Bitcoin Address", add your bitcoin address.
 +
#Wait for the balance to synchronize.
 +
#You can also download the mobile version at [https://play.google.com/store/apps/details?id=piuk.blockchain.android Google Play], [https://itunes.apple.com/us/app/blockchain-bitcoin-wallet/id493253309?mt=8 Apple Store]
  
 
==Notes==
 
==Notes==
  
*This procedure is only secure if you perform steps 1-13 in this '''exact order'''.
+
*This procedure is only secure if you perform steps 1-15 in this '''exact order'''.
 
 
*If you're a non-technical user that can't perform the steps above, use an [[Paper wallet|in-browser paper wallet generator]] to create paper wallets (read below for more caveats and info).
 
  
*Perform one or two trial runs of the above procedure with a few bitcents, and make sure that you know how to successfully retrieve them, before making a bulk transfer.
+
*Perform one or two trial runs of the above procedure with a few bitcents, and make sure that you know how to successfully retrieve them before making a bulk transfer.
  
 
*Every time you retrieve bitcoins from your savings wallet, create a fresh savings wallet by repeating the above procedure, and send all your remaining savings balance there.
 
*Every time you retrieve bitcoins from your savings wallet, create a fresh savings wallet by repeating the above procedure, and send all your remaining savings balance there.
  
*There is more than one way to do it. Similar procedures have been suggested on the forums [http://forum.bitcoin.org/index.php?topic=17240.0 here] and [http://forum.bitcoin.org/?topic=5194.0 here].
+
*There is more than one way to do it. Similar procedures have been suggested on the forums [http://bitcointalk.org/index.php?topic=17240.0 here] and [http://bitcointalk.org/?topic=5194.0 here].
 
 
*Beware that even savings wallets have limited lifetimes. New, backwards incompatible versions of bitcoin might come out in future, [http://en.wikipedia.org/wiki/Advanced_Encryption_Standard AES] might be broken, [http://en.wikipedia.org/wiki/Bit_rot bit rot] might destroy your wallets, etc. Pay attention to updates in the Bitcoin world and update to fresh savings wallets every couple of years, or as needed.
 
 
 
* See [[How to import private keys]] for an alternative way of retrieve your coins.
 
  
==Alternatives ==
+
*Beware that even savings wallets have limited lifetimes. New, backward-incompatible versions of bitcoin might come out in the future, [http://en.wikipedia.org/wiki/Advanced_Encryption_Standard AES] might be broken, [http://en.wikipedia.org/wiki/Bit_rot bit rot] might destroy your wallets, etc. Pay attention to updates in the Bitcoin world and update to fresh savings wallets every couple of years or as needed.
  
[[Paper wallet|'''Paper wallets''']] can also be used to create offline bitcoin savings accounts. While paper wallets are much easier to generate, they are not generally encrypted which means you cannot guard against accidental loss by distributing copies to online services and friends. Instead, paper wallets must be kept safe like jewels or cash. Looking forward, support for [[BIP 0038|BIP-38]] encryption is growing fast and it is expected that paper wallet generators will soon include options for generating ''encrypted paper wallets'' that can be duplicated and widely distributed for safekeeping.  
+
* See [[How to import private keys]] for an alternative way of retrieving your coins.
  
==See Also==
+
=See Also=
  
 
* [[Cold storage]]
 
* [[Cold storage]]
 +
* [[BitKey]]
 +
* [https://maxtaco.github.io/bitcoin/2014/01/16/how-jason-bourne-stores-his-bitcoin/ How Jason Bourne Stores His Bitcoins]
 
* [http://codinginmysleep.com/bitcoin-cold-storage-in-plain-english Bitcoin Cold Storage In Plain English] by David Perry
 
* [http://codinginmysleep.com/bitcoin-cold-storage-in-plain-english Bitcoin Cold Storage In Plain English] by David Perry
 +
* [https://www.youtube.com/watch?v=DQumISxkJsQ Electrum offline transactions tutorial]
  
 
[[Category:Instructional]]
 
[[Category:Instructional]]
 
[[Category:Security]]
 
[[Category:Security]]

Revision as of 02:55, 17 November 2021

Why Set up an Offline Savings Wallet?

Modern operating systems are highly complexity, leading to a large attack surface. They also constantly leak information without the user’s knowledge or consent.

No matter how many precautions you take, it is very hard to ensure your wallet is reasonably secure on an Internet connected computer.

Because Bitcoins can be stored directly on your computer and because they are real money, the motivation for sophisticated and targeted attacks against your system is very high. Previously, only large organizations had to worry about advanced attacks.


Overview of existing solutions

The bitcoin ecosystem is still relatively young and unfortunately not many user friendly and highly secure wallets have been developed yet.

Today these are the two best ways to secure your bitcoins against theft:

1. Using a hardware wallet such as TREZOR.

A hardware wallet has two functions - it stores your Bitcoins in a hardened device that is designed to be simple and highly resistant to the usual range of attacks (viruses, hackers, keyloggers).

2. Create a cold storage wallet using BitKey.

Cold storage wallets generate and store private wallet keys on a clean air-gapped computer.

Used correctly, an air-gapped wallet is safe from all online threats, such as viruses and hackers. It is however still exposed to offline threats, such as hardware keyloggers, extortion, or people looking over your shoulder.

To spend funds from cold storage securely, an unsigned transaction is generated on an Internet-connected computer. An unsigned transaction is akin to an unsigned check. The unsigned transaction is then transferred to the air-gapped computer to be verified & signed with the wallet keys.

Using a cold storage wallet on an air-gapped computer may seem tedious, but remember that security almost always comes at the cost of convenience.

Security warning

When you deposit money at a bank, you let them worry about security. Bitcoins, however, are stored on your computer and that means you are fully responsible for securing them.

Unfortunately, most people are not security experts, which means it's very hard for them to fully understand the risks. They usually don't. This increases the risk of making a fatal mistake that will result in Bitcoin theft.

For example, paper wallets are typically generated by potentially compromised PCs connected to the Internet, then printed for offline storage. This is not enough as malware running on the computer may steal your private keys and then later steal any Bitcoin you send to that address. Many Internet connected printers also save printed documents to memory.

Setting up an offline wallet from scratch

There used to be no other way to set up an offline wallet than to do it from scratch. Today there are solutions such as BitKey that can help simplify the process.

If you're still interested in doing things the hard way, the rest of this guide will instruct you on how to create an offline wallet by hand.

How to Deposit Funds

  1. Sign up for a few different cloud drive accounts such as Dropbox or Google drive.
  2. Create a strong and unique passphrase offline (manually). This passphrase should be TRULY random. Diceware is a good way of generating the passphrase. It should be at least twelve words long.
  3. Never use this passphrase elsewhere, especially not on the web.
  4. Do not forget this passphrase. Recite it several times a day. It is easy to overestimate your ability to remember a passphrase several months in the future. To be on the safe side, write it down and store the piece of paper in a safe deposit box.
  5. Download Bitcoin-Core Linux binary and save it on a USB drive.
  6. Verify the software's release signatures from an alternative device and internet connection (e.g., your smartphone). This makes sure you are not using a malicious program that poses as the bonafide Bitcoin-Core client.
  7. Shut down your computer, and boot Ubuntu (or Linux distribution of your choice) from a liveCD. This will not affect your current operating system.
  8. Disconnect machine from the internet. Unplug any network cables and disable wireless. Verify that wireless is disabled in the icon on the upper right corner (Ubuntu). Double-check that the machine is disconnected by opening the web browser.
  9. Run bitcoin while disconnected to the internet. The client will show 0 connections and 0 blocks, but it will still generate a wallet.dat file and a bitcoin address.
  10. Encrypt your wallet using the strong and unique password from step 2 above. (Bitcoin Client > Settings > Encrypt wallet)
  11. Copy wallet.dat (found in hidden folder .bitcoin in your home directory) to a USB drive.
  12. Save bitcoin address to a text file and copy it to a USB drive.
  13. Shut down system the and turn off the computer. Before switching your computer on again, remove all power sources for about 1 minute. Physically remove battery from the laptop.
  14. Backup encrypted wallet.dat file in several places:
    • Send it to your five best friends by email attachment and ask them to save it for you.
    • Save it on your cloud drive accounts created in step 1.
    • Save it on several USB drives and CDs and store them in different geographic locations.
  15. Send bitcoins to the address saved on the USB drive. Double-check in the block explorer that they have been sent or you can add Watch Bitcoin Address in BlockChain Wallet.

How to Retrieve Funds

  1. Boot from Ubuntu liveCD, as in step 5 above.
  2. Insert the USB drive.
  3. Run bitcoin client and close it again.
  4. Replace wallet.dat in ~/.bitcoin directory with wallet.dat from the USB drive.
  5. Connect to the internet.
  6. Restart bitcoin client.
  7. Wait for blocks to download (optional).
  8. Send bitcoins.

How to Setup Watch Bitcoin Address

Watch Bitcoin address is a way for you to check your cold storage balance online without exposing your private key.

  1. Create an wallet account at https://blockchain.info/wallet/
  2. Go to import/export.
  3. At "Add Watch Only Bitcoin Address", add your bitcoin address.
  4. Wait for the balance to synchronize.
  5. You can also download the mobile version at Google Play, Apple Store

Notes

  • This procedure is only secure if you perform steps 1-15 in this exact order.
  • Perform one or two trial runs of the above procedure with a few bitcents, and make sure that you know how to successfully retrieve them before making a bulk transfer.
  • Every time you retrieve bitcoins from your savings wallet, create a fresh savings wallet by repeating the above procedure, and send all your remaining savings balance there.
  • There is more than one way to do it. Similar procedures have been suggested on the forums here and here.
  • Beware that even savings wallets have limited lifetimes. New, backward-incompatible versions of bitcoin might come out in the future, AES might be broken, bit rot might destroy your wallets, etc. Pay attention to updates in the Bitcoin world and update to fresh savings wallets every couple of years or as needed.

See Also