We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 099135b + 1e08861 commit 1f607eeCopy full SHA for 1f607ee
1 file changed
wolfcrypt/src/random.c
@@ -258,7 +258,12 @@ int wc_RNG_GenerateByte(WC_RNG* rng, byte* b)
258
* minimum bits of entropy per bit of NDRNG output. */
259
#if defined(HAVE_ENTROPY_MEMUSE)
260
/* Full strength, conditioned entropy is requested of MemUse Entropy. */
261
- #define ENTROPY_SCALE_FACTOR (1)
+ #if defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \
262
+ (HAVE_FIPS_VERSION >= 2)
263
+ #define ENTROPY_SCALE_FACTOR (4)
264
+ #else
265
+ #define ENTROPY_SCALE_FACTOR (1)
266
+ #endif
267
#elif defined(HAVE_AMD_RDSEED)
268
/* This will yield a SEED_SZ of 16kb. Since nonceSz will be 0,
269
* we'll add an additional 8kb on top. */
0 commit comments