Mercurial > dropbear
comparison bignum.c @ 1692:1051e4eea25a
Update LibTomMath to 1.2.0 (#84)
* update C files
* update other files
* update headers
* update makefiles
* remove mp_set/get_double()
* use ltm 1.2.0 API
* update ltm_desc
* use bundled tommath if system-tommath is too old
* XMALLOC etc. were changed to MP_MALLOC etc.
author | Steffen Jaeckel <s@jaeckel.eu> |
---|---|
date | Tue, 26 May 2020 17:36:47 +0200 |
parents | c98e242dc505 |
children | 8b4274d34fe8 |
comparison
equal
deleted
inserted
replaced
1691:2d3745d58843 | 1692:1051e4eea25a |
---|---|
84 va_end(args); | 84 va_end(args); |
85 } | 85 } |
86 | 86 |
87 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) { | 87 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) { |
88 | 88 |
89 if (mp_read_unsigned_bin(mp, (unsigned char*)bytes, len) != MP_OKAY) { | 89 if (mp_from_ubin(mp, (unsigned char*)bytes, len) != MP_OKAY) { |
90 dropbear_exit("Mem alloc error"); | 90 dropbear_exit("Mem alloc error"); |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 /* hash the ssh representation of the mp_int mp */ | 94 /* hash the ssh representation of the mp_int mp */ |