Do keypool keys from an unencrypted wallet backup become unusable once I encrypt my wallet? I'm a little confused by this, which i found in the technical documention:


  When wallet passphrase enrcyption becomes enabled, any unused keys
  from the keypool are flushed (marked as used) and new keys protected
  with encyption are added. For this reason, make a new backup of your
  wallet so that you will be able to recover the keys from the new key
  pool should access to your backups be necessary.


If I were to encrypt my wallet.dat and had a recent backup that was unencrypted do the keypool keys in the unencrypted backup become invalid?

If I hadn't made any new transactions using the new encrypted wallet would I still be able to restore the backup using the unencrypted wallet backup or would this cause problems?
They don't become invalid. When you ask for a new address from the client, it will not choose any that it has already given you. This is for your privacy, because it makes it more difficult to associate those addresses with you.

In this case, we're making them as used for a different reason. To explain why, let's suppose the wallet didn't treat the previously unencrypted addresses differently. 


You generate a wallet.
You read about the importance of backups, and make a backup to an external flash drive.
You read about the importance of encrypting your wallet, and do so.
For about 6 months, you use 3 new addresses every week.
You get hacked, and you have the external flash drive plugged into your computer at the time.


Your wallet would be encrypted, but that wouldn't matter, because all of the keys that hold a balance are also sitting unencrypted on your flash drive.

In theory, you could just destroy all unencrypted copies of your wallet, but that seems more difficult than generating new keys and making a new backup, no?


  If I hadn't made any new transactions using the new encrypted wallet would I still be able to restore the backup using the unencrypted wallet backup or would this cause problems?


Yes, you could.