Issue Details
- Number
- 26607
- Title
- `encryptwallet` generates new keys or descriptors for a wallet with previously imported keys or descriptors
- Description
- As noted in #25634, `encryptwallet` generates new keys or descriptors because:
> We always want to rotate keys after encryption because the old keys were written to disk unencrypted and thus may have been compromised.
This makes sense for a wallet where the keys/descriptors were generated by the wallet itself. The problem arises when a user explicitly imports a key or descriptor to a previously blank wallet, or in the case of a legacy wallet when they run `sethdseed`. This is because now the expectation is set that the wallet should only be using these keys/descriptors/seeds, so it is unexpected when the wallet uses something completely different upon encryption.
Note: Currently when a blank wallet with imported descriptors is encrypted, new descriptors are not generated, but this is considered a bug and will likely be fixed by #25634
- URL
-
https://github.com/bitcoin/bitcoin/issue/26607
- Closed by
-
Back to List