From e2456214f47a322db441521db4832ac49d548450 Mon Sep 17 00:00:00 2001 From: lchristina26 Date: Fri, 11 Dec 2015 13:22:33 -0700 Subject: [PATCH] update random.c for better entropy with VXWORKS --- wolfcrypt/src/random.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index a91a279fd..e53947fdd 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -1271,20 +1271,10 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) { STATUS status; - unsigned char seed[1024]; - int i = 0; - - for (i = 0; i < sizeof(seed); i++) { - seed[i] = i * 3 % 256; - } - /* build entropy */ - (void) randAdd(seed, 0, 0); - for (i = 4; i <= sizeof(seed); i*=2) { - (void) randAdd (seed, i - 1, i); - } status = randBytes (output, sz); if (status == ERROR) { + printf("Random seed failed! Enable RANDOM ENTROPY INJECT."); return status; }