summaryrefslogtreecommitdiffhomepage
path: root/gendss.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2012-06-29 23:19:43 +0800
committerMatt Johnston <matt@ucc.asn.au>2012-06-29 23:19:43 +0800
commitd5ccc32b4d8903562107a534fbe09433c27d2880 (patch)
tree467f88f9f0d6d85c2be90d2a590504ec10742bba /gendss.c
parentdb34044c7fdfcdf85a2606b686d60910e1ff36b6 (diff)
Improve RNG seeding.
Try to read from /dev/urandom multiple times, take input from extra sources, and use /dev/random when generating private keys
Diffstat (limited to 'gendss.c')
-rw-r--r--gendss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gendss.c b/gendss.c
index 5abb4d8..0786672 100644
--- a/gendss.c
+++ b/gendss.c
@@ -57,6 +57,7 @@ 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);