Commit 5c6391dd7cec7d91036cbff23a12b936dc39329a

Daniel Mendler 2019-10-19T18:35:57

remove some MP_8BIT remnants

diff --git a/mp_prime_is_prime.c b/mp_prime_is_prime.c
index 75d44c5..1a61bb6 100644
--- a/mp_prime_is_prime.c
+++ b/mp_prime_is_prime.c
@@ -100,11 +100,6 @@ mp_err mp_prime_is_prime(const mp_int *a, int t, mp_bool *result)
     */
 #ifndef LTM_USE_ONLY_MR
    if (t >= 0) {
-      /*
-       * Use a Frobenius-Underwood test instead of the Lucas-Selfridge test for
-       * MP_8BIT (It is unknown if the Lucas-Selfridge test works with 16-bit
-       * integers but the necesssary analysis is on the todo-list).
-       */
 #ifdef LTM_USE_FROBENIUS_TEST
       err = mp_prime_frobenius_underwood(a, &res);
       if ((err != MP_OKAY) && (err != MP_ITER)) {
diff --git a/mp_prime_strong_lucas_selfridge.c b/mp_prime_strong_lucas_selfridge.c
index 6934336..895a481 100644
--- a/mp_prime_strong_lucas_selfridge.c
+++ b/mp_prime_strong_lucas_selfridge.c
@@ -52,7 +52,6 @@ mp_err mp_prime_strong_lucas_selfridge(const mp_int *a, mp_bool *result)
 {
    /* CZ TODO: choose better variable names! */
    mp_int Dz, gcd, Np1, Uz, Vz, U2mz, V2mz, Qmz, Q2mz, Qkdz, T1z, T2z, T3z, T4z, Q2kdz;
-   /* CZ TODO: Some of them need the full 32 bit, hence the (temporary) exclusion of MP_8BIT */
    int32_t D, Ds, J, sign, P, Q, r, s, u, Nbits;
    mp_err err;
    mp_bool oddness;
diff --git a/tommath.h b/tommath.h
index 29e9b20..0aac377 100644
--- a/tommath.h
+++ b/tommath.h
@@ -6,23 +6,11 @@
 
 #include <stdint.h>
 #include <stddef.h>
-#ifdef MP_8BIT
-#  error "Support of 8-bit architectures has been dropped in this version of LTM."
-#endif
-
 
 #ifndef MP_NO_FILE
 #  include <stdio.h>
 #endif
 
-#ifdef MP_8BIT
-#  ifdef _MSC_VER
-#    pragma message("8-bit (MP_8BIT) support is deprecated and will be dropped completely in the next version.")
-#  else
-#    warning "8-bit (MP_8BIT) support is deprecated and will be dropped completely in the next version."
-#  endif
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/tommath_private.h b/tommath_private.h
index c44c72a..45e0930 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -168,8 +168,6 @@ typedef private_mp_word mp_word;
 #ifndef MP_PREC
 #   ifndef MP_LOW_MEM
 #      define MP_PREC 32        /* default digits of precision */
-#   elif defined(MP_8BIT)
-#      define MP_PREC 16        /* default digits of precision */
 #   else
 #      define MP_PREC 8         /* default digits of precision */
 #   endif
@@ -219,11 +217,7 @@ extern MP_PRIVATE const uint8_t s_mp_rmap_reverse[];
 extern MP_PRIVATE const mp_digit s_mp_prime_tab[];
 
 /* number of primes */
-#ifdef MP_8BIT
-#  define MP_PRIME_TAB_SIZE 31
-#else
-#  define MP_PRIME_TAB_SIZE 256
-#endif
+#define MP_PRIME_TAB_SIZE 256
 
 #define MP_GET_ENDIANNESS(x) \
    do{\