mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
a8333fc9ffscripted-diff: wallet: rename plain and encrypted master key variables (Sebastian Falbesoner)5a92077fd5wallet: refactor: dedup master key decryption (Sebastian Falbesoner)846545947cwallet: refactor: dedup master key encryption / derivation rounds setting (Sebastian Falbesoner)a6d9b415aawallet: refactor: introduce `CMasterKey::DEFAULT_DERIVE_ITERATIONS` constant (Sebastian Falbesoner)62c209f50dwallet: doc: remove mentions of unavailable scrypt derivation method (Sebastian Falbesoner) Pull request description: This PR contains various cleanups around the wallet's master key encryption logic. The default/minimum key derivation rounds magic number of 25000 is hoisted into a constant (member of `CMasterKey`) and two new functions `EncryptMasterKey`/`DecryptMasterKey` are introduced in order to deduplicate code for the derivation round determination and master key en/decryption. Also, mentions of the never-implemented derivation method `scrypt` are removed from the wallet crypter header and both plain and encrypted master key instances are renamed to adapt to moderning coding style (hopefully improving readability). ACKs for top commit: davidgumberg: ACKa8333fc9ffachow101: ACKa8333fc9ffTree-SHA512: 5a66d3b26f481347d0b5b4f742dd237803a35aad6e3480ed15fd38b7fa3700650bd5f67f4c30ed88f5fad45d6cd4c893fe4f1657e36e563b4294fd3596187724