summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-14 13:20:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-14 13:20:06 (GMT)
commit2f7b3b25a44b2d4cae788262d093a4c2cbfee216 (patch)
tree02c154fcc3fcad9cbbb9be91ecb192bd6cf75ebf
parent072f17eb971ae3d3aff015ca39063774c876a17a (diff)
parente37816295674d1f53f8a42ed360885bfd7b1bb26 (diff)
downloadtcl-mistake_20110314.zip
tcl-mistake_20110314.tar.gz
tcl-mistake_20110314.tar.bz2
Revert previous commit: I was not aware that we have a fork of libtommathmistake_20110314
-rw-r--r--libtommath/bn_error.c6
-rw-r--r--libtommath/bn_fast_mp_invmod.c6
-rw-r--r--libtommath/bn_fast_mp_montgomery_reduce.c6
-rw-r--r--libtommath/bn_fast_s_mp_mul_digs.c6
-rw-r--r--libtommath/bn_fast_s_mp_mul_high_digs.c6
-rw-r--r--libtommath/bn_fast_s_mp_sqr.c6
-rw-r--r--libtommath/bn_mp_2expt.c6
-rw-r--r--libtommath/bn_mp_abs.c6
-rw-r--r--libtommath/bn_mp_add.c6
-rw-r--r--libtommath/bn_mp_add_d.c11
-rw-r--r--libtommath/bn_mp_addmod.c6
-rw-r--r--libtommath/bn_mp_and.c6
-rw-r--r--libtommath/bn_mp_clamp.c6
-rw-r--r--libtommath/bn_mp_clear.c6
-rw-r--r--libtommath/bn_mp_clear_multi.c6
-rw-r--r--libtommath/bn_mp_cmp.c6
-rw-r--r--libtommath/bn_mp_cmp_d.c6
-rw-r--r--libtommath/bn_mp_cmp_mag.c6
-rw-r--r--libtommath/bn_mp_cnt_lsb.c6
-rw-r--r--libtommath/bn_mp_copy.c6
-rw-r--r--libtommath/bn_mp_count_bits.c6
-rw-r--r--libtommath/bn_mp_div.c6
-rw-r--r--libtommath/bn_mp_div_2.c6
-rw-r--r--libtommath/bn_mp_div_2d.c6
-rw-r--r--libtommath/bn_mp_div_3.c6
-rw-r--r--libtommath/bn_mp_div_d.c10
-rw-r--r--libtommath/bn_mp_dr_is_modulus.c6
-rw-r--r--libtommath/bn_mp_dr_reduce.c6
-rw-r--r--libtommath/bn_mp_dr_setup.c6
-rw-r--r--libtommath/bn_mp_exch.c6
-rw-r--r--libtommath/bn_mp_expt_d.c6
-rw-r--r--libtommath/bn_mp_exptmod.c6
-rw-r--r--libtommath/bn_mp_exptmod_fast.c7
-rw-r--r--libtommath/bn_mp_exteuclid.c6
-rw-r--r--libtommath/bn_mp_fread.c6
-rw-r--r--libtommath/bn_mp_fwrite.c6
-rw-r--r--libtommath/bn_mp_gcd.c6
-rw-r--r--libtommath/bn_mp_get_int.c6
-rw-r--r--libtommath/bn_mp_grow.c6
-rw-r--r--libtommath/bn_mp_init.c6
-rw-r--r--libtommath/bn_mp_init_copy.c6
-rw-r--r--libtommath/bn_mp_init_multi.c6
-rw-r--r--libtommath/bn_mp_init_set.c6
-rw-r--r--libtommath/bn_mp_init_set_int.c6
-rw-r--r--libtommath/bn_mp_init_size.c6
-rw-r--r--libtommath/bn_mp_invmod.c6
-rw-r--r--libtommath/bn_mp_invmod_slow.c6
-rw-r--r--libtommath/bn_mp_is_square.c6
-rw-r--r--libtommath/bn_mp_jacobi.c6
-rw-r--r--libtommath/bn_mp_karatsuba_mul.c6
-rw-r--r--libtommath/bn_mp_karatsuba_sqr.c6
-rw-r--r--libtommath/bn_mp_lcm.c6
-rw-r--r--libtommath/bn_mp_lshd.c6
-rw-r--r--libtommath/bn_mp_mod.c6
-rw-r--r--libtommath/bn_mp_mod_2d.c6
-rw-r--r--libtommath/bn_mp_mod_d.c6
-rw-r--r--libtommath/bn_mp_montgomery_calc_normalization.c6
-rw-r--r--libtommath/bn_mp_montgomery_reduce.c6
-rw-r--r--libtommath/bn_mp_montgomery_setup.c6
-rw-r--r--libtommath/bn_mp_mul.c6
-rw-r--r--libtommath/bn_mp_mul_2.c6
-rw-r--r--libtommath/bn_mp_mul_2d.c6
-rw-r--r--libtommath/bn_mp_mul_d.c6
-rw-r--r--libtommath/bn_mp_mulmod.c6
-rw-r--r--libtommath/bn_mp_n_root.c6
-rw-r--r--libtommath/bn_mp_neg.c6
-rw-r--r--libtommath/bn_mp_or.c6
-rw-r--r--libtommath/bn_mp_prime_fermat.c6
-rw-r--r--libtommath/bn_mp_prime_is_divisible.c6
-rw-r--r--libtommath/bn_mp_prime_is_prime.c6
-rw-r--r--libtommath/bn_mp_prime_miller_rabin.c6
-rw-r--r--libtommath/bn_mp_prime_next_prime.c6
-rw-r--r--libtommath/bn_mp_prime_rabin_miller_trials.c6
-rw-r--r--libtommath/bn_mp_prime_random_ex.c6
-rw-r--r--libtommath/bn_mp_radix_size.c19
-rw-r--r--libtommath/bn_mp_radix_smap.c6
-rw-r--r--libtommath/bn_mp_rand.c6
-rw-r--r--libtommath/bn_mp_read_radix.c15
-rw-r--r--libtommath/bn_mp_read_signed_bin.c6
-rw-r--r--libtommath/bn_mp_read_unsigned_bin.c6
-rw-r--r--libtommath/bn_mp_reduce.c6
-rw-r--r--libtommath/bn_mp_reduce_2k.c6
-rw-r--r--libtommath/bn_mp_reduce_2k_l.c6
-rw-r--r--libtommath/bn_mp_reduce_2k_setup.c6
-rw-r--r--libtommath/bn_mp_reduce_2k_setup_l.c6
-rw-r--r--libtommath/bn_mp_reduce_is_2k.c6
-rw-r--r--libtommath/bn_mp_reduce_is_2k_l.c6
-rw-r--r--libtommath/bn_mp_reduce_setup.c6
-rw-r--r--libtommath/bn_mp_rshd.c6
-rw-r--r--libtommath/bn_mp_set.c6
-rw-r--r--libtommath/bn_mp_set_int.c6
-rw-r--r--libtommath/bn_mp_shrink.c6
-rw-r--r--libtommath/bn_mp_signed_bin_size.c6
-rw-r--r--libtommath/bn_mp_sqr.c6
-rw-r--r--libtommath/bn_mp_sqrmod.c6
-rw-r--r--libtommath/bn_mp_sqrt.c83
-rw-r--r--libtommath/bn_mp_sub.c6
-rw-r--r--libtommath/bn_mp_sub_d.c6
-rw-r--r--libtommath/bn_mp_submod.c6
-rw-r--r--libtommath/bn_mp_to_signed_bin.c6
-rw-r--r--libtommath/bn_mp_to_signed_bin_n.c6
-rw-r--r--libtommath/bn_mp_to_unsigned_bin.c6
-rw-r--r--libtommath/bn_mp_to_unsigned_bin_n.c6
-rw-r--r--libtommath/bn_mp_toom_mul.c6
-rw-r--r--libtommath/bn_mp_toom_sqr.c6
-rw-r--r--libtommath/bn_mp_toradix.c6
-rw-r--r--libtommath/bn_mp_toradix_n.c6
-rw-r--r--libtommath/bn_mp_unsigned_bin_size.c6
-rw-r--r--libtommath/bn_mp_xor.c6
-rw-r--r--libtommath/bn_mp_zero.c6
-rw-r--r--libtommath/bn_prime_tab.c6
-rw-r--r--libtommath/bn_reverse.c6
-rw-r--r--libtommath/bn_s_mp_add.c6
-rw-r--r--libtommath/bn_s_mp_exptmod.c6
-rw-r--r--libtommath/bn_s_mp_mul_digs.c6
-rw-r--r--libtommath/bn_s_mp_mul_high_digs.c6
-rw-r--r--libtommath/bn_s_mp_sqr.c6
-rw-r--r--libtommath/bn_s_mp_sub.c6
-rw-r--r--libtommath/bncore.c6
-rw-r--r--libtommath/booker.pl2
-rw-r--r--libtommath/demo/demo.c4
-rw-r--r--libtommath/demo/timing.c4
-rw-r--r--libtommath/etc/2kprime.c9
-rw-r--r--libtommath/etc/drprime.c5
-rw-r--r--libtommath/etc/mersenne.c4
-rw-r--r--libtommath/etc/mont.c9
-rw-r--r--libtommath/etc/pprime.c4
-rw-r--r--libtommath/etc/tune.c4
-rw-r--r--libtommath/logs/index.html3
-rw-r--r--libtommath/makefile.cygwin_dll4
-rw-r--r--libtommath/mtest/logtab.h5
-rw-r--r--libtommath/mtest/mpi-config.h5
-rw-r--r--libtommath/mtest/mpi-types.h5
-rw-r--r--libtommath/mtest/mpi.c6
-rw-r--r--libtommath/mtest/mpi.h6
-rw-r--r--libtommath/mtest/mtest.c4
-rw-r--r--libtommath/pre_gen/mpi.c478
-rw-r--r--libtommath/tommath.h7
-rw-r--r--libtommath/tommath_class.h4
-rw-r--r--libtommath/tommath_superclass.h4
140 files changed, 219 insertions, 1180 deletions
diff --git a/libtommath/bn_error.c b/libtommath/bn_error.c
index b1b7177..6393bb0 100644
--- a/libtommath/bn_error.c
+++ b/libtommath/bn_error.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
static const struct {
@@ -41,7 +41,3 @@ char *mp_error_to_string(int code)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_error.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_fast_mp_invmod.c b/libtommath/bn_fast_mp_invmod.c
index ff03dff..fafd9dc 100644
--- a/libtommath/bn_fast_mp_invmod.c
+++ b/libtommath/bn_fast_mp_invmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes the modular inverse via binary extended euclidean algorithm,
@@ -142,7 +142,3 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &B, &D, NULL);
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_fast_mp_invmod.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_fast_mp_montgomery_reduce.c b/libtommath/bn_fast_mp_montgomery_reduce.c
index b6c0694..e941dc2 100644
--- a/libtommath/bn_fast_mp_montgomery_reduce.c
+++ b/libtommath/bn_fast_mp_montgomery_reduce.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction
@@ -166,7 +166,3 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_fast_mp_montgomery_reduce.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_fast_s_mp_mul_digs.c b/libtommath/bn_fast_s_mp_mul_digs.c
index 91e10d6..ab157b9 100644
--- a/libtommath/bn_fast_s_mp_mul_digs.c
+++ b/libtommath/bn_fast_s_mp_mul_digs.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Fast (comba) multiplier
@@ -101,7 +101,3 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_fast_s_mp_mul_digs.c,v $ */
-/* $Revision: 1.8 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_fast_s_mp_mul_high_digs.c b/libtommath/bn_fast_s_mp_mul_high_digs.c
index 5b114d7..ec9f58a 100644
--- a/libtommath/bn_fast_s_mp_mul_high_digs.c
+++ b/libtommath/bn_fast_s_mp_mul_high_digs.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* this is a modified version of fast_s_mul_digs that only produces
@@ -92,7 +92,3 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_fast_s_mp_mul_high_digs.c,v $ */
-/* $Revision: 1.6 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_fast_s_mp_sqr.c b/libtommath/bn_fast_s_mp_sqr.c
index 19e92ef..1abf24b 100644
--- a/libtommath/bn_fast_s_mp_sqr.c
+++ b/libtommath/bn_fast_s_mp_sqr.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* the jist of squaring...
@@ -108,7 +108,3 @@ int fast_s_mp_sqr (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_fast_s_mp_sqr.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_2expt.c b/libtommath/bn_mp_2expt.c
index f422ffc..a32572d 100644
--- a/libtommath/bn_mp_2expt.c
+++ b/libtommath/bn_mp_2expt.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes a = 2**b
@@ -42,7 +42,3 @@ mp_2expt (mp_int * a, int b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_2expt.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_abs.c b/libtommath/bn_mp_abs.c
index 09dd722..dc51884 100644
--- a/libtommath/bn_mp_abs.c
+++ b/libtommath/bn_mp_abs.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* b = |a|
@@ -37,7 +37,3 @@ mp_abs (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_abs.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_add.c b/libtommath/bn_mp_add.c
index be20644..d9b8fa5 100644
--- a/libtommath/bn_mp_add.c
+++ b/libtommath/bn_mp_add.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* high level addition (handles signs) */
@@ -47,7 +47,3 @@ int mp_add (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_add.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_add_d.c b/libtommath/bn_mp_add_d.c
index 8ca36c1..5281ad4 100644
--- a/libtommath/bn_mp_add_d.c
+++ b/libtommath/bn_mp_add_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* single digit addition */
@@ -37,8 +37,9 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
/* c = |a| - b */
res = mp_sub_d(a, b, c);
- /* fix sign */
- a->sign = c->sign = MP_NEG;
+ /* fix signs */
+ a->sign = MP_NEG;
+ c->sign = (c->used) ? MP_NEG : MP_ZPOS;
/* clamp */
mp_clamp(c);
@@ -106,7 +107,3 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_add_d.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_addmod.c b/libtommath/bn_mp_addmod.c
index 6d8afe1..bff193f 100644
--- a/libtommath/bn_mp_addmod.c
+++ b/libtommath/bn_mp_addmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* d = a + b (mod c) */
@@ -35,7 +35,3 @@ mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_addmod.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_and.c b/libtommath/bn_mp_and.c
index 8ea2287..02bef18 100644
--- a/libtommath/bn_mp_and.c
+++ b/libtommath/bn_mp_and.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* AND two ints together */
@@ -51,7 +51,3 @@ mp_and (mp_int * a, mp_int * b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_and.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_clamp.c b/libtommath/bn_mp_clamp.c
index 359c2ff..74887bb 100644
--- a/libtommath/bn_mp_clamp.c
+++ b/libtommath/bn_mp_clamp.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* trim unused digits
@@ -38,7 +38,3 @@ mp_clamp (mp_int * a)
}
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_clamp.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_clear.c b/libtommath/bn_mp_clear.c
index a65f0a3..bd07e76 100644
--- a/libtommath/bn_mp_clear.c
+++ b/libtommath/bn_mp_clear.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* clear one (frees) */
@@ -38,7 +38,3 @@ mp_clear (mp_int * a)
}
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_clear.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_clear_multi.c b/libtommath/bn_mp_clear_multi.c
index daaea79..c3ad7a8 100644
--- a/libtommath/bn_mp_clear_multi.c
+++ b/libtommath/bn_mp_clear_multi.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
#include <stdarg.h>
@@ -28,7 +28,3 @@ void mp_clear_multi(mp_int *mp, ...)
va_end(args);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_clear_multi.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_cmp.c b/libtommath/bn_mp_cmp.c
index 53d2568..943249d 100644
--- a/libtommath/bn_mp_cmp.c
+++ b/libtommath/bn_mp_cmp.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* compare two ints (signed)*/
@@ -37,7 +37,3 @@ mp_cmp (const mp_int * a, const mp_int * b)
}
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_cmp.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_cmp_d.c b/libtommath/bn_mp_cmp_d.c
index 09e5bbb..ecec091 100644
--- a/libtommath/bn_mp_cmp_d.c
+++ b/libtommath/bn_mp_cmp_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* compare a digit */
@@ -38,7 +38,3 @@ int mp_cmp_d(const mp_int * a, mp_digit b)
}
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_cmp_d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_cmp_mag.c b/libtommath/bn_mp_cmp_mag.c
index 1d87968..b23a191 100644
--- a/libtommath/bn_mp_cmp_mag.c
+++ b/libtommath/bn_mp_cmp_mag.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* compare maginitude of two ints (unsigned) */
@@ -49,7 +49,3 @@ int mp_cmp_mag (const mp_int * a, const mp_int * b)
return MP_EQ;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_cmp_mag.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_cnt_lsb.c b/libtommath/bn_mp_cnt_lsb.c
index 66d1a74..6447a1f 100644
--- a/libtommath/bn_mp_cnt_lsb.c
+++ b/libtommath/bn_mp_cnt_lsb.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
static const int lnz[16] = {
@@ -47,7 +47,3 @@ int mp_cnt_lsb(mp_int *a)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_cnt_lsb.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_copy.c b/libtommath/bn_mp_copy.c
index fec956a..ffbc0d4 100644
--- a/libtommath/bn_mp_copy.c
+++ b/libtommath/bn_mp_copy.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* copy, b = a */
@@ -62,7 +62,3 @@ mp_copy (const mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_copy.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_count_bits.c b/libtommath/bn_mp_count_bits.c
index 093e70c..00d364e 100644
--- a/libtommath/bn_mp_count_bits.c
+++ b/libtommath/bn_mp_count_bits.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* returns the number of bits in an int */
@@ -39,7 +39,3 @@ mp_count_bits (const mp_int * a)
return r;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_count_bits.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_div.c b/libtommath/bn_mp_div.c
index aee9c94..de4ca04 100644
--- a/libtommath/bn_mp_div.c
+++ b/libtommath/bn_mp_div.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
#ifdef BN_MP_DIV_SMALL
@@ -286,7 +286,3 @@ LBL_Q:mp_clear (&q);
#endif
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_div.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_div_2.c b/libtommath/bn_mp_div_2.c
index 7ee3e5b..186a959 100644
--- a/libtommath/bn_mp_div_2.c
+++ b/libtommath/bn_mp_div_2.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* b = a/2 */
@@ -62,7 +62,3 @@ int mp_div_2(mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_div_2.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_div_2d.c b/libtommath/bn_mp_div_2d.c
index 09e2421..d7b7e05 100644
--- a/libtommath/bn_mp_div_2d.c
+++ b/libtommath/bn_mp_div_2d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* shift right by a certain bit count (store quotient in c, optional remainder in d) */
@@ -91,7 +91,3 @@ int mp_div_2d (const mp_int * a, int b, mp_int * c, mp_int * d)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_div_2d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_div_3.c b/libtommath/bn_mp_div_3.c
index 3c60269..79a9816 100644
--- a/libtommath/bn_mp_div_3.c
+++ b/libtommath/bn_mp_div_3.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* divide by three (based on routine from MPI and the GMP manual) */
@@ -73,7 +73,3 @@ mp_div_3 (mp_int * a, mp_int *c, mp_digit * d)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_div_3.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_div_d.c b/libtommath/bn_mp_div_d.c
index d64b4b5..f2729d2 100644
--- a/libtommath/bn_mp_div_d.c
+++ b/libtommath/bn_mp_div_d.c
@@ -12,13 +12,17 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
static int s_is_power_of_two(mp_digit b, int *p)
{
int x;
+ /* quick out - if (b & (b-1)) isn't zero, b isn't a power of two */
+ if ((b & (b-1)) != 0) {
+ return 0;
+ }
for (x = 1; x < DIGIT_BIT; x++) {
if (b == (((mp_digit)1)<<x)) {
*p = x;
@@ -104,7 +108,3 @@ int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_div_d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: $ */
diff --git a/libtommath/bn_mp_dr_is_modulus.c b/libtommath/bn_mp_dr_is_modulus.c
index 5237344..8ad31dc 100644
--- a/libtommath/bn_mp_dr_is_modulus.c
+++ b/libtommath/bn_mp_dr_is_modulus.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines if a number is a valid DR modulus */
@@ -37,7 +37,3 @@ int mp_dr_is_modulus(mp_int *a)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_dr_is_modulus.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_dr_reduce.c b/libtommath/bn_mp_dr_reduce.c
index e60b578..8337591 100644
--- a/libtommath/bn_mp_dr_reduce.c
+++ b/libtommath/bn_mp_dr_reduce.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reduce "x" in place modulo "n" using the Diminished Radix algorithm.
@@ -88,7 +88,3 @@ top:
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_dr_reduce.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_dr_setup.c b/libtommath/bn_mp_dr_setup.c
index 1d7d856..de00e2d 100644
--- a/libtommath/bn_mp_dr_setup.c
+++ b/libtommath/bn_mp_dr_setup.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines the setup value */
@@ -26,7 +26,3 @@ void mp_dr_setup(mp_int *a, mp_digit *d)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_dr_setup.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_exch.c b/libtommath/bn_mp_exch.c
index 38574e0..b7bd186 100644
--- a/libtommath/bn_mp_exch.c
+++ b/libtommath/bn_mp_exch.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* swap the elements of two integers, for cases where you can't simply swap the
@@ -28,7 +28,3 @@ mp_exch (mp_int * a, mp_int * b)
*b = t;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_exch.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_expt_d.c b/libtommath/bn_mp_expt_d.c
index 4bdc2d1..132f480 100644
--- a/libtommath/bn_mp_expt_d.c
+++ b/libtommath/bn_mp_expt_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* calculate c = a**b using a square-multiply algorithm */
@@ -51,7 +51,3 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_expt_d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_exptmod.c b/libtommath/bn_mp_exptmod.c
index 0231916..b7d9fb7 100644
--- a/libtommath/bn_mp_exptmod.c
+++ b/libtommath/bn_mp_exptmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
@@ -106,7 +106,3 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_exptmod.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_exptmod_fast.c b/libtommath/bn_mp_exptmod_fast.c
index 2a3b3c9..1902e79 100644
--- a/libtommath/bn_mp_exptmod_fast.c
+++ b/libtommath/bn_mp_exptmod_fast.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85
@@ -314,8 +314,3 @@ LBL_M:
return err;
}
#endif
-
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_exptmod_fast.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_exteuclid.c b/libtommath/bn_mp_exteuclid.c
index e6c4ce2..2e69ce1 100644
--- a/libtommath/bn_mp_exteuclid.c
+++ b/libtommath/bn_mp_exteuclid.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Extended euclidean algorithm of (a, b) produces
@@ -76,7 +76,3 @@ _ERR: mp_clear_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_exteuclid.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_fread.c b/libtommath/bn_mp_fread.c
index b344b6f..44e1ea8 100644
--- a/libtommath/bn_mp_fread.c
+++ b/libtommath/bn_mp_fread.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* read a bigint from a file stream in ASCII */
@@ -61,7 +61,3 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_fread.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_fwrite.c b/libtommath/bn_mp_fwrite.c
index a0b4c6b..b0ec29e 100644
--- a/libtommath/bn_mp_fwrite.c
+++ b/libtommath/bn_mp_fwrite.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
int mp_fwrite(mp_int *a, int radix, FILE *stream)
@@ -46,7 +46,3 @@ int mp_fwrite(mp_int *a, int radix, FILE *stream)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_fwrite.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_gcd.c b/libtommath/bn_mp_gcd.c
index b39ba90..68cfa03 100644
--- a/libtommath/bn_mp_gcd.c
+++ b/libtommath/bn_mp_gcd.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Greatest Common Divisor using the binary method */
@@ -99,7 +99,3 @@ LBL_U:mp_clear (&v);
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_gcd.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_get_int.c b/libtommath/bn_mp_get_int.c
index 17162e2..762cb23 100644
--- a/libtommath/bn_mp_get_int.c
+++ b/libtommath/bn_mp_get_int.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* get the lower 32-bits of an mp_int */
@@ -39,7 +39,3 @@ unsigned long mp_get_int(mp_int * a)
return res & 0xFFFFFFFFUL;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_get_int.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_grow.c b/libtommath/bn_mp_grow.c
index cf2b949..b5b2407 100644
--- a/libtommath/bn_mp_grow.c
+++ b/libtommath/bn_mp_grow.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* grow as required */
@@ -51,7 +51,3 @@ int mp_grow (mp_int * a, int size)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_grow.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_init.c b/libtommath/bn_mp_init.c
index 8be27f5..ddb2d07 100644
--- a/libtommath/bn_mp_init.c
+++ b/libtommath/bn_mp_init.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* init a new mp_int */
@@ -40,7 +40,3 @@ int mp_init (mp_int * a)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_init.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_init_copy.c b/libtommath/bn_mp_init_copy.c
index 0160811..2410a9f 100644
--- a/libtommath/bn_mp_init_copy.c
+++ b/libtommath/bn_mp_init_copy.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* creates "a" then copies b into it */
@@ -26,7 +26,3 @@ int mp_init_copy (mp_int * a, mp_int * b)
return mp_copy (b, a);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_init_copy.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_init_multi.c b/libtommath/bn_mp_init_multi.c
index 59dc3a9..44e3fe6 100644
--- a/libtommath/bn_mp_init_multi.c
+++ b/libtommath/bn_mp_init_multi.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
#include <stdarg.h>
@@ -53,7 +53,3 @@ int mp_init_multi(mp_int *mp, ...)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_init_multi.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_init_set.c b/libtommath/bn_mp_init_set.c
index 34edad9..dc08867 100644
--- a/libtommath/bn_mp_init_set.c
+++ b/libtommath/bn_mp_init_set.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* initialize and set a digit */
@@ -26,7 +26,3 @@ int mp_init_set (mp_int * a, mp_digit b)
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_init_set.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_init_set_int.c b/libtommath/bn_mp_init_set_int.c
index 5c55993..56b27e0 100644
--- a/libtommath/bn_mp_init_set_int.c
+++ b/libtommath/bn_mp_init_set_int.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* initialize and set a digit */
@@ -25,7 +25,3 @@ int mp_init_set_int (mp_int * a, unsigned long b)
return mp_set_int(a, b);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_init_set_int.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_init_size.c b/libtommath/bn_mp_init_size.c
index 8e01418..8ed2c2a 100644
--- a/libtommath/bn_mp_init_size.c
+++ b/libtommath/bn_mp_init_size.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* init an mp_init for a given size */
@@ -42,7 +42,3 @@ int mp_init_size (mp_int * a, int size)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_init_size.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_invmod.c b/libtommath/bn_mp_invmod.c
index 1546514..fdb6c88 100644
--- a/libtommath/bn_mp_invmod.c
+++ b/libtommath/bn_mp_invmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* hac 14.61, pp608 */
@@ -37,7 +37,3 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c)
return MP_VAL;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_invmod.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_invmod_slow.c b/libtommath/bn_mp_invmod_slow.c
index eedd47d..e079819 100644
--- a/libtommath/bn_mp_invmod_slow.c
+++ b/libtommath/bn_mp_invmod_slow.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* hac 14.61, pp608 */
@@ -169,7 +169,3 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &A, &B, &C, &D, NULL);
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_invmod_slow.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_is_square.c b/libtommath/bn_mp_is_square.c
index 50c5244..926b449 100644
--- a/libtommath/bn_mp_is_square.c
+++ b/libtommath/bn_mp_is_square.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Check if remainders are possible squares - fast exclude non-squares */
@@ -103,7 +103,3 @@ ERR:mp_clear(&t);
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_is_square.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_jacobi.c b/libtommath/bn_mp_jacobi.c
index 91cfeea..1644698 100644
--- a/libtommath/bn_mp_jacobi.c
+++ b/libtommath/bn_mp_jacobi.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes the jacobi c = (a | n) (or Legendre if n is prime)
@@ -99,7 +99,3 @@ LBL_A1:mp_clear (&a1);
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_jacobi.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_karatsuba_mul.c b/libtommath/bn_mp_karatsuba_mul.c
index 8ea2c27..0d62b9b 100644
--- a/libtommath/bn_mp_karatsuba_mul.c
+++ b/libtommath/bn_mp_karatsuba_mul.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* c = |a| * |b| using Karatsuba Multiplication using
@@ -161,7 +161,3 @@ ERR:
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_karatsuba_mul.c,v $ */
-/* $Revision: 1.6 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_karatsuba_sqr.c b/libtommath/bn_mp_karatsuba_sqr.c
index a5e198b..829405a 100644
--- a/libtommath/bn_mp_karatsuba_sqr.c
+++ b/libtommath/bn_mp_karatsuba_sqr.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Karatsuba squaring, computes b = a*a using three
@@ -115,7 +115,3 @@ ERR:
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_karatsuba_sqr.c,v $ */
-/* $Revision: 1.6 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_lcm.c b/libtommath/bn_mp_lcm.c
index 781eef5..1d53921 100644
--- a/libtommath/bn_mp_lcm.c
+++ b/libtommath/bn_mp_lcm.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes least common multiple as |a*b|/(a, b) */
@@ -54,7 +54,3 @@ LBL_T:
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_lcm.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_lshd.c b/libtommath/bn_mp_lshd.c
index f118cf1..ce1e63b 100644
--- a/libtommath/bn_mp_lshd.c
+++ b/libtommath/bn_mp_lshd.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* shift left a certain amount of digits */
@@ -61,7 +61,3 @@ int mp_lshd (mp_int * a, int b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_lshd.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mod.c b/libtommath/bn_mp_mod.c
index f5cf8d0..98e155e 100644
--- a/libtommath/bn_mp_mod.c
+++ b/libtommath/bn_mp_mod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* c = a mod b, 0 <= c < b */
@@ -42,7 +42,3 @@ mp_mod (mp_int * a, mp_int * b, mp_int * c)
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mod.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mod_2d.c b/libtommath/bn_mp_mod_2d.c
index 06e6c3e..0170f65 100644
--- a/libtommath/bn_mp_mod_2d.c
+++ b/libtommath/bn_mp_mod_2d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* calc a value mod 2**b */
@@ -49,7 +49,3 @@ mp_mod_2d (const mp_int * a, int b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mod_2d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mod_d.c b/libtommath/bn_mp_mod_d.c
index 9ca37e6..f642ee8 100644
--- a/libtommath/bn_mp_mod_d.c
+++ b/libtommath/bn_mp_mod_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
int
@@ -21,7 +21,3 @@ mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
return mp_div_d(a, b, NULL, c);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mod_d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_montgomery_calc_normalization.c b/libtommath/bn_mp_montgomery_calc_normalization.c
index c669fe0..0748762 100644
--- a/libtommath/bn_mp_montgomery_calc_normalization.c
+++ b/libtommath/bn_mp_montgomery_calc_normalization.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/*
@@ -53,7 +53,3 @@ int mp_montgomery_calc_normalization (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_montgomery_calc_normalization.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_montgomery_reduce.c b/libtommath/bn_mp_montgomery_reduce.c
index b765090..bc6abb8 100644
--- a/libtommath/bn_mp_montgomery_reduce.c
+++ b/libtommath/bn_mp_montgomery_reduce.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction */
@@ -112,7 +112,3 @@ mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_montgomery_reduce.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_montgomery_setup.c b/libtommath/bn_mp_montgomery_setup.c
index 261a9fb..9bbe0c8 100644
--- a/libtommath/bn_mp_montgomery_setup.c
+++ b/libtommath/bn_mp_montgomery_setup.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* setups the montgomery reduction stuff */
@@ -53,7 +53,3 @@ mp_montgomery_setup (mp_int * n, mp_digit * rho)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_montgomery_setup.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mul.c b/libtommath/bn_mp_mul.c
index 8b1117a..fc024be 100644
--- a/libtommath/bn_mp_mul.c
+++ b/libtommath/bn_mp_mul.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* high level multiplication (handles sign) */
@@ -60,7 +60,3 @@ int mp_mul (mp_int * a, mp_int * b, mp_int * c)
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mul.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mul_2.c b/libtommath/bn_mp_mul_2.c
index 02455fc..2ca6022 100644
--- a/libtommath/bn_mp_mul_2.c
+++ b/libtommath/bn_mp_mul_2.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* b = a*2 */
@@ -76,7 +76,3 @@ int mp_mul_2(mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mul_2.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mul_2d.c b/libtommath/bn_mp_mul_2d.c
index 3ab0aed..4ac2e4e 100644
--- a/libtommath/bn_mp_mul_2d.c
+++ b/libtommath/bn_mp_mul_2d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* shift left by a certain bit count */
@@ -79,7 +79,3 @@ int mp_mul_2d (const mp_int * a, int b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mul_2d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mul_d.c b/libtommath/bn_mp_mul_d.c
index 00f9a89..ba45a0c 100644
--- a/libtommath/bn_mp_mul_d.c
+++ b/libtommath/bn_mp_mul_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* multiply by a digit */
@@ -73,7 +73,3 @@ mp_mul_d (mp_int * a, mp_digit b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mul_d.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_mulmod.c b/libtommath/bn_mp_mulmod.c
index 003ceb9..649b717 100644
--- a/libtommath/bn_mp_mulmod.c
+++ b/libtommath/bn_mp_mulmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* d = a * b (mod c) */
@@ -34,7 +34,3 @@ int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_mulmod.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_n_root.c b/libtommath/bn_mp_n_root.c
index 0e7bedc..b2700a8 100644
--- a/libtommath/bn_mp_n_root.c
+++ b/libtommath/bn_mp_n_root.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* find the n'th root of an integer
@@ -126,7 +126,3 @@ LBL_T1:mp_clear (&t1);
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_n_root.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_neg.c b/libtommath/bn_mp_neg.c
index bfe455d..07fb148 100644
--- a/libtommath/bn_mp_neg.c
+++ b/libtommath/bn_mp_neg.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* b = -a */
@@ -34,7 +34,3 @@ int mp_neg (const mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_neg.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_or.c b/libtommath/bn_mp_or.c
index bff4995..aa5b1bd 100644
--- a/libtommath/bn_mp_or.c
+++ b/libtommath/bn_mp_or.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* OR two ints together */
@@ -44,7 +44,3 @@ int mp_or (mp_int * a, mp_int * b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_or.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_fermat.c b/libtommath/bn_mp_prime_fermat.c
index c23d77f..7b9b12e 100644
--- a/libtommath/bn_mp_prime_fermat.c
+++ b/libtommath/bn_mp_prime_fermat.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* performs one Fermat test.
@@ -56,7 +56,3 @@ LBL_T:mp_clear (&t);
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_fermat.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_is_divisible.c b/libtommath/bn_mp_prime_is_divisible.c
index 8e7871c..710c967 100644
--- a/libtommath/bn_mp_prime_is_divisible.c
+++ b/libtommath/bn_mp_prime_is_divisible.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines if an integers is divisible by one
@@ -44,7 +44,3 @@ int mp_prime_is_divisible (mp_int * a, int *result)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_is_divisible.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_is_prime.c b/libtommath/bn_mp_prime_is_prime.c
index c316d62..ce225a3 100644
--- a/libtommath/bn_mp_prime_is_prime.c
+++ b/libtommath/bn_mp_prime_is_prime.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* performs a variable number of rounds of Miller-Rabin
@@ -77,7 +77,3 @@ LBL_B:mp_clear (&b);
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_is_prime.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_miller_rabin.c b/libtommath/bn_mp_prime_miller_rabin.c
index ddf0358..c5185b8 100644
--- a/libtommath/bn_mp_prime_miller_rabin.c
+++ b/libtommath/bn_mp_prime_miller_rabin.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Miller-Rabin test of "a" to the base of "b" as described in
@@ -97,7 +97,3 @@ LBL_N1:mp_clear (&n1);
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_miller_rabin.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_next_prime.c b/libtommath/bn_mp_prime_next_prime.c
index daf2ec7..3171d61 100644
--- a/libtommath/bn_mp_prime_next_prime.c
+++ b/libtommath/bn_mp_prime_next_prime.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* finds the next prime after the number "a" using "t" trials
@@ -164,7 +164,3 @@ LBL_ERR:
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_next_prime.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_rabin_miller_trials.c b/libtommath/bn_mp_prime_rabin_miller_trials.c
index 248c2fd..e57a43c 100644
--- a/libtommath/bn_mp_prime_rabin_miller_trials.c
+++ b/libtommath/bn_mp_prime_rabin_miller_trials.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
@@ -46,7 +46,3 @@ int mp_prime_rabin_miller_trials(int size)
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_rabin_miller_trials.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_prime_random_ex.c b/libtommath/bn_mp_prime_random_ex.c
index 07aae4b..a37477e 100644
--- a/libtommath/bn_mp_prime_random_ex.c
+++ b/libtommath/bn_mp_prime_random_ex.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* makes a truly random prime of a given size (bits),
@@ -119,7 +119,3 @@ error:
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_prime_random_ex.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_radix_size.c b/libtommath/bn_mp_radix_size.c
index 1b61e3a..40c4d04 100644
--- a/libtommath/bn_mp_radix_size.c
+++ b/libtommath/bn_mp_radix_size.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* returns size of ASCII reprensentation */
@@ -66,13 +66,18 @@ int mp_radix_size (mp_int * a, int radix, int *size)
}
mp_clear (&t);
- /* return digs + 1, the 1 is for the NULL byte that would be required. */
- *size = digs + 1;
+ /*
+ * return digs + 1, the 1 is for the NULL byte that would be required.
+ * mp_toradix_n requires a minimum of 3 bytes, so never report less than
+ * that.
+ */
+
+ if ( digs >= 2 ) {
+ *size = digs + 1;
+ } else {
+ *size = 3;
+ }
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_radix_size.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_radix_smap.c b/libtommath/bn_mp_radix_smap.c
index 7d72feb..7aeb375 100644
--- a/libtommath/bn_mp_radix_smap.c
+++ b/libtommath/bn_mp_radix_smap.c
@@ -12,13 +12,9 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* chars used in radix conversions */
const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_radix_smap.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_rand.c b/libtommath/bn_mp_rand.c
index af66a67..17c1fbe 100644
--- a/libtommath/bn_mp_rand.c
+++ b/libtommath/bn_mp_rand.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* makes a pseudo-random int of a given size */
@@ -49,7 +49,3 @@ mp_rand (mp_int * a, int digits)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_rand.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_read_radix.c b/libtommath/bn_mp_read_radix.c
index 91c46c2..4b92589 100644
--- a/libtommath/bn_mp_read_radix.c
+++ b/libtommath/bn_mp_read_radix.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* read a string [ASCII] in a given radix */
@@ -48,7 +48,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
* this allows numbers like 1AB and 1ab to represent the same value
* [e.g. in hex]
*/
- ch = (char) ((radix < 36) ? toupper (*str) : *str);
+ ch = (char) ((radix < 36) ? toupper ((unsigned char) *str) : *str);
for (y = 0; y < 64; y++) {
if (ch == mp_s_rmap[y]) {
break;
@@ -72,6 +72,13 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
++str;
}
+ /* if an illegal character was found, fail. */
+
+ if ( *str != '\0' ) {
+ mp_zero( a );
+ return MP_VAL;
+ }
+
/* set the sign only if a != 0 */
if (mp_iszero(a) != 1) {
a->sign = neg;
@@ -79,7 +86,3 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_read_radix.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_read_signed_bin.c b/libtommath/bn_mp_read_signed_bin.c
index 8da651c..3ee8556 100644
--- a/libtommath/bn_mp_read_signed_bin.c
+++ b/libtommath/bn_mp_read_signed_bin.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* read signed bin, big endian, first byte is 0==positive or 1==negative */
@@ -35,7 +35,3 @@ int mp_read_signed_bin (mp_int * a, const unsigned char *b, int c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_read_signed_bin.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_read_unsigned_bin.c b/libtommath/bn_mp_read_unsigned_bin.c
index 1ebba13..caf5be0 100644
--- a/libtommath/bn_mp_read_unsigned_bin.c
+++ b/libtommath/bn_mp_read_unsigned_bin.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reads a unsigned char array, assumes the msb is stored first [big endian] */
@@ -49,7 +49,3 @@ int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_read_unsigned_bin.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce.c b/libtommath/bn_mp_reduce.c
index 21d0730..4375e4e 100644
--- a/libtommath/bn_mp_reduce.c
+++ b/libtommath/bn_mp_reduce.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reduces x mod m, assumes 0 < x < m**2, mu is
@@ -94,7 +94,3 @@ CLEANUP:
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_2k.c b/libtommath/bn_mp_reduce_2k.c
index d9620c2..428f2ff 100644
--- a/libtommath/bn_mp_reduce_2k.c
+++ b/libtommath/bn_mp_reduce_2k.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reduces a modulo n where n is of the form 2**p - d */
@@ -55,7 +55,3 @@ ERR:
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_2k.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_2k_l.c b/libtommath/bn_mp_reduce_2k_l.c
index f06103d..8e52efa 100644
--- a/libtommath/bn_mp_reduce_2k_l.c
+++ b/libtommath/bn_mp_reduce_2k_l.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reduces a modulo n where n is of the form 2**p - d
@@ -56,7 +56,3 @@ ERR:
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_2k_l.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_2k_setup.c b/libtommath/bn_mp_reduce_2k_setup.c
index a80e7a2..ac043f6 100644
--- a/libtommath/bn_mp_reduce_2k_setup.c
+++ b/libtommath/bn_mp_reduce_2k_setup.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines the setup value */
@@ -41,7 +41,3 @@ int mp_reduce_2k_setup(mp_int *a, mp_digit *d)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_2k_setup.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_2k_setup_l.c b/libtommath/bn_mp_reduce_2k_setup_l.c
index 7cf002e..b59a1ed 100644
--- a/libtommath/bn_mp_reduce_2k_setup_l.c
+++ b/libtommath/bn_mp_reduce_2k_setup_l.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines the setup value */
@@ -38,7 +38,3 @@ ERR:
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_2k_setup_l.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_is_2k.c b/libtommath/bn_mp_reduce_is_2k.c
index 7308be7..4655fcf 100644
--- a/libtommath/bn_mp_reduce_is_2k.c
+++ b/libtommath/bn_mp_reduce_is_2k.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines if mp_reduce_2k can be used */
@@ -46,7 +46,3 @@ int mp_reduce_is_2k(mp_int *a)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_is_2k.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_is_2k_l.c b/libtommath/bn_mp_reduce_is_2k_l.c
index 14a4d21..7b57865 100644
--- a/libtommath/bn_mp_reduce_is_2k_l.c
+++ b/libtommath/bn_mp_reduce_is_2k_l.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* determines if reduce_2k_l can be used */
@@ -38,7 +38,3 @@ int mp_reduce_is_2k_l(mp_int *a)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_is_2k_l.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_reduce_setup.c b/libtommath/bn_mp_reduce_setup.c
index 370f20b..d8cefd9 100644
--- a/libtommath/bn_mp_reduce_setup.c
+++ b/libtommath/bn_mp_reduce_setup.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* pre-calculate the value required for Barrett reduction
@@ -28,7 +28,3 @@ int mp_reduce_setup (mp_int * a, mp_int * b)
return mp_div (a, b, a, NULL);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_reduce_setup.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_rshd.c b/libtommath/bn_mp_rshd.c
index 2a693c5..e6095b3 100644
--- a/libtommath/bn_mp_rshd.c
+++ b/libtommath/bn_mp_rshd.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* shift right a certain amount of digits */
@@ -66,7 +66,3 @@ void mp_rshd (mp_int * a, int b)
a->used -= b;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_rshd.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_set.c b/libtommath/bn_mp_set.c
index 174adcb..c32fc42 100644
--- a/libtommath/bn_mp_set.c
+++ b/libtommath/bn_mp_set.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* set to a digit */
@@ -23,7 +23,3 @@ void mp_set (mp_int * a, mp_digit b)
a->used = (a->dp[0] != 0) ? 1 : 0;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_set.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_set_int.c b/libtommath/bn_mp_set_int.c
index cf10ea1..b0fc344 100644
--- a/libtommath/bn_mp_set_int.c
+++ b/libtommath/bn_mp_set_int.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* set a 32-bit const */
@@ -42,7 +42,3 @@ int mp_set_int (mp_int * a, unsigned long b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_set_int.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_shrink.c b/libtommath/bn_mp_shrink.c
index 4b8c5ef..482ca48 100644
--- a/libtommath/bn_mp_shrink.c
+++ b/libtommath/bn_mp_shrink.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* shrink a bignum */
@@ -29,7 +29,3 @@ int mp_shrink (mp_int * a)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_shrink.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_signed_bin_size.c b/libtommath/bn_mp_signed_bin_size.c
index 6739d19..8f88e76 100644
--- a/libtommath/bn_mp_signed_bin_size.c
+++ b/libtommath/bn_mp_signed_bin_size.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* get the size for an signed equivalent */
@@ -21,7 +21,3 @@ int mp_signed_bin_size (mp_int * a)
return 1 + mp_unsigned_bin_size (a);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_signed_bin_size.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_sqr.c b/libtommath/bn_mp_sqr.c
index 868ccbb..3938537 100644
--- a/libtommath/bn_mp_sqr.c
+++ b/libtommath/bn_mp_sqr.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* computes b = a*a */
@@ -52,7 +52,3 @@ if (a->used >= KARATSUBA_SQR_CUTOFF) {
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_sqr.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_sqrmod.c b/libtommath/bn_mp_sqrmod.c
index 161cbbb..6f90772 100644
--- a/libtommath/bn_mp_sqrmod.c
+++ b/libtommath/bn_mp_sqrmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* c = a * a (mod b) */
@@ -35,7 +35,3 @@ mp_sqrmod (mp_int * a, mp_int * b, mp_int * c)
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_sqrmod.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_sqrt.c b/libtommath/bn_mp_sqrt.c
index 8fd057c..016b8ba 100644
--- a/libtommath/bn_mp_sqrt.c
+++ b/libtommath/bn_mp_sqrt.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+
#ifdef BN_MP_SQRT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
@@ -12,14 +13,23 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
+#ifndef NO_FLOATING_POINT
+#include <math.h>
+#endif
+
/* this function is less generic than mp_n_root, simpler and faster */
int mp_sqrt(mp_int *arg, mp_int *ret)
{
int res;
mp_int t1,t2;
+ int i, j, k;
+#ifndef NO_FLOATING_POINT
+ volatile double d;
+ mp_digit dig;
+#endif
/* must be positive */
if (arg->sign == MP_NEG) {
@@ -31,17 +41,72 @@ int mp_sqrt(mp_int *arg, mp_int *ret)
mp_zero(ret);
return MP_OKAY;
}
-
- if ((res = mp_init_copy(&t1, arg)) != MP_OKAY) {
- return res;
+
+ i = (arg->used / 2) - 1;
+ j = 2 * i;
+ if ((res = mp_init_size(&t1, i+2)) != MP_OKAY) {
+ return res;
}
-
+
if ((res = mp_init(&t2)) != MP_OKAY) {
goto E2;
}
- /* First approx. (not very bad for large arg) */
- mp_rshd (&t1,t1.used/2);
+ for (k = 0; k < i; ++k) {
+ t1.dp[k] = (mp_digit) 0;
+ }
+
+#ifndef NO_FLOATING_POINT
+
+ /* Estimate the square root using the hardware floating point unit. */
+
+ d = 0.0;
+ for (k = arg->used-1; k >= j; --k) {
+ d = ldexp(d, DIGIT_BIT) + (double) (arg->dp[k]);
+ }
+
+ /*
+ * At this point, d is the nearest floating point number to the most
+ * significant 1 or 2 mp_digits of arg. Extract its square root.
+ */
+
+ d = sqrt(d);
+
+ /* dig is the most significant mp_digit of the square root */
+
+ dig = (mp_digit) ldexp(d, -DIGIT_BIT);
+
+ /*
+ * If the most significant digit is nonzero, find the next digit down
+ * by subtracting DIGIT_BIT times thie most significant digit.
+ * Subtract one from the result so that our initial estimate is always
+ * low.
+ */
+
+ if (dig) {
+ t1.used = i+2;
+ d -= ldexp((double) dig, DIGIT_BIT);
+ if (d >= 1.0) {
+ t1.dp[i+1] = dig;
+ t1.dp[i] = ((mp_digit) d) - 1;
+ } else {
+ t1.dp[i+1] = dig-1;
+ t1.dp[i] = MP_DIGIT_MAX;
+ }
+ } else {
+ t1.used = i+1;
+ t1.dp[i] = ((mp_digit) d) - 1;
+ }
+
+#else
+
+ /* Estimate the square root as having 1 in the most significant place. */
+
+ t1.used = i + 2;
+ t1.dp[i+1] = (mp_digit) 1;
+ t1.dp[i] = (mp_digit) 0;
+
+#endif
/* t1 > 0 */
if ((res = mp_div(arg,&t1,&t2,NULL)) != MP_OKAY) {
@@ -75,7 +140,3 @@ E2: mp_clear(&t1);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_sqrt.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_sub.c b/libtommath/bn_mp_sub.c
index f5015cc..13cb43e 100644
--- a/libtommath/bn_mp_sub.c
+++ b/libtommath/bn_mp_sub.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* high level subtraction (handles signs) */
@@ -53,7 +53,3 @@ mp_sub (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_sub.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_sub_d.c b/libtommath/bn_mp_sub_d.c
index 06cdca6..b1e4e3f 100644
--- a/libtommath/bn_mp_sub_d.c
+++ b/libtommath/bn_mp_sub_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* single digit subtraction */
@@ -87,7 +87,3 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_sub_d.c,v $ */
-/* $Revision: 1.6 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_submod.c b/libtommath/bn_mp_submod.c
index 869e23c..7461678 100644
--- a/libtommath/bn_mp_submod.c
+++ b/libtommath/bn_mp_submod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* d = a - b (mod c) */
@@ -36,7 +36,3 @@ mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
return res;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_submod.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_to_signed_bin.c b/libtommath/bn_mp_to_signed_bin.c
index 9df83ca..7871921 100644
--- a/libtommath/bn_mp_to_signed_bin.c
+++ b/libtommath/bn_mp_to_signed_bin.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* store in signed [big endian] format */
@@ -27,7 +27,3 @@ int mp_to_signed_bin (mp_int * a, unsigned char *b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_to_signed_bin.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_to_signed_bin_n.c b/libtommath/bn_mp_to_signed_bin_n.c
index 677f827..8da9961 100644
--- a/libtommath/bn_mp_to_signed_bin_n.c
+++ b/libtommath/bn_mp_to_signed_bin_n.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* store in signed [big endian] format */
@@ -25,7 +25,3 @@ int mp_to_signed_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen)
return mp_to_signed_bin(a, b);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_to_signed_bin_n.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_to_unsigned_bin.c b/libtommath/bn_mp_to_unsigned_bin.c
index c137f10..9496398 100644
--- a/libtommath/bn_mp_to_unsigned_bin.c
+++ b/libtommath/bn_mp_to_unsigned_bin.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* store in unsigned [big endian] format */
@@ -42,7 +42,3 @@ int mp_to_unsigned_bin (mp_int * a, unsigned char *b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_to_unsigned_bin.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_to_unsigned_bin_n.c b/libtommath/bn_mp_to_unsigned_bin_n.c
index 0dc00c6..4f2a31d 100644
--- a/libtommath/bn_mp_to_unsigned_bin_n.c
+++ b/libtommath/bn_mp_to_unsigned_bin_n.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* store in unsigned [big endian] format */
@@ -25,7 +25,3 @@ int mp_to_unsigned_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen)
return mp_to_unsigned_bin(a, b);
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_to_unsigned_bin_n.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_toom_mul.c b/libtommath/bn_mp_toom_mul.c
index ad5d9e9..9daefbd 100644
--- a/libtommath/bn_mp_toom_mul.c
+++ b/libtommath/bn_mp_toom_mul.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* multiplication using the Toom-Cook 3-way algorithm
@@ -278,7 +278,3 @@ ERR:
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_toom_mul.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_toom_sqr.c b/libtommath/bn_mp_toom_sqr.c
index 48880d0..9e3f79c 100644
--- a/libtommath/bn_mp_toom_sqr.c
+++ b/libtommath/bn_mp_toom_sqr.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* squaring using Toom-Cook 3-way algorithm */
@@ -220,7 +220,3 @@ ERR:
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_toom_sqr.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_toradix.c b/libtommath/bn_mp_toradix.c
index 0adc28d..132743e 100644
--- a/libtommath/bn_mp_toradix.c
+++ b/libtommath/bn_mp_toradix.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* stores a bignum as a ASCII string in a given radix (2..64) */
@@ -69,7 +69,3 @@ int mp_toradix (mp_int * a, char *str, int radix)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_toradix.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_toradix_n.c b/libtommath/bn_mp_toradix_n.c
index 796ed55..dedce71 100644
--- a/libtommath/bn_mp_toradix_n.c
+++ b/libtommath/bn_mp_toradix_n.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* stores a bignum as a ASCII string in a given radix (2..64)
@@ -82,7 +82,3 @@ int mp_toradix_n(mp_int * a, char *str, int radix, int maxlen)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_toradix_n.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_unsigned_bin_size.c b/libtommath/bn_mp_unsigned_bin_size.c
index 6dc3bd5..58c18fb 100644
--- a/libtommath/bn_mp_unsigned_bin_size.c
+++ b/libtommath/bn_mp_unsigned_bin_size.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* get the size for an unsigned equivalent */
@@ -22,7 +22,3 @@ int mp_unsigned_bin_size (mp_int * a)
return (size / 8 + ((size & 7) != 0 ? 1 : 0));
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_unsigned_bin_size.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_xor.c b/libtommath/bn_mp_xor.c
index 59ff2e1..432f42e 100644
--- a/libtommath/bn_mp_xor.c
+++ b/libtommath/bn_mp_xor.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* XOR two ints together */
@@ -45,7 +45,3 @@ mp_xor (mp_int * a, mp_int * b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_xor.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_mp_zero.c b/libtommath/bn_mp_zero.c
index b0977d4..d697a60 100644
--- a/libtommath/bn_mp_zero.c
+++ b/libtommath/bn_mp_zero.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* set to zero */
@@ -30,7 +30,3 @@ void mp_zero (mp_int * a)
}
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_mp_zero.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_prime_tab.c b/libtommath/bn_prime_tab.c
index bd25247..c47c8bd 100644
--- a/libtommath/bn_prime_tab.c
+++ b/libtommath/bn_prime_tab.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
const mp_digit ltm_prime_tab[] = {
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
@@ -55,7 +55,3 @@ const mp_digit ltm_prime_tab[] = {
#endif
};
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_prime_tab.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_reverse.c b/libtommath/bn_reverse.c
index ddfa827..9d7fd29 100644
--- a/libtommath/bn_reverse.c
+++ b/libtommath/bn_reverse.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reverse an array, used for radix code */
@@ -33,7 +33,3 @@ bn_reverse (unsigned char *s, int len)
}
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_reverse.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_s_mp_add.c b/libtommath/bn_s_mp_add.c
index f034ae6..7527bf8 100644
--- a/libtommath/bn_s_mp_add.c
+++ b/libtommath/bn_s_mp_add.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* low level addition, based on HAC pp.594, Algorithm 14.7 */
@@ -103,7 +103,3 @@ s_mp_add (mp_int * a, mp_int * b, mp_int * c)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_s_mp_add.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_s_mp_exptmod.c b/libtommath/bn_s_mp_exptmod.c
index 097d894..ff6bd54 100644
--- a/libtommath/bn_s_mp_exptmod.c
+++ b/libtommath/bn_s_mp_exptmod.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
#ifdef MP_LOW_MEM
#define TAB_SIZE 32
@@ -246,7 +246,3 @@ LBL_M:
return err;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_s_mp_exptmod.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_s_mp_mul_digs.c b/libtommath/bn_s_mp_mul_digs.c
index f5bbf39..401f32e 100644
--- a/libtommath/bn_s_mp_mul_digs.c
+++ b/libtommath/bn_s_mp_mul_digs.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* multiplies |a| * |b| and only computes upto digs digits of result
@@ -84,7 +84,3 @@ int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_s_mp_mul_digs.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_s_mp_mul_high_digs.c b/libtommath/bn_s_mp_mul_high_digs.c
index 2b718f2..f4dca76 100644
--- a/libtommath/bn_s_mp_mul_high_digs.c
+++ b/libtommath/bn_s_mp_mul_high_digs.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* multiplies |a| * |b| and does not compute the lower digs digits
@@ -75,7 +75,3 @@ s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_s_mp_mul_high_digs.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_s_mp_sqr.c b/libtommath/bn_s_mp_sqr.c
index d2531c2..464663f 100644
--- a/libtommath/bn_s_mp_sqr.c
+++ b/libtommath/bn_s_mp_sqr.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */
@@ -78,7 +78,3 @@ int s_mp_sqr (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_s_mp_sqr.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bn_s_mp_sub.c b/libtommath/bn_s_mp_sub.c
index 6a60c39..328c9e5 100644
--- a/libtommath/bn_s_mp_sub.c
+++ b/libtommath/bn_s_mp_sub.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */
@@ -83,7 +83,3 @@ s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-
-/* $Source: /cvs/libtom/libtommath/bn_s_mp_sub.c,v $ */
-/* $Revision: 1.4 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/bncore.c b/libtommath/bncore.c
index 8fb1824..eb95a2e 100644
--- a/libtommath/bncore.c
+++ b/libtommath/bncore.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* Known optimal configurations
@@ -30,7 +30,3 @@ int KARATSUBA_MUL_CUTOFF = 80, /* Min. number of digits before Karatsub
TOOM_MUL_CUTOFF = 350, /* no optimal values of these are known yet so set em high */
TOOM_SQR_CUTOFF = 400;
#endif
-
-/* $Source: /cvs/libtom/libtommath/bncore.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/12/28 01:25:13 $ */
diff --git a/libtommath/booker.pl b/libtommath/booker.pl
index 49f1889..df8b30d 100644
--- a/libtommath/booker.pl
+++ b/libtommath/booker.pl
@@ -82,7 +82,7 @@ while (<IN>) {
# scan till next end of comment, e.g. skip license
while (<SRC>) {
$text[$line++] = $_;
- last if ($_ =~ /math\.libtomcrypt\.com/);
+ last if ($_ =~ /math\.libtomcrypt\.org/);
}
<SRC>;
}
diff --git a/libtommath/demo/demo.c b/libtommath/demo/demo.c
index bb5eb44..e1f8a5e 100644
--- a/libtommath/demo/demo.c
+++ b/libtommath/demo/demo.c
@@ -734,7 +734,3 @@ printf("compare no compare!\n"); exit(EXIT_FAILURE); }
}
return 0;
}
-
-/* $Source: /cvs/libtom/libtommath/demo/demo.c,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2005/06/24 11:32:07 $ */
diff --git a/libtommath/demo/timing.c b/libtommath/demo/timing.c
index d4660a9..bb3be52 100644
--- a/libtommath/demo/timing.c
+++ b/libtommath/demo/timing.c
@@ -313,7 +313,3 @@ int main(void)
return 0;
}
-
-/* $Source: /cvs/libtom/libtommath/demo/timing.c,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/etc/2kprime.c b/libtommath/etc/2kprime.c
index c09818f..67a2777 100644
--- a/libtommath/etc/2kprime.c
+++ b/libtommath/etc/2kprime.c
@@ -73,12 +73,3 @@ int main(void)
return 0;
}
-
-
-
-
-
-
-/* $Source: /cvs/libtom/libtommath/etc/2kprime.c,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/etc/drprime.c b/libtommath/etc/drprime.c
index e413985..0d0fdb9 100644
--- a/libtommath/etc/drprime.c
+++ b/libtommath/etc/drprime.c
@@ -57,8 +57,3 @@ int main(void)
return 0;
}
-
-
-/* $Source: /cvs/libtom/libtommath/etc/drprime.c,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/etc/mersenne.c b/libtommath/etc/mersenne.c
index 6a6497a..28ac834 100644
--- a/libtommath/etc/mersenne.c
+++ b/libtommath/etc/mersenne.c
@@ -138,7 +138,3 @@ main (void)
}
return 0;
}
-
-/* $Source: /cvs/libtom/libtommath/etc/mersenne.c,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2006/03/31 14:18:47 $ */
diff --git a/libtommath/etc/mont.c b/libtommath/etc/mont.c
index 393be4c..7839675 100644
--- a/libtommath/etc/mont.c
+++ b/libtommath/etc/mont.c
@@ -39,12 +39,3 @@ int main(void)
return 0;
}
-
-
-
-
-
-
-/* $Source: /cvs/libtom/libtommath/etc/mont.c,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/etc/pprime.c b/libtommath/etc/pprime.c
index 317e2a0..955f19e 100644
--- a/libtommath/etc/pprime.c
+++ b/libtommath/etc/pprime.c
@@ -394,7 +394,3 @@ main (void)
return 0;
}
-
-/* $Source: /cvs/libtom/libtommath/etc/pprime.c,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2006/03/31 14:18:47 $ */
diff --git a/libtommath/etc/tune.c b/libtommath/etc/tune.c
index d4a502c..acb146f 100644
--- a/libtommath/etc/tune.c
+++ b/libtommath/etc/tune.c
@@ -136,7 +136,3 @@ main (void)
return 0;
}
-
-/* $Source: /cvs/libtom/libtommath/etc/tune.c,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2006/03/31 14:18:47 $ */
diff --git a/libtommath/logs/index.html b/libtommath/logs/index.html
index 4b68c25..8c1ed9d 100644
--- a/libtommath/logs/index.html
+++ b/libtommath/logs/index.html
@@ -22,6 +22,3 @@
</body>
</html>
-/* $Source: /cvs/libtom/libtommath/logs/index.html,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/makefile.cygwin_dll b/libtommath/makefile.cygwin_dll
index 85a9b20..85b10c7 100644
--- a/libtommath/makefile.cygwin_dll
+++ b/libtommath/makefile.cygwin_dll
@@ -49,7 +49,3 @@ windll: $(OBJECTS)
test: $(OBJECTS) windll
gcc $(CFLAGS) demo/demo.c libtommath.dll.a -Wl,--enable-auto-import -o test -s
cd mtest ; $(CC) -O3 -fomit-frame-pointer -funroll-loops mtest.c -o mtest -s
-
-/* $Source: /cvs/libtom/libtommath/makefile.cygwin_dll,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:45 $ */
diff --git a/libtommath/mtest/logtab.h b/libtommath/mtest/logtab.h
index bbefaef..addd3ab 100644
--- a/libtommath/mtest/logtab.h
+++ b/libtommath/mtest/logtab.h
@@ -17,8 +17,3 @@ const float s_logv_2[] = {
0.169293808, 0.168613099, 0.167948779, 0.167300179, /* 60 61 62 63 */
0.166666667
};
-
-
-/* $Source: /cvs/libtom/libtommath/mtest/logtab.h,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/mtest/mpi-config.h b/libtommath/mtest/mpi-config.h
index 6049c25..a347263 100644
--- a/libtommath/mtest/mpi-config.h
+++ b/libtommath/mtest/mpi-config.h
@@ -1,5 +1,4 @@
/* Default configuration for MPI library */
-/* $Id: mpi-config.h,v 1.2 2005/05/05 14:38:47 tom Exp $ */
#ifndef MPI_CONFIG_H_
#define MPI_CONFIG_H_
@@ -84,7 +83,3 @@
/* crc==3287762869, version==2, Sat Feb 02 06:43:53 2002 */
-
-/* $Source: /cvs/libtom/libtommath/mtest/mpi-config.h,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/mtest/mpi-types.h b/libtommath/mtest/mpi-types.h
index 026de58..42ccfc3 100644
--- a/libtommath/mtest/mpi-types.h
+++ b/libtommath/mtest/mpi-types.h
@@ -13,8 +13,3 @@ typedef int mp_err;
#define MP_DIGIT_SIZE 2
#define DIGIT_FMT "%04X"
#define RADIX (MP_DIGIT_MAX+1)
-
-
-/* $Source: /cvs/libtom/libtommath/mtest/mpi-types.h,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/mtest/mpi.c b/libtommath/mtest/mpi.c
index ee7c8fe..4566e89 100644
--- a/libtommath/mtest/mpi.c
+++ b/libtommath/mtest/mpi.c
@@ -5,8 +5,6 @@
Copyright (C) 1998 Michael J. Fromberger, All Rights Reserved
Arbitrary precision integer arithmetic library
-
- $Id: mpi.c,v 1.2 2005/05/05 14:38:47 tom Exp $
*/
#include "mpi.h"
@@ -3979,7 +3977,3 @@ int s_mp_outlen(int bits, int r)
/*------------------------------------------------------------------------*/
/* HERE THERE BE DRAGONS */
/* crc==4242132123, version==2, Sat Feb 02 06:43:52 2002 */
-
-/* $Source: /cvs/libtom/libtommath/mtest/mpi.c,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/mtest/mpi.h b/libtommath/mtest/mpi.h
index 66ae873..211421f 100644
--- a/libtommath/mtest/mpi.h
+++ b/libtommath/mtest/mpi.h
@@ -5,8 +5,6 @@
Copyright (C) 1998 Michael J. Fromberger, All Rights Reserved
Arbitrary precision integer arithmetic library
-
- $Id: mpi.h,v 1.2 2005/05/05 14:38:47 tom Exp $
*/
#ifndef _H_MPI_
@@ -225,7 +223,3 @@ int mp_char2value(char ch, int r);
const char *mp_strerror(mp_err ec);
#endif /* end _H_MPI_ */
-
-/* $Source: /cvs/libtom/libtommath/mtest/mpi.h,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/mtest/mtest.c b/libtommath/mtest/mtest.c
index bdfe612..d46f456 100644
--- a/libtommath/mtest/mtest.c
+++ b/libtommath/mtest/mtest.c
@@ -302,7 +302,3 @@ int main(void)
fclose(rng);
return 0;
}
-
-/* $Source: /cvs/libtom/libtommath/mtest/mtest.c,v $ */
-/* $Revision: 1.2 $ */
-/* $Date: 2005/05/05 14:38:47 $ */
diff --git a/libtommath/pre_gen/mpi.c b/libtommath/pre_gen/mpi.c
index 62ec029..b7a5bed 100644
--- a/libtommath/pre_gen/mpi.c
+++ b/libtommath/pre_gen/mpi.c
@@ -43,10 +43,6 @@ char *mp_error_to_string(int code)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_error.c */
/* Start: bn_fast_mp_invmod.c */
@@ -195,10 +191,6 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &B, &D, NULL);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_mp_invmod.c */
/* Start: bn_fast_mp_montgomery_reduce.c */
@@ -371,10 +363,6 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_mp_montgomery_reduce.c */
/* Start: bn_fast_s_mp_mul_digs.c */
@@ -482,10 +470,6 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_s_mp_mul_digs.c */
/* Start: bn_fast_s_mp_mul_high_digs.c */
@@ -584,10 +568,6 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_s_mp_mul_high_digs.c */
/* Start: bn_fast_s_mp_sqr.c */
@@ -702,10 +682,6 @@ int fast_s_mp_sqr (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_s_mp_sqr.c */
/* Start: bn_mp_2expt.c */
@@ -754,10 +730,6 @@ mp_2expt (mp_int * a, int b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_2expt.c */
/* Start: bn_mp_abs.c */
@@ -801,10 +773,6 @@ mp_abs (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_abs.c */
/* Start: bn_mp_add.c */
@@ -858,10 +826,6 @@ int mp_add (mp_int * a, mp_int * b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_add.c */
/* Start: bn_mp_add_d.c */
@@ -974,10 +938,6 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_add_d.c */
/* Start: bn_mp_addmod.c */
@@ -1019,10 +979,6 @@ mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_addmod.c */
/* Start: bn_mp_and.c */
@@ -1080,10 +1036,6 @@ mp_and (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_and.c */
/* Start: bn_mp_clamp.c */
@@ -1128,10 +1080,6 @@ mp_clamp (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_clamp.c */
/* Start: bn_mp_clear.c */
@@ -1176,10 +1124,6 @@ mp_clear (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_clear.c */
/* Start: bn_mp_clear_multi.c */
@@ -1214,10 +1158,6 @@ void mp_clear_multi(mp_int *mp, ...)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_clear_multi.c */
/* Start: bn_mp_cmp.c */
@@ -1261,10 +1201,6 @@ mp_cmp (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cmp.c */
/* Start: bn_mp_cmp_d.c */
@@ -1309,10 +1245,6 @@ int mp_cmp_d(mp_int * a, mp_digit b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cmp_d.c */
/* Start: bn_mp_cmp_mag.c */
@@ -1368,10 +1300,6 @@ int mp_cmp_mag (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cmp_mag.c */
/* Start: bn_mp_cnt_lsb.c */
@@ -1425,10 +1353,6 @@ int mp_cnt_lsb(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cnt_lsb.c */
/* Start: bn_mp_copy.c */
@@ -1497,10 +1421,6 @@ mp_copy (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_copy.c */
/* Start: bn_mp_count_bits.c */
@@ -1546,10 +1466,6 @@ mp_count_bits (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_count_bits.c */
/* Start: bn_mp_div.c */
@@ -1842,10 +1758,6 @@ LBL_Q:mp_clear (&q);
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div.c */
/* Start: bn_mp_div_2.c */
@@ -1914,10 +1826,6 @@ int mp_div_2(mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_2.c */
/* Start: bn_mp_div_2d.c */
@@ -2015,10 +1923,6 @@ int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_2d.c */
/* Start: bn_mp_div_3.c */
@@ -2098,10 +2002,6 @@ mp_div_3 (mp_int * a, mp_int *c, mp_digit * d)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_3.c */
/* Start: bn_mp_div_d.c */
@@ -2212,10 +2112,6 @@ int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_d.c */
/* Start: bn_mp_dr_is_modulus.c */
@@ -2259,10 +2155,6 @@ int mp_dr_is_modulus(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_dr_is_modulus.c */
/* Start: bn_mp_dr_reduce.c */
@@ -2357,10 +2249,6 @@ top:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_dr_reduce.c */
/* Start: bn_mp_dr_setup.c */
@@ -2393,10 +2281,6 @@ void mp_dr_setup(mp_int *a, mp_digit *d)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_dr_setup.c */
/* Start: bn_mp_exch.c */
@@ -2431,10 +2315,6 @@ mp_exch (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exch.c */
/* Start: bn_mp_expt_d.c */
@@ -2492,10 +2372,6 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_expt_d.c */
/* Start: bn_mp_exptmod.c */
@@ -2608,10 +2484,6 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exptmod.c */
/* Start: bn_mp_exptmod_fast.c */
@@ -2932,11 +2804,6 @@ LBL_M:
}
#endif
-
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exptmod_fast.c */
/* Start: bn_mp_exteuclid.c */
@@ -3019,10 +2886,6 @@ _ERR: mp_clear_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exteuclid.c */
/* Start: bn_mp_fread.c */
@@ -3090,10 +2953,6 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_fread.c */
/* Start: bn_mp_fwrite.c */
@@ -3146,10 +3005,6 @@ int mp_fwrite(mp_int *a, int radix, FILE *stream)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_fwrite.c */
/* Start: bn_mp_gcd.c */
@@ -3255,10 +3110,6 @@ LBL_U:mp_clear (&v);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_gcd.c */
/* Start: bn_mp_get_int.c */
@@ -3304,10 +3155,6 @@ unsigned long mp_get_int(mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_get_int.c */
/* Start: bn_mp_grow.c */
@@ -3365,10 +3212,6 @@ int mp_grow (mp_int * a, int size)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_grow.c */
/* Start: bn_mp_init.c */
@@ -3415,10 +3258,6 @@ int mp_init (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init.c */
/* Start: bn_mp_init_copy.c */
@@ -3451,10 +3290,6 @@ int mp_init_copy (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_copy.c */
/* Start: bn_mp_init_multi.c */
@@ -3514,10 +3349,6 @@ int mp_init_multi(mp_int *mp, ...)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_multi.c */
/* Start: bn_mp_init_set.c */
@@ -3550,10 +3381,6 @@ int mp_init_set (mp_int * a, mp_digit b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_set.c */
/* Start: bn_mp_init_set_int.c */
@@ -3585,10 +3412,6 @@ int mp_init_set_int (mp_int * a, unsigned long b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_set_int.c */
/* Start: bn_mp_init_size.c */
@@ -3637,10 +3460,6 @@ int mp_init_size (mp_int * a, int size)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_size.c */
/* Start: bn_mp_invmod.c */
@@ -3684,10 +3503,6 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_invmod.c */
/* Start: bn_mp_invmod_slow.c */
@@ -3863,10 +3678,6 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &A, &B, &C, &D, NULL);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_invmod_slow.c */
/* Start: bn_mp_is_square.c */
@@ -3976,10 +3787,6 @@ ERR:mp_clear(&t);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_is_square.c */
/* Start: bn_mp_jacobi.c */
@@ -4085,10 +3892,6 @@ LBL_A1:mp_clear (&a1);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_jacobi.c */
/* Start: bn_mp_karatsuba_mul.c */
@@ -4256,10 +4059,6 @@ ERR:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_karatsuba_mul.c */
/* Start: bn_mp_karatsuba_sqr.c */
@@ -4381,10 +4180,6 @@ ERR:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_karatsuba_sqr.c */
/* Start: bn_mp_lcm.c */
@@ -4445,10 +4240,6 @@ LBL_T:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_lcm.c */
/* Start: bn_mp_lshd.c */
@@ -4516,10 +4307,6 @@ int mp_lshd (mp_int * a, int b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_lshd.c */
/* Start: bn_mp_mod.c */
@@ -4568,10 +4355,6 @@ mp_mod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mod.c */
/* Start: bn_mp_mod_2d.c */
@@ -4627,10 +4410,6 @@ mp_mod_2d (mp_int * a, int b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mod_2d.c */
/* Start: bn_mp_mod_d.c */
@@ -4658,10 +4437,6 @@ mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mod_d.c */
/* Start: bn_mp_montgomery_calc_normalization.c */
@@ -4721,10 +4496,6 @@ int mp_montgomery_calc_normalization (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_montgomery_calc_normalization.c */
/* Start: bn_mp_montgomery_reduce.c */
@@ -4843,10 +4614,6 @@ mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_montgomery_reduce.c */
/* Start: bn_mp_montgomery_setup.c */
@@ -4906,10 +4673,6 @@ mp_montgomery_setup (mp_int * n, mp_digit * rho)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_montgomery_setup.c */
/* Start: bn_mp_mul.c */
@@ -4976,10 +4739,6 @@ int mp_mul (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul.c */
/* Start: bn_mp_mul_2.c */
@@ -5062,10 +4821,6 @@ int mp_mul_2(mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul_2.c */
/* Start: bn_mp_mul_2d.c */
@@ -5151,10 +4906,6 @@ int mp_mul_2d (mp_int * a, int b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul_2d.c */
/* Start: bn_mp_mul_d.c */
@@ -5234,10 +4985,6 @@ mp_mul_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul_d.c */
/* Start: bn_mp_mulmod.c */
@@ -5278,10 +5025,6 @@ int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mulmod.c */
/* Start: bn_mp_n_root.c */
@@ -5414,10 +5157,6 @@ LBL_T1:mp_clear (&t1);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_n_root.c */
/* Start: bn_mp_neg.c */
@@ -5458,10 +5197,6 @@ int mp_neg (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_neg.c */
/* Start: bn_mp_or.c */
@@ -5512,10 +5247,6 @@ int mp_or (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_or.c */
/* Start: bn_mp_prime_fermat.c */
@@ -5578,10 +5309,6 @@ LBL_T:mp_clear (&t);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_fermat.c */
/* Start: bn_mp_prime_is_divisible.c */
@@ -5632,10 +5359,6 @@ int mp_prime_is_divisible (mp_int * a, int *result)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_is_divisible.c */
/* Start: bn_mp_prime_is_prime.c */
@@ -5719,10 +5442,6 @@ LBL_B:mp_clear (&b);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_is_prime.c */
/* Start: bn_mp_prime_miller_rabin.c */
@@ -5826,10 +5545,6 @@ LBL_N1:mp_clear (&n1);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_miller_rabin.c */
/* Start: bn_mp_prime_next_prime.c */
@@ -6000,10 +5715,6 @@ LBL_ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_next_prime.c */
/* Start: bn_mp_prime_rabin_miller_trials.c */
@@ -6056,10 +5767,6 @@ int mp_prime_rabin_miller_trials(int size)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_rabin_miller_trials.c */
/* Start: bn_mp_prime_random_ex.c */
@@ -6185,10 +5892,6 @@ error:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_random_ex.c */
/* Start: bn_mp_radix_size.c */
@@ -6267,10 +5970,6 @@ int mp_radix_size (mp_int * a, int radix, int *size)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_radix_size.c */
/* Start: bn_mp_radix_smap.c */
@@ -6295,10 +5994,6 @@ int mp_radix_size (mp_int * a, int radix, int *size)
const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_radix_smap.c */
/* Start: bn_mp_rand.c */
@@ -6354,10 +6049,6 @@ mp_rand (mp_int * a, int digits)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_rand.c */
/* Start: bn_mp_read_radix.c */
@@ -6443,10 +6134,6 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_read_radix.c */
/* Start: bn_mp_read_signed_bin.c */
@@ -6488,10 +6175,6 @@ int mp_read_signed_bin (mp_int * a, const unsigned char *b, int c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_read_signed_bin.c */
/* Start: bn_mp_read_unsigned_bin.c */
@@ -6547,10 +6230,6 @@ int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_read_unsigned_bin.c */
/* Start: bn_mp_reduce.c */
@@ -6651,10 +6330,6 @@ CLEANUP:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce.c */
/* Start: bn_mp_reduce_2k.c */
@@ -6716,10 +6391,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k.c */
/* Start: bn_mp_reduce_2k_l.c */
@@ -6782,10 +6453,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k_l.c */
/* Start: bn_mp_reduce_2k_setup.c */
@@ -6833,10 +6500,6 @@ int mp_reduce_2k_setup(mp_int *a, mp_digit *d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k_setup.c */
/* Start: bn_mp_reduce_2k_setup_l.c */
@@ -6881,10 +6544,6 @@ ERR:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k_setup_l.c */
/* Start: bn_mp_reduce_is_2k.c */
@@ -6937,10 +6596,6 @@ int mp_reduce_is_2k(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_is_2k.c */
/* Start: bn_mp_reduce_is_2k_l.c */
@@ -6985,10 +6640,6 @@ int mp_reduce_is_2k_l(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_is_2k_l.c */
/* Start: bn_mp_reduce_setup.c */
@@ -7023,10 +6674,6 @@ int mp_reduce_setup (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_setup.c */
/* Start: bn_mp_rshd.c */
@@ -7099,10 +6746,6 @@ void mp_rshd (mp_int * a, int b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_rshd.c */
/* Start: bn_mp_set.c */
@@ -7132,10 +6775,6 @@ void mp_set (mp_int * a, mp_digit b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_set.c */
/* Start: bn_mp_set_int.c */
@@ -7184,10 +6823,6 @@ int mp_set_int (mp_int * a, unsigned long b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_set_int.c */
/* Start: bn_mp_shrink.c */
@@ -7223,10 +6858,6 @@ int mp_shrink (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_shrink.c */
/* Start: bn_mp_signed_bin_size.c */
@@ -7254,10 +6885,6 @@ int mp_signed_bin_size (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_signed_bin_size.c */
/* Start: bn_mp_sqr.c */
@@ -7316,10 +6943,6 @@ if (a->used >= KARATSUBA_SQR_CUTOFF) {
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sqr.c */
/* Start: bn_mp_sqrmod.c */
@@ -7361,14 +6984,11 @@ mp_sqrmod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sqrmod.c */
/* Start: bn_mp_sqrt.c */
#include <tommath.h>
+
#ifdef BN_MP_SQRT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
@@ -7446,10 +7066,6 @@ E2: mp_clear(&t1);
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sqrt.c */
/* Start: bn_mp_sub.c */
@@ -7509,10 +7125,6 @@ mp_sub (mp_int * a, mp_int * b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sub.c */
/* Start: bn_mp_sub_d.c */
@@ -7606,10 +7218,6 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sub_d.c */
/* Start: bn_mp_submod.c */
@@ -7652,10 +7260,6 @@ mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_submod.c */
/* Start: bn_mp_to_signed_bin.c */
@@ -7689,10 +7293,6 @@ int mp_to_signed_bin (mp_int * a, unsigned char *b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_signed_bin.c */
/* Start: bn_mp_to_signed_bin_n.c */
@@ -7724,10 +7324,6 @@ int mp_to_signed_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_signed_bin_n.c */
/* Start: bn_mp_to_unsigned_bin.c */
@@ -7776,10 +7372,6 @@ int mp_to_unsigned_bin (mp_int * a, unsigned char *b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_unsigned_bin.c */
/* Start: bn_mp_to_unsigned_bin_n.c */
@@ -7811,10 +7403,6 @@ int mp_to_unsigned_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_unsigned_bin_n.c */
/* Start: bn_mp_toom_mul.c */
@@ -8099,10 +7687,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toom_mul.c */
/* Start: bn_mp_toom_sqr.c */
@@ -8329,10 +7913,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toom_sqr.c */
/* Start: bn_mp_toradix.c */
@@ -8408,10 +7988,6 @@ int mp_toradix (mp_int * a, char *str, int radix)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toradix.c */
/* Start: bn_mp_toradix_n.c */
@@ -8500,10 +8076,6 @@ int mp_toradix_n(mp_int * a, char *str, int radix, int maxlen)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toradix_n.c */
/* Start: bn_mp_unsigned_bin_size.c */
@@ -8532,10 +8104,6 @@ int mp_unsigned_bin_size (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_unsigned_bin_size.c */
/* Start: bn_mp_xor.c */
@@ -8587,10 +8155,6 @@ mp_xor (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_xor.c */
/* Start: bn_mp_zero.c */
@@ -8627,10 +8191,6 @@ void mp_zero (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_zero.c */
/* Start: bn_prime_tab.c */
@@ -8692,10 +8252,6 @@ const mp_digit ltm_prime_tab[] = {
};
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_prime_tab.c */
/* Start: bn_reverse.c */
@@ -8735,10 +8291,6 @@ bn_reverse (unsigned char *s, int len)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_reverse.c */
/* Start: bn_s_mp_add.c */
@@ -8848,10 +8400,6 @@ s_mp_add (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_add.c */
/* Start: bn_s_mp_exptmod.c */
@@ -9104,10 +8652,6 @@ LBL_M:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_exptmod.c */
/* Start: bn_s_mp_mul_digs.c */
@@ -9198,10 +8742,6 @@ int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_mul_digs.c */
/* Start: bn_s_mp_mul_high_digs.c */
@@ -9283,10 +8823,6 @@ s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_mul_high_digs.c */
/* Start: bn_s_mp_sqr.c */
@@ -9371,10 +8907,6 @@ int s_mp_sqr (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_sqr.c */
/* Start: bn_s_mp_sub.c */
@@ -9464,10 +8996,6 @@ s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_sub.c */
/* Start: bncore.c */
@@ -9504,10 +9032,6 @@ int KARATSUBA_MUL_CUTOFF = 80, /* Min. number of digits before Karatsub
TOOM_SQR_CUTOFF = 400;
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bncore.c */
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index c778f02..4b3a76f 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -219,7 +219,7 @@ int mp_init_size(mp_int *a, int size);
/* ---> Basic Manipulations <--- */
#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
-#define mp_iseven(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
+#define mp_iseven(a) (((a)->used == 0 || (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
#define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
/* set to zero */
@@ -577,8 +577,3 @@ extern const char *mp_s_rmap;
#endif
#endif
-
-
-/* $Source: /cvs/libtom/libtommath/tommath.h,v $ */
-/* $Revision: 1.8 $ */
-/* $Date: 2006/03/31 14:18:44 $ */
diff --git a/libtommath/tommath_class.h b/libtommath/tommath_class.h
index 166dd80..b9cc902 100644
--- a/libtommath/tommath_class.h
+++ b/libtommath/tommath_class.h
@@ -993,7 +993,3 @@
#else
#define LTM_LAST
#endif
-
-/* $Source: /cvs/libtom/libtommath/tommath_class.h,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2005/07/28 11:59:32 $ */
diff --git a/libtommath/tommath_superclass.h b/libtommath/tommath_superclass.h
index 2fdebe6..e3926df 100644
--- a/libtommath/tommath_superclass.h
+++ b/libtommath/tommath_superclass.h
@@ -70,7 +70,3 @@
#endif
#endif
-
-/* $Source: /cvs/libtom/libtommath/tommath_superclass.h,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2005/05/14 13:29:17 $ */