libtommath/tommath.def
Daniel Mendler 410bf49385
apply a series of simplifications
* this is the final commit of a series of simplifications,
  containing only the regenerated files and the explanation in the
  commit message

* This is in preparation of the size_t change/a potential representation change to use
  full width as in tfm, if a (partial?) merge with tfm is desired.
  These changes have their own merits however.

* Remove obfuscating tmpx digit pointers (fewer variables, it is more obvious what is
  being manipulated)

* Reduce scope of variables where possible

* Stricter error handling/checking (for example handling in karatsuba
  was broken)

* In some cases the result was written even in the case of an error
  (e.g. s_mp_is_divisible). This will hide bugs, since the user should
  check the return value (enforced by MP_WUR). Furthermore if the user
  accesses the non-initialized result, valgrind will complain for
  example. Global static analysis like coverity will also detect the issue.
  Therefore this improves the status quo.

* Introduce generic, private MP_EXCH macro which can be used to swap values.

* Introduce s_mp_copy_digs/s_mp_zero_digs/s_mp_zero_buf

* Some control flow simplifications, e.g, loops instead of goto

* Renamings of variables/labels for consistency

* Renamings of mul/sqr functions for more consistency, e.g., comba
  instead of fast suffix

* I didn't read through some very complex functions.
  They are so complex, I am too afraid and lazy to touch them.
  Maybe someone resposible wants to simplify them if possible. Hint... Hint...
  - mp_prime_strong_lucas_selfridge.c
  - s_mp_exptmod.c
  - s_mp_exptmod_fast.c
2019-11-04 15:41:33 +01:00

136 lines
2.3 KiB
Modula-2

; libtommath
;
; Use this command to produce a 32-bit .lib file, for use in any MSVC version
; lib -machine:X86 -name:libtommath.dll -def:tommath.def -out:tommath.lib
; Use this command to produce a 64-bit .lib file, for use in any MSVC version
; lib -machine:X64 -name:libtommath.dll -def:tommath.def -out:tommath.lib
;
EXPORTS
mp_2expt
mp_abs
mp_add
mp_add_d
mp_addmod
mp_and
mp_clamp
mp_clear
mp_clear_multi
mp_cmp
mp_cmp_d
mp_cmp_mag
mp_cnt_lsb
mp_complement
mp_copy
mp_count_bits
mp_cutoffs
mp_div
mp_div_2
mp_div_2d
mp_div_3
mp_div_d
mp_dr_is_modulus
mp_dr_reduce
mp_dr_setup
mp_error_to_string
mp_exch
mp_expt_u32
mp_exptmod
mp_exteuclid
mp_fread
mp_from_sbin
mp_from_ubin
mp_fwrite
mp_gcd
mp_get_double
mp_get_i32
mp_get_i64
mp_get_l
mp_get_ll
mp_get_mag_u32
mp_get_mag_u64
mp_get_mag_ul
mp_get_mag_ull
mp_grow
mp_init
mp_init_copy
mp_init_i32
mp_init_i64
mp_init_l
mp_init_ll
mp_init_multi
mp_init_set
mp_init_size
mp_init_u32
mp_init_u64
mp_init_ul
mp_init_ull
mp_invmod
mp_is_square
mp_kronecker
mp_lcm
mp_log_u32
mp_lshd
mp_mod
mp_mod_2d
mp_montgomery_calc_normalization
mp_montgomery_reduce
mp_montgomery_setup
mp_mul
mp_mul_2
mp_mul_2d
mp_mul_d
mp_mulmod
mp_neg
mp_or
mp_pack
mp_pack_count
mp_prime_fermat
mp_prime_frobenius_underwood
mp_prime_is_prime
mp_prime_miller_rabin
mp_prime_next_prime
mp_prime_rabin_miller_trials
mp_prime_rand
mp_prime_strong_lucas_selfridge
mp_prime_tab
mp_radix_size
mp_rand
mp_read_radix
mp_reduce
mp_reduce_2k
mp_reduce_2k_l
mp_reduce_2k_setup
mp_reduce_2k_setup_l
mp_reduce_is_2k
mp_reduce_is_2k_l
mp_reduce_setup
mp_root_u32
mp_rshd
mp_sbin_size
mp_set
mp_set_double
mp_set_i32
mp_set_i64
mp_set_l
mp_set_ll
mp_set_u32
mp_set_u64
mp_set_ul
mp_set_ull
mp_shrink
mp_signed_rsh
mp_sqr
mp_sqrmod
mp_sqrt
mp_sqrtmod_prime
mp_sub
mp_sub_d
mp_submod
mp_to_radix
mp_to_sbin
mp_to_ubin
mp_ubin_size
mp_unpack
mp_xor
mp_zero