<p>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.</p>

CC BY-SA 4.0
2021-01-20T23:30:15.770Z
Okay. Why is that?
Nicholes H
CC BY-SA 4.0
2021-01-21T00:20:45.787Z
@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.
RedGrittyBrick
CC BY-SA 4.0
2021-01-21T00:24:05.350Z
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.
Pieter Wuille
CC BY-SA 4.0
2021-01-21T00:43:26.480Z
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
CC BY-SA 4.0
2021-01-21T01:16:40.400Z
It’s not really the fault of wallet encryption written a decade ago that people today are giving poor advice though.
Claris
CC BY-SA 4.0
2021-01-20T23:28:48.033Z
2021-01-20T23:28:48.033Z
Pieter Wuille
<p>To trigger the added encryption password, you need to close the wallet. While it's &quot;open&quot; 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.</p>
<p>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.</p>
<p>You can learn more <a href="https://en.bitcoin.it/wiki/Storing_bitcoins" rel="nofollow noreferrer">here</a>.</p>
<p>If you really want to test it without having a balance, open the console and try any of the <code>dumpwallet</code> or <code>dumpprivkey</code> commands and any other you find among the list using <code>help</code> 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.</p>
<p>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.</p>

CC BY-SA 4.0
2021-11-02T19:50:14.443Z
2021-11-02T19:50:14.443Z
Doedigo
<p>I created a wallet.dat with Bitcoin Core on a new PC. Then I encrypted it with the GUI menu.</p>
<p>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 <strong>only</strong> indication I got that it was encrypted was that the &quot;Encrypt wallet&quot; menu item was disabled/greyed out. Not even a small text saying: &quot;This wallet is encrypted.&quot;</p>
<p>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 <strong>only</strong> indication that it's encrypted is that disabled menu item.</p>
<p>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 <strong>that</strong> will prompt for the decryption passphrase.</p>
<p>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.</p>

<bitcoin-core><wallet.dat><encryption>
Why is Bitcoin Core not asking me to enter the decryption key for my allegedly "encrypted" wallet.dat?
Nicholes H
# Why is Bitcoin Core not asking me to enter the decryption key for my allegedly "encrypted" wallet.dat?

(Asked by: username_0 on 2021-01-20)

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.

**Tags:** bitcoin-core, wallet.dat, encryption


---

## 2 answers

### Answer by username_1 on 2021-01-20. Score: 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.

> **Comments:**
> **username_0**: Okay. Why is that?  
> **username_2**: @username_0 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.  
> **username_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.  
> **username_0**: 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.  
> **username_3**: It’s not really the fault of wallet encryption written a decade ago that people today are giving poor advice though.  

---

### Answer by username_4 on 2021-11-02. Score: 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](https://en.bitcoin.it/wiki/Storing_bitcoins).

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.


---

