<p>When encrypting a wallet, the wallet will generate new keys. If you transfer to those keys, the old, unencrypted backup will not be able to spend the funds. Only the encrypted wallet will have the private keys. Thus, after encrypting, you should take a new backup.</p>

CC BY-SA 4.0
2022-01-04T12:24:57.213Z
Thanks @meshcollider. And if I never transfer to it after the passphrase generation, but only spend some of the bitcoins there, I would still be able to use the old version (Without the passphrase) to spend the rest, it that right?
mikest
CC BY-SA 4.0
2022-01-04T20:20:37.423Z
Not necessarily, when sending bitcoins the outputs available to send may not exactly match the amount of money you want to send, so you end up sending money "to yourself".
Peter Green
CC BY-SA 4.0
2022-01-04T20:48:36.510Z
Peter is correct, this is known as "change" (in the same way you get change for overpaying with cash). Change would be sent to new, encrypted keys. But if you spend entire UTXOs at once with no change, then yes, both wallets will be able to access them.
meshcollider
CC BY-SA 4.0
2022-01-06T12:36:20.093Z
Thank you @Peter Green, meshcollider
mikest
CC BY-SA 4.0
2022-01-04T12:18:54.077Z
2022-01-04T12:18:54.077Z
meshcollider
<p>If I insert a passphrase to a wallet.dat file but also save copy of it before the passphrase, and then make a transfer to it, will I be able to use the old wallet version (Without the passphrase) to spend it?</p>
<p>In other words, does the private key somehow changes when you insert passphrase to a wallet.dat file?</p>

<private-key><wallet.dat><passphrase>
Does inserting a passphrase also changes the private key of a wallet.dat file
mikest
# Does inserting a passphrase also changes the private key of a wallet.dat file

(Asked by: username_0 on 2022-01-04)

If I insert a passphrase to a wallet.dat file but also save copy of it before the passphrase, and then make a transfer to it, will I be able to use the old wallet version (Without the passphrase) to spend it?

In other words, does the private key somehow changes when you insert passphrase to a wallet.dat file?

**Tags:** private-key, wallet.dat, passphrase


---

## 1 answers

### Answer by username_1 on 2022-01-04. Score: 2 | Accepted answer

When encrypting a wallet, the wallet will generate new keys. If you transfer to those keys, the old, unencrypted backup will not be able to spend the funds. Only the encrypted wallet will have the private keys. Thus, after encrypting, you should take a new backup.

> **Comments:**
> **username_0**: Thanks @username_1. And if I never transfer to it after the passphrase generation, but only spend some of the bitcoins there, I would still be able to use the old version (Without the passphrase) to spend the rest, it that right?  
> **username_2**: Not necessarily, when sending bitcoins the outputs available to send may not exactly match the amount of money you want to send, so you end up sending money "to yourself".  
> **username_1**: username_2 is correct, this is known as "change" (in the same way you get change for overpaying with cash). Change would be sent to new, encrypted keys. But if you spend entire UTXOs at once with no change, then yes, both wallets will be able to access them.  
> **username_0**: Thank you @username_2, username_1  

---

