Repository navigation
Prevent unencrypted private keys from being written to wallet.dat - #635
Merged
Merged
Conversation
Member
|
ACK -- only a small issue that can wait:
|
gavinandresen
added a commit
that referenced
this pull request
Nov 15, 2011
Prevent unencrypted private keys from being written to wallet.dat
coblee
referenced
this pull request
in litecoin-project/litecoin
Jul 17, 2012
Prevent unencrypted private keys from being written to wallet.dat
ptschip
pushed a commit
to ptschip/bitcoin
that referenced
this pull request
Jun 6, 2017
[Backport to Release PR627] Move bitnodes seeding to be after DNS seeding.
Losangelosgenetics
pushed a commit
to Losangelosgenetics/bitcoin
that referenced
this pull request
Mar 12, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unencrypted private keys could remain in the wallet.dat file (and other berkely db database files) after wallet encryption.
This pull request does several things to fix the problem:
Completely rewrites the wallet.dat file upon encryption.
Removes all keys from the keypool so they will not be used for new transactions (they are encrypted and stored in the new wallet, in case any bitcoins are sent to them).
Modifies the database code so temporary database files are cleaned up when bitcoin shuts down
Successful encryption of the wallet is now followed by a shutdown, so old unencrypted private keys that might have been in the database's caches will not be written to the new, encrypted wallet file.