diff options
author | Jack Lloyd <[email protected]> | 2016-03-06 06:17:15 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-03-06 06:17:15 -0500 |
commit | 7827c50cbddec094412745d877dcf3ea118ad4d7 (patch) | |
tree | c043da905a7818a046893de6ac8ceb29a87a4d8b /src/build-data | |
parent | a3d7eb9c338d2cc48116f25894a07455b1a79443 (diff) | |
parent | b642fa9bc637b3a7fe39f5640b9a2f6f9ea5f581 (diff) |
Merge GH #373 RDRAND/RDSEED logic changes
The Intel RNG may fail if heavily contended, so retry as needed.
Diffstat (limited to 'src/build-data')
-rw-r--r-- | src/build-data/buildh.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index a1d8890db..6412fdcdf 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -167,6 +167,22 @@ softare-based entropy polling is still used. */ #define BOTAN_ENTROPY_ESTIMATE_HARDWARE_RNG 0.0 +/* +How often should the RdRand/RdSeed RNGs be polled + +Each poll generates 32 bit entropy +*/ +#define BOTAN_ENTROPY_INTEL_RNG_POLLS 32 + +// According to Intel RdRand is guaranteed to generate a random number within 10 retries on a working CPU +#define BOTAN_ENTROPY_RDRAND_RETRIES 10 + +/* +* RdSeed is not guaranteed to generate a random number within a specific number of retries +* Define the number of retries here +*/ +#define BOTAN_ENTROPY_RDSEED_RETRIES 20 + // The output of a PRNG we are trusting to be strong #define BOTAN_ENTROPY_ESTIMATE_STRONG_RNG 7.0 |