diff --git a/gendss.c b/gendss.c index 078667214aadd62ea6a2709cb5f1e941e31a8029..5abb4d83b26cf7a79f6140bea86bfa781a09c2fc 100644 --- a/gendss.c +++ b/gendss.c @@ -57,7 +57,6 @@ dropbear_dss_key * gen_dss_priv_key(unsigned int size) { m_mp_init_multi(key->p, key->q, key->g, key->y, key->x, NULL); seedrandom(); - seedstrongrandom(); getq(key); getp(key, size); diff --git a/genrsa.c b/genrsa.c index 39d0a85bcecd49b8424478b94b257859e5475427..b0867e20839c89dc8e04dd7eefa20840d991be1e 100644 --- a/genrsa.c +++ b/genrsa.c @@ -56,7 +56,6 @@ dropbear_rsa_key * gen_rsa_priv_key(unsigned int size) { &pminus, &lcm, &qminus, NULL); seedrandom(); - seedstrongrandom(); if (mp_set_int(key->e, RSA_E) != MP_OKAY) { fprintf(stderr, "RSA generation failed\n"); diff --git a/random.c b/random.c index f729ae29211dcae7b26f91843f92bcced5c6f1e2..c97e71228c552ee3ba4b4b35c29052d231015e1b 100644 --- a/random.c +++ b/random.c @@ -155,24 +155,6 @@ static void write_urandom() #endif } -/* add entropy from the stronger, blocking source /dev/random. Only used - * for generating persistent private keys (RSA and DSS) */ -void seedstrongrandom() -{ - /* We assume that PRNGD is a strong source, so don't need to do anything here */ -#ifndef DROPBEAR_PRNGD_SOCKET - hash_state hs; - - sha1_process(&hs, (void*)hashpool, sizeof(hashpool)); - if (process_file(&hs, "/dev/random", INIT_SEED_SIZE, 0) - != DROPBEAR_SUCCESS) { - dropbear_exit("Failure reading random device %s", "/dev/random"); - } - - sha1_done(&hs, hashpool); -#endif -} - /* Initialise the prng from /dev/urandom or prngd. This function can * be called multiple times */ void seedrandom() { diff --git a/random.h b/random.h index fa90064f55b5a4125b609e49b557a24578ae5017..544e77e39b45f668fc5df166a7a1c0e7ec43e85a 100644 --- a/random.h +++ b/random.h @@ -27,7 +27,6 @@ struct mp_int; -void seedstrongrandom(); void seedrandom(); void genrandom(unsigned char* buf, unsigned int len); void addrandom(char * buf, unsigned int len);