summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath')
-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, 1180 insertions, 219 deletions
diff --git a/libtommath/bn_error.c b/libtommath/bn_error.c
index 6393bb0..b1b7177 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
static const struct {
@@ -41,3 +41,7 @@ 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 fafd9dc..ff03dff 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes the modular inverse via binary extended euclidean algorithm,
@@ -142,3 +142,7 @@ 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 e941dc2..b6c0694 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction
@@ -166,3 +166,7 @@ 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 ab157b9..91e10d6 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Fast (comba) multiplier
@@ -101,3 +101,7 @@ 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 ec9f58a..5b114d7 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* this is a modified version of fast_s_mul_digs that only produces
@@ -92,3 +92,7 @@ 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 1abf24b..19e92ef 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* the jist of squaring...
@@ -108,3 +108,7 @@ 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 a32572d..f422ffc 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes a = 2**b
@@ -42,3 +42,7 @@ 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 dc51884..09dd722 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* b = |a|
@@ -37,3 +37,7 @@ 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 d9b8fa5..be20644 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* high level addition (handles signs) */
@@ -47,3 +47,7 @@ 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 5281ad4..8ca36c1 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* single digit addition */
@@ -37,9 +37,8 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
/* c = |a| - b */
res = mp_sub_d(a, b, c);
- /* fix signs */
- a->sign = MP_NEG;
- c->sign = (c->used) ? MP_NEG : MP_ZPOS;
+ /* fix sign */
+ a->sign = c->sign = MP_NEG;
/* clamp */
mp_clamp(c);
@@ -107,3 +106,7 @@ 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 bff193f..6d8afe1 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* d = a + b (mod c) */
@@ -35,3 +35,7 @@ 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 02bef18..8ea2287 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* AND two ints together */
@@ -51,3 +51,7 @@ 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 74887bb..359c2ff 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* trim unused digits
@@ -38,3 +38,7 @@ 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 bd07e76..a65f0a3 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* clear one (frees) */
@@ -38,3 +38,7 @@ 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 c3ad7a8..daaea79 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include <stdarg.h>
@@ -28,3 +28,7 @@ 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 b965d4b..533f36b 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* compare two ints (signed)*/
@@ -37,3 +37,7 @@ mp_cmp (mp_int * a, 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 a446bb4..724c1c3 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* compare a digit */
@@ -38,3 +38,7 @@ int mp_cmp_d(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 3506d2b..693eb7c 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* compare maginitude of two ints (unsigned) */
@@ -49,3 +49,7 @@ int mp_cmp_mag (mp_int * a, 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 6447a1f..66d1a74 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
static const int lnz[16] = {
@@ -47,3 +47,7 @@ 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 0de7565..b0de16d 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* copy, b = a */
@@ -62,3 +62,7 @@ mp_copy (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 6c2d7ac..8bc5657 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* returns the number of bits in an int */
@@ -39,3 +39,7 @@ mp_count_bits (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 de4ca04..aee9c94 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#ifdef BN_MP_DIV_SMALL
@@ -286,3 +286,7 @@ 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 186a959..7ee3e5b 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* b = a/2 */
@@ -62,3 +62,7 @@ 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 2f8d812..4f7fa59 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* shift right by a certain bit count (store quotient in c, optional remainder in d) */
@@ -91,3 +91,7 @@ int mp_div_2d (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 79a9816..3c60269 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* divide by three (based on routine from MPI and the GMP manual) */
@@ -73,3 +73,7 @@ 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 f2729d2..d64b4b5 100644
--- a/libtommath/bn_mp_div_d.c
+++ b/libtommath/bn_mp_div_d.c
@@ -12,17 +12,13 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
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;
@@ -108,3 +104,7 @@ 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 8ad31dc..5237344 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines if a number is a valid DR modulus */
@@ -37,3 +37,7 @@ 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 8337591..e60b578 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* reduce "x" in place modulo "n" using the Diminished Radix algorithm.
@@ -88,3 +88,7 @@ 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 de00e2d..1d7d856 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines the setup value */
@@ -26,3 +26,7 @@ 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 b7bd186..38574e0 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* swap the elements of two integers, for cases where you can't simply swap the
@@ -28,3 +28,7 @@ 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 132f480..4bdc2d1 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* calculate c = a**b using a square-multiply algorithm */
@@ -51,3 +51,7 @@ 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 b7d9fb7..0231916 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
@@ -106,3 +106,7 @@ 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 1902e79..2a3b3c9 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85
@@ -314,3 +314,8 @@ 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 2e69ce1..e6c4ce2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Extended euclidean algorithm of (a, b) produces
@@ -76,3 +76,7 @@ _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 44e1ea8..b344b6f 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* read a bigint from a file stream in ASCII */
@@ -61,3 +61,7 @@ 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 b0ec29e..a0b4c6b 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
int mp_fwrite(mp_int *a, int radix, FILE *stream)
@@ -46,3 +46,7 @@ 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 68cfa03..b39ba90 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Greatest Common Divisor using the binary method */
@@ -99,3 +99,7 @@ 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 762cb23..17162e2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* get the lower 32-bits of an mp_int */
@@ -39,3 +39,7 @@ 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 b5b2407..cf2b949 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* grow as required */
@@ -51,3 +51,7 @@ 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 ddb2d07..8be27f5 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* init a new mp_int */
@@ -40,3 +40,7 @@ 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 2410a9f..0160811 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* creates "a" then copies b into it */
@@ -26,3 +26,7 @@ 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 44e3fe6..59dc3a9 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include <stdarg.h>
@@ -53,3 +53,7 @@ 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 dc08867..34edad9 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* initialize and set a digit */
@@ -26,3 +26,7 @@ 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 56b27e0..5c55993 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* initialize and set a digit */
@@ -25,3 +25,7 @@ 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 8ed2c2a..8e01418 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* init an mp_init for a given size */
@@ -42,3 +42,7 @@ 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 fdb6c88..1546514 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* hac 14.61, pp608 */
@@ -37,3 +37,7 @@ 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 e079819..eedd47d 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* hac 14.61, pp608 */
@@ -169,3 +169,7 @@ 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 926b449..50c5244 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Check if remainders are possible squares - fast exclude non-squares */
@@ -103,3 +103,7 @@ 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 1644698..91cfeea 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes the jacobi c = (a | n) (or Legendre if n is prime)
@@ -99,3 +99,7 @@ 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 0d62b9b..8ea2c27 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* c = |a| * |b| using Karatsuba Multiplication using
@@ -161,3 +161,7 @@ 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 829405a..a5e198b 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Karatsuba squaring, computes b = a*a using three
@@ -115,3 +115,7 @@ 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 1d53921..781eef5 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes least common multiple as |a*b|/(a, b) */
@@ -54,3 +54,7 @@ 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 ce1e63b..f118cf1 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* shift left a certain amount of digits */
@@ -61,3 +61,7 @@ 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 98e155e..f5cf8d0 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* c = a mod b, 0 <= c < b */
@@ -42,3 +42,7 @@ 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 25868cd..e194a06 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* calc a value mod 2**b */
@@ -49,3 +49,7 @@ mp_mod_2d (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 f642ee8..9ca37e6 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
int
@@ -21,3 +21,7 @@ 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 0748762..c669fe0 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/*
@@ -53,3 +53,7 @@ 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 bc6abb8..b765090 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction */
@@ -112,3 +112,7 @@ 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 9bbe0c8..261a9fb 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* setups the montgomery reduction stuff */
@@ -53,3 +53,7 @@ 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 fc024be..8b1117a 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* high level multiplication (handles sign) */
@@ -60,3 +60,7 @@ 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 2ca6022..02455fc 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* b = a*2 */
@@ -76,3 +76,7 @@ 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 cabff13..efeff2e 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* shift left by a certain bit count */
@@ -79,3 +79,7 @@ int mp_mul_2d (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 ba45a0c..00f9a89 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* multiply by a digit */
@@ -73,3 +73,7 @@ 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 649b717..003ceb9 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* d = a * b (mod c) */
@@ -34,3 +34,7 @@ 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 b2700a8..0e7bedc 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* find the n'th root of an integer
@@ -126,3 +126,7 @@ 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 777b59b..a7d035a 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* b = -a */
@@ -34,3 +34,7 @@ int mp_neg (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 aa5b1bd..bff4995 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* OR two ints together */
@@ -44,3 +44,7 @@ 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 7b9b12e..c23d77f 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* performs one Fermat test.
@@ -56,3 +56,7 @@ 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 710c967..8e7871c 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines if an integers is divisible by one
@@ -44,3 +44,7 @@ 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 ce225a3..c316d62 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* performs a variable number of rounds of Miller-Rabin
@@ -77,3 +77,7 @@ 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 c5185b8..ddf0358 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Miller-Rabin test of "a" to the base of "b" as described in
@@ -97,3 +97,7 @@ 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 3171d61..daf2ec7 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* finds the next prime after the number "a" using "t" trials
@@ -164,3 +164,7 @@ 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 e57a43c..248c2fd 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
@@ -46,3 +46,7 @@ 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 a37477e..07aae4b 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* makes a truly random prime of a given size (bits),
@@ -119,3 +119,7 @@ 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 40c4d04..1b61e3a 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* returns size of ASCII reprensentation */
@@ -66,18 +66,13 @@ 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.
- * 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 digs + 1, the 1 is for the NULL byte that would be required. */
+ *size = digs + 1;
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 7aeb375..7d72feb 100644
--- a/libtommath/bn_mp_radix_smap.c
+++ b/libtommath/bn_mp_radix_smap.c
@@ -12,9 +12,13 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* 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 17c1fbe..af66a67 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* makes a pseudo-random int of a given size */
@@ -49,3 +49,7 @@ 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 4b92589..91c46c2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* 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 ((unsigned char) *str) : *str);
+ ch = (char) ((radix < 36) ? toupper (*str) : *str);
for (y = 0; y < 64; y++) {
if (ch == mp_s_rmap[y]) {
break;
@@ -72,13 +72,6 @@ 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;
@@ -86,3 +79,7 @@ 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 3ee8556..8da651c 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* read signed bin, big endian, first byte is 0==positive or 1==negative */
@@ -35,3 +35,7 @@ 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 caf5be0..1ebba13 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* reads a unsigned char array, assumes the msb is stored first [big endian] */
@@ -49,3 +49,7 @@ 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 4375e4e..21d0730 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* reduces x mod m, assumes 0 < x < m**2, mu is
@@ -94,3 +94,7 @@ 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 428f2ff..d9620c2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* reduces a modulo n where n is of the form 2**p - d */
@@ -55,3 +55,7 @@ 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 8e52efa..f06103d 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* reduces a modulo n where n is of the form 2**p - d
@@ -56,3 +56,7 @@ 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 ac043f6..a80e7a2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines the setup value */
@@ -41,3 +41,7 @@ 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 b59a1ed..7cf002e 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines the setup value */
@@ -38,3 +38,7 @@ 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 4655fcf..7308be7 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines if mp_reduce_2k can be used */
@@ -46,3 +46,7 @@ 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 7b57865..14a4d21 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* determines if reduce_2k_l can be used */
@@ -38,3 +38,7 @@ 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 d8cefd9..370f20b 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* pre-calculate the value required for Barrett reduction
@@ -28,3 +28,7 @@ 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 e6095b3..2a693c5 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* shift right a certain amount of digits */
@@ -66,3 +66,7 @@ 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 c32fc42..174adcb 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* set to a digit */
@@ -23,3 +23,7 @@ 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 b0fc344..cf10ea1 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* set a 32-bit const */
@@ -42,3 +42,7 @@ 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 482ca48..4b8c5ef 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* shrink a bignum */
@@ -29,3 +29,7 @@ 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 8f88e76..6739d19 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* get the size for an signed equivalent */
@@ -21,3 +21,7 @@ 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 3938537..868ccbb 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* computes b = a*a */
@@ -52,3 +52,7 @@ 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 6f90772..161cbbb 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* c = a * a (mod b) */
@@ -35,3 +35,7 @@ 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 016b8ba..8fd057c 100644
--- a/libtommath/bn_mp_sqrt.c
+++ b/libtommath/bn_mp_sqrt.c
@@ -1,5 +1,4 @@
#include <tommath.h>
-
#ifdef BN_MP_SQRT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
@@ -13,23 +12,14 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
-#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) {
@@ -41,72 +31,17 @@ int mp_sqrt(mp_int *arg, mp_int *ret)
mp_zero(ret);
return MP_OKAY;
}
-
- 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;
- }
-
- 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]);
+ if ((res = mp_init_copy(&t1, arg)) != MP_OKAY) {
+ return res;
}
- /*
- * 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;
+ if ((res = mp_init(&t2)) != MP_OKAY) {
+ goto E2;
}
-#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
+ /* First approx. (not very bad for large arg) */
+ mp_rshd (&t1,t1.used/2);
/* t1 > 0 */
if ((res = mp_div(arg,&t1,&t2,NULL)) != MP_OKAY) {
@@ -140,3 +75,7 @@ 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 13cb43e..f5015cc 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* high level subtraction (handles signs) */
@@ -53,3 +53,7 @@ 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 b1e4e3f..06cdca6 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* single digit subtraction */
@@ -87,3 +87,7 @@ 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 7461678..869e23c 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* d = a - b (mod c) */
@@ -36,3 +36,7 @@ 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 7871921..9df83ca 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* store in signed [big endian] format */
@@ -27,3 +27,7 @@ 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 8da9961..677f827 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* store in signed [big endian] format */
@@ -25,3 +25,7 @@ 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 9496398..c137f10 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* store in unsigned [big endian] format */
@@ -42,3 +42,7 @@ 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 4f2a31d..0dc00c6 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* store in unsigned [big endian] format */
@@ -25,3 +25,7 @@ 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 9daefbd..ad5d9e9 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* multiplication using the Toom-Cook 3-way algorithm
@@ -278,3 +278,7 @@ 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 9e3f79c..48880d0 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* squaring using Toom-Cook 3-way algorithm */
@@ -220,3 +220,7 @@ 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 132743e..0adc28d 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* stores a bignum as a ASCII string in a given radix (2..64) */
@@ -69,3 +69,7 @@ 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 dedce71..796ed55 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* stores a bignum as a ASCII string in a given radix (2..64)
@@ -82,3 +82,7 @@ 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 58c18fb..6dc3bd5 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* get the size for an unsigned equivalent */
@@ -22,3 +22,7 @@ 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 432f42e..59ff2e1 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* XOR two ints together */
@@ -45,3 +45,7 @@ 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 d697a60..b0977d4 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* set to zero */
@@ -30,3 +30,7 @@ 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 c47c8bd..bd25247 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
const mp_digit ltm_prime_tab[] = {
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
@@ -55,3 +55,7 @@ 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 9d7fd29..ddfa827 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* reverse an array, used for radix code */
@@ -33,3 +33,7 @@ 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 7527bf8..f034ae6 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* low level addition, based on HAC pp.594, Algorithm 14.7 */
@@ -103,3 +103,7 @@ 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 ff6bd54..097d894 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#ifdef MP_LOW_MEM
#define TAB_SIZE 32
@@ -246,3 +246,7 @@ 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 401f32e..f5bbf39 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* multiplies |a| * |b| and only computes upto digs digits of result
@@ -84,3 +84,7 @@ 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 f4dca76..2b718f2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* multiplies |a| * |b| and does not compute the lower digs digits
@@ -75,3 +75,7 @@ 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 464663f..d2531c2 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */
@@ -78,3 +78,7 @@ 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 328c9e5..6a60c39 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */
@@ -83,3 +83,7 @@ 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 eb95a2e..8fb1824 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://math.libtomcrypt.com
+ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/* Known optimal configurations
@@ -30,3 +30,7 @@ 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 df8b30d..49f1889 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\.org/);
+ last if ($_ =~ /math\.libtomcrypt\.com/);
}
<SRC>;
}
diff --git a/libtommath/demo/demo.c b/libtommath/demo/demo.c
index e1f8a5e..bb5eb44 100644
--- a/libtommath/demo/demo.c
+++ b/libtommath/demo/demo.c
@@ -734,3 +734,7 @@ 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 bb3be52..d4660a9 100644
--- a/libtommath/demo/timing.c
+++ b/libtommath/demo/timing.c
@@ -313,3 +313,7 @@ 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 67a2777..c09818f 100644
--- a/libtommath/etc/2kprime.c
+++ b/libtommath/etc/2kprime.c
@@ -73,3 +73,12 @@ 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 0d0fdb9..e413985 100644
--- a/libtommath/etc/drprime.c
+++ b/libtommath/etc/drprime.c
@@ -57,3 +57,8 @@ 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 28ac834..6a6497a 100644
--- a/libtommath/etc/mersenne.c
+++ b/libtommath/etc/mersenne.c
@@ -138,3 +138,7 @@ 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 7839675..393be4c 100644
--- a/libtommath/etc/mont.c
+++ b/libtommath/etc/mont.c
@@ -39,3 +39,12 @@ 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 955f19e..317e2a0 100644
--- a/libtommath/etc/pprime.c
+++ b/libtommath/etc/pprime.c
@@ -394,3 +394,7 @@ 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 acb146f..d4a502c 100644
--- a/libtommath/etc/tune.c
+++ b/libtommath/etc/tune.c
@@ -136,3 +136,7 @@ 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 8c1ed9d..4b68c25 100644
--- a/libtommath/logs/index.html
+++ b/libtommath/logs/index.html
@@ -22,3 +22,6 @@
</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 85b10c7..85a9b20 100644
--- a/libtommath/makefile.cygwin_dll
+++ b/libtommath/makefile.cygwin_dll
@@ -49,3 +49,7 @@ 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 addd3ab..bbefaef 100644
--- a/libtommath/mtest/logtab.h
+++ b/libtommath/mtest/logtab.h
@@ -17,3 +17,8 @@ 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 a347263..6049c25 100644
--- a/libtommath/mtest/mpi-config.h
+++ b/libtommath/mtest/mpi-config.h
@@ -1,4 +1,5 @@
/* 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_
@@ -83,3 +84,7 @@
/* 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 42ccfc3..026de58 100644
--- a/libtommath/mtest/mpi-types.h
+++ b/libtommath/mtest/mpi-types.h
@@ -13,3 +13,8 @@ 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 5114bef..7c712dd 100644
--- a/libtommath/mtest/mpi.c
+++ b/libtommath/mtest/mpi.c
@@ -5,6 +5,8 @@
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"
@@ -3977,3 +3979,7 @@ 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 211421f..66ae873 100644
--- a/libtommath/mtest/mpi.h
+++ b/libtommath/mtest/mpi.h
@@ -5,6 +5,8 @@
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_
@@ -223,3 +225,7 @@ 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 d46f456..bdfe612 100644
--- a/libtommath/mtest/mtest.c
+++ b/libtommath/mtest/mtest.c
@@ -302,3 +302,7 @@ 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 b7a5bed..62ec029 100644
--- a/libtommath/pre_gen/mpi.c
+++ b/libtommath/pre_gen/mpi.c
@@ -43,6 +43,10 @@ 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 */
@@ -191,6 +195,10 @@ 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 */
@@ -363,6 +371,10 @@ 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 */
@@ -470,6 +482,10 @@ 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 */
@@ -568,6 +584,10 @@ 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 */
@@ -682,6 +702,10 @@ 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 */
@@ -730,6 +754,10 @@ 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 */
@@ -773,6 +801,10 @@ 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 */
@@ -826,6 +858,10 @@ 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 */
@@ -938,6 +974,10 @@ 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 */
@@ -979,6 +1019,10 @@ 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 */
@@ -1036,6 +1080,10 @@ 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 */
@@ -1080,6 +1128,10 @@ 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 */
@@ -1124,6 +1176,10 @@ 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 */
@@ -1158,6 +1214,10 @@ 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 */
@@ -1201,6 +1261,10 @@ 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 */
@@ -1245,6 +1309,10 @@ 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 */
@@ -1300,6 +1368,10 @@ 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 */
@@ -1353,6 +1425,10 @@ 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 */
@@ -1421,6 +1497,10 @@ 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 */
@@ -1466,6 +1546,10 @@ 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 */
@@ -1758,6 +1842,10 @@ 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 */
@@ -1826,6 +1914,10 @@ 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 */
@@ -1923,6 +2015,10 @@ 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 */
@@ -2002,6 +2098,10 @@ 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 */
@@ -2112,6 +2212,10 @@ 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 */
@@ -2155,6 +2259,10 @@ 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 */
@@ -2249,6 +2357,10 @@ 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 */
@@ -2281,6 +2393,10 @@ 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 */
@@ -2315,6 +2431,10 @@ 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 */
@@ -2372,6 +2492,10 @@ 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 */
@@ -2484,6 +2608,10 @@ 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 */
@@ -2804,6 +2932,11 @@ 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 */
@@ -2886,6 +3019,10 @@ _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 */
@@ -2953,6 +3090,10 @@ 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 */
@@ -3005,6 +3146,10 @@ 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 */
@@ -3110,6 +3255,10 @@ 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 */
@@ -3155,6 +3304,10 @@ 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 */
@@ -3212,6 +3365,10 @@ 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 */
@@ -3258,6 +3415,10 @@ 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 */
@@ -3290,6 +3451,10 @@ 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 */
@@ -3349,6 +3514,10 @@ 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 */
@@ -3381,6 +3550,10 @@ 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 */
@@ -3412,6 +3585,10 @@ 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 */
@@ -3460,6 +3637,10 @@ 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 */
@@ -3503,6 +3684,10 @@ 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 */
@@ -3678,6 +3863,10 @@ 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 */
@@ -3787,6 +3976,10 @@ 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 */
@@ -3892,6 +4085,10 @@ 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 */
@@ -4059,6 +4256,10 @@ 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 */
@@ -4180,6 +4381,10 @@ 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 */
@@ -4240,6 +4445,10 @@ 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 */
@@ -4307,6 +4516,10 @@ 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 */
@@ -4355,6 +4568,10 @@ 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 */
@@ -4410,6 +4627,10 @@ 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 */
@@ -4437,6 +4658,10 @@ 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 */
@@ -4496,6 +4721,10 @@ 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 */
@@ -4614,6 +4843,10 @@ 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 */
@@ -4673,6 +4906,10 @@ 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 */
@@ -4739,6 +4976,10 @@ 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 */
@@ -4821,6 +5062,10 @@ 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 */
@@ -4906,6 +5151,10 @@ 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 */
@@ -4985,6 +5234,10 @@ 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 */
@@ -5025,6 +5278,10 @@ 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 */
@@ -5157,6 +5414,10 @@ 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 */
@@ -5197,6 +5458,10 @@ 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 */
@@ -5247,6 +5512,10 @@ 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 */
@@ -5309,6 +5578,10 @@ 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 */
@@ -5359,6 +5632,10 @@ 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 */
@@ -5442,6 +5719,10 @@ 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 */
@@ -5545,6 +5826,10 @@ 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 */
@@ -5715,6 +6000,10 @@ 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 */
@@ -5767,6 +6056,10 @@ 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 */
@@ -5892,6 +6185,10 @@ 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 */
@@ -5970,6 +6267,10 @@ 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 */
@@ -5994,6 +6295,10 @@ 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 */
@@ -6049,6 +6354,10 @@ 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 */
@@ -6134,6 +6443,10 @@ 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 */
@@ -6175,6 +6488,10 @@ 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 */
@@ -6230,6 +6547,10 @@ 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 */
@@ -6330,6 +6651,10 @@ 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 */
@@ -6391,6 +6716,10 @@ 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 */
@@ -6453,6 +6782,10 @@ 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 */
@@ -6500,6 +6833,10 @@ 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 */
@@ -6544,6 +6881,10 @@ 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 */
@@ -6596,6 +6937,10 @@ 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 */
@@ -6640,6 +6985,10 @@ 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 */
@@ -6674,6 +7023,10 @@ 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 */
@@ -6746,6 +7099,10 @@ 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 */
@@ -6775,6 +7132,10 @@ 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 */
@@ -6823,6 +7184,10 @@ 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 */
@@ -6858,6 +7223,10 @@ 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 */
@@ -6885,6 +7254,10 @@ 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 */
@@ -6943,6 +7316,10 @@ 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 */
@@ -6984,11 +7361,14 @@ 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
*
@@ -7066,6 +7446,10 @@ 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 */
@@ -7125,6 +7509,10 @@ 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 */
@@ -7218,6 +7606,10 @@ 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 */
@@ -7260,6 +7652,10 @@ 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 */
@@ -7293,6 +7689,10 @@ 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 */
@@ -7324,6 +7724,10 @@ 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 */
@@ -7372,6 +7776,10 @@ 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 */
@@ -7403,6 +7811,10 @@ 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 */
@@ -7687,6 +8099,10 @@ 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 */
@@ -7913,6 +8329,10 @@ 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 */
@@ -7988,6 +8408,10 @@ 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 */
@@ -8076,6 +8500,10 @@ 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 */
@@ -8104,6 +8532,10 @@ 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 */
@@ -8155,6 +8587,10 @@ 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 */
@@ -8191,6 +8627,10 @@ 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 */
@@ -8252,6 +8692,10 @@ 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 */
@@ -8291,6 +8735,10 @@ 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 */
@@ -8400,6 +8848,10 @@ 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 */
@@ -8652,6 +9104,10 @@ 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 */
@@ -8742,6 +9198,10 @@ 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 */
@@ -8823,6 +9283,10 @@ 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 */
@@ -8907,6 +9371,10 @@ 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 */
@@ -8996,6 +9464,10 @@ 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 */
@@ -9032,6 +9504,10 @@ 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 b706576..3c00b9e 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,3 +577,8 @@ 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 b9cc902..166dd80 100644
--- a/libtommath/tommath_class.h
+++ b/libtommath/tommath_class.h
@@ -993,3 +993,7 @@
#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 e3926df..2fdebe6 100644
--- a/libtommath/tommath_superclass.h
+++ b/libtommath/tommath_superclass.h
@@ -70,3 +70,7 @@
#endif
#endif
+
+/* $Source: /cvs/libtom/libtommath/tommath_superclass.h,v $ */
+/* $Revision: 1.3 $ */
+/* $Date: 2005/05/14 13:29:17 $ */