{"shas":[["ce1d5a262ab5563cdc03e89930ad620e2218b3b3","1fa2ef4755a9226cb9a0a4840bd89b158ac71391@bluematt.me","Add wallet privkey encryption.\n\nThis commit adds support for ekeys, or encrypted private keys, to the wallet.\nAll keys are stored in memory in their encrypted form and thus the passphrase\nis required from the user to spend coins, or to create new addresses.\n\nKeys are encrypted with AES-256-CBC through OpenSSL's EVP library. The key is\ncalculated via EVP_BytesToKey using AES256 with 1000 rounds.\n\nEach RPC command which requires the password in practice has an additional\nparameter, namely that password.  Due to the need to convert the types of\nother parameters before sending them, users who do not use encryption (via\nthe -nocrypt option) will have to specify a blank string (or any string) as\nthe first parameter, followed by the command they currently use.\n\nWhenever keying material (unencrypted private keys, the user's password, the\nwallet's AES key) is stored unencrypted in memory, any reasonable attempt is\nmade to mlock/VirtualLock that memory before storing the keying material.\nThis is not true in several (commented) cases where mlock/VirtualLocking the\nmemory is not possible.\n\nAlthough encryption of private keys in memory can be very useful on desktop\nsystems (as some small amount of protection against stupid viruses), on an\nRPC server, the password is entered fairly insecurely. Thus, the only main\nadvantage encryption has for RPC servers is for RPC servers that do not spend\ncoins, except in rare cases, eg. a webserver of a merchant which only receives\npayment except for cases of manual intervention.\n\nThanks to jgarzik for the original patch and sipa for all his input.","Matt Corallo"]],"repo":"TheBlueMatt/bitcoin","actor":"TheBlueMatt","ref":"refs/heads/encprivkeys","size":1,"head":"ce1d5a262ab5563cdc03e89930ad620e2218b3b3","actor_gravatar":"c0d69eae553e6965038ba73dde6dead7","push_id":31658186}