In bitcoin Qt, I saved wallet.dat to a storage device which I cannot locate right now. Nobody has taken my bitcoins, and I'm not even sure I have really lost the drive for good - the fact is, I don't know where it is right now. My computer still works fine, the bitcoins are sitting in my wallet and I can transfer them out as I please.
So what should I do now to ensure that IF somebody did find this copy of wallet.dat that they could not compromise me in the future?
Is the wallet.dat on the storage device protected with a strong pawwphrase? If not, I'd advise starting a new wallet. Suggestions on how to do so at the end of this post.
Edit: I suspect I should transfer the coins out of the wallet and back in again. Would that do the trick?
No, it would not. If someone has access to your storage device and if the wallet.dat that is stored there is not protected by a strong passphrase, then they can gain access to any private key currently associated with any address in the wallet at the time it was backed up as well as the next 100 addresses that are ever used with that wallet.dat. It would be safer to start a new wallet.dat and transfer all coins out of the current wallet into the new one. You'll also want to let people know not to re-use any bitcoin address you've given them in the past for sending you bitcoins, since those addresses could potentially be compromised.
There may be other ways to do it, there may even be better ways to do it, but if I was going to start a new wallet.dat here's what I would do:
- Quit bitcoin-qt and wait for it to completely shut down.
- Make a copy of the current wallet.dat to wallet.bad
- List the contents of the bitcoin data directory to make sure that there is BOTH a wallet.dat AND a wallet.bad and that they are the same size
- Delete the wallet.dat
- Start up bitcoin-qt
- Bitcoin-qt will create a brand new empty wallet.dat with a new address, make a copy of that new address
- Create a backup of this new wallet.dat in a safe place (USB drive perhaps?)
- Quit bitcoin-qt and wait for it to completely shut down.
- Make a copy of the new wallet.dat to wallet.good
- List the contents of the bitcoin data directory to make sure that there is a wallet.dat AND a wallet.bad AND a wallet.good, and that the wallet.dat and wallet.good are the same size (and different size than wallet.bad)
- Delete the wallet.dat
- Copy wallet.bad to wallet.dat
- Start up bitcoin-qt
- Bitcoin-Qt will open your "bad" wallet.dat back up and you should once again see all your old addresses and bitcoin balance
- Send the entire balance to the new address that you copied from the new wallet.dat
- Wait until the transaction has at least 1 confirmation
- Quit bitcoin-qt and wait for it to completely shut down
- Delete wallet.dat
- Copy wallet.good to wallet.dat
- Start up bitcoin-qt
- Bitcoin-Qt will open your new "good" wallet.dat with the new address. You should see your bitcoin balance