summaryrefslogtreecommitdiffstats
path: root/libtommath/pre_gen/mpi.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-06-16 14:48:35 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-06-16 14:48:35 (GMT)
commitb700360ad9501defb0b1e2d86353ac8d0db8eef4 (patch)
tree8b3bcb3adb8bd2eb44bcf16bb091722274e03e9e /libtommath/pre_gen/mpi.c
parentc755ef08151343eb145710489f8c999edbef15ff (diff)
parent296aebbd6ee092a25741684fa37ee31ef5a3e222 (diff)
downloadtcl-b700360ad9501defb0b1e2d86353ac8d0db8eef4.zip
tcl-b700360ad9501defb0b1e2d86353ac8d0db8eef4.tar.gz
tcl-b700360ad9501defb0b1e2d86353ac8d0db8eef4.tar.bz2
Merge up to the 8.6.0 release.
Diffstat (limited to 'libtommath/pre_gen/mpi.c')
-rw-r--r--libtommath/pre_gen/mpi.c502
1 files changed, 18 insertions, 484 deletions
diff --git a/libtommath/pre_gen/mpi.c b/libtommath/pre_gen/mpi.c
index 62ec029..d2224c0 100644
--- a/libtommath/pre_gen/mpi.c
+++ b/libtommath/pre_gen/mpi.c
@@ -43,10 +43,6 @@ char *mp_error_to_string(int code)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_error.c */
/* Start: bn_fast_mp_invmod.c */
@@ -195,10 +191,6 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &B, &D, NULL);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_mp_invmod.c */
/* Start: bn_fast_mp_montgomery_reduce.c */
@@ -371,10 +363,6 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_mp_montgomery_reduce.c */
/* Start: bn_fast_s_mp_mul_digs.c */
@@ -482,10 +470,6 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_s_mp_mul_digs.c */
/* Start: bn_fast_s_mp_mul_high_digs.c */
@@ -569,7 +553,7 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
register mp_digit *tmpc;
tmpc = c->dp + digs;
- for (ix = digs; ix <= pa; ix++) {
+ for (ix = digs; ix < pa; ix++) {
/* now extract the previous digit [below the carry] */
*tmpc++ = W[ix];
}
@@ -584,10 +568,6 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_s_mp_mul_high_digs.c */
/* Start: bn_fast_s_mp_sqr.c */
@@ -702,10 +682,6 @@ int fast_s_mp_sqr (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_fast_s_mp_sqr.c */
/* Start: bn_mp_2expt.c */
@@ -754,10 +730,6 @@ mp_2expt (mp_int * a, int b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_2expt.c */
/* Start: bn_mp_abs.c */
@@ -801,10 +773,6 @@ mp_abs (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_abs.c */
/* Start: bn_mp_add.c */
@@ -858,10 +826,6 @@ int mp_add (mp_int * a, mp_int * b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_add.c */
/* Start: bn_mp_add_d.c */
@@ -974,10 +938,6 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_add_d.c */
/* Start: bn_mp_addmod.c */
@@ -1019,10 +979,6 @@ mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_addmod.c */
/* Start: bn_mp_and.c */
@@ -1080,10 +1036,6 @@ mp_and (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_and.c */
/* Start: bn_mp_clamp.c */
@@ -1128,10 +1080,6 @@ mp_clamp (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_clamp.c */
/* Start: bn_mp_clear.c */
@@ -1176,10 +1124,6 @@ mp_clear (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_clear.c */
/* Start: bn_mp_clear_multi.c */
@@ -1214,10 +1158,6 @@ void mp_clear_multi(mp_int *mp, ...)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_clear_multi.c */
/* Start: bn_mp_cmp.c */
@@ -1261,10 +1201,6 @@ mp_cmp (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cmp.c */
/* Start: bn_mp_cmp_d.c */
@@ -1309,10 +1245,6 @@ int mp_cmp_d(mp_int * a, mp_digit b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cmp_d.c */
/* Start: bn_mp_cmp_mag.c */
@@ -1368,10 +1300,6 @@ int mp_cmp_mag (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cmp_mag.c */
/* Start: bn_mp_cnt_lsb.c */
@@ -1425,10 +1353,6 @@ int mp_cnt_lsb(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_cnt_lsb.c */
/* Start: bn_mp_copy.c */
@@ -1497,10 +1421,6 @@ mp_copy (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_copy.c */
/* Start: bn_mp_count_bits.c */
@@ -1546,10 +1466,6 @@ mp_count_bits (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_count_bits.c */
/* Start: bn_mp_div.c */
@@ -1842,10 +1758,6 @@ LBL_Q:mp_clear (&q);
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div.c */
/* Start: bn_mp_div_2.c */
@@ -1914,10 +1826,6 @@ int mp_div_2(mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_2.c */
/* Start: bn_mp_div_2d.c */
@@ -2015,10 +1923,6 @@ int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_2d.c */
/* Start: bn_mp_div_3.c */
@@ -2098,10 +2002,6 @@ mp_div_3 (mp_int * a, mp_int *c, mp_digit * d)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_3.c */
/* Start: bn_mp_div_d.c */
@@ -2126,7 +2026,12 @@ static int s_is_power_of_two(mp_digit b, int *p)
{
int x;
- for (x = 1; x < DIGIT_BIT; x++) {
+ /* fast return if no power of two */
+ if ((b==0) || (b & (b-1))) {
+ return 0;
+ }
+
+ for (x = 0; x < DIGIT_BIT; x++) {
if (b == (((mp_digit)1)<<x)) {
*p = x;
return 1;
@@ -2212,10 +2117,6 @@ int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_div_d.c */
/* Start: bn_mp_dr_is_modulus.c */
@@ -2259,10 +2160,6 @@ int mp_dr_is_modulus(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_dr_is_modulus.c */
/* Start: bn_mp_dr_reduce.c */
@@ -2357,10 +2254,6 @@ top:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_dr_reduce.c */
/* Start: bn_mp_dr_setup.c */
@@ -2393,10 +2286,6 @@ void mp_dr_setup(mp_int *a, mp_digit *d)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_dr_setup.c */
/* Start: bn_mp_exch.c */
@@ -2431,10 +2320,6 @@ mp_exch (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exch.c */
/* Start: bn_mp_expt_d.c */
@@ -2492,10 +2377,6 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_expt_d.c */
/* Start: bn_mp_exptmod.c */
@@ -2608,10 +2489,6 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exptmod.c */
/* Start: bn_mp_exptmod_fast.c */
@@ -2932,11 +2809,6 @@ LBL_M:
}
#endif
-
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exptmod_fast.c */
/* Start: bn_mp_exteuclid.c */
@@ -3019,10 +2891,6 @@ _ERR: mp_clear_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_exteuclid.c */
/* Start: bn_mp_fread.c */
@@ -3090,10 +2958,6 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_fread.c */
/* Start: bn_mp_fwrite.c */
@@ -3146,10 +3010,6 @@ int mp_fwrite(mp_int *a, int radix, FILE *stream)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_fwrite.c */
/* Start: bn_mp_gcd.c */
@@ -3255,10 +3115,6 @@ LBL_U:mp_clear (&v);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_gcd.c */
/* Start: bn_mp_get_int.c */
@@ -3304,10 +3160,6 @@ unsigned long mp_get_int(mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_get_int.c */
/* Start: bn_mp_grow.c */
@@ -3365,10 +3217,6 @@ int mp_grow (mp_int * a, int size)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_grow.c */
/* Start: bn_mp_init.c */
@@ -3415,10 +3263,6 @@ int mp_init (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init.c */
/* Start: bn_mp_init_copy.c */
@@ -3451,10 +3295,6 @@ int mp_init_copy (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_copy.c */
/* Start: bn_mp_init_multi.c */
@@ -3514,10 +3354,6 @@ int mp_init_multi(mp_int *mp, ...)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_multi.c */
/* Start: bn_mp_init_set.c */
@@ -3550,10 +3386,6 @@ int mp_init_set (mp_int * a, mp_digit b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_set.c */
/* Start: bn_mp_init_set_int.c */
@@ -3585,10 +3417,6 @@ int mp_init_set_int (mp_int * a, unsigned long b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_set_int.c */
/* Start: bn_mp_init_size.c */
@@ -3637,10 +3465,6 @@ int mp_init_size (mp_int * a, int size)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_init_size.c */
/* Start: bn_mp_invmod.c */
@@ -3684,10 +3508,6 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_invmod.c */
/* Start: bn_mp_invmod_slow.c */
@@ -3863,10 +3683,6 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &A, &B, &C, &D, NULL);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_invmod_slow.c */
/* Start: bn_mp_is_square.c */
@@ -3976,10 +3792,6 @@ ERR:mp_clear(&t);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_is_square.c */
/* Start: bn_mp_jacobi.c */
@@ -4085,10 +3897,6 @@ LBL_A1:mp_clear (&a1);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_jacobi.c */
/* Start: bn_mp_karatsuba_mul.c */
@@ -4256,10 +4064,6 @@ ERR:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_karatsuba_mul.c */
/* Start: bn_mp_karatsuba_sqr.c */
@@ -4381,10 +4185,6 @@ ERR:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_karatsuba_sqr.c */
/* Start: bn_mp_lcm.c */
@@ -4445,10 +4245,6 @@ LBL_T:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_lcm.c */
/* Start: bn_mp_lshd.c */
@@ -4516,10 +4312,6 @@ int mp_lshd (mp_int * a, int b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_lshd.c */
/* Start: bn_mp_mod.c */
@@ -4568,10 +4360,6 @@ mp_mod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mod.c */
/* Start: bn_mp_mod_2d.c */
@@ -4627,10 +4415,6 @@ mp_mod_2d (mp_int * a, int b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mod_2d.c */
/* Start: bn_mp_mod_d.c */
@@ -4658,10 +4442,6 @@ mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mod_d.c */
/* Start: bn_mp_montgomery_calc_normalization.c */
@@ -4721,10 +4501,6 @@ int mp_montgomery_calc_normalization (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_montgomery_calc_normalization.c */
/* Start: bn_mp_montgomery_reduce.c */
@@ -4843,10 +4619,6 @@ mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_montgomery_reduce.c */
/* Start: bn_mp_montgomery_setup.c */
@@ -4900,16 +4672,12 @@ mp_montgomery_setup (mp_int * n, mp_digit * rho)
#endif
/* rho = -1/m mod b */
- *rho = (((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
+ *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
return MP_OKAY;
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_montgomery_setup.c */
/* Start: bn_mp_mul.c */
@@ -4976,10 +4744,6 @@ int mp_mul (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul.c */
/* Start: bn_mp_mul_2.c */
@@ -5062,10 +4826,6 @@ int mp_mul_2(mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul_2.c */
/* Start: bn_mp_mul_2d.c */
@@ -5151,10 +4911,6 @@ int mp_mul_2d (mp_int * a, int b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul_2d.c */
/* Start: bn_mp_mul_d.c */
@@ -5234,10 +4990,6 @@ mp_mul_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mul_d.c */
/* Start: bn_mp_mulmod.c */
@@ -5278,10 +5030,6 @@ int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_mulmod.c */
/* Start: bn_mp_n_root.c */
@@ -5414,10 +5162,6 @@ LBL_T1:mp_clear (&t1);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_n_root.c */
/* Start: bn_mp_neg.c */
@@ -5458,10 +5202,6 @@ int mp_neg (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_neg.c */
/* Start: bn_mp_or.c */
@@ -5512,10 +5252,6 @@ int mp_or (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_or.c */
/* Start: bn_mp_prime_fermat.c */
@@ -5578,10 +5314,6 @@ LBL_T:mp_clear (&t);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_fermat.c */
/* Start: bn_mp_prime_is_divisible.c */
@@ -5632,10 +5364,6 @@ int mp_prime_is_divisible (mp_int * a, int *result)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_is_divisible.c */
/* Start: bn_mp_prime_is_prime.c */
@@ -5719,10 +5447,6 @@ LBL_B:mp_clear (&b);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_is_prime.c */
/* Start: bn_mp_prime_miller_rabin.c */
@@ -5826,10 +5550,6 @@ LBL_N1:mp_clear (&n1);
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_miller_rabin.c */
/* Start: bn_mp_prime_next_prime.c */
@@ -5978,7 +5698,7 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style)
/* is this prime? */
for (x = 0; x < t; x++) {
- mp_set(&b, ltm_prime_tab[t]);
+ mp_set(&b, ltm_prime_tab[x]);
if ((err = mp_prime_miller_rabin(a, &b, &res)) != MP_OKAY) {
goto LBL_ERR;
}
@@ -6000,10 +5720,6 @@ LBL_ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_next_prime.c */
/* Start: bn_mp_prime_rabin_miller_trials.c */
@@ -6056,10 +5772,6 @@ int mp_prime_rabin_miller_trials(int size)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_rabin_miller_trials.c */
/* Start: bn_mp_prime_random_ex.c */
@@ -6185,10 +5897,6 @@ error:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_prime_random_ex.c */
/* Start: bn_mp_radix_size.c */
@@ -6267,10 +5975,6 @@ int mp_radix_size (mp_int * a, int radix, int *size)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_radix_size.c */
/* Start: bn_mp_radix_smap.c */
@@ -6295,10 +5999,6 @@ int mp_radix_size (mp_int * a, int radix, int *size)
const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_radix_smap.c */
/* Start: bn_mp_rand.c */
@@ -6354,10 +6054,6 @@ mp_rand (mp_int * a, int digits)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_rand.c */
/* Start: bn_mp_read_radix.c */
@@ -6443,10 +6139,6 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_read_radix.c */
/* Start: bn_mp_read_signed_bin.c */
@@ -6488,10 +6180,6 @@ int mp_read_signed_bin (mp_int * a, const unsigned char *b, int c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_read_signed_bin.c */
/* Start: bn_mp_read_unsigned_bin.c */
@@ -6547,10 +6235,6 @@ int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_read_unsigned_bin.c */
/* Start: bn_mp_reduce.c */
@@ -6651,10 +6335,6 @@ CLEANUP:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce.c */
/* Start: bn_mp_reduce_2k.c */
@@ -6716,10 +6396,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k.c */
/* Start: bn_mp_reduce_2k_l.c */
@@ -6782,10 +6458,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k_l.c */
/* Start: bn_mp_reduce_2k_setup.c */
@@ -6833,10 +6505,6 @@ int mp_reduce_2k_setup(mp_int *a, mp_digit *d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k_setup.c */
/* Start: bn_mp_reduce_2k_setup_l.c */
@@ -6881,10 +6549,6 @@ ERR:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_2k_setup_l.c */
/* Start: bn_mp_reduce_is_2k.c */
@@ -6937,10 +6601,6 @@ int mp_reduce_is_2k(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_is_2k.c */
/* Start: bn_mp_reduce_is_2k_l.c */
@@ -6985,10 +6645,6 @@ int mp_reduce_is_2k_l(mp_int *a)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_is_2k_l.c */
/* Start: bn_mp_reduce_setup.c */
@@ -7023,10 +6679,6 @@ int mp_reduce_setup (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_reduce_setup.c */
/* Start: bn_mp_rshd.c */
@@ -7099,10 +6751,6 @@ void mp_rshd (mp_int * a, int b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_rshd.c */
/* Start: bn_mp_set.c */
@@ -7132,10 +6780,6 @@ void mp_set (mp_int * a, mp_digit b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_set.c */
/* Start: bn_mp_set_int.c */
@@ -7184,10 +6828,6 @@ int mp_set_int (mp_int * a, unsigned long b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_set_int.c */
/* Start: bn_mp_shrink.c */
@@ -7212,21 +6852,22 @@ int mp_set_int (mp_int * a, unsigned long b)
int mp_shrink (mp_int * a)
{
mp_digit *tmp;
- if (a->alloc != a->used && a->used > 0) {
- if ((tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * a->used)) == NULL) {
+ int used = 1;
+
+ if(a->used > 0)
+ used = a->used;
+
+ if (a->alloc != used) {
+ if ((tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * used)) == NULL) {
return MP_MEM;
}
a->dp = tmp;
- a->alloc = a->used;
+ a->alloc = used;
}
return MP_OKAY;
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_shrink.c */
/* Start: bn_mp_signed_bin_size.c */
@@ -7254,10 +6895,6 @@ int mp_signed_bin_size (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_signed_bin_size.c */
/* Start: bn_mp_sqr.c */
@@ -7316,10 +6953,6 @@ if (a->used >= KARATSUBA_SQR_CUTOFF) {
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sqr.c */
/* Start: bn_mp_sqrmod.c */
@@ -7361,14 +6994,11 @@ mp_sqrmod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sqrmod.c */
/* Start: bn_mp_sqrt.c */
#include <tommath.h>
+
#ifdef BN_MP_SQRT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
@@ -7446,10 +7076,6 @@ E2: mp_clear(&t1);
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sqrt.c */
/* Start: bn_mp_sub.c */
@@ -7509,10 +7135,6 @@ mp_sub (mp_int * a, mp_int * b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sub.c */
/* Start: bn_mp_sub_d.c */
@@ -7606,10 +7228,6 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_sub_d.c */
/* Start: bn_mp_submod.c */
@@ -7652,10 +7270,6 @@ mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_submod.c */
/* Start: bn_mp_to_signed_bin.c */
@@ -7689,10 +7303,6 @@ int mp_to_signed_bin (mp_int * a, unsigned char *b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_signed_bin.c */
/* Start: bn_mp_to_signed_bin_n.c */
@@ -7724,10 +7334,6 @@ int mp_to_signed_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_signed_bin_n.c */
/* Start: bn_mp_to_unsigned_bin.c */
@@ -7776,10 +7382,6 @@ int mp_to_unsigned_bin (mp_int * a, unsigned char *b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_unsigned_bin.c */
/* Start: bn_mp_to_unsigned_bin_n.c */
@@ -7811,10 +7413,6 @@ int mp_to_unsigned_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_to_unsigned_bin_n.c */
/* Start: bn_mp_toom_mul.c */
@@ -8099,10 +7697,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toom_mul.c */
/* Start: bn_mp_toom_sqr.c */
@@ -8329,10 +7923,6 @@ ERR:
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toom_sqr.c */
/* Start: bn_mp_toradix.c */
@@ -8408,10 +7998,6 @@ int mp_toradix (mp_int * a, char *str, int radix)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toradix.c */
/* Start: bn_mp_toradix_n.c */
@@ -8500,10 +8086,6 @@ int mp_toradix_n(mp_int * a, char *str, int radix, int maxlen)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_toradix_n.c */
/* Start: bn_mp_unsigned_bin_size.c */
@@ -8532,10 +8114,6 @@ int mp_unsigned_bin_size (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_unsigned_bin_size.c */
/* Start: bn_mp_xor.c */
@@ -8587,10 +8165,6 @@ mp_xor (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_xor.c */
/* Start: bn_mp_zero.c */
@@ -8627,10 +8201,6 @@ void mp_zero (mp_int * a)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_mp_zero.c */
/* Start: bn_prime_tab.c */
@@ -8692,10 +8262,6 @@ const mp_digit ltm_prime_tab[] = {
};
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_prime_tab.c */
/* Start: bn_reverse.c */
@@ -8735,10 +8301,6 @@ bn_reverse (unsigned char *s, int len)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_reverse.c */
/* Start: bn_s_mp_add.c */
@@ -8848,10 +8410,6 @@ s_mp_add (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_add.c */
/* Start: bn_s_mp_exptmod.c */
@@ -9104,10 +8662,6 @@ LBL_M:
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_exptmod.c */
/* Start: bn_s_mp_mul_digs.c */
@@ -9198,10 +8752,6 @@ int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_mul_digs.c */
/* Start: bn_s_mp_mul_high_digs.c */
@@ -9283,10 +8833,6 @@ s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_mul_high_digs.c */
/* Start: bn_s_mp_sqr.c */
@@ -9371,10 +8917,6 @@ int s_mp_sqr (mp_int * a, mp_int * b)
}
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_sqr.c */
/* Start: bn_s_mp_sub.c */
@@ -9464,10 +9006,6 @@ s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bn_s_mp_sub.c */
/* Start: bncore.c */
@@ -9504,10 +9042,6 @@ int KARATSUBA_MUL_CUTOFF = 80, /* Min. number of digits before Karatsub
TOOM_SQR_CUTOFF = 400;
#endif
-/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/pre_gen/mpi.c,v $ */
-/* $Revision: 1.1.1.5 $ */
-/* $Date: 2006/12/01 00:08:34 $ */
-
/* End: bncore.c */