LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C.
C TeX Perl Makefile Shell Assembly Other
Pull request Compare This branch is 27 commits behind develop.
Permalink
Failed to load latest commit information.
demo
etc Remove all traces of ulong64 as per comment by Karel M Feb 3, 2016
logs added libtommath-0.36 Jul 15, 2010
mtest mtest vs. test: add possibility to exit testing Oct 18, 2014
pics
pre_gen
tombc added libtommath-0.35 Jul 15, 2010
.gitignore update gitignore Jan 9, 2016
.travis.yml add notification for #libtom irc Dec 5, 2015
LICENSE
README.md update travis.yml and adjust README Dec 5, 2015
bn.tex consistent version numbers Feb 3, 2016
bn_error.c
bn_fast_mp_invmod.c provide tommath_private.h Nov 12, 2015
bn_fast_mp_montgomery_reduce.c remove register Dec 2, 2015
bn_fast_s_mp_mul_digs.c remove register Dec 2, 2015
bn_fast_s_mp_mul_high_digs.c
bn_fast_s_mp_sqr.c add parentheses for explicit operator association Dec 2, 2015
bn_mp_2expt.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_abs.c provide tommath_private.h Nov 12, 2015
bn_mp_add.c provide tommath_private.h Nov 12, 2015
bn_mp_add_d.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_addmod.c provide tommath_private.h Nov 12, 2015
bn_mp_and.c
bn_mp_clamp.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_clear.c provide tommath_private.h Nov 12, 2015
bn_mp_clear_multi.c
bn_mp_cmp.c
bn_mp_cmp_d.c provide tommath_private.h Nov 12, 2015
bn_mp_cmp_mag.c provide tommath_private.h Nov 12, 2015
bn_mp_cnt_lsb.c
bn_mp_copy.c
bn_mp_count_bits.c provide tommath_private.h Nov 12, 2015
bn_mp_div.c
bn_mp_div_2.c remove register Dec 2, 2015
bn_mp_div_2d.c
bn_mp_div_3.c provide tommath_private.h Nov 12, 2015
bn_mp_div_d.c
bn_mp_dr_is_modulus.c provide tommath_private.h Nov 12, 2015
bn_mp_dr_reduce.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_dr_setup.c provide tommath_private.h Nov 12, 2015
bn_mp_exch.c
bn_mp_export.c add parentheses for explicit operator association Dec 2, 2015
bn_mp_expt_d.c
bn_mp_expt_d_ex.c provide tommath_private.h Nov 12, 2015
bn_mp_exptmod.c
bn_mp_exptmod_fast.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_exteuclid.c provide tommath_private.h Nov 12, 2015
bn_mp_fread.c provide tommath_private.h Nov 12, 2015
bn_mp_fwrite.c provide tommath_private.h Nov 12, 2015
bn_mp_gcd.c
bn_mp_get_int.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_get_long.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_get_long_long.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_grow.c
bn_mp_import.c
bn_mp_init.c provide tommath_private.h Nov 12, 2015
bn_mp_init_copy.c provide tommath_private.h Nov 12, 2015
bn_mp_init_multi.c provide tommath_private.h Nov 12, 2015
bn_mp_init_set.c provide tommath_private.h Nov 12, 2015
bn_mp_init_set_int.c provide tommath_private.h Nov 12, 2015
bn_mp_init_size.c provide tommath_private.h Nov 12, 2015
bn_mp_invmod.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_invmod_slow.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_is_square.c provide tommath_private.h Nov 12, 2015
bn_mp_jacobi.c mp_jacobi: error-out until #44 is fixed Jan 12, 2016
bn_mp_karatsuba_mul.c remove register Dec 2, 2015
bn_mp_karatsuba_sqr.c
bn_mp_lcm.c provide tommath_private.h Nov 12, 2015
bn_mp_lshd.c remove register Dec 2, 2015
bn_mp_mod.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_mod_2d.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_mod_d.c provide tommath_private.h Nov 12, 2015
bn_mp_montgomery_calc_normalization.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_montgomery_reduce.c
bn_mp_montgomery_setup.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_mul.c
bn_mp_mul_2.c remove register Dec 2, 2015
bn_mp_mul_2d.c remove register Dec 2, 2015
bn_mp_mul_d.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_mulmod.c
bn_mp_n_root.c provide tommath_private.h Nov 12, 2015
bn_mp_n_root_ex.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_neg.c provide tommath_private.h Nov 12, 2015
bn_mp_or.c provide tommath_private.h Nov 12, 2015
bn_mp_prime_fermat.c
bn_mp_prime_is_divisible.c provide tommath_private.h Nov 12, 2015
bn_mp_prime_is_prime.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_prime_miller_rabin.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_prime_next_prime.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_prime_rabin_miller_trials.c provide tommath_private.h Nov 12, 2015
bn_mp_prime_random_ex.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_radix_size.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_radix_smap.c provide tommath_private.h Nov 12, 2015
bn_mp_rand.c provide tommath_private.h Nov 12, 2015
bn_mp_read_radix.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_read_signed_bin.c
bn_mp_read_unsigned_bin.c provide tommath_private.h Nov 12, 2015
bn_mp_reduce.c provide tommath_private.h Nov 12, 2015
bn_mp_reduce_2k.c provide tommath_private.h Nov 12, 2015
bn_mp_reduce_2k_l.c
bn_mp_reduce_2k_setup.c
bn_mp_reduce_2k_setup_l.c
bn_mp_reduce_is_2k.c provide tommath_private.h Nov 12, 2015
bn_mp_reduce_is_2k_l.c
bn_mp_reduce_setup.c provide tommath_private.h Nov 12, 2015
bn_mp_rshd.c
bn_mp_set.c provide tommath_private.h Nov 12, 2015
bn_mp_set_int.c provide tommath_private.h Nov 12, 2015
bn_mp_set_long.c provide tommath_private.h Nov 12, 2015
bn_mp_set_long_long.c provide tommath_private.h Nov 12, 2015
bn_mp_shrink.c provide tommath_private.h Nov 12, 2015
bn_mp_signed_bin_size.c provide tommath_private.h Nov 12, 2015
bn_mp_sqr.c
bn_mp_sqrmod.c provide tommath_private.h Nov 12, 2015
bn_mp_sqrt.c provide tommath_private.h Nov 12, 2015
bn_mp_sqrtmod_prime.c handle the return value of function Dec 2, 2015
bn_mp_sub.c
bn_mp_sub_d.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_submod.c provide tommath_private.h Nov 12, 2015
bn_mp_to_signed_bin.c
bn_mp_to_signed_bin_n.c provide tommath_private.h Nov 12, 2015
bn_mp_to_unsigned_bin.c
bn_mp_to_unsigned_bin_n.c provide tommath_private.h Nov 12, 2015
bn_mp_toom_mul.c provide tommath_private.h Nov 12, 2015
bn_mp_toom_sqr.c provide tommath_private.h Nov 12, 2015
bn_mp_toradix.c
bn_mp_toradix_n.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_unsigned_bin_size.c add parentheses for explicit operator precedence Dec 2, 2015
bn_mp_xor.c provide tommath_private.h Nov 12, 2015
bn_mp_zero.c provide tommath_private.h Nov 12, 2015
bn_prime_tab.c provide tommath_private.h Nov 12, 2015
bn_reverse.c provide tommath_private.h Nov 12, 2015
bn_s_mp_add.c remove register Dec 2, 2015
bn_s_mp_exptmod.c add parentheses for explicit operator precedence Dec 2, 2015
bn_s_mp_mul_digs.c add parentheses for explicit operator precedence Dec 2, 2015
bn_s_mp_mul_high_digs.c add parentheses for explicit operator precedence Dec 2, 2015
bn_s_mp_sqr.c add parentheses for explicit operator precedence Dec 2, 2015
bn_s_mp_sub.c remove register Dec 2, 2015
bncore.c provide tommath_private.h Nov 12, 2015
booker.pl Small fixes Dec 12, 2015
callgraph.txt
changes.txt
dep.pl dep.pl: add new type mp_min_u32 Sep 28, 2014
filter.pl
gen.pl trim trailing spaces Oct 14, 2014
genlist.sh add "updatemakes" from libtomcrypt Oct 13, 2014
libtommath.dsp
libtommath_VS2005.sln Added project and solution files for Visual Studio 2005 and Visual St… Jul 15, 2010
libtommath_VS2005.vcproj update makefiles Nov 24, 2013
libtommath_VS2008.sln Added project and solution files for Visual Studio 2005 and Visual St… Jul 15, 2010
libtommath_VS2008.vcproj update makefiles Nov 24, 2013
makefile convert line endings for the zip archive Feb 3, 2016
makefile.bcc update makefiles etc. Oct 30, 2015
makefile.cygwin_dll update makefiles etc. Oct 30, 2015
makefile.icc
makefile.include Simplify versioning to drop patch level Feb 2, 2016
makefile.msvc update makefiles etc. Oct 30, 2015
makefile.shared
mess.sh added libtommath-0.36 Jul 15, 2010
parsenames.pl add "updatemakes" from libtomcrypt Oct 13, 2014
poster.tex
pretty.build
testme.sh Small fixes Dec 12, 2015
tommath.h Remove all traces of ulong64 as per comment by Karel M Feb 3, 2016
tommath.src
tommath_class.h update makefiles etc. Oct 30, 2015
tommath_private.h use unsigned literal Dec 2, 2015
tommath_superclass.h added libtommath-0.36 Jul 15, 2010
updatemakes.sh

README.md

Build Status

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

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.

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.