diff --git a/bn_mp_2expt.c b/bn_mp_2expt.c index 34259f3..1e74337 100644 --- a/bn_mp_2expt.c +++ b/bn_mp_2expt.c @@ -20,8 +20,7 @@ * Simple algorithm which zeroes the int, grows it then just sets one bit * as required. */ -int -mp_2expt (mp_int * a, int b) +int mp_2expt (mp_int * a, int b) { int res; diff --git a/bn_mp_abs.c b/bn_mp_abs.c index 815f423..d50ecfe 100644 --- a/bn_mp_abs.c +++ b/bn_mp_abs.c @@ -19,8 +19,7 @@ * * Simple function copies the input and fixes the sign to positive */ -int -mp_abs (mp_int * a, mp_int * b) +int mp_abs (mp_int * a, mp_int * b) { int res; diff --git a/bn_mp_add_d.c b/bn_mp_add_d.c index fd1a186..a355339 100644 --- a/bn_mp_add_d.c +++ b/bn_mp_add_d.c @@ -16,8 +16,7 @@ */ /* single digit addition */ -int -mp_add_d (mp_int * a, mp_digit b, mp_int * c) +int mp_add_d (mp_int * a, mp_digit b, mp_int * c) { int res, ix, oldused; mp_digit *tmpa, *tmpc, mu; diff --git a/bn_mp_addmod.c b/bn_mp_addmod.c index 1ce7e4d..d71c08b 100644 --- a/bn_mp_addmod.c +++ b/bn_mp_addmod.c @@ -16,8 +16,7 @@ */ /* d = a + b (mod c) */ -int -mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) +int mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) { int res; mp_int t; diff --git a/bn_mp_and.c b/bn_mp_and.c index 45b64f1..48956fb 100644 --- a/bn_mp_and.c +++ b/bn_mp_and.c @@ -16,8 +16,7 @@ */ /* AND two ints together */ -int -mp_and (mp_int * a, mp_int * b, mp_int * c) +int mp_and (mp_int * a, mp_int * b, mp_int * c) { int res, ix, px; mp_int t, *x; diff --git a/bn_mp_clamp.c b/bn_mp_clamp.c index e9ecb73..2fbed7b 100644 --- a/bn_mp_clamp.c +++ b/bn_mp_clamp.c @@ -22,8 +22,7 @@ * Typically very fast. Also fixes the sign if there * are no more leading digits */ -void -mp_clamp (mp_int * a) +void mp_clamp (mp_int * a) { /* decrease used while the most significant digit is * zero. diff --git a/bn_mp_clear.c b/bn_mp_clear.c index 97f3db0..ebb42ee 100644 --- a/bn_mp_clear.c +++ b/bn_mp_clear.c @@ -16,8 +16,7 @@ */ /* clear one (frees) */ -void -mp_clear (mp_int * a) +void mp_clear (mp_int * a) { int i; diff --git a/bn_mp_cmp.c b/bn_mp_cmp.c index 01bc876..b9477a8 100644 --- a/bn_mp_cmp.c +++ b/bn_mp_cmp.c @@ -16,8 +16,7 @@ */ /* compare two ints (signed)*/ -int -mp_cmp (mp_int * a, mp_int * b) +int mp_cmp (mp_int * a, mp_int * b) { /* compare based on sign */ if (a->sign != b->sign) { diff --git a/bn_mp_copy.c b/bn_mp_copy.c index e3aa9a1..e9ef6f4 100644 --- a/bn_mp_copy.c +++ b/bn_mp_copy.c @@ -16,8 +16,7 @@ */ /* copy, b = a */ -int -mp_copy (mp_int * a, mp_int * b) +int mp_copy (mp_int * a, mp_int * b) { int res, n; diff --git a/bn_mp_count_bits.c b/bn_mp_count_bits.c index 0d8af7d..5fa47ff 100644 --- a/bn_mp_count_bits.c +++ b/bn_mp_count_bits.c @@ -16,8 +16,7 @@ */ /* returns the number of bits in an int */ -int -mp_count_bits (mp_int * a) +int mp_count_bits (mp_int * a) { int r; mp_digit q; diff --git a/bn_mp_div_3.c b/bn_mp_div_3.c index 69d5100..4721f77 100644 --- a/bn_mp_div_3.c +++ b/bn_mp_div_3.c @@ -16,8 +16,7 @@ */ /* divide by three (based on routine from MPI and the GMP manual) */ -int -mp_div_3 (mp_int * a, mp_int *c, mp_digit * d) +int mp_div_3 (mp_int * a, mp_int *c, mp_digit * d) { mp_int q; mp_word w, t; diff --git a/bn_mp_dr_reduce.c b/bn_mp_dr_reduce.c index c269715..bca4bdc 100644 --- a/bn_mp_dr_reduce.c +++ b/bn_mp_dr_reduce.c @@ -29,8 +29,7 @@ * * Input x must be in the range 0 <= x <= (n-1)**2 */ -int -mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k) +int mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k) { int err, i, m; mp_word r; diff --git a/bn_mp_exch.c b/bn_mp_exch.c index bca2c68..3b023c8 100644 --- a/bn_mp_exch.c +++ b/bn_mp_exch.c @@ -18,8 +18,7 @@ /* swap the elements of two integers, for cases where you can't simply swap the * mp_int pointers around */ -void -mp_exch (mp_int * a, mp_int * b) +void mp_exch (mp_int * a, mp_int * b) { mp_int t; diff --git a/bn_mp_mod.c b/bn_mp_mod.c index 45f6dea..79c46af 100644 --- a/bn_mp_mod.c +++ b/bn_mp_mod.c @@ -16,8 +16,7 @@ */ /* c = a mod b, 0 <= c < b if b > 0, b < c <= 0 if b < 0 */ -int -mp_mod (mp_int * a, mp_int * b, mp_int * c) +int mp_mod (mp_int * a, mp_int * b, mp_int * c) { mp_int t; int res; diff --git a/bn_mp_mod_2d.c b/bn_mp_mod_2d.c index fae5c3f..fb39887 100644 --- a/bn_mp_mod_2d.c +++ b/bn_mp_mod_2d.c @@ -16,8 +16,7 @@ */ /* calc a value mod 2**b */ -int -mp_mod_2d (mp_int * a, int b, mp_int * c) +int mp_mod_2d (mp_int * a, int b, mp_int * c) { int x, res; diff --git a/bn_mp_mod_d.c b/bn_mp_mod_d.c index bf2ccaa..42fa063 100644 --- a/bn_mp_mod_d.c +++ b/bn_mp_mod_d.c @@ -15,8 +15,7 @@ * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ -int -mp_mod_d (mp_int * a, mp_digit b, mp_digit * c) +int mp_mod_d (mp_int * a, mp_digit b, mp_digit * c) { return mp_div_d(a, b, NULL, c); } diff --git a/bn_mp_montgomery_reduce.c b/bn_mp_montgomery_reduce.c index ab5c77d..207fa74 100644 --- a/bn_mp_montgomery_reduce.c +++ b/bn_mp_montgomery_reduce.c @@ -16,8 +16,7 @@ */ /* computes xR**-1 == x (mod N) via Montgomery Reduction */ -int -mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) +int mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) { int ix, res, digs; mp_digit mu; diff --git a/bn_mp_montgomery_setup.c b/bn_mp_montgomery_setup.c index 1c17445..12330d0 100644 --- a/bn_mp_montgomery_setup.c +++ b/bn_mp_montgomery_setup.c @@ -16,8 +16,7 @@ */ /* setups the montgomery reduction stuff */ -int -mp_montgomery_setup (mp_int * n, mp_digit * rho) +int mp_montgomery_setup (mp_int * n, mp_digit * rho) { mp_digit x, b; diff --git a/bn_mp_mul_d.c b/bn_mp_mul_d.c index 38de7c5..2fcee05 100644 --- a/bn_mp_mul_d.c +++ b/bn_mp_mul_d.c @@ -16,8 +16,7 @@ */ /* multiply by a digit */ -int -mp_mul_d (mp_int * a, mp_digit b, mp_int * c) +int mp_mul_d (mp_int * a, mp_digit b, mp_int * c) { mp_digit u, *tmpa, *tmpc; mp_word r; diff --git a/bn_mp_rand.c b/bn_mp_rand.c index 2992d53..b9da051 100644 --- a/bn_mp_rand.c +++ b/bn_mp_rand.c @@ -41,8 +41,7 @@ static mp_digit s_gen_random(void) return d; } -int -mp_rand (mp_int * a, int digits) +int mp_rand (mp_int * a, int digits) { int res; mp_digit d; diff --git a/bn_mp_sqr.c b/bn_mp_sqr.c index 9aed3d9..ef91ff0 100644 --- a/bn_mp_sqr.c +++ b/bn_mp_sqr.c @@ -16,8 +16,7 @@ */ /* computes b = a*a */ -int -mp_sqr (mp_int * a, mp_int * b) +int mp_sqr (mp_int * a, mp_int * b) { int res; diff --git a/bn_mp_sqrmod.c b/bn_mp_sqrmod.c index 6a03fac..3f12fec 100644 --- a/bn_mp_sqrmod.c +++ b/bn_mp_sqrmod.c @@ -16,8 +16,7 @@ */ /* c = a * a (mod b) */ -int -mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) +int mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) { int res; mp_int t; diff --git a/bn_mp_sub.c b/bn_mp_sub.c index d458102..7a5f490 100644 --- a/bn_mp_sub.c +++ b/bn_mp_sub.c @@ -16,8 +16,7 @@ */ /* high level subtraction (handles signs) */ -int -mp_sub (mp_int * a, mp_int * b, mp_int * c) +int mp_sub (mp_int * a, mp_int * b, mp_int * c) { int sa, sb, res; diff --git a/bn_mp_sub_d.c b/bn_mp_sub_d.c index 5e96030..34ace3e 100644 --- a/bn_mp_sub_d.c +++ b/bn_mp_sub_d.c @@ -16,8 +16,7 @@ */ /* single digit subtraction */ -int -mp_sub_d (mp_int * a, mp_digit b, mp_int * c) +int mp_sub_d (mp_int * a, mp_digit b, mp_int * c) { mp_digit *tmpa, *tmpc, mu; int res, ix, oldused; diff --git a/bn_mp_submod.c b/bn_mp_submod.c index 4817e47..52c282b 100644 --- a/bn_mp_submod.c +++ b/bn_mp_submod.c @@ -16,8 +16,7 @@ */ /* d = a - b (mod c) */ -int -mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) +int mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) { int res; mp_int t; diff --git a/bn_mp_toom_sqr.c b/bn_mp_toom_sqr.c index 0a38192..fff9f2d 100644 --- a/bn_mp_toom_sqr.c +++ b/bn_mp_toom_sqr.c @@ -16,8 +16,7 @@ */ /* squaring using Toom-Cook 3-way algorithm */ -int -mp_toom_sqr(mp_int *a, mp_int *b) +int mp_toom_sqr(mp_int *a, mp_int *b) { mp_int w0, w1, w2, w3, w4, tmp1, a0, a1, a2; int res, B; diff --git a/bn_mp_xor.c b/bn_mp_xor.c index 3cf312b..e49b7d2 100644 --- a/bn_mp_xor.c +++ b/bn_mp_xor.c @@ -16,8 +16,7 @@ */ /* XOR two ints together */ -int -mp_xor (mp_int * a, mp_int * b, mp_int * c) +int mp_xor (mp_int * a, mp_int * b, mp_int * c) { int res, ix, px; mp_int t, *x; diff --git a/bn_reverse.c b/bn_reverse.c index dc87a4e..781b00d 100644 --- a/bn_reverse.c +++ b/bn_reverse.c @@ -16,8 +16,7 @@ */ /* reverse an array, used for radix code */ -void -bn_reverse (unsigned char *s, int len) +void bn_reverse (unsigned char *s, int len) { int ix, iy; unsigned char t; diff --git a/bn_s_mp_add.c b/bn_s_mp_add.c index 9bd46c1..7dbcfa4 100644 --- a/bn_s_mp_add.c +++ b/bn_s_mp_add.c @@ -16,8 +16,7 @@ */ /* low level addition, based on HAC pp.594, Algorithm 14.7 */ -int -s_mp_add (mp_int * a, mp_int * b, mp_int * c) +int s_mp_add (mp_int * a, mp_int * b, mp_int * c) { mp_int *x; int olduse, res, min, max; diff --git a/bn_s_mp_mul_high_digs.c b/bn_s_mp_mul_high_digs.c index e1f671c..af0f0ba 100644 --- a/bn_s_mp_mul_high_digs.c +++ b/bn_s_mp_mul_high_digs.c @@ -18,8 +18,7 @@ /* multiplies |a| * |b| and does not compute the lower digs digits * [meant to get the higher part of the product] */ -int -s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) +int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) { mp_int t; int res, pa, pb, ix, iy; diff --git a/bn_s_mp_sub.c b/bn_s_mp_sub.c index 2f35988..a39e923 100644 --- a/bn_s_mp_sub.c +++ b/bn_s_mp_sub.c @@ -16,8 +16,7 @@ */ /* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */ -int -s_mp_sub (mp_int * a, mp_int * b, mp_int * c) +int s_mp_sub (mp_int * a, mp_int * b, mp_int * c) { int olduse, res, min, max;