diff options
| author | Pieter Wuille <[email protected]> | 2016-05-30 15:46:16 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-05-30 15:59:52 +0200 |
| commit | 950be19727a581970591d8f8138dfe4725750382 (patch) | |
| tree | 5bc423b5a39771056c4e69651987d5502e57ac48 /src/wallet/wallet.cpp | |
| parent | Merge #8107: bench: Added base58 encoding/decoding benchmarks (diff) | |
| parent | Don't use assert for catching randomness failures (diff) | |
| download | discoin-950be19727a581970591d8f8138dfe4725750382.tar.xz discoin-950be19727a581970591d8f8138dfe4725750382.zip | |
Merge #7891: Always require OS randomness when generating secret keys
628cf14 Don't use assert for catching randomness failures (Pieter Wuille)
fa2637a Always require OS randomness when generating secret keys (Pieter Wuille)
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 5d1a43119..da0d6f272 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -509,16 +509,14 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) return false; CKeyingMaterial vMasterKey; - RandAddSeedPerfmon(); vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE); - GetRandBytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE); + GetStrongRandBytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE); CMasterKey kMasterKey; - RandAddSeedPerfmon(); kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE); - GetRandBytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE); + GetStrongRandBytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE); CCrypter crypter; int64_t nStartTime = GetTimeMillis(); @@ -3147,8 +3145,6 @@ bool CWallet::InitLoadWallet() if (fFirstRun) { // Create new keyUser and set as default key - RandAddSeedPerfmon(); - CPubKey newDefaultKey; if (walletInstance->GetKeyFromPool(newDefaultKey)) { walletInstance->SetDefaultKey(newDefaultKey); |