|
1 Source: Home brewed |
|
2 Fixes: overloaded ERR definition |
|
3 |
|
4 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c 2013-06-13 02:21:02.000000000 -0700 |
|
5 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c 2014-02-18 05:51:05.518085627 -0800 |
|
6 @@ -44,6 +44,7 @@ |
|
7 * Generally though the overhead of this method doesn't pay off |
|
8 * until a certain size (N ~ 80) is reached. |
|
9 */ |
|
10 +#undef ERR |
|
11 int mp_karatsuba_mul (mp_int * a, mp_int * b, mp_int * c) |
|
12 { |
|
13 mp_int x0, x1, y0, y1, t1, x0y0, x1y1; |
|
14 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_sqr.c 2013-06-13 02:21:02.000000000 -0700 |
|
15 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_sqr.c 2014-02-18 05:52:07.020144267 -0800 |
|
16 @@ -22,6 +22,7 @@ |
|
17 * is essentially the same algorithm but merely |
|
18 * tuned to perform recursive squarings. |
|
19 */ |
|
20 +#undef ERR |
|
21 int mp_karatsuba_sqr (mp_int * a, mp_int * b) |
|
22 { |
|
23 mp_int x0, x1, t1, t2, x0x0, x1x1; |
|
24 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_toom_sqr.c 2013-06-13 02:21:02.000000000 -0700 |
|
25 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_toom_sqr.c 2014-02-18 05:54:10.993497897 -0800 |
|
26 @@ -14,6 +14,7 @@ |
|
27 * |
|
28 * Tom St Denis, [email protected], http://libtom.org |
|
29 */ |
|
30 +#undef ERR |
|
31 |
|
32 /* squaring using Toom-Cook 3-way algorithm */ |
|
33 int |
|
34 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_toom_mul.c 2013-06-13 02:21:02.000000000 -0700 |
|
35 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_toom_mul.c 2014-02-18 05:48:52.888293183 -0800 |
|
36 @@ -22,6 +22,7 @@ |
|
37 * only particularly useful on VERY large inputs |
|
38 * (we're talking 1000s of digits here...). |
|
39 */ |
|
40 +#undef ERR |
|
41 int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c) |
|
42 { |
|
43 mp_int w0, w1, w2, w3, w4, tmp1, tmp2, a0, a1, a2, b0, b1, b2; |
|
44 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k.c 2013-06-13 02:21:02.000000000 -0700 |
|
45 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k.c 2014-02-18 06:00:05.098527808 -0800 |
|
46 @@ -14,6 +14,7 @@ |
|
47 * |
|
48 * Tom St Denis, [email protected], http://libtom.org |
|
49 */ |
|
50 +#undef ERR |
|
51 |
|
52 /* reduces a modulo n where n is of the form 2**p - d */ |
|
53 int mp_reduce_2k(mp_int *a, mp_int *n, mp_digit d) |
|
54 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c 2013-06-13 02:21:02.000000000 -0700 |
|
55 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c 2014-02-18 06:01:32.514873634 -0800 |
|
56 @@ -14,6 +14,7 @@ |
|
57 * |
|
58 * Tom St Denis, [email protected], http://libtom.org |
|
59 */ |
|
60 +#undef ERR |
|
61 |
|
62 /* reduces a modulo n where n is of the form 2**p - d |
|
63 This differs from reduce_2k since "d" can be larger |
|
64 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c 2013-06-13 02:21:02.000000000 -0700 |
|
65 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c 2014-02-18 06:01:04.034539817 -0800 |
|
66 @@ -14,6 +14,7 @@ |
|
67 * |
|
68 * Tom St Denis, [email protected], http://libtom.org |
|
69 */ |
|
70 +#undef ERR |
|
71 |
|
72 /* determines the setup value */ |
|
73 int mp_reduce_2k_setup_l(mp_int *a, mp_int *d) |
|
74 --- a/source4/heimdal/lib/hcrypto/libtommath/bn_mp_is_square.c 2013-06-13 02:21:02.000000000 -0700 |
|
75 +++ samba-4.1.4/source4/heimdal/lib/hcrypto/libtommath/bn_mp_is_square.c 2014-02-18 06:05:49.598152405 -0800 |
|
76 @@ -14,6 +14,7 @@ |
|
77 * |
|
78 * Tom St Denis, [email protected], http://libtom.org |
|
79 */ |
|
80 +#undef ERR |
|
81 |
|
82 /* Check if remainders are possible squares - fast exclude non-squares */ |
|
83 static const char rem_128[128] = { |