0

I created a wallet.dat with Bitcoin Core on a new PC. Then I encrypted it with the GUI menu.

When I reloaded that computer, I was shocked to see that Bitcoin Core did NOT ask me to decrypt/unlock the wallet.dat -- it just loaded it right back up. The only indication I got that it was encrypted was that the "Encrypt wallet" menu item was disabled/greyed out. Not even a small text saying: "This wallet is encrypted."

Obviously, this made me feel as if it was not encrypted at all. So, assuming that Bitcoin Core had saved some kind of decryption file on my other computer from which it auto-decrypts it or something, I transferred the wallet.dat over to my current computer, also running Bitcoin Core. Same thing there: the only indication that it's encrypted is that disabled menu item.

Nothing else. I'm able to read the labels and see all the receive addresses and everything. Since the wallet has no actual Bitcoins in it yet, I can't test to make a transaction, but hopefully, at least that will prompt for the decryption passphrase.

Is there something I'm missing? Why isn't encrypting a wallet.dat actually encrypting its data? Is this like that idiotic practice that WinZip/ZIP format used to do where you could see all the files and the filenames but just couldn't read the file contents without the password? I never understood the point of that, and I certainly don't understand the point of Bitcoin's encryption if all it does is prevent you from sending coins away, but still allow you to snoop on the labels and receive addresses and all that.

2 Answers 2

3

Only the private keys are encrypted if you have an encrypted wallet.dat. The passphrase is only asked when those are needed, i.e. when you try to send coins.

5
  • Okay. Why is that?
    – Nicholes H
    Commented Jan 20, 2021 at 23:30
  • @NicholesH probably because A) The private keys are the only important data in the wallet, everything else is either public knowledge or relatively inconsequential. and B) to avoid causing what some users would consider unnecessary annoyance. Commented Jan 21, 2021 at 0:20
  • 1
    The direct reason is probably because that's what the person who worked on it cared about, and not many people argued otherwise. Personally I think this makes sense, as the privacy functionality (if desired) is much better fullfilled by the operating system, by encrypting the whole disk. But protection of funds beyond encryption of user data isn't something that's easy to do outside of the wallet software. Commented Jan 21, 2021 at 0:24
  • I'm not sure I follow the reasoning. It seems like a very major privacy implication to have all your labels leaked. I've seen guides that tell you to "safely upload your wallet.dat to the cloud now that you've encrypted it". Of course, I would never follow such inane advice, but others might, thinking that the encryption applies to the entire wallet.dat and not just the sending of money part.
    – Nicholes H
    Commented Jan 21, 2021 at 0:43
  • 2
    It’s not really the fault of wallet encryption written a decade ago that people today are giving poor advice though.
    – Claris
    Commented Jan 21, 2021 at 1:16
1

To trigger the added encryption password, you need to close the wallet. While it's "open" in your Bitcoin Core, it will only ask for the passphrase when sending a transaction. Essentially, behind the scenes that means it signs the transaction before announcing it to the network.

Closing the wallet unloads it from your Bitcoin core and enables the 'double encryption'. Even without closing the wallet, if someone managed to retrieve your wallet file, depending if it's while you are synced to the network (and therefore your wallet directory contains the wallet_lock file, they wouldn't be able to send out any Bitcoin you might have without the passphrase.

You can learn more here.

If you really want to test it without having a balance, open the console and try any of the dumpwallet or dumpprivkey commands and any other you find among the list using help to test what you think might enable a bad actor to steal your BTC and see what happens. You'll find that most give you a warning that you need to enter the passphrase first.

It's like someone driving by your house with the window open, they can see you have a big screen TV but that doesn't mean they can open the front door.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.