aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-04-16 12:25:12 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-05-29 01:52:17 +0200
commitfa2637a3beb8677067015df3d9d7b394fa837c2f (patch)
tree9325bb10a5fe3e220d040827b82f7da5b42fc346 /src/key.cpp
parenta80de15113166354cdf208e3d8b6e25f4511a591 (diff)
downloadbitcoin-fa2637a3beb8677067015df3d9d7b394fa837c2f.tar.xz
Always require OS randomness when generating secret keys
Diffstat (limited to 'src/key.cpp')
-rw-r--r--src/key.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/key.cpp b/src/key.cpp
index 6a3d9aa140..79023566c3 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -124,9 +124,8 @@ bool CKey::Check(const unsigned char *vch) {
}
void CKey::MakeNewKey(bool fCompressedIn) {
- RandAddSeedPerfmon();
do {
- GetRandBytes(vch, sizeof(vch));
+ GetStrongRandBytes(vch, sizeof(vch));
} while (!Check(vch));
fValid = true;
fCompressed = fCompressedIn;