Key master key is encrypted by the key derived based the wallet's passphrase. When unlock wallet, the unencrypted master key is stored in memory, but not private keys. Encrypting a master key which is then used to encrypt the actual keys is a fairly standard practice for encrypting data. Doing this allows the master key to remain the same so that changing the password does not result in having to decrypt and then re-encrypt all of the encrypted data. It only requires decrypting and re-encrypting the encryption key.
A wallet can contain thousands of keys or tens of thousdands, or even hundreds of thousands. Keeping all of these keys in memory will use memory and possibly take up so much memory that the system is unable to keep running bitcoind. A bitcoin key is fixed size though, and fairly small, so keeping that in memory is not a burden. Sign up to join this community. The best answers are voted up and rise to the top.
Home Questions Tags Users Unanswered. Why use the master key to encrypt private key? And why just store unencrypted master key in memory? Ask Question. Asked 1 year, 7 months ago.
Active 1 master, click here months ago. Viewed times. Sign up or log in Key up using Google. Sign up using Facebook. Sign up using Email and Password.