From 3490dd06c52d5aa7c258f03025a05064837ce1c6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 4 Mar 2012 11:55:19 -0800 Subject: * mpi-patches/add-mp-hash (mp_hash): Fixed use of uninitialized variable on platforms where the MP digit is smaller than a long integer. (Not anything TXR is known to run on). Changed algorithm to take the first and last digit and add them together, rather than just taking the last digit. The last digit will be zeros for numbers that contain 2 as a factor with a large enough multiplicity. * mpi-patches/add-mpi-toradix-with-case: Refreshed. * mpi-patches/bit-search-optimizations: Likewise. * mpi-patches/faster-square-root: Likewise. * mpi-patches/fix-bad-shifts: Likewise. * mpi-patches/fix-mult-bug: Likewise. --- mpi-patches/add-mpi-toradix-with-case | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mpi-patches/add-mpi-toradix-with-case') diff --git a/mpi-patches/add-mpi-toradix-with-case b/mpi-patches/add-mpi-toradix-with-case index b94fdb19..8d5b1e73 100644 --- a/mpi-patches/add-mpi-toradix-with-case +++ b/mpi-patches/add-mpi-toradix-with-case @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-10 12:05:35.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-10 12:05:39.000000000 -0800 -@@ -2615,9 +2615,9 @@ +--- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:32.456841257 -0800 ++++ mpi-1.8.6/mpi.c 2012-03-04 11:49:39.720925007 -0800 +@@ -2628,9 +2628,9 @@ /* }}} */ @@ -14,7 +14,7 @@ Index: mpi-1.8.6/mpi.c { int ix, pos = 0; -@@ -2648,7 +2648,7 @@ +@@ -2661,7 +2661,7 @@ } /* Generate digits, use capital letters */ @@ -23,7 +23,7 @@ Index: mpi-1.8.6/mpi.c str[pos++] = ch; } -@@ -2676,10 +2676,15 @@ +@@ -2689,10 +2689,15 @@ return MP_OKAY; @@ -42,8 +42,8 @@ Index: mpi-1.8.6/mpi.c int mp_char2value(char ch, int r) Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2011-12-10 12:05:35.000000000 -0800 -+++ mpi-1.8.6/mpi.h 2011-12-10 12:05:39.000000000 -0800 +--- mpi-1.8.6.orig/mpi.h 2012-03-04 11:49:32.196695007 -0800 ++++ mpi-1.8.6/mpi.h 2012-03-04 11:49:39.724927257 -0800 @@ -213,6 +213,7 @@ int mp_radix_size(mp_int *mp, int radix); int mp_value_radix_size(int num, int qty, int radix); -- cgit v1.2.3