Difference between revisions of "Storing bitcoins"

From Bitcoin Wiki
Jump to: navigation, search
(Further reading)
(renamed all "mnemonic phrase" to "seed phrase")
(22 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
As bitcoin is a digital asset, it can be very un-intuitive to store safely. Historically many people have lost their coins but with proper understanding the risks can be eliminated. If your bitcoins do end up lost or stolen then there's almost certainly nothing that can be done to get them back.
 
As bitcoin is a digital asset, it can be very un-intuitive to store safely. Historically many people have lost their coins but with proper understanding the risks can be eliminated. If your bitcoins do end up lost or stolen then there's almost certainly nothing that can be done to get them back.
  
tl;dr The best way to store bitcoin is to either buy a [[hardware wallet]] or install a [[Multisignature|multisignature wallet]]. Have your wallet create a [[Mnemonic phrase|mnemonic recovery phrase]], write it down on paper and store it in a safe place. The wallet should be backed by your own [[full node]].
+
tl;dr The best way to store bitcoin is to either buy a [[hardware wallet]] or install a [[Multisignature|multisignature wallet]]. Have your wallet create a [[seed phrase]], write it down on paper and store it in a safe place. The wallet should be backed by your own [[full node]].
  
 
== Introduction ==
 
== Introduction ==
Line 10: Line 10:
  
 
* Protection against accidental loss
 
* Protection against accidental loss
* Verification
+
* Verification that the bitcoins are genuine
* Privacy / protection against spying
+
* Privacy and protection against spying
 
* Protection against theft
 
* Protection against theft
 
* Easy access for spending or moving bitcoins
 
* Easy access for spending or moving bitcoins
Line 17: Line 17:
 
The art and science of storing bitcoins is about keeping your private keys safe, yet them still being easily available to you when you want to transact with them. It also requires verifying that your recieved bitcoins are real, and stopping an adversary from spying on you.
 
The art and science of storing bitcoins is about keeping your private keys safe, yet them still being easily available to you when you want to transact with them. It also requires verifying that your recieved bitcoins are real, and stopping an adversary from spying on you.
  
[[File:Mnemonic-seed-still-life.jpg|300px|thumb|alt=An example mnemonic phrase written on paper|Example mnemonic phrase on paper.]]
+
[[File:Mnemonic-seed-still-life.jpg|300px|thumb|alt=An example seed phrase written on paper|Example seed phrase on paper.]]
  
 
=== Protection from accidental loss ===
 
=== Protection from accidental loss ===
  
In the past many people have accidentally lost bitcoins because of failed backups, forgotten hard drives or corrupted SSD devices. Through bitter experience it was found that one of the most practical storage mediums is '''pencil and paper'''. The private keys of a bitcoin wallet are encoded into [[Mnemonic phrase|random words from a dictionary]] which can be written down. If the your hard drive crashes you can find the paper with the [[mnemonic phrase]] and restore the entire wallet. All good wallet software ask their users to write down the [[Mnemonic phrase|mnemonic recovery phrase]] of the wallet. It is worthwhile to keep copies in several locations so that even if your home burns down and nothing remains you can still recover the bitcoins.
+
In the past many people have accidentally lost bitcoins because of failed backups, forgotten hard drives or corrupted SSD devices. Through bitter experience it was found that one of the most practical storage mediums is '''pencil and paper'''. The private keys of a bitcoin wallet are encoded into [[seed phrase|random words from a dictionary]] which can be written down. If the your hard drive crashes you can find the paper with the [[seed phrase]] and restore the entire wallet. All good wallet software asks their users to write down the [[seed phrase|seed recovery phrase]] of the wallet. It is worthwhile to keep copies in several locations so that even if your home burns down and nothing remains you can still recover the bitcoins.
  
 
=== Verification and privacy ===
 
=== Verification and privacy ===
  
Storing a [[mnemonic phrase]] only stores [[Private key|private keys]], it cannot tell you if you have actually received bitcoins and in what quantity. For that you need wallet software.
+
Storing a [[seed phrase]] only stores [[Private key|private keys]], it cannot tell you if you have actually received bitcoins and in what quantity. For that you need wallet software.
  
If you received cash banknotes or gold coins to be stored, you wouldn't accept them without verifying that the banknotes were genuine and that the gold was real. The same is true with bitcoin, payments must be genuine or else you may be slipped counterfeit bitcoins and be left out of pocket. The most secure kind of wallet is one which verifies all the rules of bitcoin, known as a [[full node]]. For recieving large volumes it is essential to use wallet software backed by a [[full node]]. If bitcoin is digital gold, then a [[full node]] is your own person goldsmith who checks that received bitcoin payments are actually real. Lightweight wallets which don't check all of bitcoin's rules are only appropriate for receiving smaller amounts or when you trust the sender. See the article about [[full node|full nodes]].
+
If you received cash banknotes or gold coins as payment, you wouldn't accept them without verifying that the banknotes were genuine and that the gold was real. The same is true with bitcoin, payments must be genuine or else you may be slipped counterfeit bitcoins and be left out of pocket. The most secure kind of wallet is one which independently verifies ''all'' the rules of bitcoin, known as a [[full node]]. For receiving large volumes it is essential to use wallet software backed by a [[full node]]. If bitcoin is digital gold, then a [[full node]] is your own personal goldsmith who checks that received bitcoin payments are actually real. Lightweight wallets which don't check all of bitcoin's rules are only appropriate for receiving smaller amounts or when you trust the sender. See the article about [[full node|full nodes]].
  
 
Your wallet software will also need to learn the history and balance of its wallet. For a lightweight wallet this usually involves querying a third-party server which leads to a privacy problem as that server can spy on you by seeing your entire balance, all your transactions and usually linking it with your IP address. Using a [[full node]] avoids this problem because the software connects directly to the bitcoin p2p network and downloads the entire [[blockchain]], so any adversary will find it much harder to obtain information. See also: [[Anonymity]]
 
Your wallet software will also need to learn the history and balance of its wallet. For a lightweight wallet this usually involves querying a third-party server which leads to a privacy problem as that server can spy on you by seeing your entire balance, all your transactions and usually linking it with your IP address. Using a [[full node]] avoids this problem because the software connects directly to the bitcoin p2p network and downloads the entire [[blockchain]], so any adversary will find it much harder to obtain information. See also: [[Anonymity]]
  
So for verification and privacy, a good storage solution should be backed by a [[full node]] under your own control for use when recieving payments. Note that the [[full node]] wallet on an online computer can be a watch-only wallet that does not have the ability to actually spend or steal the bitcoins.
+
So for verification and privacy, a good storage solution should be backed by a [[full node]] under your own control for use when receiving payments. The [[full node]] wallet on an online computer can be a watch-only wallet that can display transaction information but does not have the ability to actually spend or steal the bitcoins.
  
 
=== Protection from theft ===
 
=== Protection from theft ===
  
Possession of bitcoins comes from keep your ability to keep the private keys under your exclusive control. Any malware or hackers who learn what your private keys are can create a valid bitcoin transaction sending your coins to themselves, effectively stealing your bitcoins. The average person's computer is usually vulnerable to malware so that must be taken into account when deciding on storage solutions.
+
Possession of bitcoins comes from keep your ability to keep the private keys under your exclusive control. In bitcoin, data is money. Any malware or hackers who learn what your private keys are can create a valid bitcoin transaction sending your coins to themselves, effectively stealing your bitcoins. The average person's computer is usually vulnerable to malware so that must be taken into account when deciding on storage solutions. Anybody else who discovers a wallet's [[seed phrase]] can steal all the bitcoins, so it must be kept safe and secret like jewels or cash, in particular phrases should not be typed into any website.
 +
 
 +
[[Seed phrase]]s can store any amount of bitcoins. It doesn't seem secure to possibly have enough money to purchase the entire building just sitting on a sheet of paper without any protection. For this reason many wallets make it possible to encrypt a seed phrase with a password. See [[Seed phrase#Two-Factor_Seed_Phrases]]
  
 
=== Easy access ===
 
=== Easy access ===
  
Some users may not need to actually move their bitcoins very often, especially if they [[Bitcoin as an investment|own bitcoin as an investment]]. Other users will want to be able to quickly and easily move their coins.
+
Some users may not need to actually move their bitcoins very often, especially if they [[Bitcoin as an investment|own bitcoin as an investment]]. Other users will want to be able to quickly and easily move their coins. A solution for storing bitcoins should take into account how convenient it is to spend from depending on the user's needs.
 +
 
 +
=== Summary ===
 +
 
 +
In summary: bitcoin wallets should be backed up by writing down their [[seed phrase]], this phrase must be kept safe and secret, and when sending or receiving transactions the wallet software should obtain information about the bitcoin network from your own [[full node]].
  
 
== Discussion of wallet solutions ==
 
== Discussion of wallet solutions ==
Line 47: Line 53:
 
[[Hardware wallet]]s are special purpose security-hardened devices for storing Bitcoins on a peripheral that is trusted to generate wallet keys and sign transactions.
 
[[Hardware wallet]]s are special purpose security-hardened devices for storing Bitcoins on a peripheral that is trusted to generate wallet keys and sign transactions.
  
A [[hardware wallet]] typically holds the private keys in its internal storage and is designed to be malware resistant. The device signs the transactions internally and only transmits the signed transactions to the computer. The separation of the private keys from the vulnerable environment allows the user to spend bitcoins on an untrustworthy computer with reduced risk.
+
A [[hardware wallet]] typically holds the private keys in its internal storage and is designed to be malware resistant. The device signs the transactions internally and only transmits the signed transactions to the computer. The separation of the private keys from the vulnerable environment allows the user to spend bitcoins on an untrustworthy computer with reduced risk. Hardware wallets can be very user-friendly and are a top solution for holding private keys.
  
Unfortunately as of November 2017 no hardware wallet on the market can be easily connected to a [[full node]], so using them usually involves not verifying the rules of bitcoin and querying a third-party server which can spy on you. Hardware wallets are also physical objects that can be found and which prove that you probably own bitcoins. They also cost more than other solutions.
+
Some downsides are that hardware wallets are physical objects which could be discovered and which prove that you probably own bitcoins, this is worth considering when for example crossing borders. They also cost more than software wallets.
  
 
Main article: [[Hardware wallet]]
 
Main article: [[Hardware wallet]]
Line 55: Line 61:
 
=== Multisignature wallets ===
 
=== Multisignature wallets ===
  
A multisignature wallet is one where multiple private keys are required to move the bitcoins instead of a single key. These private keys can be spread across multiple machines with the assumption that malware and hackers are unlikely to simultaneously infect your laptop, desktop and smartphone. The multisig wallet can be of the m-of-n type where any m private keys out of a possible n are required to move the money. For example a 2-of-3 multisig wallet might have your private keys spread across a desktop, laptop and smartphone; any two are required to move the money but the loss of any one does not result in loss of money especially because they can be restored from paper backup.
+
A multisignature wallet is one where multiple private keys are required to move the bitcoins instead of a single key, avoiding a single point of failure. These private keys can be spread across multiple machines in various locations with the rationale that malware and hackers are unlikely to infect all of them. The multisig wallet can be of the m-of-n type where any m private keys out of a possible n are required to move the money. For example a 2-of-3 multisig wallet might have your private keys spread across a desktop, laptop and smartphone; any two are required to move the money but the loss of any one does not result in loss of money especially because they can be restored from paper backup.
  
Multisignature wallets have the advantage of being cheaper than hardware wallets since they are implemented in software and can be downloaded for free, as well as being convenient as all keys are online and the wallet user interfaces are typically easy to use. Wallet software [[Electrum]] and [[Armory]] can create multisig wallets.
+
Multisignature wallets have the advantage of being cheaper than hardware wallets since they are implemented in software and can be downloaded for free, as well as being convenient as all keys are online and the wallet user interfaces are typically easy to use. Wallet software [[Electrum]] and [[Armory]] can create multisig wallets. Hardware and multisignature wallets can be combined by having a multisignature wallet with the private keys held on hardware wallets; after all a single hardware wallet is still a single point of failure. Cold storage and multisignature can also be combined, by having the multisignature wallet with the private keys held in cold storage to avoid them being kept online.
  
 
Main article: [[Multisignature]]
 
Main article: [[Multisignature]]
 
=== Hot wallets ===
 
 
A hot wallet refers to keeping single-signature wallets with private keys kept on an online computer. Most bitcoin wallet software out there is a hot wallet. The bitcoins are easy to spend but are maximally vulnerable to malware or hackers. Hot wallets may be appropriate for small amounts.
 
  
 
=== Cold storage wallets ===
 
=== Cold storage wallets ===
  
A cold wallet generates and stores private wallet keys offline on a clean, newly-installed [https://en.wikipedia.org/wiki/Air_gap_(networking) air-gapped] computer. Payments are recieved online with a watch-only wallet. Unsigned transactions are generated online, transferred offline for signing, and the signed transaction is transferred online to be broadcast to the Bitcoin network.
+
A cold wallet generates and stores private wallet keys offline on a clean, newly-installed [https://en.wikipedia.org/wiki/Air_gap_(networking) air-gapped] computer. Payments are received online with a watch-only wallet. Unsigned transactions are generated online, transferred offline for signing, and the signed transaction is transferred online to be broadcast to the Bitcoin network.
  
 
This allows funds to be managed offline in [[Cold storage]]. Used correctly a cold wallet is protected against online threats, such as viruses and hackers. Cold wallets are similar to hardware wallets, except that a general purpose computing device is used instead of a special purpose peripheral. The downside is that the transferring of transactions to and fro can be fiddly and unweilding, and less practical for carrying around like a hardware wallet.
 
This allows funds to be managed offline in [[Cold storage]]. Used correctly a cold wallet is protected against online threats, such as viruses and hackers. Cold wallets are similar to hardware wallets, except that a general purpose computing device is used instead of a special purpose peripheral. The downside is that the transferring of transactions to and fro can be fiddly and unweilding, and less practical for carrying around like a hardware wallet.
  
 
Main article: [[Cold storage]]
 
Main article: [[Cold storage]]
 +
 +
=== Hot wallets ===
 +
 +
A hot wallet refers to keeping single-signature wallets with private keys kept on an online computer. Most bitcoin wallet software out there is a hot wallet. The bitcoins are easy to spend but are maximally vulnerable to malware or hackers. Hot wallets may be appropriate for small amounts and day-to-day spending.
 +
 +
Main article: [[Hot wallet]]
  
 
== Bad wallet ideas ==
 
== Bad wallet ideas ==
Line 99: Line 107:
 
=== Web wallets ===
 
=== Web wallets ===
  
Web wallets have all the downsides of custodial wallets along with all the downsides of hot wallets (exposed private keys), as well as all the downsides of lightweight wallets (not verifying bitcoin's rules, someone could send you a billion bitcoins and under certain conditions the dumb web wallet would happily accept it)
+
Web wallets have all the downsides of custodial wallets (no direct possession, private keys are held by a third party) along with all the downsides of hot wallets (exposed private keys), as well as all the downsides of lightweight wallets (not verifying bitcoin's rules, someone could send you a billion bitcoins and under certain conditions the dumb web wallet would happily accept it)
 +
 
 +
Someone who needs the easy access of a web wallet should download a lightweight wallet like [[Electrum]].
  
 
=== Paper wallets ===
 
=== Paper wallets ===
  
So-called [[paper wallets]] are an obsolete and unsafe method of storing bitcoin which should not be recommended to newbs to use. They simply store a single private/public keypair on paper. They promote [[address reuse]] and require unweildy and complicated live OS system boots to be safe, they risk theft by printers and typically rely on [[Javascript cryptography]].
+
So-called [[paper wallets]] are an obsolete and unsafe method of storing bitcoin which should not be recommended to beginners. They simply store a single private/public keypair on paper. They promote [[address reuse]] and require unwieldy and complicated live OS system boots to be safe, they risk theft by printers, and typically rely on [[Javascript cryptography]].
  
Paper wallets also do not provide any method of displaying to the user when money has arrived, users are typically driven to use third-party blockchain explorers which can lie to them and spy on them.
+
Paper wallets also do not provide any method of displaying to the user when money has arrived. There's no practical way to use a [[full node]] wallet, users are typically driven to use third-party blockchain explorers which can lie to them and spy on them.
  
A much better way to achieve the job that paper wallets do is to use [[mnemonic phrase|mnemonic phrases]] instead.
+
A much better way accomplish what paper wallets do is to use [[seed phrase]]s instead.
  
 
Main article: [[Paper wallets]]
 
Main article: [[Paper wallets]]
Line 113: Line 123:
 
=== Cloud storage ===
 
=== Cloud storage ===
  
This means storing your encrypted (or not) wallet file on a cloud storage solution such as Dropbox.
+
This means storing your encrypted (or not) wallet file on a cloud storage solution such as Dropbox, or emailing them to yourself on gmail. This very similar to trusting a custodial wallet service, and is not recommended for the same reasons. You might say you use encryption for two-factor authentication, but uploading the wallet to the cloud reduces this to one-factor.
  
 
=== Removable media ===
 
=== Removable media ===
Line 125: Line 135:
 
* https://tedjonesweb.blogspot.co.uk/2017/08/do-not-use-flash-memory-ssd-drives.html
 
* https://tedjonesweb.blogspot.co.uk/2017/08/do-not-use-flash-memory-ssd-drives.html
  
Those articles recommend using GPG for encryption or a printer, instead a better solution is [[mnemonic phrases]].
+
Those articles recommend using GPG for encryption or a printer, instead a better solution is [[seed phrase]]s.
  
 
== Other ideas ==
 
== Other ideas ==
Line 138: Line 148:
  
 
If you intend to store a very large amount of bitcoins, for example in a business, you should consider paying for security consulting.
 
If you intend to store a very large amount of bitcoins, for example in a business, you should consider paying for security consulting.
 +
 +
== The 5 dollar wrench attack ==
 +
 +
[[File:Security.png|400px|none|alt=xkcd comic on the 5 dollar wrench attack.]]
 +
 +
It's sometimes said that all this security is worthless because the $5 wrench attack can be used.
 +
 +
Stored bitcoins are not secured by [[seed phrase]]s, [[hardware wallet]]s, [[multisignature]], passwords, hash functions or anything like that; they are secured by ''people''.
 +
 +
Technology is never the root of system security. Technology is a tool to help people secure what they value. Security requires people to act. A server cannot be secured by a firewall if there is no lock on the door to the server room, and a lock cannot secure the server room without a guard to monitor the door, and a guard cannot secure the door without risk of personal harm.<ref>[https://github.com/libbitcoin/libbitcoin/wiki/Risk-Sharing-Principle Libbitcoin wiki Risk Sharing Principle]</ref>.
 +
 +
Bitcoin is no different. The technology discussed on this page is only a tool to tip the scales in the defender's favour. Following from this principle, the way to beat the $5 wrench attack is to bear arms. Either your own, or employ guards, or use a safety deposit box, or rely on the police forces and army; or whatever may be appropriate and proportionate in your situation. If someone physically overpowers you then no technology on Earth can save your bitcoins. You can't be your own bank without bank-level security.
 +
 +
See Also: [https://twitter.com/i/moments/942083114385281024 Guns + Bitcoin Hardware Wallets]
  
 
== Further reading ==
 
== Further reading ==
 +
 +
* https://bitzuma.com/posts/a-gentle-introduction-to-bitcoin-cold-storage/
  
 
* https://medium.com/@lopp/thoughts-on-secure-storage-of-bitcoins-and-other-crypto-assets-210cadabb53d
 
* https://medium.com/@lopp/thoughts-on-secure-storage-of-bitcoins-and-other-crypto-assets-210cadabb53d
Line 147: Line 173:
 
* Two-factor authentication on custodial wallets doesn't work as well as you might think https://medium.com/@CodyBrown/how-to-lose-8k-worth-of-bitcoin-in-15-minutes-with-verizon-and-coinbase-com-ba75fb8d0bac
 
* Two-factor authentication on custodial wallets doesn't work as well as you might think https://medium.com/@CodyBrown/how-to-lose-8k-worth-of-bitcoin-in-15-minutes-with-verizon-and-coinbase-com-ba75fb8d0bac
  
* https://bitzuma.com/posts/a-gentle-introduction-to-bitcoin-cold-storage/
+
* This is why you shouldn’t use texts for two-factor authentication https://www.theverge.com/2017/9/18/16328172/sms-two-factor-authentication-hack-password-bitcoin Hacking 2FA based on SMS is easy.
  
 
==References==
 
==References==

Revision as of 12:29, 17 July 2018

This page is a discussion of the different ways of storing bitcoins, whether for investment purposes or as a medium of exchange.

As bitcoin is a digital asset, it can be very un-intuitive to store safely. Historically many people have lost their coins but with proper understanding the risks can be eliminated. If your bitcoins do end up lost or stolen then there's almost certainly nothing that can be done to get them back.

tl;dr The best way to store bitcoin is to either buy a hardware wallet or install a multisignature wallet. Have your wallet create a seed phrase, write it down on paper and store it in a safe place. The wallet should be backed by your own full node.

Introduction

Storage of bitcoin can be broken down in a few independent goals:

  • Protection against accidental loss
  • Verification that the bitcoins are genuine
  • Privacy and protection against spying
  • Protection against theft
  • Easy access for spending or moving bitcoins

The art and science of storing bitcoins is about keeping your private keys safe, yet them still being easily available to you when you want to transact with them. It also requires verifying that your recieved bitcoins are real, and stopping an adversary from spying on you.

An example seed phrase written on paper
Example seed phrase on paper.

Protection from accidental loss

In the past many people have accidentally lost bitcoins because of failed backups, forgotten hard drives or corrupted SSD devices. Through bitter experience it was found that one of the most practical storage mediums is pencil and paper. The private keys of a bitcoin wallet are encoded into random words from a dictionary which can be written down. If the your hard drive crashes you can find the paper with the seed phrase and restore the entire wallet. All good wallet software asks their users to write down the seed recovery phrase of the wallet. It is worthwhile to keep copies in several locations so that even if your home burns down and nothing remains you can still recover the bitcoins.

Verification and privacy

Storing a seed phrase only stores private keys, it cannot tell you if you have actually received bitcoins and in what quantity. For that you need wallet software.

If you received cash banknotes or gold coins as payment, you wouldn't accept them without verifying that the banknotes were genuine and that the gold was real. The same is true with bitcoin, payments must be genuine or else you may be slipped counterfeit bitcoins and be left out of pocket. The most secure kind of wallet is one which independently verifies all the rules of bitcoin, known as a full node. For receiving large volumes it is essential to use wallet software backed by a full node. If bitcoin is digital gold, then a full node is your own personal goldsmith who checks that received bitcoin payments are actually real. Lightweight wallets which don't check all of bitcoin's rules are only appropriate for receiving smaller amounts or when you trust the sender. See the article about full nodes.

Your wallet software will also need to learn the history and balance of its wallet. For a lightweight wallet this usually involves querying a third-party server which leads to a privacy problem as that server can spy on you by seeing your entire balance, all your transactions and usually linking it with your IP address. Using a full node avoids this problem because the software connects directly to the bitcoin p2p network and downloads the entire blockchain, so any adversary will find it much harder to obtain information. See also: Anonymity

So for verification and privacy, a good storage solution should be backed by a full node under your own control for use when receiving payments. The full node wallet on an online computer can be a watch-only wallet that can display transaction information but does not have the ability to actually spend or steal the bitcoins.

Protection from theft

Possession of bitcoins comes from keep your ability to keep the private keys under your exclusive control. In bitcoin, data is money. Any malware or hackers who learn what your private keys are can create a valid bitcoin transaction sending your coins to themselves, effectively stealing your bitcoins. The average person's computer is usually vulnerable to malware so that must be taken into account when deciding on storage solutions. Anybody else who discovers a wallet's seed phrase can steal all the bitcoins, so it must be kept safe and secret like jewels or cash, in particular phrases should not be typed into any website.

Seed phrases can store any amount of bitcoins. It doesn't seem secure to possibly have enough money to purchase the entire building just sitting on a sheet of paper without any protection. For this reason many wallets make it possible to encrypt a seed phrase with a password. See Seed phrase#Two-Factor_Seed_Phrases

Easy access

Some users may not need to actually move their bitcoins very often, especially if they own bitcoin as an investment. Other users will want to be able to quickly and easily move their coins. A solution for storing bitcoins should take into account how convenient it is to spend from depending on the user's needs.

Summary

In summary: bitcoin wallets should be backed up by writing down their seed phrase, this phrase must be kept safe and secret, and when sending or receiving transactions the wallet software should obtain information about the bitcoin network from your own full node.

Discussion of wallet solutions

Hardware wallets

Hardware wallets are special purpose security-hardened devices for storing Bitcoins on a peripheral that is trusted to generate wallet keys and sign transactions.

A hardware wallet typically holds the private keys in its internal storage and is designed to be malware resistant. The device signs the transactions internally and only transmits the signed transactions to the computer. The separation of the private keys from the vulnerable environment allows the user to spend bitcoins on an untrustworthy computer with reduced risk. Hardware wallets can be very user-friendly and are a top solution for holding private keys.

Some downsides are that hardware wallets are physical objects which could be discovered and which prove that you probably own bitcoins, this is worth considering when for example crossing borders. They also cost more than software wallets.

Main article: Hardware wallet

Multisignature wallets

A multisignature wallet is one where multiple private keys are required to move the bitcoins instead of a single key, avoiding a single point of failure. These private keys can be spread across multiple machines in various locations with the rationale that malware and hackers are unlikely to infect all of them. The multisig wallet can be of the m-of-n type where any m private keys out of a possible n are required to move the money. For example a 2-of-3 multisig wallet might have your private keys spread across a desktop, laptop and smartphone; any two are required to move the money but the loss of any one does not result in loss of money especially because they can be restored from paper backup.

Multisignature wallets have the advantage of being cheaper than hardware wallets since they are implemented in software and can be downloaded for free, as well as being convenient as all keys are online and the wallet user interfaces are typically easy to use. Wallet software Electrum and Armory can create multisig wallets. Hardware and multisignature wallets can be combined by having a multisignature wallet with the private keys held on hardware wallets; after all a single hardware wallet is still a single point of failure. Cold storage and multisignature can also be combined, by having the multisignature wallet with the private keys held in cold storage to avoid them being kept online.

Main article: Multisignature

Cold storage wallets

A cold wallet generates and stores private wallet keys offline on a clean, newly-installed air-gapped computer. Payments are received online with a watch-only wallet. Unsigned transactions are generated online, transferred offline for signing, and the signed transaction is transferred online to be broadcast to the Bitcoin network.

This allows funds to be managed offline in Cold storage. Used correctly a cold wallet is protected against online threats, such as viruses and hackers. Cold wallets are similar to hardware wallets, except that a general purpose computing device is used instead of a special purpose peripheral. The downside is that the transferring of transactions to and fro can be fiddly and unweilding, and less practical for carrying around like a hardware wallet.

Main article: Cold storage

Hot wallets

A hot wallet refers to keeping single-signature wallets with private keys kept on an online computer. Most bitcoin wallet software out there is a hot wallet. The bitcoins are easy to spend but are maximally vulnerable to malware or hackers. Hot wallets may be appropriate for small amounts and day-to-day spending.

Main article: Hot wallet

Bad wallet ideas

Custodial wallets

Custodial wallets are where an exchange, broker or other third party holds your bitcoins in trust.

The number one rule to storing bitcoin is this: if you don’t hold the private keys, you don’t actually own the assets. There are many many historical examples of loss due to custodial wallets: Bitcoinica, Silk Road, Bitfloor, MTGOX, Sheep Marketplace, BTC-e, Bitstamp, Bitfinex, Bithumb, Cryptsy, Bter, Mintpal and many more[1]

"Isn't it just like keeping your money in a bank?"

There are trade offs with everything, but let me explain why trusting Coinbase with Bitcoin is not the same as trusting a bank with dollars:
Suppose 5 people are needed to access the funds, within Coinbase, e.g. the CEO, the lead engineer, 3 others, whatever. Suppose one day they wake up and decide to be evil and move all the Bitcoin to some private account of theirs, and perhaps make up a story in the press about how they've been "hacked". You have a serious problem, as you might find there is a protracted legal battle (see MtGox), but you can't actually retrieve the funds unless in some way the company is re-stocked with Bitcoin, or perhaps an equivalent in fiat.
If on the other hand you controlled the funds with a majority of keys in a multisig, then it would always effectively be your bitcoin. But it also means that if you get hacked, you lose.
Now, if your bank gets hacked similarly - 5 key operatives in the bank decide to swipe your money and pretend it was external hackers - SWIFT transfers are made to accounts in Russia and China; here it will always ultimately be at the discretion of legal agencies whether you "actually" still have the money that is stolen. Because dollars are not real, they can be created at a whim, and while reversing international transfers is not quite so simple, very often that reversal can be achieved (e.g. recent SWIFT hank at bangladesh[2][3] bank; $1 billion stolen, all but $80 million "recovered" (just means wire transfers reversed)). Added to that consider insurance, so even when transfers can't be reversed, the money can be "found". If too many banks get hacked all at once the Federal Reserve and the govt together can make up some "fund" that magically reassigns balances any time they like, with sufficient political will (that's essentially what was happening in 2008 TARP etc).
So far no insurance company has ever paid out on a Bitcoin company's claim. Worth considering also.
You might say, since it's risky both ways, why not trust Coinbase? Aren't they more competent in security than me?
Almost certainly, but this argument has two massive holes in it: (1) because they concentrate funds they are a massive target for hackers, while you are not - at all. (2) they are a trusted third party so the situation is strictly worse - not only do you have to trust their security skills, but you also have to trust them not to steal (modulo multisig, as mentioned above) (edited to add: as well as literal stealing, there is things like political confiscation, don't forget).[4]

Web wallets

Web wallets have all the downsides of custodial wallets (no direct possession, private keys are held by a third party) along with all the downsides of hot wallets (exposed private keys), as well as all the downsides of lightweight wallets (not verifying bitcoin's rules, someone could send you a billion bitcoins and under certain conditions the dumb web wallet would happily accept it)

Someone who needs the easy access of a web wallet should download a lightweight wallet like Electrum.

Paper wallets

So-called paper wallets are an obsolete and unsafe method of storing bitcoin which should not be recommended to beginners. They simply store a single private/public keypair on paper. They promote address reuse and require unwieldy and complicated live OS system boots to be safe, they risk theft by printers, and typically rely on Javascript cryptography.

Paper wallets also do not provide any method of displaying to the user when money has arrived. There's no practical way to use a full node wallet, users are typically driven to use third-party blockchain explorers which can lie to them and spy on them.

A much better way accomplish what paper wallets do is to use seed phrases instead.

Main article: Paper wallets

Cloud storage

This means storing your encrypted (or not) wallet file on a cloud storage solution such as Dropbox, or emailing them to yourself on gmail. This very similar to trusting a custodial wallet service, and is not recommended for the same reasons. You might say you use encryption for two-factor authentication, but uploading the wallet to the cloud reduces this to one-factor.

Removable media

This refers to storing wallet files on removable media like SSD or hard drives.

Refer to the warnings from these two links:

Those articles recommend using GPG for encryption or a printer, instead a better solution is seed phrases.

Other ideas

Time-locked wallets

An interesting unconventional solution. The idea is to use time-lock contracts to create a wallet which cannot be spent from until a certain date. One possible use-case might be by a gambling addict who locks up money for paying bills for a month, after a month has passed and their time-lock wallet is opened they use that money for paying bills instead of gambling.

Time lock wallets don't exist yet except for simple javascript pages which rely on Javascript cryptography and are therefore not safe.

Consulting

If you intend to store a very large amount of bitcoins, for example in a business, you should consider paying for security consulting.

The 5 dollar wrench attack

xkcd comic on the 5 dollar wrench attack.

It's sometimes said that all this security is worthless because the $5 wrench attack can be used.

Stored bitcoins are not secured by seed phrases, hardware wallets, multisignature, passwords, hash functions or anything like that; they are secured by people.

Technology is never the root of system security. Technology is a tool to help people secure what they value. Security requires people to act. A server cannot be secured by a firewall if there is no lock on the door to the server room, and a lock cannot secure the server room without a guard to monitor the door, and a guard cannot secure the door without risk of personal harm.[5].

Bitcoin is no different. The technology discussed on this page is only a tool to tip the scales in the defender's favour. Following from this principle, the way to beat the $5 wrench attack is to bear arms. Either your own, or employ guards, or use a safety deposit box, or rely on the police forces and army; or whatever may be appropriate and proportionate in your situation. If someone physically overpowers you then no technology on Earth can save your bitcoins. You can't be your own bank without bank-level security.

See Also: Guns + Bitcoin Hardware Wallets

Further reading

References