diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-04-16 12:25:12 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-05-29 01:52:17 +0200 |
commit | fa2637a3beb8677067015df3d9d7b394fa837c2f (patch) | |
tree | 9325bb10a5fe3e220d040827b82f7da5b42fc346 /src/random.h | |
parent | a80de15113166354cdf208e3d8b6e25f4511a591 (diff) |
Always require OS randomness when generating secret keys
Diffstat (limited to 'src/random.h')
-rw-r--r-- | src/random.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/random.h b/src/random.h index 1a2d3e8ee2..31b80bd565 100644 --- a/src/random.h +++ b/src/random.h @@ -10,11 +10,8 @@ #include <stdint.h> -/** - * Seed OpenSSL PRNG with additional entropy data - */ +/* Seed OpenSSL PRNG with additional entropy data */ void RandAddSeed(); -void RandAddSeedPerfmon(); /** * Functions to gather random data via the OpenSSL PRNG @@ -25,6 +22,12 @@ int GetRandInt(int nMax); uint256 GetRandHash(); /** + * Function to gather random data from multiple sources, failing whenever any + * of those source fail to provide a result. + */ +void GetStrongRandBytes(unsigned char* buf, int num); + +/** * Seed insecure_rand using the random pool. * @param Deterministic Use a deterministic seed */ |