Go to file
Daniel Mendler 5da4e0ac01
remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues
Wconversion and Wsign-conversion is still not activated by default,
since there are many issues in demo.c.
2019-04-05 10:52:39 +02:00
demo removed tracing 2019-04-04 12:55:39 +02:00
doc additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
etc fix format 2018-12-27 09:44:34 +01:00
logs update results when running the timing demo 2018-02-27 23:30:43 +01:00
mtest Merge pull request #146 from libtom/relicense_mtest 2019-01-08 12:00:45 +01:00
tombc added libtommath-0.35 2010-07-15 17:25:53 +02:00
.gitattributes improve build 2018-04-11 23:35:43 +02:00
.gitignore split test suite 2019-03-04 01:02:22 +01:00
.travis.yml partially port over valgrind test logic from ltc 2019-03-26 14:38:54 +01:00
astylerc format with astyle (step 1) 2017-08-30 20:09:49 +02:00
bn_error.c Update file headers 2018-12-29 17:56:20 +01:00
bn_fast_mp_invmod.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_fast_mp_montgomery_reduce.c Update file headers 2018-12-29 17:56:20 +01:00
bn_fast_s_mp_mul_digs.c Update file headers 2018-12-29 17:56:20 +01:00
bn_fast_s_mp_mul_high_digs.c Update file headers 2018-12-29 17:56:20 +01:00
bn_fast_s_mp_sqr.c explicit type-cast 2019-03-26 14:28:46 +01:00
bn_mp_2expt.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_abs.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_add_d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_add.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_addmod.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_and.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_clamp.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_clear_multi.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_clear.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_cmp_d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_cmp_mag.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_cmp.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_cnt_lsb.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_complement.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_copy.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_count_bits.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_decr.c corrected C&P induced problem 2019-04-04 07:58:19 +02:00
bn_mp_div_2.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_div_2d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_div_3.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_div_d.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_div.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_dr_is_modulus.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_dr_reduce.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_dr_setup.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_exch.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_export.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_expt_d_ex.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_expt_d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_exptmod_fast.c run make new_file 2019-01-15 17:05:39 +01:00
bn_mp_exptmod.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_exteuclid.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_fread.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_fwrite.c run make astyle 2019-04-04 07:58:07 +02:00
bn_mp_gcd.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_get_bit.c bug-fix in bn_mp_get_bit.c: handle overflow correctly 2019-03-26 14:29:51 +01:00
bn_mp_get_double.c leftover DIGIT() usage 2019-03-26 11:34:06 +01:00
bn_mp_get_int.c efficiency improvement in get/set routines 2019-03-26 15:39:30 +01:00
bn_mp_get_long_long.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_get_long.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_grow.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_import.c add missing const to cast 2019-03-29 10:40:25 +01:00
bn_mp_incr.c soothe compiler 2019-04-04 07:58:19 +02:00
bn_mp_init_copy.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_init_multi.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_init_set_int.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_init_set.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_init_size.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_init.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_invmod_slow.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_invmod.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_is_square.c leftover DIGIT() usage 2019-03-26 11:34:06 +01:00
bn_mp_iseven.c mp_iseven & mp_isodd becomes C functions 2019-02-02 07:39:23 +01:00
bn_mp_isodd.c mp_iseven & mp_isodd becomes C functions 2019-02-02 07:39:23 +01:00
bn_mp_jacobi.c refactor without macro mp_isneg 2019-02-02 07:39:23 +01:00
bn_mp_karatsuba_mul.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_karatsuba_sqr.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_kronecker.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_lcm.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_lshd.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_mod_2d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_mod_d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_mod.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_montgomery_calc_normalization.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_montgomery_reduce.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_montgomery_setup.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_mul_2.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_mul_2d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_mul_d.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_mul.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_mulmod.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_n_root_ex.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_n_root.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_neg.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_or.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_prime_fermat.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_prime_frobenius_underwood.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_prime_is_divisible.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_prime_is_prime.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_prime_miller_rabin.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_prime_next_prime.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_prime_rabin_miller_trials.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_prime_random_ex.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_prime_strong_lucas_selfridge.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_radix_size.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_radix_smap.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_rand.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_read_radix.c explicit operator precedence 2019-03-26 18:58:41 +01:00
bn_mp_read_signed_bin.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_read_unsigned_bin.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_2k_l.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_2k_setup_l.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_2k_setup.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_2k.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_is_2k_l.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_is_2k.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce_setup.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_reduce.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_rshd.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_set_double.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_set_int.c efficiency improvement in get/set routines 2019-03-26 15:39:30 +01:00
bn_mp_set_long_long.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_set_long.c remove mp_set_long specialization 2019-04-04 23:03:25 +02:00
bn_mp_set.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_shrink.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_signed_bin_size.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_sqr.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_sqrmod.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_sqrt.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_sqrtmod_prime.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_sub_d.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_mp_sub.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_submod.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_tc_and.c refactor without macro mp_isneg 2019-02-02 07:39:23 +01:00
bn_mp_tc_div_2d.c refactor without macro mp_isneg 2019-02-02 07:39:23 +01:00
bn_mp_tc_or.c refactor without macro mp_isneg 2019-02-02 07:39:23 +01:00
bn_mp_tc_xor.c explicit logical XOR 2019-03-05 02:58:07 +01:00
bn_mp_to_signed_bin_n.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_to_signed_bin.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_to_unsigned_bin_n.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_to_unsigned_bin.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_toom_mul.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_toom_sqr.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_toradix_n.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_toradix.c refactor with new macros IS_* 2019-02-02 07:39:23 +01:00
bn_mp_unsigned_bin_size.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_xor.c Update file headers 2018-12-29 17:56:20 +01:00
bn_mp_zero.c Update file headers 2018-12-29 17:56:20 +01:00
bn_prime_tab.c Update file headers 2018-12-29 17:56:20 +01:00
bn_reverse.c Update file headers 2018-12-29 17:56:20 +01:00
bn_s_mp_add.c Update file headers 2018-12-29 17:56:20 +01:00
bn_s_mp_exptmod.c Update file headers 2018-12-29 17:56:20 +01:00
bn_s_mp_mul_digs.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_s_mp_mul_high_digs.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bn_s_mp_sqr.c Update file headers 2018-12-29 17:56:20 +01:00
bn_s_mp_sub.c remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
bncore.c Update file headers 2018-12-29 17:56:20 +01:00
callgraph.txt additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
changes.txt update changes.txt 2019-01-28 20:21:04 +01:00
dep.pl how to create a minimized callgraph 2019-04-04 07:54:00 +02:00
gen.pl sanitize some Perl scripts 2017-04-09 01:04:07 +02:00
helper.pl add doc checking to helper.pl 2019-02-11 15:44:53 +01:00
libtommath_VS2008.sln make libtommath_VS2008 better upgradable to the newer visual studio 2018-12-08 11:56:08 +01:00
libtommath_VS2008.vcproj additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
libtommath.pc.in add pkg-config file for shared library 2017-05-09 14:25:11 +02:00
LICENSE Re-license 2018-12-27 15:41:16 +01:00
makefile additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
makefile_include.mk remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
makefile.mingw additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
makefile.msvc additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
makefile.shared additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
makefile.unix additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
pretty.build added libtommath-0.31 2010-07-15 17:25:45 +02:00
README.md added building howto for OpenBSD 2019-02-28 21:43:37 +01:00
testme.sh partially port over valgrind test logic from ltc 2019-03-26 14:38:54 +01:00
tommath_class.h additional functions mp_incr and mp_decr 2019-04-04 07:58:19 +02:00
tommath_private.h remove mp_set_long specialization 2019-04-04 23:03:25 +02:00
tommath_superclass.h Update file headers 2018-12-29 17:56:20 +01:00
tommath.h remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues 2019-04-05 10:52:39 +02:00
updatemakes.sh fixup updatemakes.sh 2018-12-02 21:18:10 +01:00

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

master: Build Status

develop: Build Status

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 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 | ./test. mtest is creating test vectors using an alternative MPI library and test is consuming these vectors to verify correct behavior of ltm
  • make test_standalone creates a stand-alone test binary that executes several test routines.

Building and Installing

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