From 75e2c877650444fb829547bdb58d46eb1297bc1a Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 3 Aug 2017 09:23:28 -0400 Subject: Switch from ossl_rand to DRBG rand If RAND_add wraps around, XOR with existing. Add test to drbgtest that does the wrap-around. Re-order seeding and stop after first success. Add RAND_poll_ex() Use the DF and therefore lower RANDOMNESS_NEEDED. Also, for child DRBG's, mix in the address as the personalization bits. Centralize the entropy callbacks, from drbg_lib to rand_lib. (Conceptually, entropy is part of the enclosing application.) Thanks to Dr. Matthias St Pierre for the suggestion. Various code cleanups: -Make state an enum; inline RANDerr calls. -Add RAND_POLL_RETRIES (thanks Pauli for the idea) -Remove most RAND_seed calls from rest of library -Rename DRBG_CTX to RAND_DRBG, etc. -Move some code from drbg_lib to drbg_rand; drbg_lib is now only the implementation of NIST DRBG. -Remove blocklength Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/4019) --- test/ectest.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'test/ectest.c') diff --git a/test/ectest.c b/test/ectest.c index 85bb46212b..fb6027b8e5 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -1425,9 +1425,6 @@ static int parameter_test(void) ECPARAMETERS_free(ecparameters); return r; } - -static const char rnd_seed[] = - "string to make the random number generator think it has randomness"; #endif int setup_tests(void) @@ -1438,8 +1435,6 @@ int setup_tests(void) || !TEST_true(EC_get_builtin_curves(curves, crv_len))) return 0; - RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */ - ADD_TEST(parameter_test); ADD_TEST(prime_field_tests); # ifndef OPENSSL_NO_EC2M -- cgit v1.2.3