Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: samspaces on December 29, 2017, 10:41:49 PM



Title: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: samspaces on December 29, 2017, 10:41:49 PM
Hi, I got this pop up upon encrypting a bitcoin-0.15 wallet.dat.

https://s18.postimg.org/g4fndxwzt/Screenshot_from_2017-12-29_21_31_55.png

I'm curious how in the world this warning would play out. How would the chain know I'm running a version of a, on a later date, encrypted wallet.


Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: ranochigo on December 30, 2017, 04:11:26 AM
They don't. The warning is correct however.

Bitcoin Core purges your keypool with 1000 keys or your HD seed. In the case of the HD seed, the previous keys that were used are exported into the wallet file. Since the keypool is refreshed/HD seed changed, any future address generated with your new backup will diverge from your old backup.


Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: samspaces on December 30, 2017, 02:02:26 PM
They don't. The warning is correct however.

Bitcoin Core purges your keypool with 1000 keys or your HD seed. In the case of the HD seed, the previous keys that were used are exported into the wallet file. Since the keypool is refreshed/HD seed changed, any future address generated with your new backup will diverge from your old backup.

Without a HD seed, am I correct in assuming that the first 1000 addresses that all the different wallet backups will generate are the same, and that only after the first 1000 keys are used, they diverge?


Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: ranochigo on December 30, 2017, 02:46:59 PM
They don't. The warning is correct however.

Bitcoin Core purges your keypool with 1000 keys or your HD seed. In the case of the HD seed, the previous keys that were used are exported into the wallet file. Since the keypool is refreshed/HD seed changed, any future address generated with your new backup will diverge from your old backup.

Without a HD seed, am I correct in assuming that the first 1000 addresses that all the different wallet backups will generate are the same, and that only after the first 1000 keys are used, they diverge?
No. It diverges at that point for which you encrypt/change the password. The unused keypool gets refreshed and hence any future keys will be different.


Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: samspaces on December 30, 2017, 05:17:59 PM
They don't. The warning is correct however.

Bitcoin Core purges your keypool with 1000 keys or your HD seed. In the case of the HD seed, the previous keys that were used are exported into the wallet file. Since the keypool is refreshed/HD seed changed, any future address generated with your new backup will diverge from your old backup.

Without a HD seed, am I correct in assuming that the first 1000 addresses that all the different wallet backups will generate are the same, and that only after the first 1000 keys are used, they diverge?
No. It diverges at that point for which you encrypt/change the password. The unused keypool gets refreshed and hence any future keys will be different.

Ok, thanks!


Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: Spendulus on January 01, 2018, 03:49:54 AM
They don't. The warning is correct however.

Bitcoin Core purges your keypool with 1000 keys or your HD seed. In the case of the HD seed, the previous keys that were used are exported into the wallet file. Since the keypool is refreshed/HD seed changed, any future address generated with your new backup will diverge from your old backup.
Future addresses, yes.

But what about past activity? Say that a person had put $100 in BTC into an unencrypted wallet for the last 10 months, and he then encrypts the wallet (Bitcoin CORE).

Someone finds an old unencrypted wallet.

How is it possible that it would not have valid content that was retrievable by the finder?





Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: ranochigo on January 01, 2018, 03:59:00 AM
Future addresses, yes.

But what about past activity? Say that a person had put $100 in BTC into an unencrypted wallet for the last 10 months, and he then encrypts the wallet (Bitcoin CORE).

Someone finds an old unencrypted wallet.

How is it possible that it would not have valid content that was retrievable by the finder?
It's not possible for any backups to be invalidated. There isn't any way to surefire make an existing backup useless without the need for a central authority to validate each backup. The old backup will have the previously used private keys.

If someone finds an old unencrypted wallet and your old addresses still have coins in it, they can spend it. You have to send it to a new address in your new backup to deter this possibility.


Title: Re: Older unencrypted wallet.dat useless after encrypting a copy?
Post by: Spendulus on January 01, 2018, 04:12:19 AM
Future addresses, yes.

But what about past activity? Say that a person had put $100 in BTC into an unencrypted wallet for the last 10 months, and he then encrypts the wallet (Bitcoin CORE).

Someone finds an old unencrypted wallet.

How is it possible that it would not have valid content that was retrievable by the finder?
It's not possible for any backups to be invalidated. There isn't any way to surefire make an existing backup useless without the need for a central authority to validate each backup. The old backup will have the previously used private keys.

If someone finds an old unencrypted wallet and your old addresses still have coins in it, they can spend it. You have to send it to a new address in your new backup to deter this possibility.

This is what I thought. The popup message which comes up is then quite confusing.