Mercurial > dropbear
comparison gendss.c @ 805:724c3e0c8734 ecc
Add m_mp_alloc_init_multi() helper
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 23 May 2013 22:18:16 +0800 |
parents | d386defb5376 |
children | 220f55d540ae |
comparison
equal
deleted
inserted
replaced
804:34b73c9d8aa3 | 805:724c3e0c8734 |
---|---|
51 dropbear_exit("DSS keys have a fixed size of 1024 bits"); | 51 dropbear_exit("DSS keys have a fixed size of 1024 bits"); |
52 } | 52 } |
53 | 53 |
54 key = m_malloc(sizeof(*key)); | 54 key = m_malloc(sizeof(*key)); |
55 | 55 |
56 key->p = (mp_int*)m_malloc(sizeof(mp_int)); | 56 m_mp_alloc_init_multi(&key->p, &key->q, &key->g, &key->y, &key->x, NULL); |
57 key->q = (mp_int*)m_malloc(sizeof(mp_int)); | |
58 key->g = (mp_int*)m_malloc(sizeof(mp_int)); | |
59 key->y = (mp_int*)m_malloc(sizeof(mp_int)); | |
60 key->x = (mp_int*)m_malloc(sizeof(mp_int)); | |
61 m_mp_init_multi(key->p, key->q, key->g, key->y, key->x, NULL); | |
62 | 57 |
63 getq(key); | 58 getq(key); |
64 getp(key, size/8); | 59 getp(key, size/8); |
65 getg(key); | 60 getg(key); |
66 getx(key); | 61 getx(key); |