From 8f08f001d207858db23161042bc5141efcd2f99c Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 13 Nov 2019 14:49:17 -0800 Subject: [PATCH] Update the EBSNET GenerateSeed function with a better seed. It was reseeding itself every few bytes and failing the simple entropy check. --- wolfcrypt/src/random.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 6f78b8bb1..567d40c74 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -1558,16 +1558,13 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) #include "rtprand.h" /* rtp_rand () */ #include "rtptime.h" /* rtp_get_system_msec() */ - int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) { - int i; - rtp_srand(rtp_get_system_msec()); + word32 i; + rtp_srand(rtp_get_system_msec()); for (i = 0; i < sz; i++ ) { output[i] = rtp_rand() % 256; - if ( (i % 8) == 7) - rtp_srand(rtp_get_system_msec()); } return 0;