The reasons are simple. your old wallet.dat and passphrase will give thieves your private keys to your account, which can help them hack all your balances in your old addresses. But since you changed your passphrase, your new address pool will be related to your new .dat and passphrase, which is irrelevant to the old address pool. That's why people who have access to your old wallet.dat and passphrase will never be able to steal your coins.
This is completely wrong. If you think your wallet has been stolen and the passphrase is known, move your coins to a completely new wallet immediately. The HD seed is not regenerated when the passphrase is changed. Any new address that you use will be generated from the same seed in the compromised wallet.For those interested in how bitcoin core handle this, refer to wallet.cpp, line 454, where the Encrypt method actually create a new key pool for users and render the old addresses useless.
Encrypt generates a new seed, but encrypt is not what is done when the passphrase is changed. Instead ChangeWalletPassphrase is used which does not do anything to the keypool or to the HD seed.achow101 talked about this in a thread back in 2017. This is how he explained it:
This applies to non-HD wallets.The wallet.dat contains your private keys. When you change your password, the private keys you have already used stay in the wallet so that you can spend your Bitcoin. However the look-ahead keypool is refreshed so that any new addresses you request after the password change are not in the old wallet with the old private keys. This means that if you don't spend your Bitcoin after you change your password, anyone with a copy of the original wallet with the old password can still steal your Bitcoin if they have the old password.
isn't a "master private key" the same as a "wallet seed"?
Firstly bitcoin core has no seed.
In your context, a seed is mnomic phrase it’s the representation of any,bee, a master private key is the seed plus a derivation path. In terms of wallets like electrum, bitcoin seeds represent a 128 bit number, something has to be added to make them closer to the 256 bit master private key they need to become.
No (as answer to both the question and as a statement that the provided answer is wrong).In your context, a seed is mnomic phrase it’s the representation of any,bee, a master private key is the seed plus a derivation path. In terms of wallets like electrum, bitcoin seeds represent a 128 bit number, something has to be added to make them closer to the 256 bit master private key they need to become.
There are three things typically involved in modern HD wallets. There is a mnemonic, a HD seed, and the master private key. The mnemonic us a set of human readable words which can be transformed into a large number, typically by hashing. The HD seed is a large number (between 128 and 512 bits) which serves as initial entropy for the master private key. The master private key is the hash of the seed using HMAC-SHA512. So mnemonics become HD seeds, and HD seeds become the master private key. A wallet can omit the mnemonic and just have a seed and master private key. It can also omit both the mnemonic and the seed and just have the master private key.
What Bitcoin Core has is a seed. It only stores the seed and generates the master private key when necessary. When an unencrypted wallet is encrypted, a new seed will be generated. When the password for an encrypted wallet is changed, nothing changes except for the password. Not even the encryption keys change, only the password changes, which then changes how the encryption key is encrypted. So the same encryption keys are still used to encrypt the same private keys and HD seed. No new seed is generated and the keypool is not regenerated.
The one who is completely wrong is you. Encrypt will use newkeypool() which will completely abandon your old addresses. Also the changepassphrase is what uses the Encrypt method and of course everyone know it is the changepassphrase that is being called when you change passphrase.