<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wzyboy</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wzyboy"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Wzyboy"/>
	<updated>2026-06-22T01:28:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=How_to_import_private_keys&amp;diff=29427</id>
		<title>How to import private keys</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=How_to_import_private_keys&amp;diff=29427"/>
		<updated>2012-08-05T06:39:59Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: lockwallet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
When using [[Cold storage]], [[Paper wallet]] or [https://bitcointalk.org/index.php?topic=25804.0 Vanity Bitcoin Address] you need to import [[Private key]]s. Before Bitcoin 0.6.0, you need to rely on third-party [[wallet.dat]] manipulation tool such as [[pyWallet]]. Since Bitcoin 0.6.0, you can import Private keys using build-in RPC command [[importprivkey]]. Here are some instructions for desktop users (official bitcoin-qt client).&lt;br /&gt;
&lt;br /&gt;
== Start Bitcoin client ==&lt;br /&gt;
Unlike third-party wallet.dat manipulation tool such as [[pyWallet]], you do not have to close Bitcoin client before proceeding. In contrary, you need to start the bitcoind server.&lt;br /&gt;
&lt;br /&gt;
Bitcoin-qt do not start with a bitcoind server by default so it cannot accept RPC commands by default. You can do one of this:&lt;br /&gt;
* Close bitcoin-qt and start &#039;&#039;bitcoind -damon&#039;&#039; in Terminal Emulator. The version of bitcoind MUST be the same as bitcoin-qt!&lt;br /&gt;
* Close bitcoin-qt and restart it with &#039;&#039;bitcoin-qt -server&#039;&#039;. This will make bitcoin-qt accept RPC commands. You can use your client from both GUI and CLI now!&lt;br /&gt;
&lt;br /&gt;
== Unlock your wallet ==&lt;br /&gt;
If you have an encrypted wallet (which is a good idea), you need to unlock it temporarily in memory before importing or exporting Private keys. The RPC commands for unlocking is &#039;&#039;walletpassphrase &amp;lt;passphrase&amp;gt; &amp;lt;timeout&amp;gt;&#039;&#039;. But typing this directly in Terminal Emulator will leave your wallet passphrase directly in bash history. You can do this do prevent that:&lt;br /&gt;
&lt;br /&gt;
 read x&lt;br /&gt;
 (input you passphrase)&lt;br /&gt;
 bitcoind walletpassphrase &amp;quot;$x&amp;quot; 120   # Do not set the timeout too long or too short.&lt;br /&gt;
&lt;br /&gt;
By doing so, your passphrase will not be recorded into bash history. But be careful with people standing behind you since the passphrase are on your screen...&lt;br /&gt;
&lt;br /&gt;
== Import Private key(s) ==&lt;br /&gt;
The last command unlocked your wallet temporarily in memory for 120 seconds. You need to finish importing keys before timed out. Since Private keys are as important as your passphrase, you may want to use these commands to import them instead of typing / pasting them directly in Terminal Emulator to prevent their being recorded in bash history:&lt;br /&gt;
&lt;br /&gt;
 read y&lt;br /&gt;
 (type / paste your Private key)&lt;br /&gt;
 bitcoind importprivkey &amp;quot;$y&amp;quot; &amp;quot;my-new-key&amp;quot;  # Label can be omitted&lt;br /&gt;
&lt;br /&gt;
The importing process is now started. Bitcoind will rescan the entire block data to ensure this key has not been used before. This process will take about one minute or two, depending on your CPU performance. DO NOT abort it before finishing!&lt;br /&gt;
&lt;br /&gt;
If no errors occurs, the import is a success. If you run your bitcoind via bitcoin-qt, you can see your new address in the GUI now. If you need to import more keys, just repeat the instructions above. Right now there are no ways to import keys in batch so you have to wait one minute or two for every key imported...&lt;br /&gt;
&lt;br /&gt;
== Cleaning up ==&lt;br /&gt;
&lt;br /&gt;
 bitcoind walletlock&lt;br /&gt;
 unset x&lt;br /&gt;
 unset y&lt;br /&gt;
&lt;br /&gt;
This will lock your wallet again (so you don&#039;t have to wait for timeout) and clear the passphrase and Private key from memory. If you start bitcoind in the first way above, you also need to stop it, or bitcoin-qt cannot start again:&lt;br /&gt;
&lt;br /&gt;
 bitcoind stop&lt;br /&gt;
&lt;br /&gt;
Happy importing!&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=How_to_set_up_a_secure_offline_savings_wallet&amp;diff=29426</id>
		<title>How to set up a secure offline savings wallet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=How_to_set_up_a_secure_offline_savings_wallet&amp;diff=29426"/>
		<updated>2012-08-05T05:38:14Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Why set up an offline savings wallet? ==&lt;br /&gt;
&lt;br /&gt;
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 wallets will never be 100% safe on a computer that is connected to the internet.&lt;br /&gt;
  &lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
This guide will instruct you on how to create an offline wallet, a wallet that never even touches the internet in its plaintext form.  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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;&#039;your&#039;&#039;&#039; computer and that means &#039;&#039;&#039;you&#039;&#039;&#039; 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]).&lt;br /&gt;
&lt;br /&gt;
== How to deposit funds ==&lt;br /&gt;
&lt;br /&gt;
#	Set up a [http://www.wuala.com/en/bitcoin Wuala] account, or other cloud backup service of your choice.&lt;br /&gt;
#	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&amp;amp;cvwS9@05AatdP71. Never use this password elsewhere.  &lt;br /&gt;
#	&#039;&#039;&#039;Do not forget this password&#039;&#039;&#039;. 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.&lt;br /&gt;
#	Download [http://www.bitcoin.org/ Bitcoin Linux binary] and save it on a USB drive.&lt;br /&gt;
#	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. &lt;br /&gt;
#	&#039;&#039;&#039;Disconnect machine from the internet&#039;&#039;&#039;. 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.&lt;br /&gt;
#	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. &lt;br /&gt;
#       Encrypt your wallet using the strong and unique password from step 2 above. (Bitcoin Client &amp;gt; Settings &amp;gt; Encrypt wallet)&lt;br /&gt;
#	Copy wallet.dat (found in hidden folder .bitcoin in your home directory) to USB drive.&lt;br /&gt;
#	Save bitcoin address to a text file and copy it to USB drive.&lt;br /&gt;
#	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.&lt;br /&gt;
#	Backup encrypted wallet.dat file in several places: &lt;br /&gt;
#*Send it to your 5 best friends by email attachment and ask them to save it for you.&lt;br /&gt;
#*Save it on your Wuala account created in step 1.&lt;br /&gt;
#*Save it on several USB drives and CDs and store them in different geographic locations.&lt;br /&gt;
#Send bitcoins to the address saved on the USB drive.  Double check in the [[Bitcoin Block Explorer|block explorer]] that they have been sent.&lt;br /&gt;
&lt;br /&gt;
==How to retrieve funds ==&lt;br /&gt;
&lt;br /&gt;
#Boot from Ubuntu liveCD, as in step 5 above. &lt;br /&gt;
#Insert USB drive.&lt;br /&gt;
#Run bitcoin client and close it again.&lt;br /&gt;
#Replace wallet.dat in ~/.bitcoin directory with wallet.dat from USB drive.&lt;br /&gt;
#Connect to the internet.&lt;br /&gt;
#Restart bitcoin client.&lt;br /&gt;
#Wait for blocks to download (optional).&lt;br /&gt;
#Send bitcoins.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
*This procedure is only secure if you perform steps 1-13 in this &#039;&#039;&#039;exact order&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
*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].&lt;br /&gt;
&lt;br /&gt;
*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. Update to fresh savings wallets every couple of years, or as needed.&lt;br /&gt;
&lt;br /&gt;
* See [[How to import private keys]] for an alternative way of retrieve your coins.&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Securing_your_wallet&amp;diff=29425</id>
		<title>Securing your wallet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Securing_your_wallet&amp;diff=29425"/>
		<updated>2012-08-05T05:37:06Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background:#dddddd;border:solid gray 1px;width:70%;margin:auto;&amp;quot;&amp;gt;&lt;br /&gt;
Current releases of the bitcoin client offer passphase encryption for the keys in the wallet.&lt;br /&gt;
&lt;br /&gt;
This article could use an update.  See the discussion for this article for more.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Wallet security can be broken down into two independent goals:&lt;br /&gt;
# Protecting your wallet against loss.&lt;br /&gt;
# Protecting your wallet against theft.&lt;br /&gt;
&lt;br /&gt;
In the case that your current wallet hasn&#039;t been protected adequately (e.g. put online with a weaker password):&lt;br /&gt;
# Making a new secure wallet, using appropriate long-term protection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For a brief overview see also: [[Wallet Security Dos and Don&#039;ts (Windows)|Wallet Security Dos and Don&#039;ts]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Paper Wallets==&lt;br /&gt;
[[Paper wallet]]s are a fairly simple way to store Bitcoins without needing a computer.  When generated securely, a paper wallet also puts your Bitcoins well outside the reach of hackers and computer viruses.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Storing&amp;quot; bitcoins is a little bit of a misnomer - what you are actually &amp;quot;storing&amp;quot; is a sequence of secret numbers that is used to prove your right to spend the Bitcoins you have received.  This secret number is called a [[private key]].  The most common way to write a Bitcoin private key is as a sequence of fifty-one alphanumeric characters that always starts with a &#039;5&#039;.&lt;br /&gt;
&lt;br /&gt;
One way you can print a paper wallet is at the website [[BitAddress]].  This website features a free client-side paper wallet generator written in JavaScript.  This generator can be saved as a file and used on an offline computer.  Using it online is relatively safe, but not airtight unless you take a couple of extra precautions to ensure your keys are not stolen by spyware. Alternatively blockchain.info offers a [https://blockchain.info/wallet/paper-tutorial tutorial on how to generate a paper wallet] with an online component so you can still check your balance easily.&lt;br /&gt;
&lt;br /&gt;
To generate a safe paper wallet, you need to &amp;quot;clean-boot&amp;quot; your computer with a bootable CD (such as a Linux Live CD), with your computer not connected to the internet, to ensure that you do not have any active spyware that might steal the private keys you generate.  Disconnecting from the Internet allows you to confirm that the paper wallet generator is truly self-contained and isn&#039;t depending on communication with a remote server.  Run the saved paper wallet generator in a web browser, print your paper wallets (do not save them on the computer), and then shut down the computer.  You may need to load an appropriate printer driver in order to print while booted from the Live CD.&lt;br /&gt;
&lt;br /&gt;
A paper wallet lists multiple Bitcoin addresses and the corresponding &amp;quot;private key&amp;quot;.  You can send Bitcoins to any address on the page, and they will be inaccessible until the private key is loaded back onto a computer.  The Bitcoin software does not yet have a built-in way to load private keys, but you can use the &amp;quot;Add Funds&amp;quot; - &amp;quot;Private key&amp;quot; screen at [[MtGox]] to recover digital coins from a private key.  Coins are deposited in your MtGox account and can be sent out of MtGox shortly thereafter.&lt;br /&gt;
&lt;br /&gt;
Remember that spyware and viruses often attempt to monitor your computer activities so that their authors can steal from you.  They are interested in your passwords (such as to banking, etc.) and anything of value.  Bitcoin wallets and Bitcoin private keys are something of value that will be targeted by malware.  Paper wallets isolate you from much of this risk.&lt;br /&gt;
&lt;br /&gt;
If your computer is infected with spyware or viruses - even if there are no symptoms or your antivirus isn&#039;t reporting anything - then anything you type, view, or save on your computer could potentially be stolen by someone remotely controlling your computer.  Your private key could potentially be intercepted at the point you type it in to redeem it, so only enter a Bitcoin private key into your computer when your intent is to redeem its value &#039;&#039;immediately&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Importance of security updates==&lt;br /&gt;
&lt;br /&gt;
No software is perfect, and from time to time there may be security vulnerabilities found in your Bitcoin client as well.&lt;br /&gt;
Be sure you keep your client up to date for the latest bug fixes, especially when a new vulnerability is discovered.&lt;br /&gt;
We maintain a [[CVEs|list a known vulnerabilities]] on this wiki - you can watch that page to get updates.&lt;br /&gt;
Note that you &#039;&#039;don&#039;t&#039;&#039; need to be running a bleeding edge client version: some clients, including the popular Bitcoin-Qt, have older versions available with bugfix-only updates.&lt;br /&gt;
&lt;br /&gt;
==Securing an online wallet with the Bitcoin software==&lt;br /&gt;
&lt;br /&gt;
Bitcoin transactions send Bitcoins to a specific public key. A Bitcoin address is an encoded hash of a public key. In order to use received Bitcoins, you need to have the private key matching the public key you received with. This is sort of like a super long password associated with an account (the account is the public key). Your Bitcoin wallet contains all of the private keys necessary for spending your received transactions. If you delete your wallet without a backup, then you no longer have the authorization information necessary to claim your coins, and the coins associated with those keys are lost forever.&lt;br /&gt;
&lt;br /&gt;
The wallet contains a pool of queued keys. By default there are 100 keys in the [[key pool]].  The size of the pool is configurable using the &amp;quot;-keypool&amp;quot; command line argument.  When you need an address for whatever reason (send, “new address”, generation, etc.), the key is not actually generated freshly, but taken from this pool. A brand new address is generated to fill the pool back to 100. So when a backup is first created, it has all of your old keys plus 100 unused keys. After sending a transaction, it has 99 unused keys. After a total of 100 new-key actions, you will start using keys that are not in your backup. Since the backup does not have the private keys necessary for authorizing spends of these coins, restoring from the old backup will cause you to lose Bitcoins.&lt;br /&gt;
&lt;br /&gt;
Creating a new address generates a new pair of public and private keys, which are added to your wallet. Each keypair is mostly random numbers, so they cannot be known prior to generation. If you backup your wallet and then create more than 100 new addresses, the keypair associated with the newest addresses will not be in the old wallet because the new keypairs are only known after creating them. Any coins received at these addresses will be lost if you restore from the backup.&lt;br /&gt;
&lt;br /&gt;
The situation is made somewhat more confusing because the receiving addresses shown in the UI are not the only keys in your wallet. Each Bitcoin generation is given a new public key, and, more importantly, each sent transaction also sends some number of Bitcoins back to yourself at a new key. When sending Bitcoins to anyone, you generate a new keypair for yourself and simultaneously send Bitcoins to your new public key and the actual recipient&#039;s public key. This is an anonymity feature – it makes tracking Bitcoin transactions much more difficult.&lt;br /&gt;
&lt;br /&gt;
So if you create a backup, do more than 100 things that cause a new key to be used, and then restore from the backup, some Bitcoins will be lost. Bitcoin has not deleted any keys (keys are never deleted) – it has created a new key that is not in your old backup and then sent Bitcoins to it.&lt;br /&gt;
&lt;br /&gt;
== Making a new wallet ==&lt;br /&gt;
&lt;br /&gt;
In the case that a wallet has been distributed, or stored, in a (real or potential) compromised state, it is wise to create a new wallet and transfer the full balance of Bitcoins to an address contained only in the newly created wallet.&lt;br /&gt;
&lt;br /&gt;
For example, this will be necessary if one created a wallet with a password of 12 characters, as suggested. However a few years have passed and the wallet is now more easily compromised.  Just re-encrypting isn&#039;t secure.  One needs to make a new wallet and make the old wallet worthless (spending the funds to the new wallet).&lt;br /&gt;
&lt;br /&gt;
==Making a secure workspace==&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
The first step is to make a [http://www.howtogeek.com/howto/ubuntu/add-a-user-on-ubuntu-server/ new user,] so as root, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;adduser new_user_name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you get to the prompt &#039;Enter the new value, or press ENTER for the default&#039;, just keep hitting ENTER.&lt;br /&gt;
&lt;br /&gt;
Then switch user to the new user.  To get to the new user you can use the switch user icon for your system, which on Ubuntu is in the &#039;System/Quit&#039; screen, or if there is no switch icon on your system you can log out and log back in as the new user.  Then click on a folder in the new user to display the file browser, then keep going up folders until you see the new user home directory, then right click to bring up the Properties dialog, then click on the Permissions tab, then in the Others section, set the folder access to None.&lt;br /&gt;
&lt;br /&gt;
For secure browsing, open Firefox, and then go into the Edit menu and click Preferences.  Starting from the left, click on the General tab, and in the &#039;Startup/When Firefox starts&#039; pop up menu, choose &#039;Show a Blank Page&#039;.  Then click on the Content tab, and deselect &#039;Load images automatically&#039; and deselect &#039;Enable JavaScript&#039;.  Then click on the Privacy tab, and in the &#039;History/Firefox will&#039; pop up menu, choose &#039;Never remember history&#039;.  Then click on the Security tab, and in the Passwords section, deselect &#039;Remember passwords for sites&#039; and deselect &#039;Use a master password&#039;.  Then click on the Advanced tab, then click on the Update tab, and then in the &#039;Automatically check for updates to&#039; section, deselect &#039;Add-ons&#039; and &#039;Search Engines&#039;.&lt;br /&gt;
&lt;br /&gt;
When JavaScript is disabled, the [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.23/bitcoin-0.3.23-linux.tar.gz/download Linux download page] will not download automatically, so you&#039;ll have to click on the &#039;direct link&#039; part of the &amp;quot;Problems with the download? Please use this &#039;direct link&#039; or try another mirror.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve made your secure new user, to maintain security you should only use it for Bitcoin.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also a good idea to encrypt the Home directory of whatever user you run Bitcoin under using ecryptfs-utils. To do this:&lt;br /&gt;
# If the Home directory is not empty you should back it up first, by just copying the data to an external drive or something.&lt;br /&gt;
# install ecryptfs-utils (on Ubuntu: sudo apt-get install ecryptfs-utils)&lt;br /&gt;
# log out of X (graphical system) and press Ctrl+Alt+F1 to login to the command shell (you must be logged out or some files will be open and the tool won&#039;t be able to encrypt your data)&lt;br /&gt;
# change directory to something that&#039;s not in your home folder (ex: cd / )&lt;br /&gt;
# run the migration tool (on Ubuntu: sudo ecryptfs-migrate-home -u username)&lt;br /&gt;
# if it&#039;s successful, you can now press ALT+F8 to go back to the GUI and login&lt;br /&gt;
# run &#039;ecryptfs-unwrap-passphrase&#039; and &#039;&#039;&#039;WRITE DOWN OR SAVE THE CODE IT RETURNS&#039;&#039;&#039; because you will need it if you ever have to pull your data off while the OS is not working. (You can run it again later if you need to, but run it now so that you can get your data if your Linux install gets botched.)&lt;br /&gt;
# run &#039;ecryptfs-setup-swap&#039; to encrypt your swap partition (the encrypted folder data is not encrypted while it&#039;s in memory, and so if it&#039;s ever sent to the swap partition it can be stolen from there unless that too is encrypted - be aware that this will mean you cannot use Hibernate anymore, as the bootloader won&#039;t be able to restore the hibernation data)&lt;br /&gt;
(instructions from [http://bodhizazen.net/Tutorials/Ecryptfs/#Migrate])&lt;br /&gt;
&lt;br /&gt;
===Mac===&lt;br /&gt;
This solution &#039;&#039;&#039;does not scale&#039;&#039;&#039;; the amount of needed space can grow beyond the image size.&lt;br /&gt;
&lt;br /&gt;
=====Backup all data=====&lt;br /&gt;
Follow these instructions to backup all the bitcoin data (wallet and block chains) to an encrypted disk image.&lt;br /&gt;
# Open Disk Utility&lt;br /&gt;
# Click New Image and choose a big enough size, 128-bit or 256-bit (faster or more secure) encryption and single partition.&lt;br /&gt;
# Save it somewhere you won&#039;t lose it (like your Wuala, Dropbox, Strongspace or whatever)&lt;br /&gt;
# Choose a safe and strong password&lt;br /&gt;
# Move everything from ~/Library/Application Support/Bitcoin/ to the image&lt;br /&gt;
# Symlink it back so the app would be able to use it&lt;br /&gt;
:::ln -s /Volumes/Bitcoin ~/Library/Application Support/Bitcoin&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to mount your image before using Bitcoin and unmount it after quitting.&lt;br /&gt;
&lt;br /&gt;
=====Backup just wallet.dat=====&lt;br /&gt;
Follow these instructions to backup just the wallet.dat file. This results in a smaller disk image, but it&#039;s more complicated to do.&lt;br /&gt;
# Open Disk Utility&lt;br /&gt;
# Click New Image and choose a big enough size, 128-bit or 256-bit (faster or more secure) encryption and single partition.&lt;br /&gt;
# Save it somewhere you won&#039;t lose it (like your Wuala, Dropbox, Strongspace or whatever)&lt;br /&gt;
# Choose a safe and strong password&lt;br /&gt;
# Move your wallet.dat file to the image&lt;br /&gt;
# Symlink it back so the app would be able to use it&lt;br /&gt;
:::ln -s /Volumes/Bitcoin/wallet.dat ~/Library/Application Support/Bitcoin/wallet.dat&lt;br /&gt;
&lt;br /&gt;
[[File:MountWalletAndLauchnBitcoin_OSX_Automator.png|thumbnail|150px|Mount Wallet and launch Bitcoin]]&lt;br /&gt;
Don&#039;t forget to mount your image before using Bitcoin and unmount after quitting it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you start the Bitcoin application without having the image mounted, the application will overwrite your symlink with a new wallet. If that happens, don&#039;t panic. Just delete the new wallet.dat, mount the image, and recreate the symlink like above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Automation&#039;&#039;&#039;: You can create a small application using [http://en.wikipedia.org/wiki/Automator_%28software%29 Automator] (included in OS X) to automatically mount the wallet and then launch Bitcoin App. See the Screenshot on how to do this.&lt;br /&gt;
&lt;br /&gt;
If one &#039;&#039;doesn&#039;t&#039;&#039; want to use encrypted Disk images, then a &#039;&#039;&#039;small shell script&#039;&#039;&#039; can be used instead that takes care of decrypting the wallet, launching bitcoin client, and encrypting it after the client exits. This script works on both OSX and Linux: [http://lorelei.kaverit.org/bitcoin.sh bitcoin-launch-script]&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
If you are using Windows XP or Windows 7, you can keep your wallet on an encrypted disk image created by third-party software, such as [http://www.truecrypt.org/ TrueCrypt] (open source) or [http://www.jetico.com/encryption-bestcrypt/ Jetico BestCrypt] (commercial).  You can probably do the same with Windows Vista or Windows 2000.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; You should configure Bitcoin in this manner only on computers where you use Bitcoin, but do not use that computer to mine.  For example, this is a good configuration for a notebook or tablet computer.&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed the Windows Bitcoin client and run it at least once, the process is described below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;To mount the Bitcoin data directory on an encrypted drive&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol start=1 type=1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the third-party disk image encryption program of your choice to create and mount an encrypted disk image of at least 100 MB in size.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Locate the Bitcoin data directory, and copy the directory with all contents to the encrypted drive.&lt;br /&gt;
&amp;lt;p&amp;gt;For help finding this directory, see &amp;lt;b&amp;gt;[[Securing_your_wallet#Locating_Bitcoin_s_data_directory|Locating Bitcoin&#039;s Data Directory]]&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a Windows shortcut that starts Bitcoin with the &amp;lt;code&amp;gt;-datadir&amp;lt;/code&amp;gt; parameter and specifies the encrypted drive and directory.&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you installed Bitcoin in the default directory, mounted your Bitcoin encrypted drive as &amp;lt;code&amp;gt;E:\&amp;lt;/code&amp;gt;, and stored your Bitcoin data directory on it as &amp;lt;code&amp;gt;Bitcoin&amp;lt;/code&amp;gt;, you would type the following command as the shortcut Target:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;C:\Program Files\Bitcoin\bitcoin.exe -datadir=E:\Bitcoin&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open Bitcoin&#039;s settings and configure it &amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; to start automatically when you start Windows.&lt;br /&gt;
&amp;lt;p&amp;gt;This is to allow you to mount the Bitcoin encrypted disk image before starting Bitcoin.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Shut down Bitcoin, and then restart it from the new shortcut.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After doing this, any time you want to use Bitcoin, you must first mount the Bitcoin encrypted disk image using the same drive designation, and then run Bitcoin from the shortcut that you created, so that it can find its data and your wallet. :-)&lt;br /&gt;
&lt;br /&gt;
== Locating Bitcoin&#039;s data directory ==&lt;br /&gt;
&lt;br /&gt;
The [[data directory]] is the location where Bitcoin&#039;s data files are stored, including the wallet data file.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Go to Start -&amp;gt; Run (or press WinKey+R) and run this:&lt;br /&gt;
&lt;br /&gt;
 explorer %APPDATA%\Bitcoin&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s data folder will open. For most users, this is the following locations:&lt;br /&gt;
&lt;br /&gt;
 C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)&lt;br /&gt;
 &lt;br /&gt;
 C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;AppData&amp;quot; and &amp;quot;Application data&amp;quot; are hidden by default.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
By default Bitcoin will put its data here:&lt;br /&gt;
&lt;br /&gt;
 ~/.bitcoin/&lt;br /&gt;
&lt;br /&gt;
You need to do a &amp;quot;ls -a&amp;quot; to see directories that start with a dot.&lt;br /&gt;
&lt;br /&gt;
If that&#039;s not it, you can do a search like this:&lt;br /&gt;
&lt;br /&gt;
 find / -name wallet.dat -print 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
To change the directory Bitcoin stores its data in:&lt;br /&gt;
 Run in terminal or script: ./bitcoin(-qt) -datadir=./[Directory_Name]&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&lt;br /&gt;
By default Bitcoin will put its data here:&lt;br /&gt;
&lt;br /&gt;
 ~/Library/Application Support/Bitcoin/&lt;br /&gt;
&lt;br /&gt;
==Backup==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Using a service like Dropbox to back up your Bitcoin data is not recommended as doing so introduces [https://en.wikipedia.org/wiki/Dropbox_(service)#Reception security concerns] such as:&lt;br /&gt;
# the fact that they store your encryption key (meaning that a disgruntled Dropbox employee or an attacker who gained access to the system could decrypt your Dropbox data and steal your Bitcoins)&lt;br /&gt;
# the fact that the Dropbox client only needs a password for the first login. After it authenticates once, the server assigns it a token which it uses to show that, at one time, its user knew the password rather than sending the actual password (meaning that if you ever use the Dropbox client on another PC, that PC&#039;s users can access your Dropbox - even if you change your password - and can steal your Bitcoins or get a virus that will steal your Bitcoins).&lt;br /&gt;
&lt;br /&gt;
For these reasons, an alternative is Wuala which does not store your encryption key and requires a password each time.  With Wuala, the client can be set to remember your password but the server will check each time to make sure that the client is sending the correct password. Like Dropbox, the basic, lowest-storage-space account with Wuala is free of charge, and coincidentally, Wuala [http://www.wuala.com/en/bitcoin is experimenting with allowing users to pay for &amp;quot;upgraded&amp;quot; plans using Bitcoin.]&lt;br /&gt;
&lt;br /&gt;
Whether you use Dropbox as your backup or not, use what Steve Gibson calls &amp;quot;pre-Internet encryption&amp;quot; (which he [http://itknowledgeexchange.techtarget.com/security-corner/cloud-security-and-privacy-do-they-exist/ discussed in the context of Dropbox&#039;s security concerns]) and use some form of encryption on the files before you back them up -- just in case someone other than yourself ever gains access to that backup. Make sure to pick a password that&#039;s memorable but secure.&lt;br /&gt;
&lt;br /&gt;
The only file you need to back up is &amp;quot;wallet.dat&amp;quot;. Ensure that Bitcoin is closed, copy this file somewhere else, encrypt it, and put it somewhere safe. Ideally, you would put this file in two places: one nearby, and one 100+ miles away.&lt;br /&gt;
&lt;br /&gt;
You can use the [[api|backupwallet]] JSON-RPC command to back up without shutting down Bitcoin.&lt;br /&gt;
&lt;br /&gt;
=== General Solutions ===&lt;br /&gt;
&lt;br /&gt;
Your wallet.dat file is not encrypted by Bitcoin, by default.  The most current release of the Bitcoin client provides a method to encrypt with a passphrase the private keys stored in the wallet.  Anyone who can access a wallet which is not using the passphrase encryption can easily steal all of your coins.  Use one of these encryption programs if there is any chance someone might stumble upon your wallet.&lt;br /&gt;
* [http://www.7-zip.org/ 7-zip] - Supports strongly-encrypted archives.&lt;br /&gt;
* [http://www.axantum.com/axcrypt/ AxCrypt by Axantum]&lt;br /&gt;
* [http://lrzip.kolivas.org lrzip] - Compression software for Linux and OSX that supports very high grade password protected encryption&lt;br /&gt;
* [http://www.truecrypt.org/ TrueCrypt] - Volume-based on-the-fly encryption (for advanced users)&lt;br /&gt;
* [http://www.rarlab.com/ WinRar] - Commonly used archive software that supports verification records and encryption.&lt;br /&gt;
&lt;br /&gt;
There is also a list of [[OpenSourceEncryptionSoftware|open source encryption software.]]&lt;br /&gt;
&lt;br /&gt;
Decrypting and encrypting the wallet.dat every time you start or quit the Bitcoin client can be &#039;&#039;tedious&#039;&#039; (and outright error-prone). If you want to keep your wallet encrypted (except while you&#039;re actually running the Bitcoin client), it&#039;s better to relegate the automation to a [http://lorelei.kaverit.org/bitcoin.sh small shell script] that handles the en/decryption and starting up Bitcoin client for you (Linux and OSX). &lt;br /&gt;
&lt;br /&gt;
There is also a method to Print out and encrypt your Wallet.dat as a special barcode. See details here: [[WalletPaperbackup]]&lt;br /&gt;
&lt;br /&gt;
==== Password Strength ====&lt;br /&gt;
Brute-force password cracking has come a long way. A password of random [a-Z] [0-9] [!-~] of 8 characters long was previously thought secure but can be trivially solved now (using appropriate hardware). The recommended length is &#039;&#039;&#039;at least&#039;&#039;&#039; 12 characters long.  You can also use a multi-word password. [http://www.baekdal.com/tips/password-security-usability The Usability of Passwords] &lt;br /&gt;
&lt;br /&gt;
However, simply using dictionary words is also insecure as it opens you up to a dictionary attack. If you use dictionary words, be sure to throw random symbols and numbers in the mix as well.&lt;br /&gt;
&lt;br /&gt;
If you use keyfiles in addition to a password, it is unlikely that your encrypted file can ever be cracked using brute force methods, even 10 years from now when even a 12 character password might be too short.&lt;br /&gt;
&lt;br /&gt;
Assume that any encrypted files you store online (eg. Gmail, Dropbox) will be stored somewhere forever and can never be erased.&lt;br /&gt;
&lt;br /&gt;
===== Choosing Your Password =====&lt;br /&gt;
Make sure you pick at least one character in each group:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Lowercase: abcdefghijklmnopqrstuvwxyz&lt;br /&gt;
  Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;br /&gt;
  Number: 1234567890&lt;br /&gt;
  Symbol: `~!@#$%^&amp;amp;*()-_=+\|[{]};:&#039;&amp;quot;,&amp;lt;.&amp;gt;/? (space)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;9 char = unsuitable for use&lt;br /&gt;
  09 char = insecure&lt;br /&gt;
  10 char = low security&lt;br /&gt;
  11 char = medium security&lt;br /&gt;
  12 char = good security (good enough for your wallet)&lt;br /&gt;
  13 char = very good, enough for anything.&lt;br /&gt;
&lt;br /&gt;
==== Storage of Archive ====&lt;br /&gt;
One of the most simple methods for storing a appropriately &#039;&#039;&#039;encrypted&#039;&#039;&#039; archive of your wallet.dat file is to send the archive as an email attachment to your own e-mail address.  Services like gmail.com use very comprehensive distributed networks that make the loss of data very unlikely.  One can even obfuscate the name of the files within the archive, and name the archive something less inviting, such as: &#039;personal notes&#039; or &#039;car insurance&#039;.&lt;br /&gt;
&lt;br /&gt;
Another solution is to use a file storage service like [http://www.wuala.com/bitcoin Wuala] ( encrypted, [http://www.bitcoin.org/smf/index.php?topic=5817.0 instructions]), [http://www.dropbox.com Dropbox] and [http://en.wikipedia.org/wiki/Comparison_of_online_backup_services others], including the more secure [http://www.spideroak.com SpiderOak].&lt;br /&gt;
&lt;br /&gt;
=== Linux solution ===&lt;br /&gt;
&lt;br /&gt;
Linux users can setup backups using cron by telling it to run a backup script at set intervals of time. Run &#039;crontab -e&#039; and add this line near the bottom:&lt;br /&gt;
&lt;br /&gt;
 01 */1 * * * /usr/local/bin/backupwallet.sh&lt;br /&gt;
&lt;br /&gt;
This cron line will run the /usr/local/bin/backupwallet.sh script at the 01 minute of every hour. Remember to add a newline after the last line of the crontab file, or else the last line won&#039;t run. You may also wish to ignore the script&#039;s output by appending &amp;quot; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;quot; to the line (this will also prevent emails from being sent).&lt;br /&gt;
&lt;br /&gt;
Create /usr/local/bin/backupwallet.sh:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # /usr/local/bin/backupwallet.sh&lt;br /&gt;
 #&lt;br /&gt;
 # Performs backup of bitcoin wallet.&lt;br /&gt;
 #&lt;br /&gt;
 # Written by: https://en.bitcoin.it/wiki/Securing_your_wallet&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Standard Options&lt;br /&gt;
 #&lt;br /&gt;
 TS=$(date &amp;quot;+%Y%m%d-%H%M&amp;quot;)&lt;br /&gt;
 WALLET=/tmp/wallet-${TS}&lt;br /&gt;
 WALLET_E=/tmp/wallet-${TS}.crypt&lt;br /&gt;
 BITCOIN=bitcoind  # /path/to/bitcoind&lt;br /&gt;
 GPG=gpg  # /path/to/gpg&lt;br /&gt;
 GPG_USER=username  # Username of gpg recipient. User should have gpg setup.&lt;br /&gt;
 RM=rm&lt;br /&gt;
 RM_OPTS=&#039;--force&#039;&lt;br /&gt;
 USE_SHRED=0  # Flip to 1 to use `shred` instead of `rm`.&lt;br /&gt;
 SHRED=shred&lt;br /&gt;
 SHRED_OPTS=&#039;--force --iterations=9 --zero --remove&#039;&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Storage Options&lt;br /&gt;
 # Only 1 set of options should be un-commented (the last one will be used).&lt;br /&gt;
 # Update CP_DEST paths as neccessary.&lt;br /&gt;
 #&lt;br /&gt;
 # CP - Storage on a local machine. Could be Dropbox/Wuala folder.&lt;br /&gt;
 #CP=cp&lt;br /&gt;
 #CP_DEST=&#039;/var/data/backups/&#039;  # &#039;~/Dropbox/&#039;, etc.&lt;br /&gt;
 #&lt;br /&gt;
 # SSH - Storage on a remote machine.&lt;br /&gt;
 CP=scp&lt;br /&gt;
 CP_DEST=&#039;remoteuser@example.com:~/wallets/&#039;&lt;br /&gt;
 #&lt;br /&gt;
 # S3 - Storage on Amazon&#039;s S3. Be sure s3cmd is installed and properly setup.&lt;br /&gt;
 # You may need &amp;quot;s3cmd put --force&amp;quot; if you use a sub-directory in CP_DEST.&lt;br /&gt;
 #CP=s3cmd put&lt;br /&gt;
 #CP_DEST=&#039;s3://bucket&#039;&lt;br /&gt;
 &lt;br /&gt;
 do_clean() {&lt;br /&gt;
   # Remove temporary wallets.&lt;br /&gt;
   if [ 1 -eq $USE_SHRED ]; then&lt;br /&gt;
     $SHRED $SHRED_OPTS $WALLET $WALLET_E&lt;br /&gt;
   else&lt;br /&gt;
     $RM $RM_OPTS $WALLET $WALLET_E&lt;br /&gt;
   fi&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 do_fail() {&lt;br /&gt;
   do_clean&lt;br /&gt;
   echo failed!&lt;br /&gt;
   exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # Perform the backup.&lt;br /&gt;
 echo -n Making backup...&lt;br /&gt;
 $BITCOIN backupwallet $WALLET&lt;br /&gt;
 [ ! -s &amp;quot;$WALLET&amp;quot; ] &amp;amp;&amp;amp; do_fail  # If the backup does not exist or is empty, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 echo -n Encrypting backup...&lt;br /&gt;
 $GPG -r $GPG_USER --output $WALLET_E --encrypt $WALLET&lt;br /&gt;
 [ 0 -ne $? ] &amp;amp;&amp;amp; do_fail  # If gpg returns a non-zero result, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 echo -n Copying to backup location...&lt;br /&gt;
 $CP $WALLET_E &amp;quot;$CP_DEST&amp;quot;&lt;br /&gt;
 [ 0 -ne $? ] &amp;amp;&amp;amp; do_fail  # If the $CP command returns a non-zero result, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 do_clean&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
The shell script:&lt;br /&gt;
&lt;br /&gt;
* Calls bitcoind backupwallet to create a time/date-stamped wallet.&lt;br /&gt;
* GPG encrypts the wallet with your public key.&lt;br /&gt;
* Copies the result using one of several storage options (cp, scp, and s3cmd).&lt;br /&gt;
* Uses the rm or shred command to remove the temporary wallet files.&lt;br /&gt;
&lt;br /&gt;
Be sure to modify the script options to fit your setup. After you save, make sure the file can be executed properly by the cron user. Common permissions for files in /usr/local/bin/ can be applied using (verify with your distribution!):&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/bin/ &amp;amp;&amp;amp; chown root:root backupwallet.sh &amp;amp;&amp;amp; chmod 755 backupwallet.sh&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
&lt;br /&gt;
==Restore==&lt;br /&gt;
&lt;br /&gt;
Assuming your backup is recent enough that you haven&#039;t used up all of your key pool... restoring a wallet to a new (or old) location and rescanning the block chain should leave you with all your coins. Just follow these steps:&lt;br /&gt;
* Quit bitcoin(d).&lt;br /&gt;
* Copy your backed up wallet.dat into your bitcoin profile directory.&lt;br /&gt;
* If copying into existing profile, delete files &#039;&#039;blk*.dat&#039;&#039; to make the client re-scan the block chain.&lt;br /&gt;
&lt;br /&gt;
And you&#039;ll be good as new.&lt;br /&gt;
&lt;br /&gt;
==Erasing Plain Text Wallets==&lt;br /&gt;
&lt;br /&gt;
A good practice is to keep at least two wallets, one as a &amp;quot;current account&amp;quot; for everyday transactions and one as a &amp;quot;savings account&amp;quot; where you store the majority of your Bitcoins.  &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;savings account&amp;quot; wallet should be backed up in encrypted form only and all plaintext copies of this wallet should be erased. In case someone gains unauthorised access to your computer (either by physically stealing it or by exploiting a system vulnerability via the internet), they will only be able to spend the coins in your &amp;quot;current account&amp;quot; wallet.&lt;br /&gt;
&lt;br /&gt;
In most operating systems, including Windows, Linux, and Mac OS X, simply deleting a wallet.dat file will &#039;&#039;not&#039;&#039; generally destroy it. It is likely that advanced tools can still be used to recover the wallet.dat file, even after it has been deleted.&lt;br /&gt;
&lt;br /&gt;
The Linux &#039;&#039;&#039;shred&#039;&#039;&#039; command can be used to overwrite the wallet file with random data prior to deleting; this particular copy of the file will then be practically impossible to recover.  Using shred (and similar tools on Windows) however does not guarantee that still other copies don&#039;t exist somewhere hidden on your HD. That will depend on your system configuration and what packages you have installed. Some system restore and backup tools, for instance, create periodic snapshots of your  filesystem, duplicating your wallet.dat.&lt;br /&gt;
&lt;br /&gt;
In Mac OS, the equivalent of &#039;&#039;&#039;shred&#039;&#039;&#039; is &#039;&#039;&#039;srm&#039;&#039;&#039; (introduced in Leopard). Using the Finder to remove files, clicking &amp;quot;Secure Empty Trash&amp;quot; in the Finder menu will shred the contents of the trash can. As with any OS this doesn&#039;t guarantee that there are not other copies elsewhere on your system.&lt;br /&gt;
&lt;br /&gt;
For Windows, the built-in command &#039;&#039;cipher /W&#039;&#039; will shred all previously-deleted files. [http://www.cylog.org/utilities/cybershredder.jsp CyberShredder] can securely deleted individual files.&lt;br /&gt;
&lt;br /&gt;
==eWallet==&lt;br /&gt;
&lt;br /&gt;
Storing bitcoins with an [[eWallet]] provider incurs risks as well. Basically you grant the third party, in this case eWallet, full access to your wallet. These eWallets, or Electronic Wallets have a number of pros and cons. For example, you can access your wallet on any computer in the world, but the wallet can be forged or hacked and your bitcoins could be lost. You can also get eWallet applications for your Android phone, which also download the block chain like the normal client but allow the user to send bitcoins by QR code or NFC. The problem with this is that Bitcoins can be intercepted through means of mobile hacking.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Data directory]]&lt;br /&gt;
* [[How to import private keys]]&lt;br /&gt;
* [http://startbitcoin.com/how-to-create-a-secure-bitcoin-wallet/ Secure Bitcoin Wallet Tutorial]&lt;br /&gt;
* [[How to set up a secure offline savings wallet]]&lt;br /&gt;
* [http://arimaa.com/bitcoin/ Bitcoin Gateway - A Peer-to-peer Bitcoin Vault and Payment Network]&lt;br /&gt;
* [http://blog.cyplo.net/2012/04/01/bitcoin-wallet-recovery-photorec/ Find lost wallet eg. after disk format, using Photorec]&lt;br /&gt;
[[de:Sichere deine Geldbörse]]&lt;br /&gt;
[[zh-cn:保护你的钱包]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Cold_storage&amp;diff=29424</id>
		<title>Cold storage</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Cold_storage&amp;diff=29424"/>
		<updated>2012-08-05T05:36:29Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Cold storage&#039;&#039;&#039; in the context of Bitcoin refers to keeping a reserve of Bitcoins offline.&lt;br /&gt;
&lt;br /&gt;
For example, a Bitcoin exchange typically offers an instant withdrawal feature, and might be a steward over hundreds of thousands of Bitcoins.  To minimize the possibility that an intruder could steal the entire reserve in a security breach, the operator of the website follows a best practice by keeping the majority of the reserve in &#039;&#039;cold storage&#039;&#039;, or in other words, not present on the web server or any other computer.  The only amount kept on the server is the amount needed to cover anticipated withdrawals.&lt;br /&gt;
&lt;br /&gt;
Methods of cold storage include keeping bitcoins:&lt;br /&gt;
* On a USB drive or other data storage medium in a safe place (e.g. safety deposit box, safe)&lt;br /&gt;
* On a [[paper wallet]]&lt;br /&gt;
* On a bearer item such as a physical bitcoin.&lt;br /&gt;
* Online, but on encrypted media where the encryption key is offline.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deep cold storage&#039;&#039;&#039; refers to keeping a reserve of Bitcoins offline, using a method that makes retrieving coins from storage significantly more difficult than sending them there.  This could be done for safety&#039;s sake, such as to prevent theft or robbery.&lt;br /&gt;
&lt;br /&gt;
Because Bitcoins can be sent to a wallet by anyone knowing the wallet address, it is trivial to put a wallet in cold storage but to keep a copy of the addresses needed to send funds to it.&lt;br /&gt;
&lt;br /&gt;
A simple example of deep cold storage is opening a safety deposit box and putting a USB stick containing an encrypted wallet file in it.  The public (sending) addresses can be used any time to send additional bitcoins to the wallet, but spending the bitcoins would require physical access to the box (in addition to knowledge of the encryption password).&lt;br /&gt;
&lt;br /&gt;
Deep cold storage would typically be used for holding large amounts of bitcoins, or for a trustee holding bitcoins on behalf of others.  In such a case, additional precautions should be taken beyond a simple example of a single safety deposit box.&lt;br /&gt;
* The box could be accessed by bank or maintenance personnel, so the contents of the box alone should not be sufficient to access the wallet.&lt;br /&gt;
* The box could be stolen or destroyed in a disaster, or the media could become unreadable, so the box should not contain the only copy of the wallet.&lt;br /&gt;
* The trustee could die or become incapacitated.  If access to the wallet or knowledge of its location is lost, or encryption passwords are lost, the bitcoins are gone forever.  Provisions should be made so that the box can be accessed by someone else as appropriate, including any encryption passwords.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[How to import private keys]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Paper_wallet&amp;diff=29423</id>
		<title>Paper wallet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Paper_wallet&amp;diff=29423"/>
		<updated>2012-08-05T05:35:42Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;paper wallet&#039;&#039;&#039; is a way to store Bitcoins that involves printing the Bitcoin addresses and private keys directly on a piece of paper.  When done properly, paper wallets are one of the safest ways possible to store Bitcoins.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
A Bitcoin [[private key]] can be represented in several formats, but is typically a string of numbers and letters no more than about 51 characters in length.  This is easy to print on paper, and if kept secret, can securely hold an unlimited quantity of Bitcoins.&lt;br /&gt;
&lt;br /&gt;
==Producing safe paper wallets==&lt;br /&gt;
Several tools exist for producing paper wallets, including [[pywallet]], [[vanitygen]], [[bitaddress.org]], [[LinuxCoin]], and [[Bitcoin Address Utility]].  Paper wallets must be produced securely in order to be safe, because any leak of the private key constitutes the ability for an attacker to steal any present and future balance of the address.  Consider the following:&lt;br /&gt;
* Paper wallets should be produced on a computer not connected to the Internet.&lt;br /&gt;
* 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 paper wallet.  Also consider that antivirus software cannot completely rule out the possibility of malware.  However, using bootable CD&#039;s prevents the vast majority of malware from being able to run.  If you can generate a paper wallet with a bootable CD such as [[LinuxCoin]], the likelihood of malware being able to compromise your keys is very low.&lt;br /&gt;
* The private keys of paper wallets should never be saved to a computer hard drive.  You should also never scan your paper wallet into your computer or type the private keys or save them in e-mail, except at the moment you are redeeming the balance.&lt;br /&gt;
* A web-based paper wallet generator should be written so that all of the generation happens on your computer, not the web server.  After you load the paper wallet generating website in your web browser, you should disconnect from the internet, and observe that the paper wallet generator continues to function.  Afterward, you should close your browser before reconnecting to the internet.&lt;br /&gt;
* A paper wallet generator should use an appropriate source of random numbers (entropy).  This means that the generated addresses aren&#039;t predictable.  If the addresses come from a predictable or partially-predictable pattern, someone else who can predict the pattern addresses can steal the balance.  A safe way to generate addresses is from a passphrase, where you provide a very long unguessable passphrase (at least thirty characters - even if it is just mashing random characters on the keyboard).  This way, you as the user are in control of the randomness and potential predictability of the addresses.&lt;br /&gt;
&lt;br /&gt;
==Redeeming Keys==&lt;br /&gt;
&lt;br /&gt;
There are various methods for copying the private key data from a paper wallet to other wallets.  [[MtGox|Mt. Gox]] provides the ability to Add Funds using a private key.  The exchange will then create a &amp;quot;sweep&amp;quot; transaction that spends any amount for that paper wallet address so that the amount is added to your account with them.  They will also sweep to your account any bitcoins received to that address in the future as well.&lt;br /&gt;
&lt;br /&gt;
Those running the Bitcoin.org (&amp;quot;Satoshi&amp;quot;) client can import paper wallet addresses using the [[Pywallet]] utility.  Other [[:Category:Clients|clients]] may allow this as well, including the Javascript-based wallet called My Wallet from [[BlockChain.info]] which can import Bitcoin private keys as well.&lt;br /&gt;
&lt;br /&gt;
Since 0.6.0, key import/export are available in the client itself, you can use is via RPC. The commands are &#039;&#039;dumpprivkey&#039;&#039; and &#039;&#039;importprivkey&#039;&#039;. For encrypted wallet, you need to use &#039;&#039;walletpassphrase&#039;&#039; to decrypt temporarily in memory before importing or exporting. Note that bitcoind will rescan the block data when importing each key now, this process takes about one minute or two, depending on your CPU performance. See [[How to import private keys]] for more info.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Private key]]&lt;br /&gt;
&lt;br /&gt;
* [[Securing_your_wallet#Paper_Wallets]]&lt;br /&gt;
&lt;br /&gt;
* [[How to import private keys]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Private_key&amp;diff=29422</id>
		<title>Private key</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Private_key&amp;diff=29422"/>
		<updated>2012-08-05T05:35:15Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;private key&#039;&#039;&#039; in the context of Bitcoin is a secret number that allows bitcoins to be spent.  Every Bitcoin address has a matching private key, which is saved in the wallet file of the person who owns the balance.  The private key is mathematically related to the Bitcoin address, and is designed so that the Bitcoin address can be calculated from the private key, but importantly, the same cannot be done in reverse.&lt;br /&gt;
&lt;br /&gt;
Because the private key is the &amp;quot;ticket&amp;quot; that allows someone to spend bitcoins, it is important that these are kept secure.  Private keys can be kept on computer files, but they are also short enough that they can be printed on paper.  An example of a utility that allows extraction of private keys from your wallet file for printing purposes is [[pywallet]].&lt;br /&gt;
&lt;br /&gt;
As of March 2012, the easiest way to redeem a private key is on [[MtGox]]&#039;s Add Funds screen.  Funds are deposited to the MtGox account after a six-confirmation wait (typically one hour).  In addition to MtGox, the following services allow redemption of private keys: &lt;br /&gt;
&lt;br /&gt;
* [[StrongCoin]]&lt;br /&gt;
&lt;br /&gt;
==An example private key==&lt;br /&gt;
In Bitcoin, a private key is a 256-bit number, which can be represented one of several ways.  Here is a private key in hexadecimal - 256 bits in hexadecimal is 32 bytes, or 64 characters in the range 0-9 or A-F.&lt;br /&gt;
&lt;br /&gt;
 E9 87 3D 79 C6 D8 7D C0 FB 6A 57 78 63 33 89 F4 45 32 13 30 3D A6 1F 20 BD 67 FC 23 3A A3 32 62&lt;br /&gt;
&lt;br /&gt;
==Range of valid private keys==&lt;br /&gt;
Nearly every 256-bit number is a valid private key.  Specifically, any 256-bit number between 0x1 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 is a valid private key.&lt;br /&gt;
&lt;br /&gt;
The range of valid private keys is governed by the [[secp256k1]] ECDSA standard used by Bitcoin.&lt;br /&gt;
&lt;br /&gt;
==Base 58 Wallet Import format==&lt;br /&gt;
When we represent private keys in Bitcoin, however, we use a shorter format known as [[wallet import format]], which offers a few advantages.  The wallet import format is shorter, and includes built-in error checking codes so that typos can be automatically detected and/or corrected (which is impossible in hex format).  Wallet import format is the most common way to represent private keys in Bitcoin.  For private keys associated with uncompressed public keys, they are 51 characters and always start with the number 5. Private keys associated with compressed public keys are 52 characters and start with a capital L or K. This is the same private key in wallet import format.&lt;br /&gt;
&lt;br /&gt;
 5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF&lt;br /&gt;
&lt;br /&gt;
When a private key is imported, it always corresponds to exactly one [[Address|Bitcoin address]].  Any utility which performs the conversion can display the matching Bitcoin address.  The mathematical conversion is somewhat complex and best left to a computer, but it&#039;s notable that each private key will always correspond to the same address no matter which program is used to convert it.&lt;br /&gt;
&lt;br /&gt;
The Bitcoin address corresponding to the sample above is: 1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj&lt;br /&gt;
&lt;br /&gt;
==Mini private key format==&lt;br /&gt;
Some applications use the [[mini private key format]].  Not every private key or Bitcoin address has a corresponding mini private key - they have to be generated a certain way in order to ensure a mini private key exists for an address.  The mini private key is used for applications where space is critical, such as in QR codes and in [[physical bitcoins]].  The above example has a mini key, which is:&lt;br /&gt;
&lt;br /&gt;
 SzavMBLoXU6kDrqtUVmffv&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Any Bitcoins sent to the address 1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj can be spent by anybody who knows the private key in &#039;&#039;any&#039;&#039; of the three formats.  That includes bitcoins presently at the address, as well as any bitcoins that are ever sent to it in the future.  The private key is only needed to spend the balance, not necessarily to see it.  The Bitcoin balance of the address can be determined by anybody with the public [[Block Explorer]] at http://www.blockexplorer.com/address/1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj - even if they don&#039;t have the private key.&lt;br /&gt;
&lt;br /&gt;
If a private key with a Bitcoin balance is compromised or stolen, the bitcoin balance can only be protected if it is immediately spent to a different address whose private key is not compromised.  Because bitcoins can only be spent once, when they are spent away from a private key, the private key is worthless unless more coins are sent to the address.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Paper wallet]]&lt;br /&gt;
* [[How to import private keys]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=How_to_import_private_keys&amp;diff=29421</id>
		<title>How to import private keys</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=How_to_import_private_keys&amp;diff=29421"/>
		<updated>2012-08-05T05:33:42Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: Created page with &amp;quot;{{Stub}}  When using Cold storage, Paper wallet or [https://bitcointalk.org/index.php?topic=25804.0 Vanity Bitcoin Address] you need to import Private keys. Before...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
When using [[Cold storage]], [[Paper wallet]] or [https://bitcointalk.org/index.php?topic=25804.0 Vanity Bitcoin Address] you need to import [[Private key]]s. Before Bitcoin 0.6.0, you need to rely on third-party [[wallet.dat]] manipulation tool such as [[pyWallet]]. Since Bitcoin 0.6.0, you can import Private keys using build-in RPC command [[importprivkey]]. Here are some instructions for desktop users (official bitcoin-qt client).&lt;br /&gt;
&lt;br /&gt;
== Start Bitcoin client ==&lt;br /&gt;
Unlike third-party wallet.dat manipulation tool such as [[pyWallet]], you do not have to close Bitcoin client before proceeding. In contrary, you need to start the bitcoind server.&lt;br /&gt;
&lt;br /&gt;
Bitcoin-qt do not start with a bitcoind server by default so it cannot accept RPC commands by default. You can do one of this:&lt;br /&gt;
* Close bitcoin-qt and start &#039;&#039;bitcoind -damon&#039;&#039; in Terminal Emulator. The version of bitcoind MUST be the same as bitcoin-qt!&lt;br /&gt;
* Close bitcoin-qt and restart it with &#039;&#039;bitcoin-qt -server&#039;&#039;. This will make bitcoin-qt accept RPC commands. You can use your client from both GUI and CLI now!&lt;br /&gt;
&lt;br /&gt;
== Unlock your wallet ==&lt;br /&gt;
If you have an encrypted wallet (which is a good idea), you need to unlock it temporarily in memory before importing or exporting Private keys. The RPC commands for unlocking is &#039;&#039;walletpassphrase &amp;lt;passphrase&amp;gt; &amp;lt;timeout&amp;gt;&#039;&#039;. But typing this directly in Terminal Emulator will leave your wallet passphrase directly in bash history. You can do this do prevent that:&lt;br /&gt;
&lt;br /&gt;
 read x&lt;br /&gt;
 (input you passphrase)&lt;br /&gt;
 bitcoind walletpassphrase &amp;quot;$x&amp;quot; 120   # Do not set the timeout too long or too short.&lt;br /&gt;
&lt;br /&gt;
By doing so, your passphrase will not be recorded into bash history. But be careful with people standing behind you since the passphrase are on your screen...&lt;br /&gt;
&lt;br /&gt;
== Import Private key(s) ==&lt;br /&gt;
The last command unlocked your wallet temporarily in memory for 120 seconds. You need to finish importing keys before timed out. Since Private keys are as important as your passphrase, you may want to use these commands to import them instead of typing / pasting them directly in Terminal Emulator to prevent their being recorded in bash history:&lt;br /&gt;
&lt;br /&gt;
 read y&lt;br /&gt;
 (type / paste your Private key)&lt;br /&gt;
 bitcoind importprivkey &amp;quot;$y&amp;quot; &amp;quot;my-new-key&amp;quot;  # Label can be omitted&lt;br /&gt;
&lt;br /&gt;
The importing process is now started. Bitcoind will rescan the entire block data to ensure this key has not been used before. This process will take about one minute or two, depending on your CPU performance. DO NOT abort it before finishing!&lt;br /&gt;
&lt;br /&gt;
If no errors occurs, the import is a success. If you run your bitcoind via bitcoin-qt, you can see your new address in the GUI now. If you need to import more keys, just repeat the instructions above. Right now there are no ways to import keys in batch so you have to wait one minute or two for every key imported...&lt;br /&gt;
&lt;br /&gt;
== Cleaning up ==&lt;br /&gt;
&lt;br /&gt;
 unset x&lt;br /&gt;
 unset y&lt;br /&gt;
&lt;br /&gt;
This will clear the passphrase and Private key from memory. If you start bitcoind in the first way above, you also need to stop it, or bitcoin-qt cannot start again:&lt;br /&gt;
&lt;br /&gt;
 bitcoind stop&lt;br /&gt;
&lt;br /&gt;
Happy importing!&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Paper_wallet&amp;diff=29420</id>
		<title>Paper wallet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Paper_wallet&amp;diff=29420"/>
		<updated>2012-08-05T05:04:36Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* Redeeming Keys */ importprivkey howto&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;paper wallet&#039;&#039;&#039; is a way to store Bitcoins that involves printing the Bitcoin addresses and private keys directly on a piece of paper.  When done properly, paper wallets are one of the safest ways possible to store Bitcoins.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
A Bitcoin [[private key]] can be represented in several formats, but is typically a string of numbers and letters no more than about 51 characters in length.  This is easy to print on paper, and if kept secret, can securely hold an unlimited quantity of Bitcoins.&lt;br /&gt;
&lt;br /&gt;
==Producing safe paper wallets==&lt;br /&gt;
Several tools exist for producing paper wallets, including [[pywallet]], [[vanitygen]], [[bitaddress.org]], [[LinuxCoin]], and [[Bitcoin Address Utility]].  Paper wallets must be produced securely in order to be safe, because any leak of the private key constitutes the ability for an attacker to steal any present and future balance of the address.  Consider the following:&lt;br /&gt;
* Paper wallets should be produced on a computer not connected to the Internet.&lt;br /&gt;
* 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 paper wallet.  Also consider that antivirus software cannot completely rule out the possibility of malware.  However, using bootable CD&#039;s prevents the vast majority of malware from being able to run.  If you can generate a paper wallet with a bootable CD such as [[LinuxCoin]], the likelihood of malware being able to compromise your keys is very low.&lt;br /&gt;
* The private keys of paper wallets should never be saved to a computer hard drive.  You should also never scan your paper wallet into your computer or type the private keys or save them in e-mail, except at the moment you are redeeming the balance.&lt;br /&gt;
* A web-based paper wallet generator should be written so that all of the generation happens on your computer, not the web server.  After you load the paper wallet generating website in your web browser, you should disconnect from the internet, and observe that the paper wallet generator continues to function.  Afterward, you should close your browser before reconnecting to the internet.&lt;br /&gt;
* A paper wallet generator should use an appropriate source of random numbers (entropy).  This means that the generated addresses aren&#039;t predictable.  If the addresses come from a predictable or partially-predictable pattern, someone else who can predict the pattern addresses can steal the balance.  A safe way to generate addresses is from a passphrase, where you provide a very long unguessable passphrase (at least thirty characters - even if it is just mashing random characters on the keyboard).  This way, you as the user are in control of the randomness and potential predictability of the addresses.&lt;br /&gt;
&lt;br /&gt;
==Redeeming Keys==&lt;br /&gt;
&lt;br /&gt;
There are various methods for copying the private key data from a paper wallet to other wallets.  [[MtGox|Mt. Gox]] provides the ability to Add Funds using a private key.  The exchange will then create a &amp;quot;sweep&amp;quot; transaction that spends any amount for that paper wallet address so that the amount is added to your account with them.  They will also sweep to your account any bitcoins received to that address in the future as well.&lt;br /&gt;
&lt;br /&gt;
Those running the Bitcoin.org (&amp;quot;Satoshi&amp;quot;) client can import paper wallet addresses using the [[Pywallet]] utility.  Other [[:Category:Clients|clients]] may allow this as well, including the Javascript-based wallet called My Wallet from [[BlockChain.info]] which can import Bitcoin private keys as well.&lt;br /&gt;
&lt;br /&gt;
Since 0.6.0, key import/export are available in the client itself, you can use is via RPC. The commands are &#039;&#039;dumpprivkey&#039;&#039; and &#039;&#039;importprivkey&#039;&#039;. For encrypted wallet, you need to use &#039;&#039;walletpassphrase&#039;&#039; to decrypt temporarily in memory before importing or exporting. Note that bitcoind will rescan the block data when importing each key now, this process takes about one minute or two, depending on your CPU performance. See [[How to import private keys]] for more info.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Private key]]&lt;br /&gt;
&lt;br /&gt;
* [[Securing_your_wallet#Paper_Wallets]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoind&amp;diff=29402</id>
		<title>Bitcoind</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoind&amp;diff=29402"/>
		<updated>2012-08-04T14:14:27Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The first Bitcoin client in the network&#039;s history is &#039;&#039;&#039;bitcoind&#039;&#039;&#039;. It is available under the [http://www.opensource.org/licenses/mit-license.php MIT license] for Windows, 32 and 64-bit GNU/Linux-based OSes and Mac OS X.&lt;br /&gt;
&lt;br /&gt;
Prior to version 0.5, this service-provider client used a wxWidgets GUI as its default GUI. It is now instead bundled with [[Bitcoin-Qt]].&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
See [[Running_bitcoind|running bitcoind]] for more detail and an example of the configuration file.&lt;br /&gt;
&lt;br /&gt;
bitcoind is a headless daemon, and also bundles a testing tool for the same daemon.  It provides a JSON-RPC interface, allowing it to be controlled locally or remotely.  [[Original Bitcoin client/API Calls list|Various commands]] are made available by the API.&lt;br /&gt;
&lt;br /&gt;
To use locally, first start the program in daemon mode:&lt;br /&gt;
:bitcoind -daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then you can use the same program to execute [[Original Bitcoin client/API Calls list|API commands]], e.g.:&lt;br /&gt;
:bitcoind listreceivedbyaddress 0 true&lt;br /&gt;
:bitcoind getbalance&lt;br /&gt;
&lt;br /&gt;
To stop the bitcoin daemon, execute:&lt;br /&gt;
:bitcoind stop&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
* Version 0.4.0 was released for all supported platforms on September 23th, 2011 &amp;lt;ref&amp;gt;[https://bitcointalk.org/index.php?topic=45410.0 Bitcoin version 0.4.0 released]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
* Version 0.3.24 was released for all supported platforms on July 8th, 2011 &amp;lt;ref&amp;gt;[http://forum.bitcoin.org/index.php?topic=27187.0 Bitcoin version 0.3.24 released]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
* Version 0.3.23 was released for all supported platforms on June 13th, 2011 &amp;lt;ref&amp;gt;[http://forum.bitcoin.org/index.php?topic=16553.0 Bitcoin version 0.3.23 released]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
* Version 0.3.22 was released for all supported platforms on May 19th, 2011 &amp;lt;ref&amp;gt;[http://forum.bitcoin.org/index.php?topic=8894.0 Version 0.3.22]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
* Version 0.3.20 was released for all supported platforms on February 21st, 2011&amp;lt;ref&amp;gt;[http://www.bitcoin.org/smf/index.php?topic=3704.0 Version 0.3.20]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Theory of Operation==&lt;br /&gt;
&lt;br /&gt;
bitcoind is a multithreaded C++ program. It is designed to be portable across Windows, Mac, and Linux systems. The multithreaded aspect leads to some complexity and the use of certain code patterns to deal with concurrency that may be unfamiliar to many programmers. Also, the code is aggressive in the use of C++ constructs, so it will help to be fluent with map, multimap, set, string, vector, iostream, and templates. As is typical of a C++ program, a lot of code tends to end up in the header files so be sure to search both the .cpp and .h files when looking for a function.&lt;br /&gt;
&lt;br /&gt;
The client is oriented around several major operations, which are described in separate detailed articles and summarized in the following sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Satoshi Client Initialization and Startup|Initialization and Startup]]===&lt;br /&gt;
Upon startup, the client performs various initialization routines including starting multiple threads to handle concurrent operations.&lt;br /&gt;
&lt;br /&gt;
===[[Satoshi Client Node Discovery|Node Discovery]]===&lt;br /&gt;
The client uses various techniques find out about other bitcoin nodes that may exist.&lt;br /&gt;
&lt;br /&gt;
===[[Satoshi Client Node Connectivity|Node Connectivity]]===&lt;br /&gt;
The client initiates and maintains connections to other nodes.&lt;br /&gt;
&lt;br /&gt;
===[[Satoshi Client Sockets and Messages|Sockets and Messages]]===&lt;br /&gt;
The client processes messages from other nodes and sends messages to other nodes using socket connections.&lt;br /&gt;
&lt;br /&gt;
===[[Satoshi Client Block Exchange|Block Exchange]]===&lt;br /&gt;
Nodes advertise their inventory of blocks to each other and exchange blocks to build block chains.&lt;br /&gt;
&lt;br /&gt;
===[[Satoshi Client Transaction Exchange|Transaction Exchange]]===&lt;br /&gt;
Nodes exchange and relay transactions with each other. The client associates transactions with bitcoin addresses in the local wallet.&lt;br /&gt;
&lt;br /&gt;
===Wallet Services===&lt;br /&gt;
The client can create transactions using the local wallet. The client associates transactions with bitcoin addresses in the local wallet. The client provides a service for managing the local wallet.&lt;br /&gt;
&lt;br /&gt;
===RPC Interface===&lt;br /&gt;
The client offers an JSON-RPC interface over HTTP over sockets to perform various operational functions and to manage the local wallet.&lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
The user interface code was based on [http://www.wxwidgets.org wxWidgets] and was superseded by [[Bitcoin-qt]] in version 0.5.0.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Original Bitcoin client/API calls list]]&lt;br /&gt;
* [[Protocol specification|Bitcoin network protocol]]&lt;br /&gt;
* [[Development process]]&lt;br /&gt;
* [[Release process]]&lt;br /&gt;
* [[Changelog]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/ Bitcoin Client project on Github]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Nodes]]&lt;br /&gt;
[[Category:Wallets]]&lt;br /&gt;
[[Category:User Interfaces]]&lt;br /&gt;
[[Category:Clients]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Free Software]]&lt;br /&gt;
[[Category:License/MIT-X11]]&lt;br /&gt;
[[Category:Open Source]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Securing_your_wallet&amp;diff=29400</id>
		<title>Securing your wallet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Securing_your_wallet&amp;diff=29400"/>
		<updated>2012-08-04T10:50:44Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* Restore */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background:#dddddd;border:solid gray 1px;width:70%;margin:auto;&amp;quot;&amp;gt;&lt;br /&gt;
Current releases of the bitcoin client offer passphase encryption for the keys in the wallet.&lt;br /&gt;
&lt;br /&gt;
This article could use an update.  See the discussion for this article for more.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Wallet security can be broken down into two independent goals:&lt;br /&gt;
# Protecting your wallet against loss.&lt;br /&gt;
# Protecting your wallet against theft.&lt;br /&gt;
&lt;br /&gt;
In the case that your current wallet hasn&#039;t been protected adequately (e.g. put online with a weaker password):&lt;br /&gt;
# Making a new secure wallet, using appropriate long-term protection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For a brief overview see also: [[Wallet Security Dos and Don&#039;ts (Windows)|Wallet Security Dos and Don&#039;ts]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Paper Wallets==&lt;br /&gt;
[[Paper wallet]]s are a fairly simple way to store Bitcoins without needing a computer.  When generated securely, a paper wallet also puts your Bitcoins well outside the reach of hackers and computer viruses.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Storing&amp;quot; bitcoins is a little bit of a misnomer - what you are actually &amp;quot;storing&amp;quot; is a sequence of secret numbers that is used to prove your right to spend the Bitcoins you have received.  This secret number is called a [[private key]].  The most common way to write a Bitcoin private key is as a sequence of fifty-one alphanumeric characters that always starts with a &#039;5&#039;.&lt;br /&gt;
&lt;br /&gt;
One way you can print a paper wallet is at the website [[BitAddress]].  This website features a free client-side paper wallet generator written in JavaScript.  This generator can be saved as a file and used on an offline computer.  Using it online is relatively safe, but not airtight unless you take a couple of extra precautions to ensure your keys are not stolen by spyware. Alternatively blockchain.info offers a [https://blockchain.info/wallet/paper-tutorial tutorial on how to generate a paper wallet] with an online component so you can still check your balance easily.&lt;br /&gt;
&lt;br /&gt;
To generate a safe paper wallet, you need to &amp;quot;clean-boot&amp;quot; your computer with a bootable CD (such as a Linux Live CD), with your computer not connected to the internet, to ensure that you do not have any active spyware that might steal the private keys you generate.  Disconnecting from the Internet allows you to confirm that the paper wallet generator is truly self-contained and isn&#039;t depending on communication with a remote server.  Run the saved paper wallet generator in a web browser, print your paper wallets (do not save them on the computer), and then shut down the computer.  You may need to load an appropriate printer driver in order to print while booted from the Live CD.&lt;br /&gt;
&lt;br /&gt;
A paper wallet lists multiple Bitcoin addresses and the corresponding &amp;quot;private key&amp;quot;.  You can send Bitcoins to any address on the page, and they will be inaccessible until the private key is loaded back onto a computer.  The Bitcoin software does not yet have a built-in way to load private keys, but you can use the &amp;quot;Add Funds&amp;quot; - &amp;quot;Private key&amp;quot; screen at [[MtGox]] to recover digital coins from a private key.  Coins are deposited in your MtGox account and can be sent out of MtGox shortly thereafter.&lt;br /&gt;
&lt;br /&gt;
Remember that spyware and viruses often attempt to monitor your computer activities so that their authors can steal from you.  They are interested in your passwords (such as to banking, etc.) and anything of value.  Bitcoin wallets and Bitcoin private keys are something of value that will be targeted by malware.  Paper wallets isolate you from much of this risk.&lt;br /&gt;
&lt;br /&gt;
If your computer is infected with spyware or viruses - even if there are no symptoms or your antivirus isn&#039;t reporting anything - then anything you type, view, or save on your computer could potentially be stolen by someone remotely controlling your computer.  Your private key could potentially be intercepted at the point you type it in to redeem it, so only enter a Bitcoin private key into your computer when your intent is to redeem its value &#039;&#039;immediately&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Importance of security updates==&lt;br /&gt;
&lt;br /&gt;
No software is perfect, and from time to time there may be security vulnerabilities found in your Bitcoin client as well.&lt;br /&gt;
Be sure you keep your client up to date for the latest bug fixes, especially when a new vulnerability is discovered.&lt;br /&gt;
We maintain a [[CVEs|list a known vulnerabilities]] on this wiki - you can watch that page to get updates.&lt;br /&gt;
Note that you &#039;&#039;don&#039;t&#039;&#039; need to be running a bleeding edge client version: some clients, including the popular Bitcoin-Qt, have older versions available with bugfix-only updates.&lt;br /&gt;
&lt;br /&gt;
==Securing an online wallet with the Bitcoin software==&lt;br /&gt;
&lt;br /&gt;
Bitcoin transactions send Bitcoins to a specific public key. A Bitcoin address is an encoded hash of a public key. In order to use received Bitcoins, you need to have the private key matching the public key you received with. This is sort of like a super long password associated with an account (the account is the public key). Your Bitcoin wallet contains all of the private keys necessary for spending your received transactions. If you delete your wallet without a backup, then you no longer have the authorization information necessary to claim your coins, and the coins associated with those keys are lost forever.&lt;br /&gt;
&lt;br /&gt;
The wallet contains a pool of queued keys. By default there are 100 keys in the [[key pool]].  The size of the pool is configurable using the &amp;quot;-keypool&amp;quot; command line argument.  When you need an address for whatever reason (send, “new address”, generation, etc.), the key is not actually generated freshly, but taken from this pool. A brand new address is generated to fill the pool back to 100. So when a backup is first created, it has all of your old keys plus 100 unused keys. After sending a transaction, it has 99 unused keys. After a total of 100 new-key actions, you will start using keys that are not in your backup. Since the backup does not have the private keys necessary for authorizing spends of these coins, restoring from the old backup will cause you to lose Bitcoins.&lt;br /&gt;
&lt;br /&gt;
Creating a new address generates a new pair of public and private keys, which are added to your wallet. Each keypair is mostly random numbers, so they cannot be known prior to generation. If you backup your wallet and then create more than 100 new addresses, the keypair associated with the newest addresses will not be in the old wallet because the new keypairs are only known after creating them. Any coins received at these addresses will be lost if you restore from the backup.&lt;br /&gt;
&lt;br /&gt;
The situation is made somewhat more confusing because the receiving addresses shown in the UI are not the only keys in your wallet. Each Bitcoin generation is given a new public key, and, more importantly, each sent transaction also sends some number of Bitcoins back to yourself at a new key. When sending Bitcoins to anyone, you generate a new keypair for yourself and simultaneously send Bitcoins to your new public key and the actual recipient&#039;s public key. This is an anonymity feature – it makes tracking Bitcoin transactions much more difficult.&lt;br /&gt;
&lt;br /&gt;
So if you create a backup, do more than 100 things that cause a new key to be used, and then restore from the backup, some Bitcoins will be lost. Bitcoin has not deleted any keys (keys are never deleted) – it has created a new key that is not in your old backup and then sent Bitcoins to it.&lt;br /&gt;
&lt;br /&gt;
== Making a new wallet ==&lt;br /&gt;
&lt;br /&gt;
In the case that a wallet has been distributed, or stored, in a (real or potential) compromised state, it is wise to create a new wallet and transfer the full balance of Bitcoins to an address contained only in the newly created wallet.&lt;br /&gt;
&lt;br /&gt;
For example, this will be necessary if one created a wallet with a password of 12 characters, as suggested. However a few years have passed and the wallet is now more easily compromised.  Just re-encrypting isn&#039;t secure.  One needs to make a new wallet and make the old wallet worthless (spending the funds to the new wallet).&lt;br /&gt;
&lt;br /&gt;
==Making a secure workspace==&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
The first step is to make a [http://www.howtogeek.com/howto/ubuntu/add-a-user-on-ubuntu-server/ new user,] so as root, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;adduser new_user_name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you get to the prompt &#039;Enter the new value, or press ENTER for the default&#039;, just keep hitting ENTER.&lt;br /&gt;
&lt;br /&gt;
Then switch user to the new user.  To get to the new user you can use the switch user icon for your system, which on Ubuntu is in the &#039;System/Quit&#039; screen, or if there is no switch icon on your system you can log out and log back in as the new user.  Then click on a folder in the new user to display the file browser, then keep going up folders until you see the new user home directory, then right click to bring up the Properties dialog, then click on the Permissions tab, then in the Others section, set the folder access to None.&lt;br /&gt;
&lt;br /&gt;
For secure browsing, open Firefox, and then go into the Edit menu and click Preferences.  Starting from the left, click on the General tab, and in the &#039;Startup/When Firefox starts&#039; pop up menu, choose &#039;Show a Blank Page&#039;.  Then click on the Content tab, and deselect &#039;Load images automatically&#039; and deselect &#039;Enable JavaScript&#039;.  Then click on the Privacy tab, and in the &#039;History/Firefox will&#039; pop up menu, choose &#039;Never remember history&#039;.  Then click on the Security tab, and in the Passwords section, deselect &#039;Remember passwords for sites&#039; and deselect &#039;Use a master password&#039;.  Then click on the Advanced tab, then click on the Update tab, and then in the &#039;Automatically check for updates to&#039; section, deselect &#039;Add-ons&#039; and &#039;Search Engines&#039;.&lt;br /&gt;
&lt;br /&gt;
When JavaScript is disabled, the [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.23/bitcoin-0.3.23-linux.tar.gz/download Linux download page] will not download automatically, so you&#039;ll have to click on the &#039;direct link&#039; part of the &amp;quot;Problems with the download? Please use this &#039;direct link&#039; or try another mirror.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve made your secure new user, to maintain security you should only use it for Bitcoin.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also a good idea to encrypt the Home directory of whatever user you run Bitcoin under using ecryptfs-utils. To do this:&lt;br /&gt;
# If the Home directory is not empty you should back it up first, by just copying the data to an external drive or something.&lt;br /&gt;
# install ecryptfs-utils (on Ubuntu: sudo apt-get install ecryptfs-utils)&lt;br /&gt;
# log out of X (graphical system) and press Ctrl+Alt+F1 to login to the command shell (you must be logged out or some files will be open and the tool won&#039;t be able to encrypt your data)&lt;br /&gt;
# change directory to something that&#039;s not in your home folder (ex: cd / )&lt;br /&gt;
# run the migration tool (on Ubuntu: sudo ecryptfs-migrate-home -u username)&lt;br /&gt;
# if it&#039;s successful, you can now press ALT+F8 to go back to the GUI and login&lt;br /&gt;
# run &#039;ecryptfs-unwrap-passphrase&#039; and &#039;&#039;&#039;WRITE DOWN OR SAVE THE CODE IT RETURNS&#039;&#039;&#039; because you will need it if you ever have to pull your data off while the OS is not working. (You can run it again later if you need to, but run it now so that you can get your data if your Linux install gets botched.)&lt;br /&gt;
# run &#039;ecryptfs-setup-swap&#039; to encrypt your swap partition (the encrypted folder data is not encrypted while it&#039;s in memory, and so if it&#039;s ever sent to the swap partition it can be stolen from there unless that too is encrypted - be aware that this will mean you cannot use Hibernate anymore, as the bootloader won&#039;t be able to restore the hibernation data)&lt;br /&gt;
(instructions from [http://bodhizazen.net/Tutorials/Ecryptfs/#Migrate])&lt;br /&gt;
&lt;br /&gt;
===Mac===&lt;br /&gt;
This solution &#039;&#039;&#039;does not scale&#039;&#039;&#039;; the amount of needed space can grow beyond the image size.&lt;br /&gt;
&lt;br /&gt;
=====Backup all data=====&lt;br /&gt;
Follow these instructions to backup all the bitcoin data (wallet and block chains) to an encrypted disk image.&lt;br /&gt;
# Open Disk Utility&lt;br /&gt;
# Click New Image and choose a big enough size, 128-bit or 256-bit (faster or more secure) encryption and single partition.&lt;br /&gt;
# Save it somewhere you won&#039;t lose it (like your Wuala, Dropbox, Strongspace or whatever)&lt;br /&gt;
# Choose a safe and strong password&lt;br /&gt;
# Move everything from ~/Library/Application Support/Bitcoin/ to the image&lt;br /&gt;
# Symlink it back so the app would be able to use it&lt;br /&gt;
:::ln -s /Volumes/Bitcoin ~/Library/Application Support/Bitcoin&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to mount your image before using Bitcoin and unmount it after quitting.&lt;br /&gt;
&lt;br /&gt;
=====Backup just wallet.dat=====&lt;br /&gt;
Follow these instructions to backup just the wallet.dat file. This results in a smaller disk image, but it&#039;s more complicated to do.&lt;br /&gt;
# Open Disk Utility&lt;br /&gt;
# Click New Image and choose a big enough size, 128-bit or 256-bit (faster or more secure) encryption and single partition.&lt;br /&gt;
# Save it somewhere you won&#039;t lose it (like your Wuala, Dropbox, Strongspace or whatever)&lt;br /&gt;
# Choose a safe and strong password&lt;br /&gt;
# Move your wallet.dat file to the image&lt;br /&gt;
# Symlink it back so the app would be able to use it&lt;br /&gt;
:::ln -s /Volumes/Bitcoin/wallet.dat ~/Library/Application Support/Bitcoin/wallet.dat&lt;br /&gt;
&lt;br /&gt;
[[File:MountWalletAndLauchnBitcoin_OSX_Automator.png|thumbnail|150px|Mount Wallet and launch Bitcoin]]&lt;br /&gt;
Don&#039;t forget to mount your image before using Bitcoin and unmount after quitting it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you start the Bitcoin application without having the image mounted, the application will overwrite your symlink with a new wallet. If that happens, don&#039;t panic. Just delete the new wallet.dat, mount the image, and recreate the symlink like above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Automation&#039;&#039;&#039;: You can create a small application using [http://en.wikipedia.org/wiki/Automator_%28software%29 Automator] (included in OS X) to automatically mount the wallet and then launch Bitcoin App. See the Screenshot on how to do this.&lt;br /&gt;
&lt;br /&gt;
If one &#039;&#039;doesn&#039;t&#039;&#039; want to use encrypted Disk images, then a &#039;&#039;&#039;small shell script&#039;&#039;&#039; can be used instead that takes care of decrypting the wallet, launching bitcoin client, and encrypting it after the client exits. This script works on both OSX and Linux: [http://lorelei.kaverit.org/bitcoin.sh bitcoin-launch-script]&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
If you are using Windows XP or Windows 7, you can keep your wallet on an encrypted disk image created by third-party software, such as [http://www.truecrypt.org/ TrueCrypt] (open source) or [http://www.jetico.com/encryption-bestcrypt/ Jetico BestCrypt] (commercial).  You can probably do the same with Windows Vista or Windows 2000.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; You should configure Bitcoin in this manner only on computers where you use Bitcoin, but do not use that computer to mine.  For example, this is a good configuration for a notebook or tablet computer.&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed the Windows Bitcoin client and run it at least once, the process is described below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;To mount the Bitcoin data directory on an encrypted drive&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol start=1 type=1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the third-party disk image encryption program of your choice to create and mount an encrypted disk image of at least 100 MB in size.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Locate the Bitcoin data directory, and copy the directory with all contents to the encrypted drive.&lt;br /&gt;
&amp;lt;p&amp;gt;For help finding this directory, see &amp;lt;b&amp;gt;[[Securing_your_wallet#Locating_Bitcoin_s_data_directory|Locating Bitcoin&#039;s Data Directory]]&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a Windows shortcut that starts Bitcoin with the &amp;lt;code&amp;gt;-datadir&amp;lt;/code&amp;gt; parameter and specifies the encrypted drive and directory.&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you installed Bitcoin in the default directory, mounted your Bitcoin encrypted drive as &amp;lt;code&amp;gt;E:\&amp;lt;/code&amp;gt;, and stored your Bitcoin data directory on it as &amp;lt;code&amp;gt;Bitcoin&amp;lt;/code&amp;gt;, you would type the following command as the shortcut Target:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;C:\Program Files\Bitcoin\bitcoin.exe -datadir=E:\Bitcoin&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open Bitcoin&#039;s settings and configure it &amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; to start automatically when you start Windows.&lt;br /&gt;
&amp;lt;p&amp;gt;This is to allow you to mount the Bitcoin encrypted disk image before starting Bitcoin.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Shut down Bitcoin, and then restart it from the new shortcut.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After doing this, any time you want to use Bitcoin, you must first mount the Bitcoin encrypted disk image using the same drive designation, and then run Bitcoin from the shortcut that you created, so that it can find its data and your wallet. :-)&lt;br /&gt;
&lt;br /&gt;
== Locating Bitcoin&#039;s data directory ==&lt;br /&gt;
&lt;br /&gt;
The [[data directory]] is the location where Bitcoin&#039;s data files are stored, including the wallet data file.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Go to Start -&amp;gt; Run (or press WinKey+R) and run this:&lt;br /&gt;
&lt;br /&gt;
 explorer %APPDATA%\Bitcoin&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s data folder will open. For most users, this is the following locations:&lt;br /&gt;
&lt;br /&gt;
 C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)&lt;br /&gt;
 &lt;br /&gt;
 C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;AppData&amp;quot; and &amp;quot;Application data&amp;quot; are hidden by default.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
By default Bitcoin will put its data here:&lt;br /&gt;
&lt;br /&gt;
 ~/.bitcoin/&lt;br /&gt;
&lt;br /&gt;
You need to do a &amp;quot;ls -a&amp;quot; to see directories that start with a dot.&lt;br /&gt;
&lt;br /&gt;
If that&#039;s not it, you can do a search like this:&lt;br /&gt;
&lt;br /&gt;
 find / -name wallet.dat -print 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
To change the directory Bitcoin stores its data in:&lt;br /&gt;
 Run in terminal or script: ./bitcoin(-qt) -datadir=./[Directory_Name]&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&lt;br /&gt;
By default Bitcoin will put its data here:&lt;br /&gt;
&lt;br /&gt;
 ~/Library/Application Support/Bitcoin/&lt;br /&gt;
&lt;br /&gt;
==Backup==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Using a service like Dropbox to back up your Bitcoin data is not recommended as doing so introduces [https://en.wikipedia.org/wiki/Dropbox_(service)#Reception security concerns] such as:&lt;br /&gt;
# the fact that they store your encryption key (meaning that a disgruntled Dropbox employee or an attacker who gained access to the system could decrypt your Dropbox data and steal your Bitcoins)&lt;br /&gt;
# the fact that the Dropbox client only needs a password for the first login. After it authenticates once, the server assigns it a token which it uses to show that, at one time, its user knew the password rather than sending the actual password (meaning that if you ever use the Dropbox client on another PC, that PC&#039;s users can access your Dropbox - even if you change your password - and can steal your Bitcoins or get a virus that will steal your Bitcoins).&lt;br /&gt;
&lt;br /&gt;
For these reasons, an alternative is Wuala which does not store your encryption key and requires a password each time.  With Wuala, the client can be set to remember your password but the server will check each time to make sure that the client is sending the correct password. Like Dropbox, the basic, lowest-storage-space account with Wuala is free of charge, and coincidentally, Wuala [http://www.wuala.com/en/bitcoin is experimenting with allowing users to pay for &amp;quot;upgraded&amp;quot; plans using Bitcoin.]&lt;br /&gt;
&lt;br /&gt;
Whether you use Dropbox as your backup or not, use what Steve Gibson calls &amp;quot;pre-Internet encryption&amp;quot; (which he [http://itknowledgeexchange.techtarget.com/security-corner/cloud-security-and-privacy-do-they-exist/ discussed in the context of Dropbox&#039;s security concerns]) and use some form of encryption on the files before you back them up -- just in case someone other than yourself ever gains access to that backup. Make sure to pick a password that&#039;s memorable but secure.&lt;br /&gt;
&lt;br /&gt;
The only file you need to back up is &amp;quot;wallet.dat&amp;quot;. Ensure that Bitcoin is closed, copy this file somewhere else, encrypt it, and put it somewhere safe. Ideally, you would put this file in two places: one nearby, and one 100+ miles away.&lt;br /&gt;
&lt;br /&gt;
You can use the [[api|backupwallet]] JSON-RPC command to back up without shutting down Bitcoin.&lt;br /&gt;
&lt;br /&gt;
=== General Solutions ===&lt;br /&gt;
&lt;br /&gt;
Your wallet.dat file is not encrypted by Bitcoin, by default.  The most current release of the Bitcoin client provides a method to encrypt with a passphrase the private keys stored in the wallet.  Anyone who can access a wallet which is not using the passphrase encryption can easily steal all of your coins.  Use one of these encryption programs if there is any chance someone might stumble upon your wallet.&lt;br /&gt;
* [http://www.7-zip.org/ 7-zip] - Supports strongly-encrypted archives.&lt;br /&gt;
* [http://www.axantum.com/axcrypt/ AxCrypt by Axantum]&lt;br /&gt;
* [http://lrzip.kolivas.org lrzip] - Compression software for Linux and OSX that supports very high grade password protected encryption&lt;br /&gt;
* [http://www.truecrypt.org/ TrueCrypt] - Volume-based on-the-fly encryption (for advanced users)&lt;br /&gt;
* [http://www.rarlab.com/ WinRar] - Commonly used archive software that supports verification records and encryption.&lt;br /&gt;
&lt;br /&gt;
There is also a list of [[OpenSourceEncryptionSoftware|open source encryption software.]]&lt;br /&gt;
&lt;br /&gt;
Decrypting and encrypting the wallet.dat every time you start or quit the Bitcoin client can be &#039;&#039;tedious&#039;&#039; (and outright error-prone). If you want to keep your wallet encrypted (except while you&#039;re actually running the Bitcoin client), it&#039;s better to relegate the automation to a [http://lorelei.kaverit.org/bitcoin.sh small shell script] that handles the en/decryption and starting up Bitcoin client for you (Linux and OSX). &lt;br /&gt;
&lt;br /&gt;
There is also a method to Print out and encrypt your Wallet.dat as a special barcode. See details here: [[WalletPaperbackup]]&lt;br /&gt;
&lt;br /&gt;
==== Password Strength ====&lt;br /&gt;
Brute-force password cracking has come a long way. A password of random [a-Z] [0-9] [!-~] of 8 characters long was previously thought secure but can be trivially solved now (using appropriate hardware). The recommended length is &#039;&#039;&#039;at least&#039;&#039;&#039; 12 characters long.  You can also use a multi-word password. [http://www.baekdal.com/tips/password-security-usability The Usability of Passwords] &lt;br /&gt;
&lt;br /&gt;
However, simply using dictionary words is also insecure as it opens you up to a dictionary attack. If you use dictionary words, be sure to throw random symbols and numbers in the mix as well.&lt;br /&gt;
&lt;br /&gt;
If you use keyfiles in addition to a password, it is unlikely that your encrypted file can ever be cracked using brute force methods, even 10 years from now when even a 12 character password might be too short.&lt;br /&gt;
&lt;br /&gt;
Assume that any encrypted files you store online (eg. Gmail, Dropbox) will be stored somewhere forever and can never be erased.&lt;br /&gt;
&lt;br /&gt;
===== Choosing Your Password =====&lt;br /&gt;
Make sure you pick at least one character in each group:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Lowercase: abcdefghijklmnopqrstuvwxyz&lt;br /&gt;
  Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;br /&gt;
  Number: 1234567890&lt;br /&gt;
  Symbol: `~!@#$%^&amp;amp;*()-_=+\|[{]};:&#039;&amp;quot;,&amp;lt;.&amp;gt;/? (space)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;9 char = unsuitable for use&lt;br /&gt;
  09 char = insecure&lt;br /&gt;
  10 char = low security&lt;br /&gt;
  11 char = medium security&lt;br /&gt;
  12 char = good security (good enough for your wallet)&lt;br /&gt;
  13 char = very good, enough for anything.&lt;br /&gt;
&lt;br /&gt;
==== Storage of Archive ====&lt;br /&gt;
One of the most simple methods for storing a appropriately &#039;&#039;&#039;encrypted&#039;&#039;&#039; archive of your wallet.dat file is to send the archive as an email attachment to your own e-mail address.  Services like gmail.com use very comprehensive distributed networks that make the loss of data very unlikely.  One can even obfuscate the name of the files within the archive, and name the archive something less inviting, such as: &#039;personal notes&#039; or &#039;car insurance&#039;.&lt;br /&gt;
&lt;br /&gt;
Another solution is to use a file storage service like [http://www.wuala.com/bitcoin Wuala] ( encrypted, [http://www.bitcoin.org/smf/index.php?topic=5817.0 instructions]), [http://www.dropbox.com Dropbox] and [http://en.wikipedia.org/wiki/Comparison_of_online_backup_services others], including the more secure [http://www.spideroak.com SpiderOak].&lt;br /&gt;
&lt;br /&gt;
=== Linux solution ===&lt;br /&gt;
&lt;br /&gt;
Linux users can setup backups using cron by telling it to run a backup script at set intervals of time. Run &#039;crontab -e&#039; and add this line near the bottom:&lt;br /&gt;
&lt;br /&gt;
 01 */1 * * * /usr/local/bin/backupwallet.sh&lt;br /&gt;
&lt;br /&gt;
This cron line will run the /usr/local/bin/backupwallet.sh script at the 01 minute of every hour. Remember to add a newline after the last line of the crontab file, or else the last line won&#039;t run. You may also wish to ignore the script&#039;s output by appending &amp;quot; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;quot; to the line (this will also prevent emails from being sent).&lt;br /&gt;
&lt;br /&gt;
Create /usr/local/bin/backupwallet.sh:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # /usr/local/bin/backupwallet.sh&lt;br /&gt;
 #&lt;br /&gt;
 # Performs backup of bitcoin wallet.&lt;br /&gt;
 #&lt;br /&gt;
 # Written by: https://en.bitcoin.it/wiki/Securing_your_wallet&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Standard Options&lt;br /&gt;
 #&lt;br /&gt;
 TS=$(date &amp;quot;+%Y%m%d-%H%M&amp;quot;)&lt;br /&gt;
 WALLET=/tmp/wallet-${TS}&lt;br /&gt;
 WALLET_E=/tmp/wallet-${TS}.crypt&lt;br /&gt;
 BITCOIN=bitcoind  # /path/to/bitcoind&lt;br /&gt;
 GPG=gpg  # /path/to/gpg&lt;br /&gt;
 GPG_USER=username  # Username of gpg recipient. User should have gpg setup.&lt;br /&gt;
 RM=rm&lt;br /&gt;
 RM_OPTS=&#039;--force&#039;&lt;br /&gt;
 USE_SHRED=0  # Flip to 1 to use `shred` instead of `rm`.&lt;br /&gt;
 SHRED=shred&lt;br /&gt;
 SHRED_OPTS=&#039;--force --iterations=9 --zero --remove&#039;&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Storage Options&lt;br /&gt;
 # Only 1 set of options should be un-commented (the last one will be used).&lt;br /&gt;
 # Update CP_DEST paths as neccessary.&lt;br /&gt;
 #&lt;br /&gt;
 # CP - Storage on a local machine. Could be Dropbox/Wuala folder.&lt;br /&gt;
 #CP=cp&lt;br /&gt;
 #CP_DEST=&#039;/var/data/backups/&#039;  # &#039;~/Dropbox/&#039;, etc.&lt;br /&gt;
 #&lt;br /&gt;
 # SSH - Storage on a remote machine.&lt;br /&gt;
 CP=scp&lt;br /&gt;
 CP_DEST=&#039;remoteuser@example.com:~/wallets/&#039;&lt;br /&gt;
 #&lt;br /&gt;
 # S3 - Storage on Amazon&#039;s S3. Be sure s3cmd is installed and properly setup.&lt;br /&gt;
 # You may need &amp;quot;s3cmd put --force&amp;quot; if you use a sub-directory in CP_DEST.&lt;br /&gt;
 #CP=s3cmd put&lt;br /&gt;
 #CP_DEST=&#039;s3://bucket&#039;&lt;br /&gt;
 &lt;br /&gt;
 do_clean() {&lt;br /&gt;
   # Remove temporary wallets.&lt;br /&gt;
   if [ 1 -eq $USE_SHRED ]; then&lt;br /&gt;
     $SHRED $SHRED_OPTS $WALLET $WALLET_E&lt;br /&gt;
   else&lt;br /&gt;
     $RM $RM_OPTS $WALLET $WALLET_E&lt;br /&gt;
   fi&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 do_fail() {&lt;br /&gt;
   do_clean&lt;br /&gt;
   echo failed!&lt;br /&gt;
   exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # Perform the backup.&lt;br /&gt;
 echo -n Making backup...&lt;br /&gt;
 $BITCOIN backupwallet $WALLET&lt;br /&gt;
 [ ! -s &amp;quot;$WALLET&amp;quot; ] &amp;amp;&amp;amp; do_fail  # If the backup does not exist or is empty, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 echo -n Encrypting backup...&lt;br /&gt;
 $GPG -r $GPG_USER --output $WALLET_E --encrypt $WALLET&lt;br /&gt;
 [ 0 -ne $? ] &amp;amp;&amp;amp; do_fail  # If gpg returns a non-zero result, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 echo -n Copying to backup location...&lt;br /&gt;
 $CP $WALLET_E &amp;quot;$CP_DEST&amp;quot;&lt;br /&gt;
 [ 0 -ne $? ] &amp;amp;&amp;amp; do_fail  # If the $CP command returns a non-zero result, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 do_clean&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
The shell script:&lt;br /&gt;
&lt;br /&gt;
* Calls bitcoind backupwallet to create a time/date-stamped wallet.&lt;br /&gt;
* GPG encrypts the wallet with your public key.&lt;br /&gt;
* Copies the result using one of several storage options (cp, scp, and s3cmd).&lt;br /&gt;
* Uses the rm or shred command to remove the temporary wallet files.&lt;br /&gt;
&lt;br /&gt;
Be sure to modify the script options to fit your setup. After you save, make sure the file can be executed properly by the cron user. Common permissions for files in /usr/local/bin/ can be applied using (verify with your distribution!):&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/bin/ &amp;amp;&amp;amp; chown root:root backupwallet.sh &amp;amp;&amp;amp; chmod 755 backupwallet.sh&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
&lt;br /&gt;
==Restore==&lt;br /&gt;
&lt;br /&gt;
Assuming your backup is recent enough that you haven&#039;t used up all of your key pool... restoring a wallet to a new (or old) location and rescanning the block chain should leave you with all your coins. Just follow these steps:&lt;br /&gt;
* Quit bitcoin(d).&lt;br /&gt;
* Copy your backed up wallet.dat into your bitcoin profile directory.&lt;br /&gt;
* If copying into existing profile, delete files &#039;&#039;blk*.dat&#039;&#039; to make the client re-scan the block chain.&lt;br /&gt;
&lt;br /&gt;
And you&#039;ll be good as new.&lt;br /&gt;
&lt;br /&gt;
==Erasing Plain Text Wallets==&lt;br /&gt;
&lt;br /&gt;
A good practice is to keep at least two wallets, one as a &amp;quot;current account&amp;quot; for everyday transactions and one as a &amp;quot;savings account&amp;quot; where you store the majority of your Bitcoins.  &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;savings account&amp;quot; wallet should be backed up in encrypted form only and all plaintext copies of this wallet should be erased. In case someone gains unauthorised access to your computer (either by physically stealing it or by exploiting a system vulnerability via the internet), they will only be able to spend the coins in your &amp;quot;current account&amp;quot; wallet.&lt;br /&gt;
&lt;br /&gt;
In most operating systems, including Windows, Linux, and Mac OS X, simply deleting a wallet.dat file will &#039;&#039;not&#039;&#039; generally destroy it. It is likely that advanced tools can still be used to recover the wallet.dat file, even after it has been deleted.&lt;br /&gt;
&lt;br /&gt;
The Linux &#039;&#039;&#039;shred&#039;&#039;&#039; command can be used to overwrite the wallet file with random data prior to deleting; this particular copy of the file will then be practically impossible to recover.  Using shred (and similar tools on Windows) however does not guarantee that still other copies don&#039;t exist somewhere hidden on your HD. That will depend on your system configuration and what packages you have installed. Some system restore and backup tools, for instance, create periodic snapshots of your  filesystem, duplicating your wallet.dat.&lt;br /&gt;
&lt;br /&gt;
In Mac OS, the equivalent of &#039;&#039;&#039;shred&#039;&#039;&#039; is &#039;&#039;&#039;srm&#039;&#039;&#039; (introduced in Leopard). Using the Finder to remove files, clicking &amp;quot;Secure Empty Trash&amp;quot; in the Finder menu will shred the contents of the trash can. As with any OS this doesn&#039;t guarantee that there are not other copies elsewhere on your system.&lt;br /&gt;
&lt;br /&gt;
For Windows, the built-in command &#039;&#039;cipher /W&#039;&#039; will shred all previously-deleted files. [http://www.cylog.org/utilities/cybershredder.jsp CyberShredder] can securely deleted individual files.&lt;br /&gt;
&lt;br /&gt;
==eWallet==&lt;br /&gt;
&lt;br /&gt;
Storing bitcoins with an [[eWallet]] provider incurs risks as well. Basically you grant the third party, in this case eWallet, full access to your wallet. These eWallets, or Electronic Wallets have a number of pros and cons. For example, you can access your wallet on any computer in the world, but the wallet can be forged or hacked and your bitcoins could be lost. You can also get eWallet applications for your Android phone, which also download the block chain like the normal client but allow the user to send bitcoins by QR code or NFC. The problem with this is that Bitcoins can be intercepted through means of mobile hacking.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Data directory]]&lt;br /&gt;
* [http://startbitcoin.com/how-to-create-a-secure-bitcoin-wallet/ Secure Bitcoin Wallet Tutorial]&lt;br /&gt;
* [[How to set up a secure offline savings wallet]]&lt;br /&gt;
* [http://arimaa.com/bitcoin/ Bitcoin Gateway - A Peer-to-peer Bitcoin Vault and Payment Network]&lt;br /&gt;
* [http://blog.cyplo.net/2012/04/01/bitcoin-wallet-recovery-photorec/ Find lost wallet eg. after disk format, using Photorec]&lt;br /&gt;
[[de:Sichere deine Geldbörse]]&lt;br /&gt;
[[zh-cn:保护你的钱包]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Wzyboy&amp;diff=29383</id>
		<title>User:Wzyboy</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Wzyboy&amp;diff=29383"/>
		<updated>2012-08-04T07:26:26Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: Creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My user page: [[https://en.wikipedia.org/wiki/User:Wzyboy User:Wzyboy]].&lt;br /&gt;
&lt;br /&gt;
My Bitcoin address: 18bVT7CXaCWsWUWSt8buzmYQ6NR4ZreMn2&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Securing_your_wallet&amp;diff=29382</id>
		<title>Securing your wallet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Securing_your_wallet&amp;diff=29382"/>
		<updated>2012-08-04T07:22:06Z</updated>

		<summary type="html">&lt;p&gt;Wzyboy: /* Backup */ fix dead link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background:#dddddd;border:solid gray 1px;width:70%;margin:auto;&amp;quot;&amp;gt;&lt;br /&gt;
Current releases of the bitcoin client offer passphase encryption for the keys in the wallet.&lt;br /&gt;
&lt;br /&gt;
This article could use an update.  See the discussion for this article for more.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Wallet security can be broken down into two independent goals:&lt;br /&gt;
# Protecting your wallet against loss.&lt;br /&gt;
# Protecting your wallet against theft.&lt;br /&gt;
&lt;br /&gt;
In the case that your current wallet hasn&#039;t been protected adequately (e.g. put online with a weaker password):&lt;br /&gt;
# Making a new secure wallet, using appropriate long-term protection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For a brief overview see also: [[Wallet Security Dos and Don&#039;ts (Windows)|Wallet Security Dos and Don&#039;ts]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Paper Wallets==&lt;br /&gt;
[[Paper wallet]]s are a fairly simple way to store Bitcoins without needing a computer.  When generated securely, a paper wallet also puts your Bitcoins well outside the reach of hackers and computer viruses.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Storing&amp;quot; bitcoins is a little bit of a misnomer - what you are actually &amp;quot;storing&amp;quot; is a sequence of secret numbers that is used to prove your right to spend the Bitcoins you have received.  This secret number is called a [[private key]].  The most common way to write a Bitcoin private key is as a sequence of fifty-one alphanumeric characters that always starts with a &#039;5&#039;.&lt;br /&gt;
&lt;br /&gt;
One way you can print a paper wallet is at the website [[BitAddress]].  This website features a free client-side paper wallet generator written in JavaScript.  This generator can be saved as a file and used on an offline computer.  Using it online is relatively safe, but not airtight unless you take a couple of extra precautions to ensure your keys are not stolen by spyware. Alternatively blockchain.info offers a [https://blockchain.info/wallet/paper-tutorial tutorial on how to generate a paper wallet] with an online component so you can still check your balance easily.&lt;br /&gt;
&lt;br /&gt;
To generate a safe paper wallet, you need to &amp;quot;clean-boot&amp;quot; your computer with a bootable CD (such as a Linux Live CD), with your computer not connected to the internet, to ensure that you do not have any active spyware that might steal the private keys you generate.  Disconnecting from the Internet allows you to confirm that the paper wallet generator is truly self-contained and isn&#039;t depending on communication with a remote server.  Run the saved paper wallet generator in a web browser, print your paper wallets (do not save them on the computer), and then shut down the computer.  You may need to load an appropriate printer driver in order to print while booted from the Live CD.&lt;br /&gt;
&lt;br /&gt;
A paper wallet lists multiple Bitcoin addresses and the corresponding &amp;quot;private key&amp;quot;.  You can send Bitcoins to any address on the page, and they will be inaccessible until the private key is loaded back onto a computer.  The Bitcoin software does not yet have a built-in way to load private keys, but you can use the &amp;quot;Add Funds&amp;quot; - &amp;quot;Private key&amp;quot; screen at [[MtGox]] to recover digital coins from a private key.  Coins are deposited in your MtGox account and can be sent out of MtGox shortly thereafter.&lt;br /&gt;
&lt;br /&gt;
Remember that spyware and viruses often attempt to monitor your computer activities so that their authors can steal from you.  They are interested in your passwords (such as to banking, etc.) and anything of value.  Bitcoin wallets and Bitcoin private keys are something of value that will be targeted by malware.  Paper wallets isolate you from much of this risk.&lt;br /&gt;
&lt;br /&gt;
If your computer is infected with spyware or viruses - even if there are no symptoms or your antivirus isn&#039;t reporting anything - then anything you type, view, or save on your computer could potentially be stolen by someone remotely controlling your computer.  Your private key could potentially be intercepted at the point you type it in to redeem it, so only enter a Bitcoin private key into your computer when your intent is to redeem its value &#039;&#039;immediately&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Importance of security updates==&lt;br /&gt;
&lt;br /&gt;
No software is perfect, and from time to time there may be security vulnerabilities found in your Bitcoin client as well.&lt;br /&gt;
Be sure you keep your client up to date for the latest bug fixes, especially when a new vulnerability is discovered.&lt;br /&gt;
We maintain a [[CVEs|list a known vulnerabilities]] on this wiki - you can watch that page to get updates.&lt;br /&gt;
Note that you &#039;&#039;don&#039;t&#039;&#039; need to be running a bleeding edge client version: some clients, including the popular Bitcoin-Qt, have older versions available with bugfix-only updates.&lt;br /&gt;
&lt;br /&gt;
==Securing an online wallet with the Bitcoin software==&lt;br /&gt;
&lt;br /&gt;
Bitcoin transactions send Bitcoins to a specific public key. A Bitcoin address is an encoded hash of a public key. In order to use received Bitcoins, you need to have the private key matching the public key you received with. This is sort of like a super long password associated with an account (the account is the public key). Your Bitcoin wallet contains all of the private keys necessary for spending your received transactions. If you delete your wallet without a backup, then you no longer have the authorization information necessary to claim your coins, and the coins associated with those keys are lost forever.&lt;br /&gt;
&lt;br /&gt;
The wallet contains a pool of queued keys. By default there are 100 keys in the [[key pool]].  The size of the pool is configurable using the &amp;quot;-keypool&amp;quot; command line argument.  When you need an address for whatever reason (send, “new address”, generation, etc.), the key is not actually generated freshly, but taken from this pool. A brand new address is generated to fill the pool back to 100. So when a backup is first created, it has all of your old keys plus 100 unused keys. After sending a transaction, it has 99 unused keys. After a total of 100 new-key actions, you will start using keys that are not in your backup. Since the backup does not have the private keys necessary for authorizing spends of these coins, restoring from the old backup will cause you to lose Bitcoins.&lt;br /&gt;
&lt;br /&gt;
Creating a new address generates a new pair of public and private keys, which are added to your wallet. Each keypair is mostly random numbers, so they cannot be known prior to generation. If you backup your wallet and then create more than 100 new addresses, the keypair associated with the newest addresses will not be in the old wallet because the new keypairs are only known after creating them. Any coins received at these addresses will be lost if you restore from the backup.&lt;br /&gt;
&lt;br /&gt;
The situation is made somewhat more confusing because the receiving addresses shown in the UI are not the only keys in your wallet. Each Bitcoin generation is given a new public key, and, more importantly, each sent transaction also sends some number of Bitcoins back to yourself at a new key. When sending Bitcoins to anyone, you generate a new keypair for yourself and simultaneously send Bitcoins to your new public key and the actual recipient&#039;s public key. This is an anonymity feature – it makes tracking Bitcoin transactions much more difficult.&lt;br /&gt;
&lt;br /&gt;
So if you create a backup, do more than 100 things that cause a new key to be used, and then restore from the backup, some Bitcoins will be lost. Bitcoin has not deleted any keys (keys are never deleted) – it has created a new key that is not in your old backup and then sent Bitcoins to it.&lt;br /&gt;
&lt;br /&gt;
== Making a new wallet ==&lt;br /&gt;
&lt;br /&gt;
In the case that a wallet has been distributed, or stored, in a (real or potential) compromised state, it is wise to create a new wallet and transfer the full balance of Bitcoins to an address contained only in the newly created wallet.&lt;br /&gt;
&lt;br /&gt;
For example, this will be necessary if one created a wallet with a password of 12 characters, as suggested. However a few years have passed and the wallet is now more easily compromised.  Just re-encrypting isn&#039;t secure.  One needs to make a new wallet and make the old wallet worthless (spending the funds to the new wallet).&lt;br /&gt;
&lt;br /&gt;
==Making a secure workspace==&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
The first step is to make a [http://www.howtogeek.com/howto/ubuntu/add-a-user-on-ubuntu-server/ new user,] so as root, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;adduser new_user_name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you get to the prompt &#039;Enter the new value, or press ENTER for the default&#039;, just keep hitting ENTER.&lt;br /&gt;
&lt;br /&gt;
Then switch user to the new user.  To get to the new user you can use the switch user icon for your system, which on Ubuntu is in the &#039;System/Quit&#039; screen, or if there is no switch icon on your system you can log out and log back in as the new user.  Then click on a folder in the new user to display the file browser, then keep going up folders until you see the new user home directory, then right click to bring up the Properties dialog, then click on the Permissions tab, then in the Others section, set the folder access to None.&lt;br /&gt;
&lt;br /&gt;
For secure browsing, open Firefox, and then go into the Edit menu and click Preferences.  Starting from the left, click on the General tab, and in the &#039;Startup/When Firefox starts&#039; pop up menu, choose &#039;Show a Blank Page&#039;.  Then click on the Content tab, and deselect &#039;Load images automatically&#039; and deselect &#039;Enable JavaScript&#039;.  Then click on the Privacy tab, and in the &#039;History/Firefox will&#039; pop up menu, choose &#039;Never remember history&#039;.  Then click on the Security tab, and in the Passwords section, deselect &#039;Remember passwords for sites&#039; and deselect &#039;Use a master password&#039;.  Then click on the Advanced tab, then click on the Update tab, and then in the &#039;Automatically check for updates to&#039; section, deselect &#039;Add-ons&#039; and &#039;Search Engines&#039;.&lt;br /&gt;
&lt;br /&gt;
When JavaScript is disabled, the [http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.23/bitcoin-0.3.23-linux.tar.gz/download Linux download page] will not download automatically, so you&#039;ll have to click on the &#039;direct link&#039; part of the &amp;quot;Problems with the download? Please use this &#039;direct link&#039; or try another mirror.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve made your secure new user, to maintain security you should only use it for Bitcoin.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also a good idea to encrypt the Home directory of whatever user you run Bitcoin under using ecryptfs-utils. To do this:&lt;br /&gt;
# If the Home directory is not empty you should back it up first, by just copying the data to an external drive or something.&lt;br /&gt;
# install ecryptfs-utils (on Ubuntu: sudo apt-get install ecryptfs-utils)&lt;br /&gt;
# log out of X (graphical system) and press Ctrl+Alt+F1 to login to the command shell (you must be logged out or some files will be open and the tool won&#039;t be able to encrypt your data)&lt;br /&gt;
# change directory to something that&#039;s not in your home folder (ex: cd / )&lt;br /&gt;
# run the migration tool (on Ubuntu: sudo ecryptfs-migrate-home -u username)&lt;br /&gt;
# if it&#039;s successful, you can now press ALT+F8 to go back to the GUI and login&lt;br /&gt;
# run &#039;ecryptfs-unwrap-passphrase&#039; and &#039;&#039;&#039;WRITE DOWN OR SAVE THE CODE IT RETURNS&#039;&#039;&#039; because you will need it if you ever have to pull your data off while the OS is not working. (You can run it again later if you need to, but run it now so that you can get your data if your Linux install gets botched.)&lt;br /&gt;
# run &#039;ecryptfs-setup-swap&#039; to encrypt your swap partition (the encrypted folder data is not encrypted while it&#039;s in memory, and so if it&#039;s ever sent to the swap partition it can be stolen from there unless that too is encrypted - be aware that this will mean you cannot use Hibernate anymore, as the bootloader won&#039;t be able to restore the hibernation data)&lt;br /&gt;
(instructions from [http://bodhizazen.net/Tutorials/Ecryptfs/#Migrate])&lt;br /&gt;
&lt;br /&gt;
===Mac===&lt;br /&gt;
This solution &#039;&#039;&#039;does not scale&#039;&#039;&#039;; the amount of needed space can grow beyond the image size.&lt;br /&gt;
&lt;br /&gt;
=====Backup all data=====&lt;br /&gt;
Follow these instructions to backup all the bitcoin data (wallet and block chains) to an encrypted disk image.&lt;br /&gt;
# Open Disk Utility&lt;br /&gt;
# Click New Image and choose a big enough size, 128-bit or 256-bit (faster or more secure) encryption and single partition.&lt;br /&gt;
# Save it somewhere you won&#039;t lose it (like your Wuala, Dropbox, Strongspace or whatever)&lt;br /&gt;
# Choose a safe and strong password&lt;br /&gt;
# Move everything from ~/Library/Application Support/Bitcoin/ to the image&lt;br /&gt;
# Symlink it back so the app would be able to use it&lt;br /&gt;
:::ln -s /Volumes/Bitcoin ~/Library/Application Support/Bitcoin&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to mount your image before using Bitcoin and unmount it after quitting.&lt;br /&gt;
&lt;br /&gt;
=====Backup just wallet.dat=====&lt;br /&gt;
Follow these instructions to backup just the wallet.dat file. This results in a smaller disk image, but it&#039;s more complicated to do.&lt;br /&gt;
# Open Disk Utility&lt;br /&gt;
# Click New Image and choose a big enough size, 128-bit or 256-bit (faster or more secure) encryption and single partition.&lt;br /&gt;
# Save it somewhere you won&#039;t lose it (like your Wuala, Dropbox, Strongspace or whatever)&lt;br /&gt;
# Choose a safe and strong password&lt;br /&gt;
# Move your wallet.dat file to the image&lt;br /&gt;
# Symlink it back so the app would be able to use it&lt;br /&gt;
:::ln -s /Volumes/Bitcoin/wallet.dat ~/Library/Application Support/Bitcoin/wallet.dat&lt;br /&gt;
&lt;br /&gt;
[[File:MountWalletAndLauchnBitcoin_OSX_Automator.png|thumbnail|150px|Mount Wallet and launch Bitcoin]]&lt;br /&gt;
Don&#039;t forget to mount your image before using Bitcoin and unmount after quitting it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: If you start the Bitcoin application without having the image mounted, the application will overwrite your symlink with a new wallet. If that happens, don&#039;t panic. Just delete the new wallet.dat, mount the image, and recreate the symlink like above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Automation&#039;&#039;&#039;: You can create a small application using [http://en.wikipedia.org/wiki/Automator_%28software%29 Automator] (included in OS X) to automatically mount the wallet and then launch Bitcoin App. See the Screenshot on how to do this.&lt;br /&gt;
&lt;br /&gt;
If one &#039;&#039;doesn&#039;t&#039;&#039; want to use encrypted Disk images, then a &#039;&#039;&#039;small shell script&#039;&#039;&#039; can be used instead that takes care of decrypting the wallet, launching bitcoin client, and encrypting it after the client exits. This script works on both OSX and Linux: [http://lorelei.kaverit.org/bitcoin.sh bitcoin-launch-script]&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
If you are using Windows XP or Windows 7, you can keep your wallet on an encrypted disk image created by third-party software, such as [http://www.truecrypt.org/ TrueCrypt] (open source) or [http://www.jetico.com/encryption-bestcrypt/ Jetico BestCrypt] (commercial).  You can probably do the same with Windows Vista or Windows 2000.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; You should configure Bitcoin in this manner only on computers where you use Bitcoin, but do not use that computer to mine.  For example, this is a good configuration for a notebook or tablet computer.&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed the Windows Bitcoin client and run it at least once, the process is described below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;To mount the Bitcoin data directory on an encrypted drive&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol start=1 type=1&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the third-party disk image encryption program of your choice to create and mount an encrypted disk image of at least 100 MB in size.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Locate the Bitcoin data directory, and copy the directory with all contents to the encrypted drive.&lt;br /&gt;
&amp;lt;p&amp;gt;For help finding this directory, see &amp;lt;b&amp;gt;[[Securing_your_wallet#Locating_Bitcoin_s_data_directory|Locating Bitcoin&#039;s Data Directory]]&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a Windows shortcut that starts Bitcoin with the &amp;lt;code&amp;gt;-datadir&amp;lt;/code&amp;gt; parameter and specifies the encrypted drive and directory.&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you installed Bitcoin in the default directory, mounted your Bitcoin encrypted drive as &amp;lt;code&amp;gt;E:\&amp;lt;/code&amp;gt;, and stored your Bitcoin data directory on it as &amp;lt;code&amp;gt;Bitcoin&amp;lt;/code&amp;gt;, you would type the following command as the shortcut Target:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;C:\Program Files\Bitcoin\bitcoin.exe -datadir=E:\Bitcoin&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open Bitcoin&#039;s settings and configure it &amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; to start automatically when you start Windows.&lt;br /&gt;
&amp;lt;p&amp;gt;This is to allow you to mount the Bitcoin encrypted disk image before starting Bitcoin.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Shut down Bitcoin, and then restart it from the new shortcut.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After doing this, any time you want to use Bitcoin, you must first mount the Bitcoin encrypted disk image using the same drive designation, and then run Bitcoin from the shortcut that you created, so that it can find its data and your wallet. :-)&lt;br /&gt;
&lt;br /&gt;
== Locating Bitcoin&#039;s data directory ==&lt;br /&gt;
&lt;br /&gt;
The [[data directory]] is the location where Bitcoin&#039;s data files are stored, including the wallet data file.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Go to Start -&amp;gt; Run (or press WinKey+R) and run this:&lt;br /&gt;
&lt;br /&gt;
 explorer %APPDATA%\Bitcoin&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s data folder will open. For most users, this is the following locations:&lt;br /&gt;
&lt;br /&gt;
 C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)&lt;br /&gt;
 &lt;br /&gt;
 C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;AppData&amp;quot; and &amp;quot;Application data&amp;quot; are hidden by default.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
By default Bitcoin will put its data here:&lt;br /&gt;
&lt;br /&gt;
 ~/.bitcoin/&lt;br /&gt;
&lt;br /&gt;
You need to do a &amp;quot;ls -a&amp;quot; to see directories that start with a dot.&lt;br /&gt;
&lt;br /&gt;
If that&#039;s not it, you can do a search like this:&lt;br /&gt;
&lt;br /&gt;
 find / -name wallet.dat -print 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
To change the directory Bitcoin stores its data in:&lt;br /&gt;
 Run in terminal or script: ./bitcoin(-qt) -datadir=./[Directory_Name]&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&lt;br /&gt;
By default Bitcoin will put its data here:&lt;br /&gt;
&lt;br /&gt;
 ~/Library/Application Support/Bitcoin/&lt;br /&gt;
&lt;br /&gt;
==Backup==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Using a service like Dropbox to back up your Bitcoin data is not recommended as doing so introduces [https://en.wikipedia.org/wiki/Dropbox_(service)#Reception security concerns] such as:&lt;br /&gt;
# the fact that they store your encryption key (meaning that a disgruntled Dropbox employee or an attacker who gained access to the system could decrypt your Dropbox data and steal your Bitcoins)&lt;br /&gt;
# the fact that the Dropbox client only needs a password for the first login. After it authenticates once, the server assigns it a token which it uses to show that, at one time, its user knew the password rather than sending the actual password (meaning that if you ever use the Dropbox client on another PC, that PC&#039;s users can access your Dropbox - even if you change your password - and can steal your Bitcoins or get a virus that will steal your Bitcoins).&lt;br /&gt;
&lt;br /&gt;
For these reasons, an alternative is Wuala which does not store your encryption key and requires a password each time.  With Wuala, the client can be set to remember your password but the server will check each time to make sure that the client is sending the correct password. Like Dropbox, the basic, lowest-storage-space account with Wuala is free of charge, and coincidentally, Wuala [http://www.wuala.com/en/bitcoin is experimenting with allowing users to pay for &amp;quot;upgraded&amp;quot; plans using Bitcoin.]&lt;br /&gt;
&lt;br /&gt;
Whether you use Dropbox as your backup or not, use what Steve Gibson calls &amp;quot;pre-Internet encryption&amp;quot; (which he [http://itknowledgeexchange.techtarget.com/security-corner/cloud-security-and-privacy-do-they-exist/ discussed in the context of Dropbox&#039;s security concerns]) and use some form of encryption on the files before you back them up -- just in case someone other than yourself ever gains access to that backup. Make sure to pick a password that&#039;s memorable but secure.&lt;br /&gt;
&lt;br /&gt;
The only file you need to back up is &amp;quot;wallet.dat&amp;quot;. Ensure that Bitcoin is closed, copy this file somewhere else, encrypt it, and put it somewhere safe. Ideally, you would put this file in two places: one nearby, and one 100+ miles away.&lt;br /&gt;
&lt;br /&gt;
You can use the [[api|backupwallet]] JSON-RPC command to back up without shutting down Bitcoin.&lt;br /&gt;
&lt;br /&gt;
=== General Solutions ===&lt;br /&gt;
&lt;br /&gt;
Your wallet.dat file is not encrypted by Bitcoin, by default.  The most current release of the Bitcoin client provides a method to encrypt with a passphrase the private keys stored in the wallet.  Anyone who can access a wallet which is not using the passphrase encryption can easily steal all of your coins.  Use one of these encryption programs if there is any chance someone might stumble upon your wallet.&lt;br /&gt;
* [http://www.7-zip.org/ 7-zip] - Supports strongly-encrypted archives.&lt;br /&gt;
* [http://www.axantum.com/axcrypt/ AxCrypt by Axantum]&lt;br /&gt;
* [http://lrzip.kolivas.org lrzip] - Compression software for Linux and OSX that supports very high grade password protected encryption&lt;br /&gt;
* [http://www.truecrypt.org/ TrueCrypt] - Volume-based on-the-fly encryption (for advanced users)&lt;br /&gt;
* [http://www.rarlab.com/ WinRar] - Commonly used archive software that supports verification records and encryption.&lt;br /&gt;
&lt;br /&gt;
There is also a list of [[OpenSourceEncryptionSoftware|open source encryption software.]]&lt;br /&gt;
&lt;br /&gt;
Decrypting and encrypting the wallet.dat every time you start or quit the Bitcoin client can be &#039;&#039;tedious&#039;&#039; (and outright error-prone). If you want to keep your wallet encrypted (except while you&#039;re actually running the Bitcoin client), it&#039;s better to relegate the automation to a [http://lorelei.kaverit.org/bitcoin.sh small shell script] that handles the en/decryption and starting up Bitcoin client for you (Linux and OSX). &lt;br /&gt;
&lt;br /&gt;
There is also a method to Print out and encrypt your Wallet.dat as a special barcode. See details here: [[WalletPaperbackup]]&lt;br /&gt;
&lt;br /&gt;
==== Password Strength ====&lt;br /&gt;
Brute-force password cracking has come a long way. A password of random [a-Z] [0-9] [!-~] of 8 characters long was previously thought secure but can be trivially solved now (using appropriate hardware). The recommended length is &#039;&#039;&#039;at least&#039;&#039;&#039; 12 characters long.  You can also use a multi-word password. [http://www.baekdal.com/tips/password-security-usability The Usability of Passwords] &lt;br /&gt;
&lt;br /&gt;
However, simply using dictionary words is also insecure as it opens you up to a dictionary attack. If you use dictionary words, be sure to throw random symbols and numbers in the mix as well.&lt;br /&gt;
&lt;br /&gt;
If you use keyfiles in addition to a password, it is unlikely that your encrypted file can ever be cracked using brute force methods, even 10 years from now when even a 12 character password might be too short.&lt;br /&gt;
&lt;br /&gt;
Assume that any encrypted files you store online (eg. Gmail, Dropbox) will be stored somewhere forever and can never be erased.&lt;br /&gt;
&lt;br /&gt;
===== Choosing Your Password =====&lt;br /&gt;
Make sure you pick at least one character in each group:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Lowercase: abcdefghijklmnopqrstuvwxyz&lt;br /&gt;
  Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;br /&gt;
  Number: 1234567890&lt;br /&gt;
  Symbol: `~!@#$%^&amp;amp;*()-_=+\|[{]};:&#039;&amp;quot;,&amp;lt;.&amp;gt;/? (space)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;9 char = unsuitable for use&lt;br /&gt;
  09 char = insecure&lt;br /&gt;
  10 char = low security&lt;br /&gt;
  11 char = medium security&lt;br /&gt;
  12 char = good security (good enough for your wallet)&lt;br /&gt;
  13 char = very good, enough for anything.&lt;br /&gt;
&lt;br /&gt;
==== Storage of Archive ====&lt;br /&gt;
One of the most simple methods for storing a appropriately &#039;&#039;&#039;encrypted&#039;&#039;&#039; archive of your wallet.dat file is to send the archive as an email attachment to your own e-mail address.  Services like gmail.com use very comprehensive distributed networks that make the loss of data very unlikely.  One can even obfuscate the name of the files within the archive, and name the archive something less inviting, such as: &#039;personal notes&#039; or &#039;car insurance&#039;.&lt;br /&gt;
&lt;br /&gt;
Another solution is to use a file storage service like [http://www.wuala.com/bitcoin Wuala] ( encrypted, [http://www.bitcoin.org/smf/index.php?topic=5817.0 instructions]), [http://www.dropbox.com Dropbox] and [http://en.wikipedia.org/wiki/Comparison_of_online_backup_services others], including the more secure [http://www.spideroak.com SpiderOak].&lt;br /&gt;
&lt;br /&gt;
=== Linux solution ===&lt;br /&gt;
&lt;br /&gt;
Linux users can setup backups using cron by telling it to run a backup script at set intervals of time. Run &#039;crontab -e&#039; and add this line near the bottom:&lt;br /&gt;
&lt;br /&gt;
 01 */1 * * * /usr/local/bin/backupwallet.sh&lt;br /&gt;
&lt;br /&gt;
This cron line will run the /usr/local/bin/backupwallet.sh script at the 01 minute of every hour. Remember to add a newline after the last line of the crontab file, or else the last line won&#039;t run. You may also wish to ignore the script&#039;s output by appending &amp;quot; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;quot; to the line (this will also prevent emails from being sent).&lt;br /&gt;
&lt;br /&gt;
Create /usr/local/bin/backupwallet.sh:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # /usr/local/bin/backupwallet.sh&lt;br /&gt;
 #&lt;br /&gt;
 # Performs backup of bitcoin wallet.&lt;br /&gt;
 #&lt;br /&gt;
 # Written by: https://en.bitcoin.it/wiki/Securing_your_wallet&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Standard Options&lt;br /&gt;
 #&lt;br /&gt;
 TS=$(date &amp;quot;+%Y%m%d-%H%M&amp;quot;)&lt;br /&gt;
 WALLET=/tmp/wallet-${TS}&lt;br /&gt;
 WALLET_E=/tmp/wallet-${TS}.crypt&lt;br /&gt;
 BITCOIN=bitcoind  # /path/to/bitcoind&lt;br /&gt;
 GPG=gpg  # /path/to/gpg&lt;br /&gt;
 GPG_USER=username  # Username of gpg recipient. User should have gpg setup.&lt;br /&gt;
 RM=rm&lt;br /&gt;
 RM_OPTS=&#039;--force&#039;&lt;br /&gt;
 USE_SHRED=0  # Flip to 1 to use `shred` instead of `rm`.&lt;br /&gt;
 SHRED=shred&lt;br /&gt;
 SHRED_OPTS=&#039;--force --iterations=9 --zero --remove&#039;&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Storage Options&lt;br /&gt;
 # Only 1 set of options should be un-commented (the last one will be used).&lt;br /&gt;
 # Update CP_DEST paths as neccessary.&lt;br /&gt;
 #&lt;br /&gt;
 # CP - Storage on a local machine. Could be Dropbox/Wuala folder.&lt;br /&gt;
 #CP=cp&lt;br /&gt;
 #CP_DEST=&#039;/var/data/backups/&#039;  # &#039;~/Dropbox/&#039;, etc.&lt;br /&gt;
 #&lt;br /&gt;
 # SSH - Storage on a remote machine.&lt;br /&gt;
 CP=scp&lt;br /&gt;
 CP_DEST=&#039;remoteuser@example.com:~/wallets/&#039;&lt;br /&gt;
 #&lt;br /&gt;
 # S3 - Storage on Amazon&#039;s S3. Be sure s3cmd is installed and properly setup.&lt;br /&gt;
 # You may need &amp;quot;s3cmd put --force&amp;quot; if you use a sub-directory in CP_DEST.&lt;br /&gt;
 #CP=s3cmd put&lt;br /&gt;
 #CP_DEST=&#039;s3://bucket&#039;&lt;br /&gt;
 &lt;br /&gt;
 do_clean() {&lt;br /&gt;
   # Remove temporary wallets.&lt;br /&gt;
   if [ 1 -eq $USE_SHRED ]; then&lt;br /&gt;
     $SHRED $SHRED_OPTS $WALLET $WALLET_E&lt;br /&gt;
   else&lt;br /&gt;
     $RM $RM_OPTS $WALLET $WALLET_E&lt;br /&gt;
   fi&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 do_fail() {&lt;br /&gt;
   do_clean&lt;br /&gt;
   echo failed!&lt;br /&gt;
   exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # Perform the backup.&lt;br /&gt;
 echo -n Making backup...&lt;br /&gt;
 $BITCOIN backupwallet $WALLET&lt;br /&gt;
 [ ! -s &amp;quot;$WALLET&amp;quot; ] &amp;amp;&amp;amp; do_fail  # If the backup does not exist or is empty, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 echo -n Encrypting backup...&lt;br /&gt;
 $GPG -r $GPG_USER --output $WALLET_E --encrypt $WALLET&lt;br /&gt;
 [ 0 -ne $? ] &amp;amp;&amp;amp; do_fail  # If gpg returns a non-zero result, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 echo -n Copying to backup location...&lt;br /&gt;
 $CP $WALLET_E &amp;quot;$CP_DEST&amp;quot;&lt;br /&gt;
 [ 0 -ne $? ] &amp;amp;&amp;amp; do_fail  # If the $CP command returns a non-zero result, fail.&lt;br /&gt;
 echo done.&lt;br /&gt;
 do_clean&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
The shell script:&lt;br /&gt;
&lt;br /&gt;
* Calls bitcoind backupwallet to create a time/date-stamped wallet.&lt;br /&gt;
* GPG encrypts the wallet with your public key.&lt;br /&gt;
* Copies the result using one of several storage options (cp, scp, and s3cmd).&lt;br /&gt;
* Uses the rm or shred command to remove the temporary wallet files.&lt;br /&gt;
&lt;br /&gt;
Be sure to modify the script options to fit your setup. After you save, make sure the file can be executed properly by the cron user. Common permissions for files in /usr/local/bin/ can be applied using (verify with your distribution!):&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/bin/ &amp;amp;&amp;amp; chown root:root backupwallet.sh &amp;amp;&amp;amp; chmod 755 backupwallet.sh&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
&lt;br /&gt;
==Restore==&lt;br /&gt;
&lt;br /&gt;
Assuming your backup is recent enough that you haven&#039;t used up all of your key pool... restoring a wallet to a new (or old) location and rescanning the block chain should leave you with all your coins. Just follow these steps:&lt;br /&gt;
* Quit bitcoin(d).&lt;br /&gt;
* Copy your backed up wallet.dat into your bitcoin profile directory.&lt;br /&gt;
* If copying into existing profile, delete file &#039;&#039;blkindex.dat&#039;&#039; and &#039;&#039;blk0001.dat&#039;&#039; to make the client re-scan the block chain.&lt;br /&gt;
&lt;br /&gt;
And you&#039;ll be good as new.&lt;br /&gt;
&lt;br /&gt;
==Erasing Plain Text Wallets==&lt;br /&gt;
&lt;br /&gt;
A good practice is to keep at least two wallets, one as a &amp;quot;current account&amp;quot; for everyday transactions and one as a &amp;quot;savings account&amp;quot; where you store the majority of your Bitcoins.  &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;savings account&amp;quot; wallet should be backed up in encrypted form only and all plaintext copies of this wallet should be erased. In case someone gains unauthorised access to your computer (either by physically stealing it or by exploiting a system vulnerability via the internet), they will only be able to spend the coins in your &amp;quot;current account&amp;quot; wallet.&lt;br /&gt;
&lt;br /&gt;
In most operating systems, including Windows, Linux, and Mac OS X, simply deleting a wallet.dat file will &#039;&#039;not&#039;&#039; generally destroy it. It is likely that advanced tools can still be used to recover the wallet.dat file, even after it has been deleted.&lt;br /&gt;
&lt;br /&gt;
The Linux &#039;&#039;&#039;shred&#039;&#039;&#039; command can be used to overwrite the wallet file with random data prior to deleting; this particular copy of the file will then be practically impossible to recover.  Using shred (and similar tools on Windows) however does not guarantee that still other copies don&#039;t exist somewhere hidden on your HD. That will depend on your system configuration and what packages you have installed. Some system restore and backup tools, for instance, create periodic snapshots of your  filesystem, duplicating your wallet.dat.&lt;br /&gt;
&lt;br /&gt;
In Mac OS, the equivalent of &#039;&#039;&#039;shred&#039;&#039;&#039; is &#039;&#039;&#039;srm&#039;&#039;&#039; (introduced in Leopard). Using the Finder to remove files, clicking &amp;quot;Secure Empty Trash&amp;quot; in the Finder menu will shred the contents of the trash can. As with any OS this doesn&#039;t guarantee that there are not other copies elsewhere on your system.&lt;br /&gt;
&lt;br /&gt;
For Windows, the built-in command &#039;&#039;cipher /W&#039;&#039; will shred all previously-deleted files. [http://www.cylog.org/utilities/cybershredder.jsp CyberShredder] can securely deleted individual files.&lt;br /&gt;
&lt;br /&gt;
==eWallet==&lt;br /&gt;
&lt;br /&gt;
Storing bitcoins with an [[eWallet]] provider incurs risks as well. Basically you grant the third party, in this case eWallet, full access to your wallet. These eWallets, or Electronic Wallets have a number of pros and cons. For example, you can access your wallet on any computer in the world, but the wallet can be forged or hacked and your bitcoins could be lost. You can also get eWallet applications for your Android phone, which also download the block chain like the normal client but allow the user to send bitcoins by QR code or NFC. The problem with this is that Bitcoins can be intercepted through means of mobile hacking.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Data directory]]&lt;br /&gt;
* [http://startbitcoin.com/how-to-create-a-secure-bitcoin-wallet/ Secure Bitcoin Wallet Tutorial]&lt;br /&gt;
* [[How to set up a secure offline savings wallet]]&lt;br /&gt;
* [http://arimaa.com/bitcoin/ Bitcoin Gateway - A Peer-to-peer Bitcoin Vault and Payment Network]&lt;br /&gt;
* [http://blog.cyplo.net/2012/04/01/bitcoin-wallet-recovery-photorec/ Find lost wallet eg. after disk format, using Photorec]&lt;br /&gt;
[[de:Sichere deine Geldbörse]]&lt;br /&gt;
[[zh-cn:保护你的钱包]]&lt;/div&gt;</summary>
		<author><name>Wzyboy</name></author>
	</entry>
</feed>