aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/buildh.in
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-03-06 06:17:15 -0500
committerJack Lloyd <[email protected]>2016-03-06 06:17:15 -0500
commit7827c50cbddec094412745d877dcf3ea118ad4d7 (patch)
treec043da905a7818a046893de6ac8ceb29a87a4d8b /src/build-data/buildh.in
parenta3d7eb9c338d2cc48116f25894a07455b1a79443 (diff)
parentb642fa9bc637b3a7fe39f5640b9a2f6f9ea5f581 (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/buildh.in')
-rw-r--r--src/build-data/buildh.in16
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