diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-04-28 23:17:43 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-04-28 23:17:43 +0800 |
commit | 79660f2eb1c64bcac9ba0084f9d3822ee88dbd5c (patch) | |
tree | 3a5e25381d08d23b881300c9d5c58c8ac439ea29 /gendss.c | |
parent | 5c87c6a435ab1791294c412abe32aa629b42fdc7 (diff) |
more ecdsa signkey work, not correct
--HG--
branch : ecc
Diffstat (limited to 'gendss.c')
-rw-r--r-- | gendss.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -47,6 +47,10 @@ dropbear_dss_key * gen_dss_priv_key(unsigned int size) { dropbear_dss_key *key; + if (size != 1024) { + dropbear_exit("DSS keys have a fixed size of 1024 bits"); + } + key = m_malloc(sizeof(*key)); key->p = (mp_int*)m_malloc(sizeof(mp_int)); @@ -56,10 +60,8 @@ dropbear_dss_key * gen_dss_priv_key(unsigned int size) { key->x = (mp_int*)m_malloc(sizeof(mp_int)); m_mp_init_multi(key->p, key->q, key->g, key->y, key->x, NULL); - seedrandom(); - getq(key); - getp(key, size); + getp(key, size/8); getg(key); getx(key); gety(key); |