Go to file
Steffen Jaeckel ef6d85a1a6 don't use rand() in mp_rand()
This fixes #103
2018-04-23 22:31:59 +02:00
demo fix timing & logs/*.png generation 2018-02-27 23:30:43 +01:00
doc clean-up file headers 2018-02-27 23:30:43 +01:00
etc fix type & cast 2018-02-13 19:04:31 +01:00
logs update results when running the timing demo 2018-02-27 23:30:43 +01:00
mtest run astyle 2017-12-06 16:30: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 remove pre_gen/mpi.c from repo 2018-04-11 23:35:43 +02:00
.travis.yml also run test vs mtest with real random data 2017-10-19 12:01:58 +02:00
astylerc format with astyle (step 1) 2017-08-30 20:09:49 +02:00
bn_error.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_fast_mp_invmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_fast_mp_montgomery_reduce.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_fast_s_mp_mul_digs.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_fast_s_mp_mul_high_digs.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_fast_s_mp_sqr.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_2expt.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_abs.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_add_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_add.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_addmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_and.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_clamp.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_clear_multi.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_clear.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_cmp_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_cmp_mag.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_cmp.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_cnt_lsb.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_copy.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_count_bits.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_div_2.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_div_2d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_div_3.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_div_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_div.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_dr_is_modulus.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_dr_reduce.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_dr_setup.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_exch.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_export.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_expt_d_ex.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_expt_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_exptmod_fast.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_exptmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_exteuclid.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_fread.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_fwrite.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_gcd.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_get_int.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_get_long_long.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_get_long.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_grow.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_import.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_init_copy.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_init_multi.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_init_set_int.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_init_set.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_init_size.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_init.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_invmod_slow.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_invmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_is_square.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_jacobi.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_karatsuba_mul.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_karatsuba_sqr.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_lcm.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_lshd.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mod_2d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mod_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_montgomery_calc_normalization.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_montgomery_reduce.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_montgomery_setup.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mul_2.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mul_2d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mul_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mul.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_mulmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_n_root_ex.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_n_root.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_neg.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_or.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_fermat.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_is_divisible.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_is_prime.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_miller_rabin.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_next_prime.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_rabin_miller_trials.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_prime_random_ex.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_radix_size.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_radix_smap.c auto-format bn_mp_radix_smap.c 2018-04-11 23:35:43 +02:00
bn_mp_rand.c don't use rand() in mp_rand() 2018-04-23 22:31:59 +02:00
bn_mp_read_radix.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_read_signed_bin.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_read_unsigned_bin.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_reduce_2k_l.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_reduce_2k_setup_l.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_reduce_2k_setup.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_reduce_2k.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_reduce_is_2k_l.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_reduce_is_2k.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_reduce_setup.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_reduce.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_rshd.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_set_int.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_set_long_long.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_set_long.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_set.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_shrink.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_signed_bin_size.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_sqr.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_sqrmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_sqrt.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_sqrtmod_prime.c literal suffix 2017-10-15 19:57:12 +02:00
bn_mp_sub_d.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_sub.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_submod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_to_signed_bin_n.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_to_signed_bin.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_to_unsigned_bin_n.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_to_unsigned_bin.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_toom_mul.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_toom_sqr.c Fix build on Solaris by using LBL_ERR instead of ERR 2018-04-11 13:46:35 -07:00
bn_mp_toradix_n.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_toradix.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_unsigned_bin_size.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_xor.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_mp_zero.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_prime_tab.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_reverse.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_s_mp_add.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_s_mp_exptmod.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_s_mp_mul_digs.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_s_mp_mul_high_digs.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_s_mp_sqr.c clean-up file headers 2018-02-27 23:30:43 +01:00
bn_s_mp_sub.c clean-up file headers 2018-02-27 23:30:43 +01:00
bncore.c clean-up file headers 2018-02-27 23:30:43 +01:00
callgraph.txt update callgraph 2017-08-28 17:04:18 +02:00
changes.txt fix date in changes.txt 2017-08-29 22:51:01 +02:00
dep.pl generate tommath_class.h with astyle format 2017-08-30 20:23:28 +02:00
filter.pl replace SVN tags 2017-08-28 17:00:58 +02:00
gen.pl sanitize some Perl scripts 2017-04-09 01:04:07 +02:00
genlist.sh replace SVN tags 2017-08-28 17:00:58 +02:00
libtommath_VS2005.sln Added project and solution files for Visual Studio 2005 and Visual Studio 2008. 2010-07-15 17:48:59 +02:00
libtommath_VS2005.vcproj update makefiles 2013-11-24 15:21:39 +01:00
libtommath_VS2008.sln Added project and solution files for Visual Studio 2005 and Visual Studio 2008. 2010-07-15 17:48:59 +02:00
libtommath_VS2008.vcproj update makefiles 2013-11-24 15:21:39 +01:00
libtommath.dsp added libtommath-0.41 2010-07-15 17:26:06 +02:00
libtommath.pc.in add pkg-config file for shared library 2017-05-09 14:25:11 +02:00
LICENSE after multiple objections of libtom users [1], we decided to change licensing 2011-01-19 10:21:45 +01:00
makefile improve build 2018-04-11 23:35:43 +02:00
makefile_include.mk rename timing demo 2018-02-27 23:30:43 +01:00
makefile.bcc update makefiles etc. 2015-10-30 18:04:33 -04:00
makefile.cygwin_dll update makefiles etc. 2015-10-30 18:04:33 -04:00
makefile.icc rename timing demo 2018-02-27 23:30:43 +01:00
makefile.msvc fix makefile.msvc 2018-02-27 23:30:43 +01:00
makefile.shared rename timing demo 2018-02-27 23:30:43 +01:00
mess.sh added libtommath-0.36 2010-07-15 17:25:56 +02:00
parsenames.pl replace SVN tags 2017-08-28 17:00:58 +02:00
pretty.build added libtommath-0.31 2010-07-15 17:25:45 +02:00
README.md update README.md 2018-04-11 23:35:43 +02:00
testme.sh also run test vs mtest with real random data 2017-10-19 12:01:58 +02:00
tommath_class.h refactor indentation of preprocessor directives 2017-08-30 20:09:16 +02:00
tommath_private.h clean-up file headers 2018-02-27 23:30:43 +01:00
tommath_superclass.h format with astyle (step 5) 2017-08-30 20:23:26 +02:00
tommath.h don't use rand() in mp_rand() 2018-04-23 22:31:59 +02:00
updatemakes.sh replace SVN tags 2017-08-28 17:00:58 +02: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.