comparison rsa.c @ 84:29a5c7c62350

default initialisers for mp_ints
author Matt Johnston <matt@ucc.asn.au>
date Tue, 17 Aug 2004 10:20:20 +0000
parents b0316ce64e4b
children 0cfba3034be5
comparison
equal deleted inserted replaced
83:6539c9480b23 84:29a5c7c62350
199 * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ 199 * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
200 int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data, 200 int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data,
201 unsigned int len) { 201 unsigned int len) {
202 202
203 unsigned int slen; 203 unsigned int slen;
204 mp_int rsa_s, rsa_mdash; 204 DEF_MP_INT(rsa_s);
205 DEF_MP_INT(rsa_mdash);
205 mp_int *rsa_em = NULL; 206 mp_int *rsa_em = NULL;
206 int ret = DROPBEAR_FAILURE; 207 int ret = DROPBEAR_FAILURE;
207 208
208 TRACE(("enter buf_rsa_verify")); 209 TRACE(("enter buf_rsa_verify"));
209 210
260 void buf_put_rsa_sign(buffer* buf, rsa_key *key, const unsigned char* data, 261 void buf_put_rsa_sign(buffer* buf, rsa_key *key, const unsigned char* data,
261 unsigned int len) { 262 unsigned int len) {
262 263
263 unsigned int nsize, ssize; 264 unsigned int nsize, ssize;
264 unsigned int i; 265 unsigned int i;
265 mp_int rsa_s; 266 DEF_MP_INT(rsa_s);
266 mp_int *rsa_em = NULL; 267 mp_int *rsa_em = NULL;
267 268
268 TRACE(("enter buf_put_rsa_sign")); 269 TRACE(("enter buf_put_rsa_sign"));
269 assert(key != NULL); 270 assert(key != NULL);
270 271