comparison gendss.c @ 687:167fdc091c05

Improve RNG seeding. Try to read from /dev/urandom multiple times, take input from extra sources, and use /dev/random when generating private keys
author Matt Johnston <matt@ucc.asn.au>
date Fri, 29 Jun 2012 23:19:43 +0800
parents a98a2138364a
children c3de235d9506
comparison
equal deleted inserted replaced
683:63f8d6c469cf 687:167fdc091c05
55 key->y = (mp_int*)m_malloc(sizeof(mp_int)); 55 key->y = (mp_int*)m_malloc(sizeof(mp_int));
56 key->x = (mp_int*)m_malloc(sizeof(mp_int)); 56 key->x = (mp_int*)m_malloc(sizeof(mp_int));
57 m_mp_init_multi(key->p, key->q, key->g, key->y, key->x, NULL); 57 m_mp_init_multi(key->p, key->q, key->g, key->y, key->x, NULL);
58 58
59 seedrandom(); 59 seedrandom();
60 seedstrongrandom();
60 61
61 getq(key); 62 getq(key);
62 getp(key, size); 63 getp(key, size);
63 getg(key); 64 getg(key);
64 getx(key); 65 getx(key);