comparison bignum.c @ 188:c9483550701b

- refactored random mp_int generation and byte->mp_int code - added RSA blinding
author Matt Johnston <matt@ucc.asn.au>
date Thu, 05 May 2005 03:58:21 +0000
parents 82fcf3185616
children a98a2138364a 76097ec1a29a
comparison
equal deleted inserted replaced
187:c44df7123b0a 188:c9483550701b
50 cur_arg = va_arg(args, mp_int*); 50 cur_arg = va_arg(args, mp_int*);
51 } 51 }
52 va_end(args); 52 va_end(args);
53 } 53 }
54 54
55 void bytestomp(mp_int *mp, unsigned char* bytes, unsigned int len) { 55 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) {
56 56
57 if (mp_read_unsigned_bin(mp, bytes, len) != MP_OKAY) { 57 if (mp_read_unsigned_bin(mp, (unsigned char*)bytes, len) != MP_OKAY) {
58 dropbear_exit("mem alloc error"); 58 dropbear_exit("mem alloc error");
59 } 59 }
60 } 60 }
61 61
62 /* hash the ssh representation of the mp_int mp */ 62 /* hash the ssh representation of the mp_int mp */