From de2f1b52b8f6e065479b60c81d400a4c3735df4a Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 17 Apr 2014 12:42:43 +0000 Subject: [PATCH] RAND_seed now does nothing, so skip the operation --- lib/libcrypto/bn/expspeed.c | 6 ------ lib/libssl/src/crypto/bn/expspeed.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/lib/libcrypto/bn/expspeed.c b/lib/libcrypto/bn/expspeed.c index 4d5f221f33a..1b434db1ab9 100644 --- a/lib/libcrypto/bn/expspeed.c +++ b/lib/libcrypto/bn/expspeed.c @@ -195,8 +195,6 @@ static int sizes[NUM_SIZES]={128,256,512,1024,2048,4096,8192}; static int mul_c[NUM_SIZES]={8*8*8*8*8*8,8*8*8*8*8,8*8*8*8,8*8*8,8*8,8,1}; /*static int sizes[NUM_SIZES]={59,179,299,419,539}; */ -#define RAND_SEED(string) { const char str[] = string; RAND_seed(string, sizeof str); } - void do_mul_exp(BIGNUM *r,BIGNUM *a,BIGNUM *b,BIGNUM *c,BN_CTX *ctx); int main(int argc, char **argv) @@ -215,10 +213,6 @@ int main(int argc, char **argv) c=BN_new(); r=BN_new(); - while (!RAND_status()) - /* not enough bits */ - RAND_SEED("I demand a manual recount!"); - do_mul_exp(r,a,b,c,ctx); return 0; } diff --git a/lib/libssl/src/crypto/bn/expspeed.c b/lib/libssl/src/crypto/bn/expspeed.c index 4d5f221f33a..1b434db1ab9 100644 --- a/lib/libssl/src/crypto/bn/expspeed.c +++ b/lib/libssl/src/crypto/bn/expspeed.c @@ -195,8 +195,6 @@ static int sizes[NUM_SIZES]={128,256,512,1024,2048,4096,8192}; static int mul_c[NUM_SIZES]={8*8*8*8*8*8,8*8*8*8*8,8*8*8*8,8*8*8,8*8,8,1}; /*static int sizes[NUM_SIZES]={59,179,299,419,539}; */ -#define RAND_SEED(string) { const char str[] = string; RAND_seed(string, sizeof str); } - void do_mul_exp(BIGNUM *r,BIGNUM *a,BIGNUM *b,BIGNUM *c,BN_CTX *ctx); int main(int argc, char **argv) @@ -215,10 +213,6 @@ int main(int argc, char **argv) c=BN_new(); r=BN_new(); - while (!RAND_status()) - /* not enough bits */ - RAND_SEED("I demand a manual recount!"); - do_mul_exp(r,a,b,c,ctx); return 0; } -- 2.20.1