Issues:
- Symmetric (aes) vs public key (rsa) encryption
- Decrypt at startup vs decrypt on use
- Create new keys automatically (as now) vs create only on user action
- Encrypt all keys with same passphrase vs different passphrases for different key sets
A flexible system could do the following, with the user making some usability choices:
* Have the user choose a passphrase, and derive one or two secret keys OR the user chooses two passphrases
* Optionally encrypt the wallet as a whole with one secret key
* Always encrypt the private keys with the second secret key
* If the whole wallet is encrypted, prompt for passphrase on startup
* Optionally forget the passphrase after startup, while keeping the wallet secret key
* If passphrase was forgotten, or there is no whole-wallet encryption, and the user wishes to spend, prompt for the passphrase again
* Again, optionally forget the passphrase after spending
I think new keys can still be created automatically. Just create them in batch ahead of time during spend operations.
Different passphrases for different key sets are an interesting idea, but usability would start to suffer due to complexity. Might be better to have separate wallets.
We can distinguish three levels of attacker:
1. Can read user files
2. Can read/write user files but only read system files
3. Can read/write everything, root privileges
Sorry, getting tired, will write more later.".
I don't think there's any difference between #2 and #3. In either case, the attacker can listen for the user's passphrase.