mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Always require OS randomness when generating secret keys
This commit is contained in:
11
src/random.h
11
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
|
||||
@@ -24,6 +21,12 @@ uint64_t GetRand(uint64_t nMax);
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user