diff --git a/.gitignore b/.gitignore index 2717a33..38b3426 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,8 @@ coverage*/ coverage.info # suppress output of build process and *nix/windows test executables -ltmtest -ltmtest.exe +timing +timing.exe test test.exe mtest diff --git a/bn_error.c b/bn_error.c index 7e816bf..24ce476 100644 --- a/bn_error.c +++ b/bn_error.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ static const struct { diff --git a/bn_fast_mp_invmod.c b/bn_fast_mp_invmod.c index 6be44f8..b44684a 100644 --- a/bn_fast_mp_invmod.c +++ b/bn_fast_mp_invmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes the modular inverse via binary extended euclidean algorithm, diff --git a/bn_fast_mp_montgomery_reduce.c b/bn_fast_mp_montgomery_reduce.c index 8f91196..2f94161 100644 --- a/bn_fast_mp_montgomery_reduce.c +++ b/bn_fast_mp_montgomery_reduce.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes xR**-1 == x (mod N) via Montgomery Reduction diff --git a/bn_fast_s_mp_mul_digs.c b/bn_fast_s_mp_mul_digs.c index e542c2e..99a8aa1 100644 --- a/bn_fast_s_mp_mul_digs.c +++ b/bn_fast_s_mp_mul_digs.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Fast (comba) multiplier diff --git a/bn_fast_s_mp_mul_high_digs.c b/bn_fast_s_mp_mul_high_digs.c index 6ea8a6c..cb0acb9 100644 --- a/bn_fast_s_mp_mul_high_digs.c +++ b/bn_fast_s_mp_mul_high_digs.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* this is a modified version of fast_s_mul_digs that only produces diff --git a/bn_fast_s_mp_sqr.c b/bn_fast_s_mp_sqr.c index 1050121..f7081de 100644 --- a/bn_fast_s_mp_sqr.c +++ b/bn_fast_s_mp_sqr.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* the jist of squaring... diff --git a/bn_mp_2expt.c b/bn_mp_2expt.c index 5333d48..6f6ee97 100644 --- a/bn_mp_2expt.c +++ b/bn_mp_2expt.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes a = 2**b diff --git a/bn_mp_abs.c b/bn_mp_abs.c index 9b6bcec..89eedb8 100644 --- a/bn_mp_abs.c +++ b/bn_mp_abs.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* b = |a| diff --git a/bn_mp_add.c b/bn_mp_add.c index d31d5a0..974cd34 100644 --- a/bn_mp_add.c +++ b/bn_mp_add.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* high level addition (handles signs) */ diff --git a/bn_mp_add_d.c b/bn_mp_add_d.c index e5ede1f..1132f0e 100644 --- a/bn_mp_add_d.c +++ b/bn_mp_add_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* single digit addition */ diff --git a/bn_mp_addmod.c b/bn_mp_addmod.c index 0d612c3..63d30ae 100644 --- a/bn_mp_addmod.c +++ b/bn_mp_addmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* d = a + b (mod c) */ diff --git a/bn_mp_and.c b/bn_mp_and.c index 09ff772..8776e2f 100644 --- a/bn_mp_and.c +++ b/bn_mp_and.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* AND two ints together */ diff --git a/bn_mp_clamp.c b/bn_mp_clamp.c index 79a5b20..36081be 100644 --- a/bn_mp_clamp.c +++ b/bn_mp_clamp.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* trim unused digits diff --git a/bn_mp_clear.c b/bn_mp_clear.c index fcf4d61..348872e 100644 --- a/bn_mp_clear.c +++ b/bn_mp_clear.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* clear one (frees) */ diff --git a/bn_mp_clear_multi.c b/bn_mp_clear_multi.c index ac3949a..aa9927f 100644 --- a/bn_mp_clear_multi.c +++ b/bn_mp_clear_multi.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #include diff --git a/bn_mp_cmp.c b/bn_mp_cmp.c index a33d483..a19ae86 100644 --- a/bn_mp_cmp.c +++ b/bn_mp_cmp.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* compare two ints (signed)*/ diff --git a/bn_mp_cmp_d.c b/bn_mp_cmp_d.c index 576a073..3bf0da3 100644 --- a/bn_mp_cmp_d.c +++ b/bn_mp_cmp_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* compare a digit */ diff --git a/bn_mp_cmp_mag.c b/bn_mp_cmp_mag.c index e2c723f..0aadac8 100644 --- a/bn_mp_cmp_mag.c +++ b/bn_mp_cmp_mag.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* compare maginitude of two ints (unsigned) */ diff --git a/bn_mp_cnt_lsb.c b/bn_mp_cnt_lsb.c index 219c369..d897a2f 100644 --- a/bn_mp_cnt_lsb.c +++ b/bn_mp_cnt_lsb.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ static const int lnz[16] = { diff --git a/bn_mp_copy.c b/bn_mp_copy.c index 17816e8..93474d5 100644 --- a/bn_mp_copy.c +++ b/bn_mp_copy.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* copy, b = a */ diff --git a/bn_mp_count_bits.c b/bn_mp_count_bits.c index 4530c92..8d1cafb 100644 --- a/bn_mp_count_bits.c +++ b/bn_mp_count_bits.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* returns the number of bits in an int */ diff --git a/bn_mp_div.c b/bn_mp_div.c index f64f485..3f75114 100644 --- a/bn_mp_div.c +++ b/bn_mp_div.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #ifdef BN_MP_DIV_SMALL diff --git a/bn_mp_div_2.c b/bn_mp_div_2.c index 2907a1b..683efec 100644 --- a/bn_mp_div_2.c +++ b/bn_mp_div_2.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* b = a/2 */ diff --git a/bn_mp_div_2d.c b/bn_mp_div_2d.c index aeaa8f2..2b0269e 100644 --- a/bn_mp_div_2d.c +++ b/bn_mp_div_2d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* shift right by a certain bit count (store quotient in c, optional remainder in d) */ diff --git a/bn_mp_div_3.c b/bn_mp_div_3.c index 9d41793..640288e 100644 --- a/bn_mp_div_3.c +++ b/bn_mp_div_3.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* divide by three (based on routine from MPI and the GMP manual) */ diff --git a/bn_mp_div_d.c b/bn_mp_div_d.c index 2124bcc..a0b85a5 100644 --- a/bn_mp_div_d.c +++ b/bn_mp_div_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ static int s_is_power_of_two(mp_digit b, int *p) diff --git a/bn_mp_dr_is_modulus.c b/bn_mp_dr_is_modulus.c index bf4ed8b..2efda5e 100644 --- a/bn_mp_dr_is_modulus.c +++ b/bn_mp_dr_is_modulus.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines if a number is a valid DR modulus */ diff --git a/bn_mp_dr_reduce.c b/bn_mp_dr_reduce.c index d677b03..096f23d 100644 --- a/bn_mp_dr_reduce.c +++ b/bn_mp_dr_reduce.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* reduce "x" in place modulo "n" using the Diminished Radix algorithm. diff --git a/bn_mp_dr_setup.c b/bn_mp_dr_setup.c index 32aa582..ecc6ee6 100644 --- a/bn_mp_dr_setup.c +++ b/bn_mp_dr_setup.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines the setup value */ diff --git a/bn_mp_exch.c b/bn_mp_exch.c index 2bc635f..141c3ae 100644 --- a/bn_mp_exch.c +++ b/bn_mp_exch.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* swap the elements of two integers, for cases where you can't simply swap the diff --git a/bn_mp_export.c b/bn_mp_export.c index 92a85d5..13818f4 100644 --- a/bn_mp_export.c +++ b/bn_mp_export.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* based on gmp's mpz_export. diff --git a/bn_mp_expt_d.c b/bn_mp_expt_d.c index f5ce3c1..7831aa5 100644 --- a/bn_mp_expt_d.c +++ b/bn_mp_expt_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* wrapper function for mp_expt_d_ex() */ diff --git a/bn_mp_expt_d_ex.c b/bn_mp_expt_d_ex.c index d363d59..7a6f161 100644 --- a/bn_mp_expt_d_ex.c +++ b/bn_mp_expt_d_ex.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* calculate c = a**b using a square-multiply algorithm */ diff --git a/bn_mp_exptmod.c b/bn_mp_exptmod.c index 934fd25..36fb20d 100644 --- a/bn_mp_exptmod.c +++ b/bn_mp_exptmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ diff --git a/bn_mp_exptmod_fast.c b/bn_mp_exptmod_fast.c index 52d4a55..091da31 100644 --- a/bn_mp_exptmod_fast.c +++ b/bn_mp_exptmod_fast.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85 diff --git a/bn_mp_exteuclid.c b/bn_mp_exteuclid.c index 29bad83..84e5202 100644 --- a/bn_mp_exteuclid.c +++ b/bn_mp_exteuclid.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Extended euclidean algorithm of (a, b) produces diff --git a/bn_mp_fread.c b/bn_mp_fread.c index 6922183..95011fc 100644 --- a/bn_mp_fread.c +++ b/bn_mp_fread.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #ifndef LTM_NO_FILE diff --git a/bn_mp_fwrite.c b/bn_mp_fwrite.c index 8541bc7..d7153e5 100644 --- a/bn_mp_fwrite.c +++ b/bn_mp_fwrite.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #ifndef LTM_NO_FILE diff --git a/bn_mp_gcd.c b/bn_mp_gcd.c index f5aa78b..5815016 100644 --- a/bn_mp_gcd.c +++ b/bn_mp_gcd.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Greatest Common Divisor using the binary method */ diff --git a/bn_mp_get_int.c b/bn_mp_get_int.c index d99a0a0..90f1bac 100644 --- a/bn_mp_get_int.c +++ b/bn_mp_get_int.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* get the lower 32-bits of an mp_int */ diff --git a/bn_mp_get_long.c b/bn_mp_get_long.c index 9ec2664..de9933f 100644 --- a/bn_mp_get_long.c +++ b/bn_mp_get_long.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* get the lower unsigned long of an mp_int, platform dependent */ diff --git a/bn_mp_get_long_long.c b/bn_mp_get_long_long.c index ffde373..0a3b5c0 100644 --- a/bn_mp_get_long_long.c +++ b/bn_mp_get_long_long.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* get the lower unsigned long long of an mp_int, platform dependent */ diff --git a/bn_mp_grow.c b/bn_mp_grow.c index 60f8f32..e62c192 100644 --- a/bn_mp_grow.c +++ b/bn_mp_grow.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* grow as required */ diff --git a/bn_mp_import.c b/bn_mp_import.c index 9bbd215..8f8b839 100644 --- a/bn_mp_import.c +++ b/bn_mp_import.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* based on gmp's mpz_import. diff --git a/bn_mp_init.c b/bn_mp_init.c index ad630e3..37d50a1 100644 --- a/bn_mp_init.c +++ b/bn_mp_init.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* init a new mp_int */ diff --git a/bn_mp_init_copy.c b/bn_mp_init_copy.c index 5681015..7f4c043 100644 --- a/bn_mp_init_copy.c +++ b/bn_mp_init_copy.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* creates "a" then copies b into it */ diff --git a/bn_mp_init_multi.c b/bn_mp_init_multi.c index 9ed777c..5dd0fb4 100644 --- a/bn_mp_init_multi.c +++ b/bn_mp_init_multi.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #include diff --git a/bn_mp_init_set.c b/bn_mp_init_set.c index e9c1b12..c91901b 100644 --- a/bn_mp_init_set.c +++ b/bn_mp_init_set.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* initialize and set a digit */ diff --git a/bn_mp_init_set_int.c b/bn_mp_init_set_int.c index 8e7441a..afeed8a 100644 --- a/bn_mp_init_set_int.c +++ b/bn_mp_init_set_int.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* initialize and set a digit */ diff --git a/bn_mp_init_size.c b/bn_mp_init_size.c index 35713ac..d3a32ea 100644 --- a/bn_mp_init_size.c +++ b/bn_mp_init_size.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* init an mp_init for a given size */ diff --git a/bn_mp_invmod.c b/bn_mp_invmod.c index 96717ea..879511c 100644 --- a/bn_mp_invmod.c +++ b/bn_mp_invmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* hac 14.61, pp608 */ diff --git a/bn_mp_invmod_slow.c b/bn_mp_invmod_slow.c index 360f161..bc12b3b 100644 --- a/bn_mp_invmod_slow.c +++ b/bn_mp_invmod_slow.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* hac 14.61, pp608 */ diff --git a/bn_mp_is_square.c b/bn_mp_is_square.c index 329d727..18d74b8 100644 --- a/bn_mp_is_square.c +++ b/bn_mp_is_square.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Check if remainders are possible squares - fast exclude non-squares */ diff --git a/bn_mp_jacobi.c b/bn_mp_jacobi.c index ef2e72f..d9739b0 100644 --- a/bn_mp_jacobi.c +++ b/bn_mp_jacobi.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes the jacobi c = (a | n) (or Legendre if n is prime) diff --git a/bn_mp_karatsuba_mul.c b/bn_mp_karatsuba_mul.c index 1a84211..a69f9d1 100644 --- a/bn_mp_karatsuba_mul.c +++ b/bn_mp_karatsuba_mul.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* c = |a| * |b| using Karatsuba Multiplication using diff --git a/bn_mp_karatsuba_sqr.c b/bn_mp_karatsuba_sqr.c index c566b06..4c4276b 100644 --- a/bn_mp_karatsuba_sqr.c +++ b/bn_mp_karatsuba_sqr.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Karatsuba squaring, computes b = a*a using three diff --git a/bn_mp_lcm.c b/bn_mp_lcm.c index 24b621c..82e1790 100644 --- a/bn_mp_lcm.c +++ b/bn_mp_lcm.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes least common multiple as |a*b|/(a, b) */ diff --git a/bn_mp_lshd.c b/bn_mp_lshd.c index b49b545..e2edce0 100644 --- a/bn_mp_lshd.c +++ b/bn_mp_lshd.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* shift left a certain amount of digits */ diff --git a/bn_mp_mod.c b/bn_mp_mod.c index 64e73ea..4da21c4 100644 --- a/bn_mp_mod.c +++ b/bn_mp_mod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* c = a mod b, 0 <= c < b if b > 0, b < c <= 0 if b < 0 */ diff --git a/bn_mp_mod_2d.c b/bn_mp_mod_2d.c index 7a74746..e8a15a0 100644 --- a/bn_mp_mod_2d.c +++ b/bn_mp_mod_2d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* calc a value mod 2**b */ diff --git a/bn_mp_mod_d.c b/bn_mp_mod_d.c index 9a24e78..adb4e2a 100644 --- a/bn_mp_mod_d.c +++ b/bn_mp_mod_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ int mp_mod_d(const mp_int *a, mp_digit b, mp_digit *c) diff --git a/bn_mp_montgomery_calc_normalization.c b/bn_mp_montgomery_calc_normalization.c index 360e3e5..048dbc7 100644 --- a/bn_mp_montgomery_calc_normalization.c +++ b/bn_mp_montgomery_calc_normalization.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* diff --git a/bn_mp_montgomery_reduce.c b/bn_mp_montgomery_reduce.c index e3a0eaa..ecaa046 100644 --- a/bn_mp_montgomery_reduce.c +++ b/bn_mp_montgomery_reduce.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes xR**-1 == x (mod N) via Montgomery Reduction */ diff --git a/bn_mp_montgomery_setup.c b/bn_mp_montgomery_setup.c index 75da42b..ddbee95 100644 --- a/bn_mp_montgomery_setup.c +++ b/bn_mp_montgomery_setup.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* setups the montgomery reduction stuff */ diff --git a/bn_mp_mul.c b/bn_mp_mul.c index babb12b..1db0e91 100644 --- a/bn_mp_mul.c +++ b/bn_mp_mul.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* high level multiplication (handles sign) */ diff --git a/bn_mp_mul_2.c b/bn_mp_mul_2.c index 7611536..55c1d5f 100644 --- a/bn_mp_mul_2.c +++ b/bn_mp_mul_2.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* b = a*2 */ diff --git a/bn_mp_mul_2d.c b/bn_mp_mul_2d.c index 96aef85..88bec99 100644 --- a/bn_mp_mul_2d.c +++ b/bn_mp_mul_2d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* shift left by a certain bit count */ diff --git a/bn_mp_mul_d.c b/bn_mp_mul_d.c index 13f94a2..4081c9b 100644 --- a/bn_mp_mul_d.c +++ b/bn_mp_mul_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* multiply by a digit */ diff --git a/bn_mp_mulmod.c b/bn_mp_mulmod.c index aeee4ee..14dc55f 100644 --- a/bn_mp_mulmod.c +++ b/bn_mp_mulmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* d = a * b (mod c) */ diff --git a/bn_mp_n_root.c b/bn_mp_n_root.c index a09804f..69569b6 100644 --- a/bn_mp_n_root.c +++ b/bn_mp_n_root.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* wrapper function for mp_n_root_ex() diff --git a/bn_mp_n_root_ex.c b/bn_mp_n_root_ex.c index 60c9929..e4ea8e5 100644 --- a/bn_mp_n_root_ex.c +++ b/bn_mp_n_root_ex.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* find the n'th root of an integer diff --git a/bn_mp_neg.c b/bn_mp_neg.c index 75f8bbd..bd28df8 100644 --- a/bn_mp_neg.c +++ b/bn_mp_neg.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* b = -a */ diff --git a/bn_mp_or.c b/bn_mp_or.c index f411509..1769117 100644 --- a/bn_mp_or.c +++ b/bn_mp_or.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* OR two ints together */ diff --git a/bn_mp_prime_fermat.c b/bn_mp_prime_fermat.c index e71e0ae..59b0082 100644 --- a/bn_mp_prime_fermat.c +++ b/bn_mp_prime_fermat.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* performs one Fermat test. diff --git a/bn_mp_prime_is_divisible.c b/bn_mp_prime_is_divisible.c index c49fdd2..b69a394 100644 --- a/bn_mp_prime_is_divisible.c +++ b/bn_mp_prime_is_divisible.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines if an integers is divisible by one diff --git a/bn_mp_prime_is_prime.c b/bn_mp_prime_is_prime.c index e97712d..aacd7a7 100644 --- a/bn_mp_prime_is_prime.c +++ b/bn_mp_prime_is_prime.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* performs a variable number of rounds of Miller-Rabin diff --git a/bn_mp_prime_miller_rabin.c b/bn_mp_prime_miller_rabin.c index 34c4d1c..77d2ee0 100644 --- a/bn_mp_prime_miller_rabin.c +++ b/bn_mp_prime_miller_rabin.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Miller-Rabin test of "a" to the base of "b" as described in diff --git a/bn_mp_prime_next_prime.c b/bn_mp_prime_next_prime.c index b106a74..f83e48d 100644 --- a/bn_mp_prime_next_prime.c +++ b/bn_mp_prime_next_prime.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* finds the next prime after the number "a" using "t" trials diff --git a/bn_mp_prime_rabin_miller_trials.c b/bn_mp_prime_rabin_miller_trials.c index cde309a..45fbb97 100644 --- a/bn_mp_prime_rabin_miller_trials.c +++ b/bn_mp_prime_rabin_miller_trials.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ diff --git a/bn_mp_prime_random_ex.c b/bn_mp_prime_random_ex.c index 1ae2934..ec926da 100644 --- a/bn_mp_prime_random_ex.c +++ b/bn_mp_prime_random_ex.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* makes a truly random prime of a given size (bits), diff --git a/bn_mp_radix_size.c b/bn_mp_radix_size.c index 29355cb..5f8af60 100644 --- a/bn_mp_radix_size.c +++ b/bn_mp_radix_size.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* returns size of ASCII reprensentation */ diff --git a/bn_mp_radix_smap.c b/bn_mp_radix_smap.c index 262775c..e1c7fbc 100644 --- a/bn_mp_radix_smap.c +++ b/bn_mp_radix_smap.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* chars used in radix conversions */ diff --git a/bn_mp_rand.c b/bn_mp_rand.c index 2ed665e..5e0c1b3 100644 --- a/bn_mp_rand.c +++ b/bn_mp_rand.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #if defined(MP_8BIT) || defined(MP_16BIT) diff --git a/bn_mp_read_radix.c b/bn_mp_read_radix.c index 55c5ee1..77dfe08 100644 --- a/bn_mp_read_radix.c +++ b/bn_mp_read_radix.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* read a string [ASCII] in a given radix */ diff --git a/bn_mp_read_signed_bin.c b/bn_mp_read_signed_bin.c index 17bc6ce..1b3f96d 100644 --- a/bn_mp_read_signed_bin.c +++ b/bn_mp_read_signed_bin.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* read signed bin, big endian, first byte is 0==positive or 1==negative */ diff --git a/bn_mp_read_unsigned_bin.c b/bn_mp_read_unsigned_bin.c index 6398c43..b42a356 100644 --- a/bn_mp_read_unsigned_bin.c +++ b/bn_mp_read_unsigned_bin.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* reads a unsigned char array, assumes the msb is stored first [big endian] */ diff --git a/bn_mp_reduce.c b/bn_mp_reduce.c index 5b1d405..ff7bfc5 100644 --- a/bn_mp_reduce.c +++ b/bn_mp_reduce.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* reduces x mod m, assumes 0 < x < m**2, mu is diff --git a/bn_mp_reduce_2k.c b/bn_mp_reduce_2k.c index e1e2bc8..e26ac9f 100644 --- a/bn_mp_reduce_2k.c +++ b/bn_mp_reduce_2k.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* reduces a modulo n where n is of the form 2**p - d */ diff --git a/bn_mp_reduce_2k_l.c b/bn_mp_reduce_2k_l.c index 23381bf..59d095e 100644 --- a/bn_mp_reduce_2k_l.c +++ b/bn_mp_reduce_2k_l.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* reduces a modulo n where n is of the form 2**p - d diff --git a/bn_mp_reduce_2k_setup.c b/bn_mp_reduce_2k_setup.c index e6ae839..8e158d4 100644 --- a/bn_mp_reduce_2k_setup.c +++ b/bn_mp_reduce_2k_setup.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines the setup value */ diff --git a/bn_mp_reduce_2k_setup_l.c b/bn_mp_reduce_2k_setup_l.c index af81b5b..a2debdd 100644 --- a/bn_mp_reduce_2k_setup_l.c +++ b/bn_mp_reduce_2k_setup_l.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines the setup value */ diff --git a/bn_mp_reduce_is_2k.c b/bn_mp_reduce_is_2k.c index f59d535..3b42138 100644 --- a/bn_mp_reduce_is_2k.c +++ b/bn_mp_reduce_is_2k.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines if mp_reduce_2k can be used */ diff --git a/bn_mp_reduce_is_2k_l.c b/bn_mp_reduce_is_2k_l.c index 22c7582..77fe1f9 100644 --- a/bn_mp_reduce_is_2k_l.c +++ b/bn_mp_reduce_is_2k_l.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* determines if reduce_2k_l can be used */ diff --git a/bn_mp_reduce_setup.c b/bn_mp_reduce_setup.c index 70e193a..d02ad6d 100644 --- a/bn_mp_reduce_setup.c +++ b/bn_mp_reduce_setup.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* pre-calculate the value required for Barrett reduction diff --git a/bn_mp_rshd.c b/bn_mp_rshd.c index fd06735..fef76d2 100644 --- a/bn_mp_rshd.c +++ b/bn_mp_rshd.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* shift right a certain amount of digits */ diff --git a/bn_mp_set.c b/bn_mp_set.c index 952d080..d065b3b 100644 --- a/bn_mp_set.c +++ b/bn_mp_set.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* set to a digit */ diff --git a/bn_mp_set_int.c b/bn_mp_set_int.c index 006f263..25ed219 100644 --- a/bn_mp_set_int.c +++ b/bn_mp_set_int.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* set a 32-bit const */ diff --git a/bn_mp_set_long.c b/bn_mp_set_long.c index 8cbb811..ea529d4 100644 --- a/bn_mp_set_long.c +++ b/bn_mp_set_long.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* set a platform dependent unsigned long int */ diff --git a/bn_mp_set_long_long.c b/bn_mp_set_long_long.c index 3566b45..9c7b0e0 100644 --- a/bn_mp_set_long_long.c +++ b/bn_mp_set_long_long.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* set a platform dependent unsigned long long int */ diff --git a/bn_mp_shrink.c b/bn_mp_shrink.c index 3e4dde0..b5898e8 100644 --- a/bn_mp_shrink.c +++ b/bn_mp_shrink.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* shrink a bignum */ diff --git a/bn_mp_signed_bin_size.c b/bn_mp_signed_bin_size.c index 1fdfd85..137d585 100644 --- a/bn_mp_signed_bin_size.c +++ b/bn_mp_signed_bin_size.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* get the size for an signed equivalent */ diff --git a/bn_mp_sqr.c b/bn_mp_sqr.c index a98f16c..668e4a1 100644 --- a/bn_mp_sqr.c +++ b/bn_mp_sqr.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* computes b = a*a */ diff --git a/bn_mp_sqrmod.c b/bn_mp_sqrmod.c index c3c7ec9..be4fcc2 100644 --- a/bn_mp_sqrmod.c +++ b/bn_mp_sqrmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* c = a * a (mod b) */ diff --git a/bn_mp_sqrt.c b/bn_mp_sqrt.c index d70c523..f25cd05 100644 --- a/bn_mp_sqrt.c +++ b/bn_mp_sqrt.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* this function is less generic than mp_n_root, simpler and faster */ diff --git a/bn_mp_sub.c b/bn_mp_sub.c index 19cb65e..c04e3a4 100644 --- a/bn_mp_sub.c +++ b/bn_mp_sub.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* high level subtraction (handles signs) */ diff --git a/bn_mp_sub_d.c b/bn_mp_sub_d.c index e5fbfff..92a1b0c 100644 --- a/bn_mp_sub_d.c +++ b/bn_mp_sub_d.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* single digit subtraction */ diff --git a/bn_mp_submod.c b/bn_mp_submod.c index c4db397..c27ad50 100644 --- a/bn_mp_submod.c +++ b/bn_mp_submod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* d = a - b (mod c) */ diff --git a/bn_mp_to_signed_bin.c b/bn_mp_to_signed_bin.c index 4d4be88..78b3e19 100644 --- a/bn_mp_to_signed_bin.c +++ b/bn_mp_to_signed_bin.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* store in signed [big endian] format */ diff --git a/bn_mp_to_signed_bin_n.c b/bn_mp_to_signed_bin_n.c index f1d7c8b..0fa5c7a 100644 --- a/bn_mp_to_signed_bin_n.c +++ b/bn_mp_to_signed_bin_n.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* store in signed [big endian] format */ diff --git a/bn_mp_to_unsigned_bin.c b/bn_mp_to_unsigned_bin.c index a53f711..fe9ba91 100644 --- a/bn_mp_to_unsigned_bin.c +++ b/bn_mp_to_unsigned_bin.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* store in unsigned [big endian] format */ diff --git a/bn_mp_to_unsigned_bin_n.c b/bn_mp_to_unsigned_bin_n.c index e7d303c..ea9f874 100644 --- a/bn_mp_to_unsigned_bin_n.c +++ b/bn_mp_to_unsigned_bin_n.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* store in unsigned [big endian] format */ diff --git a/bn_mp_toom_mul.c b/bn_mp_toom_mul.c index 00b6bfb..474ab41 100644 --- a/bn_mp_toom_mul.c +++ b/bn_mp_toom_mul.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* multiplication using the Toom-Cook 3-way algorithm diff --git a/bn_mp_toom_sqr.c b/bn_mp_toom_sqr.c index 183de20..4dc929a 100644 --- a/bn_mp_toom_sqr.c +++ b/bn_mp_toom_sqr.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* squaring using Toom-Cook 3-way algorithm */ diff --git a/bn_mp_toradix.c b/bn_mp_toradix.c index 7dd6e4f..d4c5a0a 100644 --- a/bn_mp_toradix.c +++ b/bn_mp_toradix.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* stores a bignum as a ASCII string in a given radix (2..64) */ diff --git a/bn_mp_toradix_n.c b/bn_mp_toradix_n.c index ef885fc..491fdca 100644 --- a/bn_mp_toradix_n.c +++ b/bn_mp_toradix_n.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* stores a bignum as a ASCII string in a given radix (2..64) diff --git a/bn_mp_unsigned_bin_size.c b/bn_mp_unsigned_bin_size.c index 2b9ce8a..313544b 100644 --- a/bn_mp_unsigned_bin_size.c +++ b/bn_mp_unsigned_bin_size.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* get the size for an unsigned equivalent */ diff --git a/bn_mp_xor.c b/bn_mp_xor.c index 9ebc53a..734f533 100644 --- a/bn_mp_xor.c +++ b/bn_mp_xor.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* XOR two ints together */ diff --git a/bn_mp_zero.c b/bn_mp_zero.c index 08aac2a..9e43f11 100644 --- a/bn_mp_zero.c +++ b/bn_mp_zero.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* set to zero */ diff --git a/bn_prime_tab.c b/bn_prime_tab.c index bcd23ed..97d44bc 100644 --- a/bn_prime_tab.c +++ b/bn_prime_tab.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ const mp_digit ltm_prime_tab[] = { diff --git a/bn_reverse.c b/bn_reverse.c index 71e3d03..729d32b 100644 --- a/bn_reverse.c +++ b/bn_reverse.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* reverse an array, used for radix code */ diff --git a/bn_s_mp_add.c b/bn_s_mp_add.c index 3f908ef..9810cb0 100644 --- a/bn_s_mp_add.c +++ b/bn_s_mp_add.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* low level addition, based on HAC pp.594, Algorithm 14.7 */ diff --git a/bn_s_mp_exptmod.c b/bn_s_mp_exptmod.c index a954757..ff67369 100644 --- a/bn_s_mp_exptmod.c +++ b/bn_s_mp_exptmod.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ #ifdef MP_LOW_MEM diff --git a/bn_s_mp_mul_digs.c b/bn_s_mp_mul_digs.c index 214ae31..f1bdbe3 100644 --- a/bn_s_mp_mul_digs.c +++ b/bn_s_mp_mul_digs.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* multiplies |a| * |b| and only computes upto digs digits of result diff --git a/bn_s_mp_mul_high_digs.c b/bn_s_mp_mul_high_digs.c index 3c0418a..485f962 100644 --- a/bn_s_mp_mul_high_digs.c +++ b/bn_s_mp_mul_high_digs.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* multiplies |a| * |b| and does not compute the lower digs digits diff --git a/bn_s_mp_sqr.c b/bn_s_mp_sqr.c index 71bbccd..d670907 100644 --- a/bn_s_mp_sqr.c +++ b/bn_s_mp_sqr.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */ diff --git a/bn_s_mp_sub.c b/bn_s_mp_sub.c index c8472af..2cd2807 100644 --- a/bn_s_mp_sub.c +++ b/bn_s_mp_sub.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */ diff --git a/bncore.c b/bncore.c index cfd19f0..3596313 100644 --- a/bncore.c +++ b/bncore.c @@ -11,8 +11,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Known optimal configurations diff --git a/demo/timing.c b/demo/timing.c index d22e471..78fce1e 100644 --- a/demo/timing.c +++ b/demo/timing.c @@ -137,7 +137,7 @@ int main(void) } while (++rr < 100000u); printf("Adding\t\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n", mp_count_bits(&a), CLK_PER_SEC / tt, tt); - FPRINTF(log, "%d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt); + FPRINTF(log, "%6d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt); FFLUSH(log); } FCLOSE(log); @@ -159,7 +159,7 @@ int main(void) printf("Subtracting\t\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n", mp_count_bits(&a), CLK_PER_SEC / tt, tt); - FPRINTF(log, "%d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt); + FPRINTF(log, "%6d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt); FFLUSH(log); } FCLOSE(log); @@ -194,7 +194,7 @@ int main(void) } while (++rr < 100u); printf("Multiplying\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n", mp_count_bits(&a), CLK_PER_SEC / tt, tt); - FPRINTF(log, "%d %9" PRIu64 "\n", mp_count_bits(&a), tt); + FPRINTF(log, "%6d %9" PRIu64 "\n", mp_count_bits(&a), tt); FFLUSH(log); } FCLOSE(log); @@ -214,7 +214,7 @@ int main(void) } while (++rr < 100u); printf("Squaring\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n", mp_count_bits(&a), CLK_PER_SEC / tt, tt); - FPRINTF(log, "%d %9" PRIu64 "\n", mp_count_bits(&a), tt); + FPRINTF(log, "%6d %9" PRIu64 "\n", mp_count_bits(&a), tt); FFLUSH(log); } FCLOSE(log); @@ -290,8 +290,8 @@ int main(void) } printf("Exponentiating\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n", mp_count_bits(&a), CLK_PER_SEC / tt, tt); - FPRINTF((n < 4) ? logd : (n < 9) ? logc : (n < 16) ? logb : log, - "%d %9" PRIu64 "\n", mp_count_bits(&a), tt); + FPRINTF((n < 3) ? logd : (n < 9) ? logc : (n < 16) ? logb : log, + "%6d %9" PRIu64 "\n", mp_count_bits(&a), tt); } } FCLOSE(log); @@ -326,7 +326,7 @@ int main(void) } printf("Inverting mod\t%4d-bit => %9" PRIu64 "/sec, %9" PRIu64 " cycles\n", mp_count_bits(&a), CLK_PER_SEC / tt, tt); - FPRINTF(log, "%d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt); + FPRINTF(log, "%6d %9" PRIu64 "\n", cnt * DIGIT_BIT, tt); } FCLOSE(log); diff --git a/doc/bn.tex b/doc/bn.tex index 4f1724d..b3618e3 100644 --- a/doc/bn.tex +++ b/doc/bn.tex @@ -50,7 +50,7 @@ \frontmatter \pagestyle{empty} \title{LibTomMath User Manual \\ v1.0.1} -\author{Tom St Denis \\ tstdenis82@gmail.com} +\author{LibTom Projects \\ www.libtom.net} \maketitle This text, the library and the accompanying textbook are all hereby placed in the public domain. This book has been formatted for B5 [176x250] paper using the \LaTeX{} {\em book} macro package. @@ -60,6 +60,9 @@ formatted for B5 [176x250] paper using the \LaTeX{} {\em book} macro package. \begin{flushright}Open Source. Open Academia. Open Minds. \mbox{ } +LibTom Projects + +\& originally Tom St Denis, diff --git a/logs/Makefile b/logs/Makefile new file mode 100644 index 0000000..c2ebaf7 --- /dev/null +++ b/logs/Makefile @@ -0,0 +1,2 @@ +all: + gnuplot graphs.dem diff --git a/logs/add.log b/logs/add.log index 43503ac..0ed7b70 100644 --- a/logs/add.log +++ b/logs/add.log @@ -1,16 +1,16 @@ -480 87 -960 111 -1440 135 -1920 159 -2400 200 -2880 224 -3360 248 -3840 272 -4320 296 -4800 320 -5280 344 -5760 368 -6240 392 -6720 416 -7200 440 -7680 464 + 480 48 + 960 61 + 1440 82 + 1920 97 + 2400 106 + 2880 112 + 3360 127 + 3840 130 + 4320 146 + 4800 157 + 5280 174 + 5760 185 + 6240 200 + 6720 214 + 7200 230 + 7680 244 diff --git a/logs/addsub.png b/logs/addsub.png index a5679ac..b8ffef7 100644 Binary files a/logs/addsub.png and b/logs/addsub.png differ diff --git a/logs/expt.log b/logs/expt.log index 70932ab..2e5ee30 100644 --- a/logs/expt.log +++ b/logs/expt.log @@ -1,7 +1,7 @@ -513 1435869 -769 3544970 -1025 7791638 -2049 46902238 -2561 85334899 -3073 141451412 -4097 308770310 + 513 446633 + 769 1110301 + 1025 2414927 + 2049 14870787 + 2561 26299761 + 3073 44323310 + 4097 98934292 diff --git a/logs/expt.png b/logs/expt.png index 9ee8bb7..27c53ee 100644 Binary files a/logs/expt.png and b/logs/expt.png differ diff --git a/logs/expt_2k.log b/logs/expt_2k.log index 97d325f..140b92f 100644 --- a/logs/expt_2k.log +++ b/logs/expt_2k.log @@ -1,5 +1,6 @@ -607 2109225 -1279 10148314 -2203 34126877 -3217 82716424 -4253 161569606 + 521 533515 + 607 675230 + 1279 2560713 + 2203 7468422 + 3217 17314246 + 4253 33899969 diff --git a/logs/expt_2kl.log b/logs/expt_2kl.log index d9ad4be..1dc495f 100644 --- a/logs/expt_2kl.log +++ b/logs/expt_2kl.log @@ -1,4 +1,3 @@ -1024 7705271 -2048 34286851 -4096 165207491 -521 1618631 + 1024 2210287 + 2048 7940364 + 4096 35903891 diff --git a/logs/expt_dr.log b/logs/expt_dr.log index c6bbe07..3752ea8 100644 --- a/logs/expt_dr.log +++ b/logs/expt_dr.log @@ -1,7 +1,7 @@ -532 1928550 -784 3763908 -1036 7564221 -1540 16566059 -2072 32283784 -3080 79851565 -4116 157843530 + 532 642330 + 784 1138699 + 1036 1972796 + 1540 3912241 + 2072 7075836 + 3080 16420867 + 4116 32477173 diff --git a/logs/graphs.dem b/logs/graphs.dem index dfaf613..538e5c0 100644 --- a/logs/graphs.dem +++ b/logs/graphs.dem @@ -1,5 +1,4 @@ set terminal png -set size 1.75 set ylabel "Cycles per Operation" set xlabel "Operand size (bits)" diff --git a/logs/invmod.log b/logs/invmod.log index e69de29..7d22449 100644 --- a/logs/invmod.log +++ b/logs/invmod.log @@ -0,0 +1,8 @@ + 240 58197 + 480 86617 + 720 255279 + 960 399626 + 1200 533330 + 1440 470046 + 1680 906754 + 1920 1132009 diff --git a/logs/invmod.png b/logs/invmod.png index 0a8a4ad..5c09e90 100644 Binary files a/logs/invmod.png and b/logs/invmod.png differ diff --git a/logs/mult.log b/logs/mult.log index 33563fc..841b40b 100644 --- a/logs/mult.log +++ b/logs/mult.log @@ -1,84 +1,84 @@ -271 555 -390 855 -508 1161 -631 1605 -749 2117 -871 2687 -991 3329 -1108 4084 -1231 4786 -1351 5624 -1470 6392 -1586 7364 -1710 8218 -1830 9255 -1951 10217 -2067 11461 -2191 12463 -2308 13677 -2430 14800 -2551 16232 -2671 17460 -2791 18899 -2902 20247 -3028 21902 -3151 23240 -3267 24927 -3391 26441 -3511 28277 -3631 29838 -3749 31751 -3869 33673 -3989 35431 -4111 37518 -4231 39426 -4349 41504 -4471 43567 -4591 45786 -4711 47876 -4831 50299 -4951 52427 -5071 54785 -5189 57241 -5307 59730 -5431 62194 -5551 64761 -5670 67322 -5789 70073 -5907 72663 -6030 75437 -6151 78242 -6268 81202 -6389 83948 -6509 86985 -6631 89903 -6747 93184 -6869 96044 -6991 99286 -7109 102395 -7229 105917 -7351 108940 -7470 112490 -7589 115702 -7711 119508 -7831 122632 -7951 126410 -8071 129808 -8190 133895 -8311 137146 -8431 141218 -8549 144732 -8667 149131 -8790 152462 -8911 156754 -9030 160479 -9149 165138 -9271 168601 -9391 173185 -9511 176988 -9627 181976 -9751 185539 -9870 190388 -9991 194335 -10110 199605 -10228 203298 + 240 114 + 360 182 + 480 273 + 600 364 + 717 471 + 840 597 + 960 737 + 1080 881 + 1196 1041 + 1318 1215 + 1438 1405 + 1559 1600 + 1679 1812 + 1800 2045 + 1918 2289 + 2040 2534 + 2160 2800 + 2280 3067 + 2397 3375 + 2520 3678 + 2640 4007 + 2759 4325 + 2880 4851 + 3000 5200 + 3117 5557 + 3239 5938 + 3356 6332 + 3480 6741 + 3600 7168 + 3720 7597 + 3840 8054 + 3960 8514 + 4079 8956 + 4198 9451 + 4320 9976 + 4440 10457 + 4560 10973 + 4679 11535 + 4797 12085 + 4920 12639 + 5040 13235 + 5160 13832 + 5279 14454 + 5400 15063 + 5519 15657 + 5640 16339 + 5760 16992 + 5879 17676 + 6000 18380 + 6120 18022 + 6237 18567 + 6360 19259 + 6479 19929 + 6599 20686 + 6719 21180 + 6840 22121 + 6960 22741 + 7080 23664 + 7200 24315 + 7320 25107 + 7439 25945 + 7560 26557 + 7680 27527 + 7799 28341 + 7920 30761 + 8040 31648 + 8159 32628 + 8280 33498 + 8400 34508 + 8520 33657 + 8640 34566 + 8758 35203 + 8878 36356 + 9000 37379 + 9119 38072 + 9240 39390 + 9360 48931 + 9475 66682 + 9600 72564 + 9719 51493 + 9840 52637 + 9960 48247 + 10080 49030 + 10195 50592 diff --git a/logs/mult.png b/logs/mult.png index 4f7a4ee..9681183 100644 Binary files a/logs/mult.png and b/logs/mult.png differ diff --git a/logs/mult_kara.log b/logs/mult_kara.log index 7136c79..91b59cb 100644 --- a/logs/mult_kara.log +++ b/logs/mult_kara.log @@ -1,84 +1,84 @@ -271 560 -391 870 -511 1159 -631 1605 -750 2111 -871 2737 -991 3361 -1111 4054 -1231 4778 -1351 5600 -1471 6404 -1591 7323 -1710 8255 -1831 9239 -1948 10257 -2070 11397 -2190 12531 -2308 13665 -2429 14870 -2550 16175 -2671 17539 -2787 18879 -2911 20350 -3031 21807 -3150 23415 -3270 24897 -3388 26567 -3511 28205 -3627 30076 -3751 31744 -3869 33657 -3991 35425 -4111 37522 -4229 39363 -4351 41503 -4470 43491 -4590 45827 -4711 47795 -4828 50166 -4951 52318 -5070 54911 -5191 57036 -5308 58237 -5431 60248 -5551 62678 -5671 64786 -5791 67294 -5908 69343 -6031 71607 -6151 74166 -6271 76590 -6391 78734 -6511 81175 -6631 83742 -6750 86403 -6868 88873 -6990 91150 -7110 94211 -7228 96922 -7351 99445 -7469 102216 -7589 104968 -7711 108113 -7827 110758 -7950 113714 -8071 116511 -8186 119643 -8310 122679 -8425 125581 -8551 128715 -8669 131778 -8788 135116 -8910 138138 -9031 141628 -9148 144754 -9268 148367 -9391 151551 -9511 155033 -9631 158652 -9751 162125 -9871 165248 -9988 168627 -10111 172427 -10231 176412 + 240 133 + 360 250 + 474 396 + 599 585 + 720 637 + 840 1045 + 960 1212 + 1080 1543 + 1196 1780 + 1320 2005 + 1436 2274 + 1560 2446 + 1680 1985 + 1800 2368 + 1920 2791 + 2038 3620 + 2160 3763 + 2278 3444 + 2400 4158 + 2516 5869 + 2640 6368 + 2753 5384 + 2876 7449 + 3000 6471 + 3114 8540 + 3240 7217 + 3360 9685 + 3476 6759 + 3599 8518 + 3714 8911 + 3840 12345 + 3960 9787 + 4079 11018 + 4196 12033 + 4319 12740 + 4440 12471 + 4558 15251 + 4678 13353 + 4798 15998 + 4920 13395 + 5040 13699 + 5160 14552 + 5280 14972 + 5400 15825 + 5520 16512 + 5639 17379 + 5757 17596 + 5879 18350 + 6000 18976 + 6115 19601 + 6240 20076 + 6354 20515 + 6480 21670 + 6600 22312 + 6716 22647 + 6839 23437 + 6960 24164 + 7080 24723 + 7199 25454 + 7320 26092 + 7440 26912 + 7557 27521 + 7677 28015 + 7800 28885 + 7919 29483 + 8040 30115 + 8160 31236 + 8280 31975 + 8400 30835 + 8520 31565 + 8639 32380 + 8760 32760 + 8879 33590 + 8996 34553 + 9119 35185 + 9239 36146 + 9358 36815 + 9480 39630 + 9596 43022 + 9720 41219 + 9840 41596 + 9960 42354 + 10080 43352 + 10200 43915 diff --git a/logs/sqr.log b/logs/sqr.log index cd29fc5..93234a1 100644 --- a/logs/sqr.log +++ b/logs/sqr.log @@ -1,84 +1,84 @@ -265 562 -389 882 -509 1207 -631 1572 -750 1990 -859 2433 -991 2894 -1109 3555 -1230 4228 -1350 5018 -1471 5805 -1591 6579 -1709 7415 -1829 8329 -1949 9225 -2071 10139 -2188 11239 -2309 12178 -2431 13212 -2551 14294 -2671 15551 -2791 16512 -2911 17718 -3030 18876 -3150 20259 -3270 21374 -3391 22650 -3511 23948 -3631 25493 -3750 26756 -3870 28225 -3989 29705 -4110 31409 -4230 32834 -4351 34327 -4471 35818 -4591 37636 -4711 39228 -4830 40868 -4949 42393 -5070 44541 -5191 46269 -5310 48162 -5429 49728 -5548 51985 -5671 53948 -5791 55885 -5910 57584 -6031 60082 -6150 62239 -6270 64309 -6390 66014 -6511 68766 -6631 71012 -6750 73172 -6871 74952 -6991 77909 -7111 80371 -7231 82666 -7351 84531 -7469 87698 -7589 90318 -7711 225384 -7830 232428 -7950 240009 -8070 246522 -8190 253662 -8310 260961 -8431 269253 -8549 275743 -8671 283769 -8789 290811 -8911 300034 -9030 306873 -9149 315085 -9270 323944 -9390 332390 -9508 337519 -9631 348986 -9749 356904 -9871 367013 -9989 373831 -10108 381033 -10230 393475 + 240 114 + 359 174 + 478 241 + 600 311 + 720 399 + 840 494 + 960 599 + 1080 799 + 1200 931 + 1320 911 + 1440 1016 + 1560 1143 + 1680 1281 + 1800 1459 + 1918 1617 + 2039 1763 + 2159 1913 + 2279 2071 + 2399 2240 + 2518 2412 + 2640 2600 + 2760 2792 + 2877 3008 + 2999 3220 + 3119 3405 + 3239 3637 + 3359 3859 + 3480 4094 + 3600 4328 + 3717 4571 + 3838 4840 + 3960 5098 + 4080 5349 + 4200 5617 + 4320 5891 + 4440 6147 + 4560 6444 + 4680 6745 + 4800 7057 + 4918 7317 + 5039 7637 + 5160 12833 + 5280 10098 + 5397 8666 + 5520 8999 + 5639 9376 + 5758 9727 + 5880 9996 + 6000 10427 + 6118 10868 + 6240 12218 + 6359 14010 + 6478 14838 + 6593 16135 + 6719 16503 + 6840 13267 + 6960 13648 + 7080 14118 + 7199 14525 + 7320 14803 + 7439 15378 + 7558 15871 + 7680 57530 + 7800 59550 + 7916 61091 + 8039 63004 + 8160 61136 + 8279 62803 + 8398 68671 + 8520 71001 + 8638 71537 + 8759 74757 + 8880 77164 + 9000 78963 + 9119 80982 + 9239 83142 + 9357 85292 + 9480 88190 + 9600 90343 + 9718 86710 + 9840 88818 + 9954 91034 + 10079 93350 + 10197 95592 diff --git a/logs/sqr_kara.log b/logs/sqr_kara.log index 06355a7..da10897 100644 --- a/logs/sqr_kara.log +++ b/logs/sqr_kara.log @@ -1,84 +1,84 @@ -271 560 -388 878 -511 1179 -629 1625 -751 1988 -871 2423 -989 2896 -1111 3561 -1231 4209 -1350 5015 -1470 5804 -1591 6556 -1709 7420 -1831 8263 -1951 9173 -2070 10153 -2191 11229 -2310 12167 -2431 13211 -2550 14309 -2671 15524 -2788 16525 -2910 17712 -3028 18822 -3148 20220 -3271 21343 -3391 22652 -3511 23944 -3630 25485 -3750 26778 -3868 28201 -3990 29653 -4111 31393 -4225 32841 -4350 34328 -4471 35786 -4590 37652 -4711 39245 -4830 40876 -4951 42433 -5068 44547 -5191 46321 -5311 48140 -5430 49727 -5550 52034 -5671 53954 -5791 55921 -5908 57597 -6031 60084 -6148 62226 -6270 64295 -6390 66045 -6511 68779 -6629 71003 -6751 73169 -6871 74992 -6991 77895 -7110 80376 -7231 82628 -7351 84468 -7470 87664 -7591 90284 -7711 91352 -7828 93995 -7950 96276 -8071 98691 -8190 101256 -8308 103631 -8431 105222 -8550 108343 -8671 110281 -8787 112764 -8911 115397 -9031 117690 -9151 120266 -9271 122715 -9391 124624 -9510 127937 -9630 130313 -9750 132914 -9871 136129 -9991 138517 -10108 141525 -10231 144225 + 240 115 + 360 175 + 480 241 + 600 312 + 719 397 + 839 494 + 960 597 + 1080 696 + 1200 794 + 1320 908 + 1439 1022 + 1560 1141 + 1678 1284 + 1797 1461 + 1918 1590 + 2040 1764 + 2160 1911 + 2278 2072 + 2399 2263 + 2516 2425 + 2640 2627 + 2756 2809 + 2880 3017 + 3000 3220 + 3119 3413 + 3239 3627 + 3359 3864 + 3479 4087 + 3600 4327 + 3720 4603 + 3840 4867 + 3957 5095 + 4079 5079 + 4200 5623 + 4319 5878 + 4439 6177 + 4560 6467 + 4679 6749 + 4800 7056 + 4920 7384 + 5039 7681 + 5159 8004 + 5280 8332 + 5399 8664 + 5520 8929 + 5638 9340 + 5760 9631 + 5879 10109 + 5999 10458 + 6118 10816 + 6240 11215 + 6359 11550 + 6478 11958 + 6600 12390 + 6718 12801 + 6838 13197 + 6959 13609 + 7079 14033 + 7199 16182 + 7320 16539 + 7440 16952 + 7559 16255 + 7679 17593 + 7800 17107 + 7920 17362 + 8037 17723 + 8159 18072 + 8280 19804 + 8399 18966 + 8519 19510 + 8640 19958 + 8760 20364 + 8878 20674 + 9000 21682 + 9120 21665 + 9237 21945 + 9359 22394 + 9480 23105 + 9598 23334 + 9718 25301 + 9840 26053 + 9960 26565 + 10079 26812 + 10200 27300 diff --git a/logs/sub.log b/logs/sub.log index 9f84fa2..87c0160 100644 --- a/logs/sub.log +++ b/logs/sub.log @@ -1,16 +1,16 @@ -480 94 -960 116 -1440 140 -1920 164 -2400 205 -2880 229 -3360 253 -3840 277 -4320 299 -4800 321 -5280 345 -5760 371 -6240 395 -6720 419 -7200 441 -7680 465 + 480 36 + 960 51 + 1440 64 + 1920 78 + 2400 90 + 2880 105 + 3360 118 + 3840 133 + 4320 146 + 4800 161 + 5280 182 + 5760 201 + 6240 201 + 6720 214 + 7200 228 + 7680 243 diff --git a/makefile b/makefile index 5eddae4..a6f7690 100644 --- a/makefile +++ b/makefile @@ -67,17 +67,17 @@ $(LIBNAME): $(OBJECTS) # So far I've seen improvements in the MP math profiled: make CFLAGS="$(CFLAGS) -fprofile-arcs -DTESTING" timing - ./ltmtest - rm -f *.a *.o ltmtest + ./timing + rm -f *.a *.o timing make CFLAGS="$(CFLAGS) -fbranch-probabilities" #make a single object profiled library profiled_single: perl gen.pl $(CC) $(CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o - $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -lgcov -o ltmtest - ./ltmtest - rm -f *.o ltmtest + $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -lgcov -o timing + ./timing + rm -f *.o timing $(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o $(AR) $(ARFLAGS) $(LIBNAME) mpi.o ranlib $(LIBNAME) @@ -102,8 +102,8 @@ test_standalone: $(LIBNAME) demo/demo.o mtest: cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LFLAGS) -o mtest -timing: $(LIBNAME) - $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) $(LFLAGS) -o ltmtest +timing: $(LIBNAME) demo/timing.c + $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) $(LFLAGS) -o timing # You have to create a file .coveralls.yml with the content "repo_token: " # in the base folder to be able to submit to coveralls @@ -131,6 +131,8 @@ zipup: clean pre_gen new_file manual poster docs rm -rf libtommath-$(VERSION) ltm-$(VERSION).* @# files/dirs excluded from "git archive" are defined in .gitattributes git archive --format=tar --prefix=libtommath-$(VERSION)/ HEAD | tar x + @echo 'fixme check' + -@(find libtommath-$(VERSION)/ -type f | xargs grep 'FIXM[E]') && echo '############## BEWARE: the "fixme" marker was found !!! ##############' || true mkdir -p libtommath-$(VERSION)/doc cp doc/bn.pdf doc/tommath.pdf doc/poster.pdf libtommath-$(VERSION)/doc/ tar -c libtommath-$(VERSION)/ | xz -6e -c - > ltm-$(VERSION).tar.xz diff --git a/makefile.icc b/makefile.icc index 1563802..a1d1fdc 100644 --- a/makefile.icc +++ b/makefile.icc @@ -80,17 +80,17 @@ libtommath.a: $(OBJECTS) # So far I've seen improvements in the MP math profiled: make -f makefile.icc CFLAGS="$(CFLAGS) -prof_gen -DTESTING" timing - ./ltmtest - rm -f *.a *.o ltmtest + ./timing + rm -f *.a *.o timing make -f makefile.icc CFLAGS="$(CFLAGS) -prof_use" #make a single object profiled library profiled_single: perl gen.pl $(CC) $(CFLAGS) -prof_gen -DTESTING -c mpi.c -o mpi.o - $(CC) $(CFLAGS) -DTESTING -DTIMER demo/demo.c mpi.o -o ltmtest - ./ltmtest - rm -f *.o ltmtest + $(CC) $(CFLAGS) -DTESTING -DTIMER demo/demo.c mpi.o -o timing + ./timing + rm -f *.o timing $(CC) $(CFLAGS) -prof_use -ip -DTESTING -c mpi.c -o mpi.o $(AR) $(ARFLAGS) libtommath.a mpi.o ranlib libtommath.a @@ -107,11 +107,11 @@ test: libtommath.a demo/demo.o mtest: test cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest -timing: libtommath.a - $(CC) $(CFLAGS) -DTIMER demo/timing.c libtommath.a -o ltmtest +timing: libtommath.a demo/timing.c + $(CC) $(CFLAGS) -DTIMER demo/timing.c libtommath.a -o timing clean: - rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ + rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test timing mpitest mtest/mtest mtest/mtest.exe \ *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.il etc/*.il *.dyn cd etc ; make clean cd pics ; make clean diff --git a/makefile.msvc b/makefile.msvc index a47aadd..3ed7fe7 100644 --- a/makefile.msvc +++ b/makefile.msvc @@ -2,7 +2,7 @@ # #Tom St Denis -CFLAGS = /I. /Ox /DWIN32 /W3 /Fo$@ +LTM_CFLAGS = /Ox /nologo /I. /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /W3 $(CFLAGS) default: library @@ -34,7 +34,10 @@ bn_s_mp_sqr.obj bn_s_mp_sub.obj #END_INS -HEADERS=tommath.h tommath_class.h tommath_superclass.h +HEADERS=tommath.h tommath_class.h tommath_private.h tommath_superclass.h library: $(OBJECTS) lib /out:tommath.lib $(OBJECTS) + +.c.obj: + $(CC) $(LTM_CFLAGS) /c $< /Fo$@ diff --git a/makefile.shared b/makefile.shared index 67213a2..870160a 100644 --- a/makefile.shared +++ b/makefile.shared @@ -84,5 +84,5 @@ test_standalone: $(LIBNAME) demo/demo.o mtest: cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest -timing: $(LIBNAME) - $(LT) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o ltmtest +timing: $(LIBNAME) demo/timing.c + $(LT) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing diff --git a/makefile_include.mk b/makefile_include.mk index 45a4895..f21e7aa 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -70,7 +70,7 @@ endif # adjust coverage set ifneq ($(filter $(shell arch), i386 i686 x86_64 amd64 ia64),) COVERAGE = test_standalone timing - COVERAGE_APP = ./test && ./ltmtest + COVERAGE_APP = ./test && ./timing else COVERAGE = test_standalone COVERAGE_APP = ./test @@ -113,7 +113,7 @@ cleancov-clean: cleancov: cleancov-clean clean clean: - rm -f *.gcda *.gcno *.gcov *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ + rm -f *.gcda *.gcno *.gcov *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test timing mpitest mtest/mtest mtest/mtest.exe \ *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la rm -rf .libs/ ${MAKE} -C etc/ clean MAKE=${MAKE} diff --git a/tommath.h b/tommath.h index e229bc6..e26e1b9 100644 --- a/tommath.h +++ b/tommath.h @@ -9,8 +9,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://math.libtomcrypt.com */ #ifndef BN_H_ #define BN_H_ @@ -27,7 +25,7 @@ extern "C" { #endif /* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */ -#if defined(_MSC_VER) || defined(__LLP64__) +#if defined(_MSC_VER) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__) # define MP_32BIT #endif diff --git a/tommath_private.h b/tommath_private.h index 678edc4..2c0557b 100644 --- a/tommath_private.h +++ b/tommath_private.h @@ -9,8 +9,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tstdenis82@gmail.com, http://math.libtomcrypt.com */ #ifndef TOMMATH_PRIV_H_ #define TOMMATH_PRIV_H_