gingerBill 10f4d8df32 Override libtommath allocation procedures 4 éve
..
LICENSE 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
README.md 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_2expt.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_abs.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_add.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_add_d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_addmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_and.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_clamp.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_clear.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_clear_multi.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_cmp.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_cmp_d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_cmp_mag.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_cnt_lsb.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_complement.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_copy.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_count_bits.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_cutoffs.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_div.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_div_2.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_div_2d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_div_d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_dr_is_modulus.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_dr_reduce.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_dr_setup.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_error_to_string.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_exch.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_expt_n.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_exptmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_exteuclid.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_fread.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_from_sbin.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_from_ubin.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_fwrite.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_gcd.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_double.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_i32.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_i64.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_l.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_mag_u32.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_mag_u64.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_get_mag_ul.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_grow.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_copy.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_i32.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_i64.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_l.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_multi.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_set.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_size.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_u32.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_u64.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_init_ul.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_invmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_is_square.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_kronecker.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_lcm.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_log_n.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_lshd.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mod_2d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_montgomery_calc_normalization.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_montgomery_reduce.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_montgomery_setup.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mul.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mul_2.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mul_2d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mul_d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_mulmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_neg.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_or.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_pack.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_pack_count.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_fermat.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_frobenius_underwood.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_is_prime.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_miller_rabin.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_next_prime.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_rabin_miller_trials.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_rand.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_prime_strong_lucas_selfridge.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_radix_size.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_radix_size_overestimate.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_rand.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_rand_source.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_read_radix.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_2k.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_2k_l.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_2k_setup.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_2k_setup_l.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_is_2k.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_is_2k_l.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_reduce_setup.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_root_n.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_rshd.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_sbin_size.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_double.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_i32.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_i64.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_l.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_u32.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_u64.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_set_ul.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_shrink.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_signed_rsh.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_sqrmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_sqrt.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_sqrtmod_prime.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_sub.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_sub_d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_submod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_to_radix.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_to_sbin.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_to_ubin.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_ubin_size.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_unpack.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_xor.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
mp_zero.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_add.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_copy_digs.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_div_3.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_div_recursive.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_div_school.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_div_small.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_exptmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_exptmod_fast.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_get_bit.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_invmod.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_invmod_odd.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_log.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_log_2expt.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_log_d.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_montgomery_reduce_comba.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul_balance.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul_comba.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul_high.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul_high_comba.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul_karatsuba.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_mul_toom.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_prime_is_divisible.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_prime_tab.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_radix_map.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_radix_size_overestimate.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_rand_platform.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_sqr.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_sqr_comba.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_sqr_karatsuba.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_sqr_toom.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_sub.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_zero_buf.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
s_mp_zero_digs.c 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
tommath.h 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
tommath_c89.h 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
tommath_class.h 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
tommath_cutoffs.h 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve
tommath_private.h 10f4d8df32 Override libtommath allocation procedures 4 éve
tommath_superclass.h 460e14e586 Change the compiler's big integer library to use libTomMath 4 éve

README.md

libtommath

This is the git repository for LibTomMath, a free open source portable number theoretic multiple-precision integer (MPI) library written entirely in C.

Build Status

Travis CI

master: Build Status

develop: Build Status

AppVeyor

master: Build status

develop: Build status

ABI Laboratory

API/ABI changes: check here

Summary

The develop branch contains the in-development version. Stable releases are tagged.

Documentation is built from the LaTeX file bn.tex. There is also limited documentation in tommath.h. There is also a document, tommath.pdf, which describes the goals of the project and many of the algorithms used.

The project can be build by using make. Along with the usual make, make clean and make install, there are several other build targets, see the makefile for details. There are also makefiles for certain specific platforms.

Testing

Tests are located in demo/ and can be built in two flavors.

  • make test creates a stand-alone test binary that executes several test routines.
  • make mtest_opponent creates a test binary that is intended to be run against mtest. mtest can be built with make mtest and test execution is done like ./mtest/mtest | ./mtest_opponent. mtest is creating test vectors using an alternative MPI library and test is consuming these vectors to verify correct behavior of ltm

Building and Installing

Building is straightforward for GNU Linux only, the section "Building LibTomMath" in the documentation in doc/bn.pdf has the details.