Fixes for compressed keys. Fix to fast math "mp_cnt_lsb" to return proper value, which fixes "mp_jacobi", which fixes "mp_sqrtmod_prime", which fixes compressed keys for 224-bit key. Removed workarounds for compressed keys. Added new configure option "--enable-compkey". Fixed issue with normal math and custom curves where "t2" could be free'd and used. Fixed issue with mp_dump in integer.c, with not allocating correctly sized buffer for toradix.

This commit is contained in:
David Garske
2016-06-21 14:06:02 -07:00
parent 5fa80a2667
commit aa1a405dd1
6 changed files with 46 additions and 31 deletions

View File

@@ -4801,7 +4801,7 @@ void mp_dump(const char* desc, mp_int* a, byte verbose)
char *buffer;
int size = a->alloc;
buffer = (char*)XMALLOC(size * 2, NULL, DYNAMIC_TYPE_TMP_BUFFER);
buffer = (char*)XMALLOC(size * sizeof(mp_digit) * 2, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (buffer == NULL) {
return;
}