Skip to content

[rfc] Remove encrypting wallets that already exist #36027

Open

Description

@achow101

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.

Activity

  1. w0xlt commented on Aug 19, 2026

    @w0xlt
    Contributor

    I'm in favor of this direction: simplify the code, simplify wallet operations (including backups), and reduce the chances of users making mistakes.

  2. pseudoramdom commented on Aug 19, 2026

    @pseudoramdom
    Contributor

    Overall in favor of this.

    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?

  3. achow101 commented on Aug 19, 2026

    @achow101
    MemberAuthor

    Should we also consider disallowing the creation of unencrypted wallets that contain private keys? Are there any legitimate use cases for them?

    I think we should still allow unencrypted wallets.

  4. jonatack commented on Aug 20, 2026

    @jonatack
    Member

    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.

  5. PraneethGunas commented on Aug 20, 2026

    @PraneethGunas

    Makes complete sense. A concrete way this bites users today:

    1. User sets up inheritance, sharing keys and descriptors with heirs.
    2. User encrypts the wallet. New active descriptors are generated from a new seed, and the shared descriptor is deactivated.
    3. The inheritance setup is now stale and has to be redone. Nothing tells the user this.
  6. davidgumberg commented on Aug 20, 2026

    @davidgumberg
    Contributor

    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

  7. davidgumberg commented on Sep 2, 2026

    @davidgumberg
    Contributor

    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.

  8. davidgumberg commented on Sep 30, 2026

    @davidgumberg
    Contributor

    Opened #36387 which will be needed before deleting the encryptwallet RPC.

  9. added a commit that references this issue on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions