remove some MP_8BIT remnants
This commit is contained in:
parent
99df8f7b25
commit
5c6391dd7c
@ -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)) {
|
||||
|
@ -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;
|
||||
|
12
tommath.h
12
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
|
||||
|
@ -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{\
|
||||
|
Loading…
Reference in New Issue
Block a user