{"shas":[["773a3a58312826809aee8bedb7a20f09f027cf65","d15667e2d58fd2e3f6a4a33b12ede1eb153be19b@jrbobdobbs.org","Make mlock() and munlock() portable to systems that require the address to be on a page boundary.","Doug Huff"],["38ea8659c81cf2d825caa67e976b9d270142fb76","1fa2ef4755a9226cb9a0a4840bd89b158ac71391@bluematt.me","Add wallet privkey encryption.\n\nThis commit adds support for ckeys, 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 SHA512 with (by default) 25000 rounds and\na random salt.\n\nBy default, the user's wallet remains unencrypted until they call the RPC\ncommand encryptwallet <password> or, from the GUI menu, Options->\nEncrypt Wallet.\n\nWhen the user is attempting to call RPC functions which require the password\nto unlock the wallet, an error will be returned unless they call\nwalletpassword <password> <time to keep key in memory> first.\n\nA keypoolrefill command has been added which tops up the users keypool\n(requiring the password via walletpassword first).\nkeypoolsize has been added to the output of getinfo to show the user the\nnumber of keys left before they need to specify their password and call\ntopupkeypool.\n\nWhen the keypool runs out (and wallet is locked) GetOrReuseKeyFromPool\nreturns vchDefaultKey, meaning miners may start to generate many blocks to\nvchDefaultKey instead of a new key each time.\n\nA walletpasswordchange <oldpassword> <newpassword> has been added to allow\nthe user to change their password via RPC.\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, gmaxwell and many others\nfor all their input.","Matt Corallo"],["2a20e3405bf583ad39d469ea02b6d4fb1fd2baa5","1fa2ef4755a9226cb9a0a4840bd89b158ac71391@bluematt.me","Set the number of SHA512 rounds based on the speed of the computer.","Matt Corallo"],["c5fa5bec2d44b5f564e32283f2f9d88d8ad8ac5f","1fa2ef4755a9226cb9a0a4840bd89b158ac71391@bluematt.me","Push unlocked_until in getinfo.","Matt Corallo"],["8a88a21545f718b728be269791784add7ee54975","1fa2ef4755a9226cb9a0a4840bd89b158ac71391@bluematt.me","Dynamically remove/insert the Options for encryption in the menus.","Matt Corallo"]],"ref":"refs/heads/newenc","size":5,"head":"8a88a21545f718b728be269791784add7ee54975","push_id":35318036}