Difference between revisions of "Paper wallet"

From Bitcoin Wiki
Jump to: navigation, search
m (Canton moved page Paper ECDSA private keys to Paper Wallet: Moving to "paper wallet" because this page describes what is commonly known as a paper wallet.)
(Made it clear that this is a page about what is commonly known as a Paper Wallet. Added in link to BitcoinPaperWallet which was removed without explanation.)
Line 1: Line 1:
[[File:FirstBitcoinBills.jpg|thumb|right|200px|Casascius holding early paper ECDSA private keys]]
+
[[File:FirstBitcoinBills.jpg|thumb|right|200px|Casascius holding early paper wallets]]
A '''paper ECDSA private key''' is a mechanism for storing bitcoins offline as a physical document that can be secured like cash or anything else of real-world value.
+
A paper wallet is a mechanism for storing bitcoins offline as a physical document that can be secured like cash or anything else of real-world value.
 
They are generally created by printing a brand new public address and private key onto paper, and then sending bitcoins from a wallet to the printed key's public address for safekeeping.
 
They are generally created by printing a brand new public address and private key onto paper, and then sending bitcoins from a wallet to the printed key's public address for safekeeping.
Storing bitcoins this way is generally considered a bad idea.{{why}}
 
  
 
__TOC__
 
__TOC__
  
==Producing safe paper keys==
+
==Producing safe paper wallets==
  
 
[[File:BitcoinPaperWallet-sample.jpg|thumb|right|300px|Paper keypair with private key secured beneath folds]]
 
[[File:BitcoinPaperWallet-sample.jpg|thumb|right|300px|Paper keypair with private key secured beneath folds]]
 
[[File:PaperWallets-offlineaddress-com.png|200px|thumb|right|Paper keypair]]
 
[[File:PaperWallets-offlineaddress-com.png|200px|thumb|right|Paper keypair]]
An [[ECDSA]] [[private key]] can be represented in several formats, but typically the Wallet Import Format (WIF) is used, since keys represented that way are very short (51 characters) and thus easy to re-enter when importing or "sweeping" it for withdrawal.
+
The [[ECDSA]] [[private key]] can be represented in several formats, but typically the Wallet Import Format (WIF) is used, since keys represented that way are very short (51 characters) and thus easy to re-enter when importing or "sweeping" it for withdrawal.
  
Several tools exist for producing paper keypairs, including [[Bitcoin Address Utility]], [[vanitygen]], and [[Cwallet]].  
+
Several tools exist for producing paper keypairs, including [[Bitcoin Address Utility]], [[BitcoinPaperWallet]],  [[vanitygen]], and [[Cwallet]].  
  
 
Care must be taken to securely generate keys since an attacker can steal stored bitcoins if it is exposed, transmitted, or generated with insufficient entropy.
 
Care must be taken to securely generate keys since an attacker can steal stored bitcoins if it is exposed, transmitted, or generated with insufficient entropy.
Line 26: Line 25:
 
* A web-based generator should not be used.
 
* A web-based generator should not be used.
 
* A generator should use an appropriate source of random numbers (entropy).  This means that the generated keys aren't predictable.  If the addresses come from a predictable or partially-predictable patterns like pseudorandom numbers <ref>[https://en.wikipedia.org/wiki/Pseudorandomness#Cryptography Pseudorandomness] '' is not enough for strong cryptography''</ref>, someone else who can predict the pattern can steal the balance. Ideally, randomness should NOT be human generated.
 
* A generator should use an appropriate source of random numbers (entropy).  This means that the generated keys aren't predictable.  If the addresses come from a predictable or partially-predictable patterns like pseudorandom numbers <ref>[https://en.wikipedia.org/wiki/Pseudorandomness#Cryptography Pseudorandomness] '' is not enough for strong cryptography''</ref>, someone else who can predict the pattern can steal the balance. Ideally, randomness should NOT be human generated.
* Remember that unlike wallets, a single ECDSA private key is only good to receive a single payment, and must be redeemed in its entirety.
+
* Remember that unlike wallets, a single paper wallet is only good to receive a single payment, and must be redeemed in its entirety.
  
 
===Printer Security===
 
===Printer Security===
Line 34: Line 33:
 
==Redeeming Keys and Withdrawing Funds==
 
==Redeeming Keys and Withdrawing Funds==
  
ECDSA private keys are very different from wallets such as Bitcoin Core in that it is not possible to transfer (withdraw) a ''portion'' of a key's bitcoins.
+
Paper wallets are very different from wallets such as Bitcoin Core in that it is not possible to transfer (withdraw) a ''portion'' of a key's bitcoins.
 
The only way to withdraw funds is to import or "sweep" the ''entire'' received amount to a new address, typically a wallet or online exchange.
 
The only way to withdraw funds is to import or "sweep" the ''entire'' received amount to a new address, typically a wallet or online exchange.
 
Once the transfer has been confirmed, ''the key should not be reused''.<ref>[http://www.reddit.com/r/Bitcoin/comments/1c9xr7/psa_using_paper_wallets_understanding_change/ reddit.com] ''Using Paper Wallets and Understanding Change''</ref>
 
Once the transfer has been confirmed, ''the key should not be reused''.<ref>[http://www.reddit.com/r/Bitcoin/comments/1c9xr7/psa_using_paper_wallets_understanding_change/ reddit.com] ''Using Paper Wallets and Understanding Change''</ref>

Revision as of 15:30, 26 February 2015

Casascius holding early paper wallets

A paper wallet is a mechanism for storing bitcoins offline as a physical document that can be secured like cash or anything else of real-world value. They are generally created by printing a brand new public address and private key onto paper, and then sending bitcoins from a wallet to the printed key's public address for safekeeping.

Producing safe paper wallets

Paper keypair with private key secured beneath folds
Paper keypair

The ECDSA private key can be represented in several formats, but typically the Wallet Import Format (WIF) is used, since keys represented that way are very short (51 characters) and thus easy to re-enter when importing or "sweeping" it for withdrawal.

Several tools exist for producing paper keypairs, including Bitcoin Address Utility, BitcoinPaperWallet, vanitygen, and Cwallet.

Care must be taken to securely generate keys since an attacker can steal stored bitcoins if it is exposed, transmitted, or generated with insufficient entropy.

Some websites feature a free open-source client-side paper keypair generators written in JavaScript. Using these is generally considered a bad idea and inherently insecure.

Recommendations:

  • Keys should be produced on a computer not connected to the Internet.
  • Be aware that malware often allows a remote third party to view your screen and see your keystrokes, and these can compromise the integrity of your key. Also consider that antivirus software cannot completely rule out the possibility of malware. However, booting from a live disc prevents most malware from running.
  • The private keys should never be saved to a computer hard drive. You should also never scan your key into your computer or type them or save them in e-mail, except at the moment you are redeeming it.
  • If possible, the private key should be kept hidden, for example by using BIP38 encryption, or by folding the paper to hide the private key so that a photograph or photocopy of it will not reveal or replicate the private key.
  • A web-based generator should not be used.
  • A generator should use an appropriate source of random numbers (entropy). This means that the generated keys aren't predictable. If the addresses come from a predictable or partially-predictable patterns like pseudorandom numbers [1], someone else who can predict the pattern can steal the balance. Ideally, randomness should NOT be human generated.
  • Remember that unlike wallets, a single paper wallet is only good to receive a single payment, and must be redeemed in its entirety.

Printer Security

Some advanced printers have internal storage (even hard drives) that preserve copies of printouts. This is a risk if someone gets access to your printer, or if you dispose of your printer. There is also the possibility that a smart enough printer can be hacked. (Consider StuxNet which was able to rewrite the firmware of non-computer devices indirectly connected to the Internet) If this concerns you, use a "dumb" printer, and never let your printer have access to the Internet or to an Internet-connected computer.

Redeeming Keys and Withdrawing Funds

Paper wallets are very different from wallets such as Bitcoin Core in that it is not possible to transfer (withdraw) a portion of a key's bitcoins. The only way to withdraw funds is to import or "sweep" the entire received amount to a new address, typically a wallet or online exchange. Once the transfer has been confirmed, the key should not be reused.[2]

There are various methods for copying the private key data to other wallets.

Note that importing a private key that may be compromised can result in the entire wallet being insecure. For this reason, sweeping is generally recommended over importing.

References

  1. Pseudorandomness is not enough for strong cryptography
  2. reddit.com Using Paper Wallets and Understanding Change

See Also