You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[rfc] Remove encrypting wallets that already exist #36027
Encrypting wallets after they have already been used seems like it is no longer a useful feature. There are a number of possible footguns with doing so:
encrypting generates an entirely new set of descriptors which necessitates a new backup
in generating the new descriptors, if the user had imported custom descriptors as active, those descriptors become inactive, which may lead to funds being sent to incorrect descriptors
once the wallet is encrypted, existing funds are not moved, so any compromise of an unencrypted backup can still steal those funds
It has been possible to make born encrypted wallets for several years now. Given the above, I think we should make born encrypted wallets the only way to make an encrypted wallet, and stop allowing users to encrypt wallets after the fact.
Removing this also makes many of the atomicity issues that #35752 tries to address irrelevant.
For historical context, when encryption was introduced, there could only ever have been a single wallet loaded at a time and wallets were created by default, prefilled with keys. The only way to have a wallet was to encrypt it after the fact.
Reacted by da1sychain, w0xlt, Ram, Praneeth G, David Gumberg, Aaron Leeb, pablomartin4btc, Victor Oluoch and rkrux
Given the above, I think we should make born encrypted wallets the only way to make an encrypted wallet, and stop allowing users to encrypt wallets after the fact.
Should we also consider disallowing the creation of unencrypted wallets that contain private keys? Are there any legitimate use cases for them?
IIRC encryption has been optional because, depending on the user, losing the passphrase could be an equal or greater risk than hostile access to the wallet file.
This presents both footguns for users, and footguns for developers, with very little actual utility. This would also resolve the oldest open issue: #3314
IIRC encryption has been optional because, depending on the user, losing the passphrase could be an equal or greater risk than hostile access to the wallet file.
Unencrypted wallets should remain an option, but wallets that start unencrypted and then are encrypted later have all the same risks.
Activity
w0xlt commentedon Aug 19, 2026
I'm in favor of this direction: simplify the code, simplify wallet operations (including backups), and reduce the chances of users making mistakes.
pseudoramdom commentedon Aug 19, 2026
Overall in favor of this.
Should we also consider disallowing the creation of unencrypted wallets that contain private keys? Are there any legitimate use cases for them?
achow101 commentedon Aug 19, 2026
I think we should still allow unencrypted wallets.
jonatack commentedon Aug 20, 2026
IIRC encryption has been optional because, depending on the user, losing the passphrase could be an equal or greater risk than hostile access to the wallet file.
PraneethGunas commentedon Aug 20, 2026
Makes complete sense. A concrete way this bites users today:
davidgumberg commentedon Aug 20, 2026
Concept ACK
This presents both footguns for users, and footguns for developers, with very little actual utility. This would also resolve the oldest open issue: #3314
davidgumberg commentedon Sep 2, 2026
Unencrypted wallets should remain an option, but wallets that start unencrypted and then are encrypted later have all the same risks.
davidgumberg commentedon Sep 30, 2026
Opened #36387 which will be needed before deleting the
encryptwalletRPC.Merge #36387: wallet: rpc: Deprecate `encryptwallet` RPC for encrypti…