Mercurial > dropbear
comparison libtommath/tommath_class.h @ 1739:13d834efc376 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 15 Oct 2020 19:55:15 +0800 |
parents | 5386011b740d |
children | 34d9d3c022ce |
comparison
equal
deleted
inserted
replaced
1562:768ebf737aa0 | 1739:13d834efc376 |
---|---|
1 /* LibTomMath, multiple-precision integer library -- Tom St Denis */ | |
2 /* SPDX-License-Identifier: Unlicense */ | |
3 | |
1 #if !(defined(LTM1) && defined(LTM2) && defined(LTM3)) | 4 #if !(defined(LTM1) && defined(LTM2) && defined(LTM3)) |
5 #define LTM_INSIDE | |
2 #if defined(LTM2) | 6 #if defined(LTM2) |
3 #define LTM3 | 7 # define LTM3 |
4 #endif | 8 #endif |
5 #if defined(LTM1) | 9 #if defined(LTM1) |
6 #define LTM2 | 10 # define LTM2 |
7 #endif | 11 #endif |
8 #define LTM1 | 12 #define LTM1 |
9 | |
10 #if defined(LTM_ALL) | 13 #if defined(LTM_ALL) |
11 #define BN_ERROR_C | 14 # define BN_CUTOFFS_C |
12 #define BN_FAST_MP_INVMOD_C | 15 # define BN_DEPRECATED_C |
13 #define BN_FAST_MP_MONTGOMERY_REDUCE_C | 16 # define BN_MP_2EXPT_C |
14 #define BN_FAST_S_MP_MUL_DIGS_C | 17 # define BN_MP_ABS_C |
15 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C | 18 # define BN_MP_ADD_C |
16 #define BN_FAST_S_MP_SQR_C | 19 # define BN_MP_ADD_D_C |
17 #define BN_MP_2EXPT_C | 20 # define BN_MP_ADDMOD_C |
18 #define BN_MP_ABS_C | 21 # define BN_MP_AND_C |
19 #define BN_MP_ADD_C | 22 # define BN_MP_CLAMP_C |
20 #define BN_MP_ADD_D_C | 23 # define BN_MP_CLEAR_C |
21 #define BN_MP_ADDMOD_C | 24 # define BN_MP_CLEAR_MULTI_C |
22 #define BN_MP_AND_C | 25 # define BN_MP_CMP_C |
23 #define BN_MP_CLAMP_C | 26 # define BN_MP_CMP_D_C |
24 #define BN_MP_CLEAR_C | 27 # define BN_MP_CMP_MAG_C |
25 #define BN_MP_CLEAR_MULTI_C | 28 # define BN_MP_CNT_LSB_C |
26 #define BN_MP_CMP_C | 29 # define BN_MP_COMPLEMENT_C |
27 #define BN_MP_CMP_D_C | 30 # define BN_MP_COPY_C |
28 #define BN_MP_CMP_MAG_C | 31 # define BN_MP_COUNT_BITS_C |
29 #define BN_MP_CNT_LSB_C | 32 # define BN_MP_DECR_C |
30 #define BN_MP_COPY_C | 33 # define BN_MP_DIV_C |
31 #define BN_MP_COUNT_BITS_C | 34 # define BN_MP_DIV_2_C |
32 #define BN_MP_DIV_C | 35 # define BN_MP_DIV_2D_C |
33 #define BN_MP_DIV_2_C | 36 # define BN_MP_DIV_3_C |
34 #define BN_MP_DIV_2D_C | 37 # define BN_MP_DIV_D_C |
35 #define BN_MP_DIV_3_C | 38 # define BN_MP_DR_IS_MODULUS_C |
36 #define BN_MP_DIV_D_C | 39 # define BN_MP_DR_REDUCE_C |
37 #define BN_MP_DR_IS_MODULUS_C | 40 # define BN_MP_DR_SETUP_C |
38 #define BN_MP_DR_REDUCE_C | 41 # define BN_MP_ERROR_TO_STRING_C |
39 #define BN_MP_DR_SETUP_C | 42 # define BN_MP_EXCH_C |
40 #define BN_MP_EXCH_C | 43 # define BN_MP_EXPT_U32_C |
41 #define BN_MP_EXPORT_C | 44 # define BN_MP_EXPTMOD_C |
42 #define BN_MP_EXPT_D_C | 45 # define BN_MP_EXTEUCLID_C |
43 #define BN_MP_EXPT_D_EX_C | 46 # define BN_MP_FREAD_C |
44 #define BN_MP_EXPTMOD_C | 47 # define BN_MP_FROM_SBIN_C |
45 #define BN_MP_EXPTMOD_FAST_C | 48 # define BN_MP_FROM_UBIN_C |
46 #define BN_MP_EXTEUCLID_C | 49 # define BN_MP_FWRITE_C |
47 #define BN_MP_FREAD_C | 50 # define BN_MP_GCD_C |
48 #define BN_MP_FWRITE_C | 51 # define BN_MP_GET_I32_C |
49 #define BN_MP_GCD_C | 52 # define BN_MP_GET_I64_C |
50 #define BN_MP_GET_INT_C | 53 # define BN_MP_GET_L_C |
51 #define BN_MP_GET_LONG_C | 54 # define BN_MP_GET_LL_C |
52 #define BN_MP_GET_LONG_LONG_C | 55 # define BN_MP_GET_MAG_U32_C |
53 #define BN_MP_GROW_C | 56 # define BN_MP_GET_MAG_U64_C |
54 #define BN_MP_IMPORT_C | 57 # define BN_MP_GET_MAG_UL_C |
55 #define BN_MP_INIT_C | 58 # define BN_MP_GET_MAG_ULL_C |
56 #define BN_MP_INIT_COPY_C | 59 # define BN_MP_GROW_C |
57 #define BN_MP_INIT_MULTI_C | 60 # define BN_MP_INCR_C |
58 #define BN_MP_INIT_SET_C | 61 # define BN_MP_INIT_C |
59 #define BN_MP_INIT_SET_INT_C | 62 # define BN_MP_INIT_COPY_C |
60 #define BN_MP_INIT_SIZE_C | 63 # define BN_MP_INIT_I32_C |
61 #define BN_MP_INVMOD_C | 64 # define BN_MP_INIT_I64_C |
62 #define BN_MP_INVMOD_SLOW_C | 65 # define BN_MP_INIT_L_C |
63 #define BN_MP_IS_SQUARE_C | 66 # define BN_MP_INIT_LL_C |
64 #define BN_MP_JACOBI_C | 67 # define BN_MP_INIT_MULTI_C |
65 #define BN_MP_KARATSUBA_MUL_C | 68 # define BN_MP_INIT_SET_C |
66 #define BN_MP_KARATSUBA_SQR_C | 69 # define BN_MP_INIT_SIZE_C |
67 #define BN_MP_LCM_C | 70 # define BN_MP_INIT_U32_C |
68 #define BN_MP_LSHD_C | 71 # define BN_MP_INIT_U64_C |
69 #define BN_MP_MOD_C | 72 # define BN_MP_INIT_UL_C |
70 #define BN_MP_MOD_2D_C | 73 # define BN_MP_INIT_ULL_C |
71 #define BN_MP_MOD_D_C | 74 # define BN_MP_INVMOD_C |
72 #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C | 75 # define BN_MP_IS_SQUARE_C |
73 #define BN_MP_MONTGOMERY_REDUCE_C | 76 # define BN_MP_ISEVEN_C |
74 #define BN_MP_MONTGOMERY_SETUP_C | 77 # define BN_MP_ISODD_C |
75 #define BN_MP_MUL_C | 78 # define BN_MP_KRONECKER_C |
76 #define BN_MP_MUL_2_C | 79 # define BN_MP_LCM_C |
77 #define BN_MP_MUL_2D_C | 80 # define BN_MP_LOG_U32_C |
78 #define BN_MP_MUL_D_C | 81 # define BN_MP_LSHD_C |
79 #define BN_MP_MULMOD_C | 82 # define BN_MP_MOD_C |
80 #define BN_MP_N_ROOT_C | 83 # define BN_MP_MOD_2D_C |
81 #define BN_MP_N_ROOT_EX_C | 84 # define BN_MP_MOD_D_C |
82 #define BN_MP_NEG_C | 85 # define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C |
83 #define BN_MP_OR_C | 86 # define BN_MP_MONTGOMERY_REDUCE_C |
84 #define BN_MP_PRIME_FERMAT_C | 87 # define BN_MP_MONTGOMERY_SETUP_C |
85 #define BN_MP_PRIME_IS_DIVISIBLE_C | 88 # define BN_MP_MUL_C |
86 #define BN_MP_PRIME_IS_PRIME_C | 89 # define BN_MP_MUL_2_C |
87 #define BN_MP_PRIME_MILLER_RABIN_C | 90 # define BN_MP_MUL_2D_C |
88 #define BN_MP_PRIME_NEXT_PRIME_C | 91 # define BN_MP_MUL_D_C |
89 #define BN_MP_PRIME_RABIN_MILLER_TRIALS_C | 92 # define BN_MP_MULMOD_C |
90 #define BN_MP_PRIME_RANDOM_EX_C | 93 # define BN_MP_NEG_C |
91 #define BN_MP_RADIX_SIZE_C | 94 # define BN_MP_OR_C |
92 #define BN_MP_RADIX_SMAP_C | 95 # define BN_MP_PACK_C |
93 #define BN_MP_RAND_C | 96 # define BN_MP_PACK_COUNT_C |
94 #define BN_MP_READ_RADIX_C | 97 # define BN_MP_PRIME_FERMAT_C |
95 #define BN_MP_READ_SIGNED_BIN_C | 98 # define BN_MP_PRIME_FROBENIUS_UNDERWOOD_C |
96 #define BN_MP_READ_UNSIGNED_BIN_C | 99 # define BN_MP_PRIME_IS_PRIME_C |
97 #define BN_MP_REDUCE_C | 100 # define BN_MP_PRIME_MILLER_RABIN_C |
98 #define BN_MP_REDUCE_2K_C | 101 # define BN_MP_PRIME_NEXT_PRIME_C |
99 #define BN_MP_REDUCE_2K_L_C | 102 # define BN_MP_PRIME_RABIN_MILLER_TRIALS_C |
100 #define BN_MP_REDUCE_2K_SETUP_C | 103 # define BN_MP_PRIME_RAND_C |
101 #define BN_MP_REDUCE_2K_SETUP_L_C | 104 # define BN_MP_PRIME_STRONG_LUCAS_SELFRIDGE_C |
102 #define BN_MP_REDUCE_IS_2K_C | 105 # define BN_MP_RADIX_SIZE_C |
103 #define BN_MP_REDUCE_IS_2K_L_C | 106 # define BN_MP_RADIX_SMAP_C |
104 #define BN_MP_REDUCE_SETUP_C | 107 # define BN_MP_RAND_C |
105 #define BN_MP_RSHD_C | 108 # define BN_MP_READ_RADIX_C |
106 #define BN_MP_SET_C | 109 # define BN_MP_REDUCE_C |
107 #define BN_MP_SET_INT_C | 110 # define BN_MP_REDUCE_2K_C |
108 #define BN_MP_SET_LONG_C | 111 # define BN_MP_REDUCE_2K_L_C |
109 #define BN_MP_SET_LONG_LONG_C | 112 # define BN_MP_REDUCE_2K_SETUP_C |
110 #define BN_MP_SHRINK_C | 113 # define BN_MP_REDUCE_2K_SETUP_L_C |
111 #define BN_MP_SIGNED_BIN_SIZE_C | 114 # define BN_MP_REDUCE_IS_2K_C |
112 #define BN_MP_SQR_C | 115 # define BN_MP_REDUCE_IS_2K_L_C |
113 #define BN_MP_SQRMOD_C | 116 # define BN_MP_REDUCE_SETUP_C |
114 #define BN_MP_SQRT_C | 117 # define BN_MP_ROOT_U32_C |
115 #define BN_MP_SQRTMOD_PRIME_C | 118 # define BN_MP_RSHD_C |
116 #define BN_MP_SUB_C | 119 # define BN_MP_SBIN_SIZE_C |
117 #define BN_MP_SUB_D_C | 120 # define BN_MP_SET_C |
118 #define BN_MP_SUBMOD_C | 121 # define BN_MP_SET_I32_C |
119 #define BN_MP_TO_SIGNED_BIN_C | 122 # define BN_MP_SET_I64_C |
120 #define BN_MP_TO_SIGNED_BIN_N_C | 123 # define BN_MP_SET_L_C |
121 #define BN_MP_TO_UNSIGNED_BIN_C | 124 # define BN_MP_SET_LL_C |
122 #define BN_MP_TO_UNSIGNED_BIN_N_C | 125 # define BN_MP_SET_U32_C |
123 #define BN_MP_TOOM_MUL_C | 126 # define BN_MP_SET_U64_C |
124 #define BN_MP_TOOM_SQR_C | 127 # define BN_MP_SET_UL_C |
125 #define BN_MP_TORADIX_C | 128 # define BN_MP_SET_ULL_C |
126 #define BN_MP_TORADIX_N_C | 129 # define BN_MP_SHRINK_C |
127 #define BN_MP_UNSIGNED_BIN_SIZE_C | 130 # define BN_MP_SIGNED_RSH_C |
128 #define BN_MP_XOR_C | 131 # define BN_MP_SQR_C |
129 #define BN_MP_ZERO_C | 132 # define BN_MP_SQRMOD_C |
130 #define BN_PRIME_TAB_C | 133 # define BN_MP_SQRT_C |
131 #define BN_REVERSE_C | 134 # define BN_MP_SQRTMOD_PRIME_C |
132 #define BN_S_MP_ADD_C | 135 # define BN_MP_SUB_C |
133 #define BN_S_MP_EXPTMOD_C | 136 # define BN_MP_SUB_D_C |
134 #define BN_S_MP_MUL_DIGS_C | 137 # define BN_MP_SUBMOD_C |
135 #define BN_S_MP_MUL_HIGH_DIGS_C | 138 # define BN_MP_TO_RADIX_C |
136 #define BN_S_MP_SQR_C | 139 # define BN_MP_TO_SBIN_C |
137 #define BN_S_MP_SUB_C | 140 # define BN_MP_TO_UBIN_C |
138 #define BNCORE_C | 141 # define BN_MP_UBIN_SIZE_C |
139 #endif | 142 # define BN_MP_UNPACK_C |
140 | 143 # define BN_MP_XOR_C |
141 #if defined(BN_ERROR_C) | 144 # define BN_MP_ZERO_C |
142 #define BN_MP_ERROR_TO_STRING_C | 145 # define BN_PRIME_TAB_C |
143 #endif | 146 # define BN_S_MP_ADD_C |
144 | 147 # define BN_S_MP_BALANCE_MUL_C |
145 #if defined(BN_FAST_MP_INVMOD_C) | 148 # define BN_S_MP_EXPTMOD_C |
146 #define BN_MP_ISEVEN_C | 149 # define BN_S_MP_EXPTMOD_FAST_C |
147 #define BN_MP_INIT_MULTI_C | 150 # define BN_S_MP_GET_BIT_C |
148 #define BN_MP_COPY_C | 151 # define BN_S_MP_INVMOD_FAST_C |
149 #define BN_MP_MOD_C | 152 # define BN_S_MP_INVMOD_SLOW_C |
150 #define BN_MP_SET_C | 153 # define BN_S_MP_KARATSUBA_MUL_C |
151 #define BN_MP_DIV_2_C | 154 # define BN_S_MP_KARATSUBA_SQR_C |
152 #define BN_MP_ISODD_C | 155 # define BN_S_MP_MONTGOMERY_REDUCE_FAST_C |
153 #define BN_MP_SUB_C | 156 # define BN_S_MP_MUL_DIGS_C |
154 #define BN_MP_CMP_C | 157 # define BN_S_MP_MUL_DIGS_FAST_C |
155 #define BN_MP_ISZERO_C | 158 # define BN_S_MP_MUL_HIGH_DIGS_C |
156 #define BN_MP_CMP_D_C | 159 # define BN_S_MP_MUL_HIGH_DIGS_FAST_C |
157 #define BN_MP_ADD_C | 160 # define BN_S_MP_PRIME_IS_DIVISIBLE_C |
158 #define BN_MP_EXCH_C | 161 # define BN_S_MP_RAND_JENKINS_C |
159 #define BN_MP_CLEAR_MULTI_C | 162 # define BN_S_MP_RAND_PLATFORM_C |
160 #endif | 163 # define BN_S_MP_REVERSE_C |
161 | 164 # define BN_S_MP_SQR_C |
162 #if defined(BN_FAST_MP_MONTGOMERY_REDUCE_C) | 165 # define BN_S_MP_SQR_FAST_C |
163 #define BN_MP_GROW_C | 166 # define BN_S_MP_SUB_C |
164 #define BN_MP_RSHD_C | 167 # define BN_S_MP_TOOM_MUL_C |
165 #define BN_MP_CLAMP_C | 168 # define BN_S_MP_TOOM_SQR_C |
166 #define BN_MP_CMP_MAG_C | 169 #endif |
167 #define BN_S_MP_SUB_C | 170 #endif |
168 #endif | 171 #if defined(BN_CUTOFFS_C) |
169 | 172 #endif |
170 #if defined(BN_FAST_S_MP_MUL_DIGS_C) | 173 |
171 #define BN_MP_GROW_C | 174 #if defined(BN_DEPRECATED_C) |
172 #define BN_MP_CLAMP_C | 175 # define BN_FAST_MP_INVMOD_C |
173 #endif | 176 # define BN_FAST_MP_MONTGOMERY_REDUCE_C |
174 | 177 # define BN_FAST_S_MP_MUL_DIGS_C |
175 #if defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C) | 178 # define BN_FAST_S_MP_MUL_HIGH_DIGS_C |
176 #define BN_MP_GROW_C | 179 # define BN_FAST_S_MP_SQR_C |
177 #define BN_MP_CLAMP_C | 180 # define BN_MP_AND_C |
178 #endif | 181 # define BN_MP_BALANCE_MUL_C |
179 | 182 # define BN_MP_CMP_D_C |
180 #if defined(BN_FAST_S_MP_SQR_C) | 183 # define BN_MP_EXPORT_C |
181 #define BN_MP_GROW_C | 184 # define BN_MP_EXPTMOD_FAST_C |
182 #define BN_MP_CLAMP_C | 185 # define BN_MP_EXPT_D_C |
186 # define BN_MP_EXPT_D_EX_C | |
187 # define BN_MP_EXPT_U32_C | |
188 # define BN_MP_FROM_SBIN_C | |
189 # define BN_MP_FROM_UBIN_C | |
190 # define BN_MP_GET_BIT_C | |
191 # define BN_MP_GET_INT_C | |
192 # define BN_MP_GET_LONG_C | |
193 # define BN_MP_GET_LONG_LONG_C | |
194 # define BN_MP_GET_MAG_U32_C | |
195 # define BN_MP_GET_MAG_ULL_C | |
196 # define BN_MP_GET_MAG_UL_C | |
197 # define BN_MP_IMPORT_C | |
198 # define BN_MP_INIT_SET_INT_C | |
199 # define BN_MP_INIT_U32_C | |
200 # define BN_MP_INVMOD_SLOW_C | |
201 # define BN_MP_JACOBI_C | |
202 # define BN_MP_KARATSUBA_MUL_C | |
203 # define BN_MP_KARATSUBA_SQR_C | |
204 # define BN_MP_KRONECKER_C | |
205 # define BN_MP_N_ROOT_C | |
206 # define BN_MP_N_ROOT_EX_C | |
207 # define BN_MP_OR_C | |
208 # define BN_MP_PACK_C | |
209 # define BN_MP_PRIME_IS_DIVISIBLE_C | |
210 # define BN_MP_PRIME_RANDOM_EX_C | |
211 # define BN_MP_RAND_DIGIT_C | |
212 # define BN_MP_READ_SIGNED_BIN_C | |
213 # define BN_MP_READ_UNSIGNED_BIN_C | |
214 # define BN_MP_ROOT_U32_C | |
215 # define BN_MP_SBIN_SIZE_C | |
216 # define BN_MP_SET_INT_C | |
217 # define BN_MP_SET_LONG_C | |
218 # define BN_MP_SET_LONG_LONG_C | |
219 # define BN_MP_SET_U32_C | |
220 # define BN_MP_SET_U64_C | |
221 # define BN_MP_SIGNED_BIN_SIZE_C | |
222 # define BN_MP_SIGNED_RSH_C | |
223 # define BN_MP_TC_AND_C | |
224 # define BN_MP_TC_DIV_2D_C | |
225 # define BN_MP_TC_OR_C | |
226 # define BN_MP_TC_XOR_C | |
227 # define BN_MP_TOOM_MUL_C | |
228 # define BN_MP_TOOM_SQR_C | |
229 # define BN_MP_TORADIX_C | |
230 # define BN_MP_TORADIX_N_C | |
231 # define BN_MP_TO_RADIX_C | |
232 # define BN_MP_TO_SBIN_C | |
233 # define BN_MP_TO_SIGNED_BIN_C | |
234 # define BN_MP_TO_SIGNED_BIN_N_C | |
235 # define BN_MP_TO_UBIN_C | |
236 # define BN_MP_TO_UNSIGNED_BIN_C | |
237 # define BN_MP_TO_UNSIGNED_BIN_N_C | |
238 # define BN_MP_UBIN_SIZE_C | |
239 # define BN_MP_UNPACK_C | |
240 # define BN_MP_UNSIGNED_BIN_SIZE_C | |
241 # define BN_MP_XOR_C | |
242 # define BN_S_MP_BALANCE_MUL_C | |
243 # define BN_S_MP_EXPTMOD_FAST_C | |
244 # define BN_S_MP_GET_BIT_C | |
245 # define BN_S_MP_INVMOD_FAST_C | |
246 # define BN_S_MP_INVMOD_SLOW_C | |
247 # define BN_S_MP_KARATSUBA_MUL_C | |
248 # define BN_S_MP_KARATSUBA_SQR_C | |
249 # define BN_S_MP_MONTGOMERY_REDUCE_FAST_C | |
250 # define BN_S_MP_MUL_DIGS_FAST_C | |
251 # define BN_S_MP_MUL_HIGH_DIGS_FAST_C | |
252 # define BN_S_MP_PRIME_IS_DIVISIBLE_C | |
253 # define BN_S_MP_PRIME_RANDOM_EX_C | |
254 # define BN_S_MP_RAND_SOURCE_C | |
255 # define BN_S_MP_REVERSE_C | |
256 # define BN_S_MP_SQR_FAST_C | |
257 # define BN_S_MP_TOOM_MUL_C | |
258 # define BN_S_MP_TOOM_SQR_C | |
183 #endif | 259 #endif |
184 | 260 |
185 #if defined(BN_MP_2EXPT_C) | 261 #if defined(BN_MP_2EXPT_C) |
186 #define BN_MP_ZERO_C | 262 # define BN_MP_GROW_C |
187 #define BN_MP_GROW_C | 263 # define BN_MP_ZERO_C |
188 #endif | 264 #endif |
189 | 265 |
190 #if defined(BN_MP_ABS_C) | 266 #if defined(BN_MP_ABS_C) |
191 #define BN_MP_COPY_C | 267 # define BN_MP_COPY_C |
192 #endif | 268 #endif |
193 | 269 |
194 #if defined(BN_MP_ADD_C) | 270 #if defined(BN_MP_ADD_C) |
195 #define BN_S_MP_ADD_C | 271 # define BN_MP_CMP_MAG_C |
196 #define BN_MP_CMP_MAG_C | 272 # define BN_S_MP_ADD_C |
197 #define BN_S_MP_SUB_C | 273 # define BN_S_MP_SUB_C |
198 #endif | 274 #endif |
199 | 275 |
200 #if defined(BN_MP_ADD_D_C) | 276 #if defined(BN_MP_ADD_D_C) |
201 #define BN_MP_GROW_C | 277 # define BN_MP_CLAMP_C |
202 #define BN_MP_SUB_D_C | 278 # define BN_MP_GROW_C |
203 #define BN_MP_CLAMP_C | 279 # define BN_MP_SUB_D_C |
204 #endif | 280 #endif |
205 | 281 |
206 #if defined(BN_MP_ADDMOD_C) | 282 #if defined(BN_MP_ADDMOD_C) |
207 #define BN_MP_INIT_C | 283 # define BN_MP_ADD_C |
208 #define BN_MP_ADD_C | 284 # define BN_MP_CLEAR_C |
209 #define BN_MP_CLEAR_C | 285 # define BN_MP_INIT_C |
210 #define BN_MP_MOD_C | 286 # define BN_MP_MOD_C |
211 #endif | 287 #endif |
212 | 288 |
213 #if defined(BN_MP_AND_C) | 289 #if defined(BN_MP_AND_C) |
214 #define BN_MP_INIT_COPY_C | 290 # define BN_MP_CLAMP_C |
215 #define BN_MP_CLAMP_C | 291 # define BN_MP_GROW_C |
216 #define BN_MP_EXCH_C | |
217 #define BN_MP_CLEAR_C | |
218 #endif | 292 #endif |
219 | 293 |
220 #if defined(BN_MP_CLAMP_C) | 294 #if defined(BN_MP_CLAMP_C) |
221 #endif | 295 #endif |
222 | 296 |
223 #if defined(BN_MP_CLEAR_C) | 297 #if defined(BN_MP_CLEAR_C) |
224 #endif | 298 #endif |
225 | 299 |
226 #if defined(BN_MP_CLEAR_MULTI_C) | 300 #if defined(BN_MP_CLEAR_MULTI_C) |
227 #define BN_MP_CLEAR_C | 301 # define BN_MP_CLEAR_C |
228 #endif | 302 #endif |
229 | 303 |
230 #if defined(BN_MP_CMP_C) | 304 #if defined(BN_MP_CMP_C) |
231 #define BN_MP_CMP_MAG_C | 305 # define BN_MP_CMP_MAG_C |
232 #endif | 306 #endif |
233 | 307 |
234 #if defined(BN_MP_CMP_D_C) | 308 #if defined(BN_MP_CMP_D_C) |
235 #endif | 309 #endif |
236 | 310 |
237 #if defined(BN_MP_CMP_MAG_C) | 311 #if defined(BN_MP_CMP_MAG_C) |
238 #endif | 312 #endif |
239 | 313 |
240 #if defined(BN_MP_CNT_LSB_C) | 314 #if defined(BN_MP_CNT_LSB_C) |
241 #define BN_MP_ISZERO_C | 315 #endif |
316 | |
317 #if defined(BN_MP_COMPLEMENT_C) | |
318 # define BN_MP_NEG_C | |
319 # define BN_MP_SUB_D_C | |
242 #endif | 320 #endif |
243 | 321 |
244 #if defined(BN_MP_COPY_C) | 322 #if defined(BN_MP_COPY_C) |
245 #define BN_MP_GROW_C | 323 # define BN_MP_GROW_C |
246 #endif | 324 #endif |
247 | 325 |
248 #if defined(BN_MP_COUNT_BITS_C) | 326 #if defined(BN_MP_COUNT_BITS_C) |
249 #endif | 327 #endif |
250 | 328 |
329 #if defined(BN_MP_DECR_C) | |
330 # define BN_MP_INCR_C | |
331 # define BN_MP_SET_C | |
332 # define BN_MP_SUB_D_C | |
333 # define BN_MP_ZERO_C | |
334 #endif | |
335 | |
251 #if defined(BN_MP_DIV_C) | 336 #if defined(BN_MP_DIV_C) |
252 #define BN_MP_ISZERO_C | 337 # define BN_MP_ADD_C |
253 #define BN_MP_CMP_MAG_C | 338 # define BN_MP_CLAMP_C |
254 #define BN_MP_COPY_C | 339 # define BN_MP_CLEAR_C |
255 #define BN_MP_ZERO_C | 340 # define BN_MP_CMP_C |
256 #define BN_MP_INIT_MULTI_C | 341 # define BN_MP_CMP_MAG_C |
257 #define BN_MP_SET_C | 342 # define BN_MP_COPY_C |
258 #define BN_MP_COUNT_BITS_C | 343 # define BN_MP_COUNT_BITS_C |
259 #define BN_MP_ABS_C | 344 # define BN_MP_DIV_2D_C |
260 #define BN_MP_MUL_2D_C | 345 # define BN_MP_EXCH_C |
261 #define BN_MP_CMP_C | 346 # define BN_MP_INIT_C |
262 #define BN_MP_SUB_C | 347 # define BN_MP_INIT_COPY_C |
263 #define BN_MP_ADD_C | 348 # define BN_MP_INIT_SIZE_C |
264 #define BN_MP_DIV_2D_C | 349 # define BN_MP_LSHD_C |
265 #define BN_MP_EXCH_C | 350 # define BN_MP_MUL_2D_C |
266 #define BN_MP_CLEAR_MULTI_C | 351 # define BN_MP_MUL_D_C |
267 #define BN_MP_INIT_SIZE_C | 352 # define BN_MP_RSHD_C |
268 #define BN_MP_INIT_C | 353 # define BN_MP_SUB_C |
269 #define BN_MP_INIT_COPY_C | 354 # define BN_MP_ZERO_C |
270 #define BN_MP_LSHD_C | |
271 #define BN_MP_RSHD_C | |
272 #define BN_MP_MUL_D_C | |
273 #define BN_MP_CLAMP_C | |
274 #define BN_MP_CLEAR_C | |
275 #endif | 355 #endif |
276 | 356 |
277 #if defined(BN_MP_DIV_2_C) | 357 #if defined(BN_MP_DIV_2_C) |
278 #define BN_MP_GROW_C | 358 # define BN_MP_CLAMP_C |
279 #define BN_MP_CLAMP_C | 359 # define BN_MP_GROW_C |
280 #endif | 360 #endif |
281 | 361 |
282 #if defined(BN_MP_DIV_2D_C) | 362 #if defined(BN_MP_DIV_2D_C) |
283 #define BN_MP_COPY_C | 363 # define BN_MP_CLAMP_C |
284 #define BN_MP_ZERO_C | 364 # define BN_MP_COPY_C |
285 #define BN_MP_MOD_2D_C | 365 # define BN_MP_MOD_2D_C |
286 #define BN_MP_RSHD_C | 366 # define BN_MP_RSHD_C |
287 #define BN_MP_CLAMP_C | 367 # define BN_MP_ZERO_C |
288 #endif | 368 #endif |
289 | 369 |
290 #if defined(BN_MP_DIV_3_C) | 370 #if defined(BN_MP_DIV_3_C) |
291 #define BN_MP_INIT_SIZE_C | 371 # define BN_MP_CLAMP_C |
292 #define BN_MP_CLAMP_C | 372 # define BN_MP_CLEAR_C |
293 #define BN_MP_EXCH_C | 373 # define BN_MP_EXCH_C |
294 #define BN_MP_CLEAR_C | 374 # define BN_MP_INIT_SIZE_C |
295 #endif | 375 #endif |
296 | 376 |
297 #if defined(BN_MP_DIV_D_C) | 377 #if defined(BN_MP_DIV_D_C) |
298 #define BN_MP_ISZERO_C | 378 # define BN_MP_CLAMP_C |
299 #define BN_MP_COPY_C | 379 # define BN_MP_CLEAR_C |
300 #define BN_MP_DIV_2D_C | 380 # define BN_MP_COPY_C |
301 #define BN_MP_DIV_3_C | 381 # define BN_MP_DIV_2D_C |
302 #define BN_MP_INIT_SIZE_C | 382 # define BN_MP_DIV_3_C |
303 #define BN_MP_CLAMP_C | 383 # define BN_MP_EXCH_C |
304 #define BN_MP_EXCH_C | 384 # define BN_MP_INIT_SIZE_C |
305 #define BN_MP_CLEAR_C | |
306 #endif | 385 #endif |
307 | 386 |
308 #if defined(BN_MP_DR_IS_MODULUS_C) | 387 #if defined(BN_MP_DR_IS_MODULUS_C) |
309 #endif | 388 #endif |
310 | 389 |
311 #if defined(BN_MP_DR_REDUCE_C) | 390 #if defined(BN_MP_DR_REDUCE_C) |
312 #define BN_MP_GROW_C | 391 # define BN_MP_CLAMP_C |
313 #define BN_MP_CLAMP_C | 392 # define BN_MP_CMP_MAG_C |
314 #define BN_MP_CMP_MAG_C | 393 # define BN_MP_GROW_C |
315 #define BN_S_MP_SUB_C | 394 # define BN_S_MP_SUB_C |
316 #endif | 395 #endif |
317 | 396 |
318 #if defined(BN_MP_DR_SETUP_C) | 397 #if defined(BN_MP_DR_SETUP_C) |
319 #endif | 398 #endif |
320 | 399 |
400 #if defined(BN_MP_ERROR_TO_STRING_C) | |
401 #endif | |
402 | |
321 #if defined(BN_MP_EXCH_C) | 403 #if defined(BN_MP_EXCH_C) |
322 #endif | 404 #endif |
323 | 405 |
324 #if defined(BN_MP_EXPORT_C) | 406 #if defined(BN_MP_EXPT_U32_C) |
325 #define BN_MP_INIT_COPY_C | 407 # define BN_MP_CLEAR_C |
326 #define BN_MP_COUNT_BITS_C | 408 # define BN_MP_INIT_COPY_C |
327 #define BN_MP_DIV_2D_C | 409 # define BN_MP_MUL_C |
328 #define BN_MP_CLEAR_C | 410 # define BN_MP_SET_C |
329 #endif | 411 # define BN_MP_SQR_C |
330 | |
331 #if defined(BN_MP_EXPT_D_C) | |
332 #define BN_MP_EXPT_D_EX_C | |
333 #endif | |
334 | |
335 #if defined(BN_MP_EXPT_D_EX_C) | |
336 #define BN_MP_INIT_COPY_C | |
337 #define BN_MP_SET_C | |
338 #define BN_MP_MUL_C | |
339 #define BN_MP_CLEAR_C | |
340 #define BN_MP_SQR_C | |
341 #endif | 412 #endif |
342 | 413 |
343 #if defined(BN_MP_EXPTMOD_C) | 414 #if defined(BN_MP_EXPTMOD_C) |
344 #define BN_MP_INIT_C | 415 # define BN_MP_ABS_C |
345 #define BN_MP_INVMOD_C | 416 # define BN_MP_CLEAR_MULTI_C |
346 #define BN_MP_CLEAR_C | 417 # define BN_MP_DR_IS_MODULUS_C |
347 #define BN_MP_ABS_C | 418 # define BN_MP_INIT_MULTI_C |
348 #define BN_MP_CLEAR_MULTI_C | 419 # define BN_MP_INVMOD_C |
349 #define BN_MP_REDUCE_IS_2K_L_C | 420 # define BN_MP_REDUCE_IS_2K_C |
350 #define BN_S_MP_EXPTMOD_C | 421 # define BN_MP_REDUCE_IS_2K_L_C |
351 #define BN_MP_DR_IS_MODULUS_C | 422 # define BN_S_MP_EXPTMOD_C |
352 #define BN_MP_REDUCE_IS_2K_C | 423 # define BN_S_MP_EXPTMOD_FAST_C |
353 #define BN_MP_ISODD_C | |
354 #define BN_MP_EXPTMOD_FAST_C | |
355 #endif | |
356 | |
357 #if defined(BN_MP_EXPTMOD_FAST_C) | |
358 #define BN_MP_COUNT_BITS_C | |
359 #define BN_MP_INIT_SIZE_C | |
360 #define BN_MP_CLEAR_C | |
361 #define BN_MP_MONTGOMERY_SETUP_C | |
362 #define BN_FAST_MP_MONTGOMERY_REDUCE_C | |
363 #define BN_MP_MONTGOMERY_REDUCE_C | |
364 #define BN_MP_DR_SETUP_C | |
365 #define BN_MP_DR_REDUCE_C | |
366 #define BN_MP_REDUCE_2K_SETUP_C | |
367 #define BN_MP_REDUCE_2K_C | |
368 #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C | |
369 #define BN_MP_MULMOD_C | |
370 #define BN_MP_SET_C | |
371 #define BN_MP_MOD_C | |
372 #define BN_MP_COPY_C | |
373 #define BN_MP_SQR_C | |
374 #define BN_MP_MUL_C | |
375 #define BN_MP_EXCH_C | |
376 #endif | 424 #endif |
377 | 425 |
378 #if defined(BN_MP_EXTEUCLID_C) | 426 #if defined(BN_MP_EXTEUCLID_C) |
379 #define BN_MP_INIT_MULTI_C | 427 # define BN_MP_CLEAR_MULTI_C |
380 #define BN_MP_SET_C | 428 # define BN_MP_COPY_C |
381 #define BN_MP_COPY_C | 429 # define BN_MP_DIV_C |
382 #define BN_MP_ISZERO_C | 430 # define BN_MP_EXCH_C |
383 #define BN_MP_DIV_C | 431 # define BN_MP_INIT_MULTI_C |
384 #define BN_MP_MUL_C | 432 # define BN_MP_MUL_C |
385 #define BN_MP_SUB_C | 433 # define BN_MP_NEG_C |
386 #define BN_MP_NEG_C | 434 # define BN_MP_SET_C |
387 #define BN_MP_EXCH_C | 435 # define BN_MP_SUB_C |
388 #define BN_MP_CLEAR_MULTI_C | |
389 #endif | 436 #endif |
390 | 437 |
391 #if defined(BN_MP_FREAD_C) | 438 #if defined(BN_MP_FREAD_C) |
392 #define BN_MP_ZERO_C | 439 # define BN_MP_ADD_D_C |
393 #define BN_MP_S_RMAP_C | 440 # define BN_MP_MUL_D_C |
394 #define BN_MP_MUL_D_C | 441 # define BN_MP_ZERO_C |
395 #define BN_MP_ADD_D_C | 442 #endif |
396 #define BN_MP_CMP_D_C | 443 |
444 #if defined(BN_MP_FROM_SBIN_C) | |
445 # define BN_MP_FROM_UBIN_C | |
446 #endif | |
447 | |
448 #if defined(BN_MP_FROM_UBIN_C) | |
449 # define BN_MP_CLAMP_C | |
450 # define BN_MP_GROW_C | |
451 # define BN_MP_MUL_2D_C | |
452 # define BN_MP_ZERO_C | |
397 #endif | 453 #endif |
398 | 454 |
399 #if defined(BN_MP_FWRITE_C) | 455 #if defined(BN_MP_FWRITE_C) |
400 #define BN_MP_RADIX_SIZE_C | 456 # define BN_MP_RADIX_SIZE_C |
401 #define BN_MP_TORADIX_C | 457 # define BN_MP_TO_RADIX_C |
402 #endif | 458 #endif |
403 | 459 |
404 #if defined(BN_MP_GCD_C) | 460 #if defined(BN_MP_GCD_C) |
405 #define BN_MP_ISZERO_C | 461 # define BN_MP_ABS_C |
406 #define BN_MP_ABS_C | 462 # define BN_MP_CLEAR_C |
407 #define BN_MP_INIT_COPY_C | 463 # define BN_MP_CMP_MAG_C |
408 #define BN_MP_CNT_LSB_C | 464 # define BN_MP_CNT_LSB_C |
409 #define BN_MP_DIV_2D_C | 465 # define BN_MP_DIV_2D_C |
410 #define BN_MP_CMP_MAG_C | 466 # define BN_MP_EXCH_C |
411 #define BN_MP_EXCH_C | 467 # define BN_MP_INIT_COPY_C |
412 #define BN_S_MP_SUB_C | 468 # define BN_MP_MUL_2D_C |
413 #define BN_MP_MUL_2D_C | 469 # define BN_S_MP_SUB_C |
414 #define BN_MP_CLEAR_C | 470 #endif |
415 #endif | 471 |
416 | 472 #if defined(BN_MP_GET_I32_C) |
417 #if defined(BN_MP_GET_INT_C) | 473 # define BN_MP_GET_MAG_U32_C |
418 #endif | 474 #endif |
419 | 475 |
420 #if defined(BN_MP_GET_LONG_C) | 476 #if defined(BN_MP_GET_I64_C) |
421 #endif | 477 # define BN_MP_GET_MAG_U64_C |
422 | 478 #endif |
423 #if defined(BN_MP_GET_LONG_LONG_C) | 479 |
480 #if defined(BN_MP_GET_L_C) | |
481 # define BN_MP_GET_MAG_UL_C | |
482 #endif | |
483 | |
484 #if defined(BN_MP_GET_LL_C) | |
485 # define BN_MP_GET_MAG_ULL_C | |
486 #endif | |
487 | |
488 #if defined(BN_MP_GET_MAG_U32_C) | |
489 #endif | |
490 | |
491 #if defined(BN_MP_GET_MAG_U64_C) | |
492 #endif | |
493 | |
494 #if defined(BN_MP_GET_MAG_UL_C) | |
495 #endif | |
496 | |
497 #if defined(BN_MP_GET_MAG_ULL_C) | |
424 #endif | 498 #endif |
425 | 499 |
426 #if defined(BN_MP_GROW_C) | 500 #if defined(BN_MP_GROW_C) |
427 #endif | 501 #endif |
428 | 502 |
429 #if defined(BN_MP_IMPORT_C) | 503 #if defined(BN_MP_INCR_C) |
430 #define BN_MP_ZERO_C | 504 # define BN_MP_ADD_D_C |
431 #define BN_MP_MUL_2D_C | 505 # define BN_MP_DECR_C |
432 #define BN_MP_CLAMP_C | 506 # define BN_MP_SET_C |
433 #endif | 507 #endif |
434 | 508 |
435 #if defined(BN_MP_INIT_C) | 509 #if defined(BN_MP_INIT_C) |
436 #endif | 510 #endif |
437 | 511 |
438 #if defined(BN_MP_INIT_COPY_C) | 512 #if defined(BN_MP_INIT_COPY_C) |
439 #define BN_MP_INIT_SIZE_C | 513 # define BN_MP_CLEAR_C |
440 #define BN_MP_COPY_C | 514 # define BN_MP_COPY_C |
441 #define BN_MP_CLEAR_C | 515 # define BN_MP_INIT_SIZE_C |
516 #endif | |
517 | |
518 #if defined(BN_MP_INIT_I32_C) | |
519 # define BN_MP_INIT_C | |
520 # define BN_MP_SET_I32_C | |
521 #endif | |
522 | |
523 #if defined(BN_MP_INIT_I64_C) | |
524 # define BN_MP_INIT_C | |
525 # define BN_MP_SET_I64_C | |
526 #endif | |
527 | |
528 #if defined(BN_MP_INIT_L_C) | |
529 # define BN_MP_INIT_C | |
530 # define BN_MP_SET_L_C | |
531 #endif | |
532 | |
533 #if defined(BN_MP_INIT_LL_C) | |
534 # define BN_MP_INIT_C | |
535 # define BN_MP_SET_LL_C | |
442 #endif | 536 #endif |
443 | 537 |
444 #if defined(BN_MP_INIT_MULTI_C) | 538 #if defined(BN_MP_INIT_MULTI_C) |
445 #define BN_MP_ERR_C | 539 # define BN_MP_CLEAR_C |
446 #define BN_MP_INIT_C | 540 # define BN_MP_INIT_C |
447 #define BN_MP_CLEAR_C | |
448 #endif | 541 #endif |
449 | 542 |
450 #if defined(BN_MP_INIT_SET_C) | 543 #if defined(BN_MP_INIT_SET_C) |
451 #define BN_MP_INIT_C | 544 # define BN_MP_INIT_C |
452 #define BN_MP_SET_C | 545 # define BN_MP_SET_C |
453 #endif | |
454 | |
455 #if defined(BN_MP_INIT_SET_INT_C) | |
456 #define BN_MP_INIT_C | |
457 #define BN_MP_SET_INT_C | |
458 #endif | 546 #endif |
459 | 547 |
460 #if defined(BN_MP_INIT_SIZE_C) | 548 #if defined(BN_MP_INIT_SIZE_C) |
461 #define BN_MP_INIT_C | 549 #endif |
550 | |
551 #if defined(BN_MP_INIT_U32_C) | |
552 # define BN_MP_INIT_C | |
553 # define BN_MP_SET_U32_C | |
554 #endif | |
555 | |
556 #if defined(BN_MP_INIT_U64_C) | |
557 # define BN_MP_INIT_C | |
558 # define BN_MP_SET_U64_C | |
559 #endif | |
560 | |
561 #if defined(BN_MP_INIT_UL_C) | |
562 # define BN_MP_INIT_C | |
563 # define BN_MP_SET_UL_C | |
564 #endif | |
565 | |
566 #if defined(BN_MP_INIT_ULL_C) | |
567 # define BN_MP_INIT_C | |
568 # define BN_MP_SET_ULL_C | |
462 #endif | 569 #endif |
463 | 570 |
464 #if defined(BN_MP_INVMOD_C) | 571 #if defined(BN_MP_INVMOD_C) |
465 #define BN_MP_ISZERO_C | 572 # define BN_MP_CMP_D_C |
466 #define BN_MP_ISODD_C | 573 # define BN_S_MP_INVMOD_FAST_C |
467 #define BN_MP_CMP_D_C | 574 # define BN_S_MP_INVMOD_SLOW_C |
468 #define BN_FAST_MP_INVMOD_C | |
469 #define BN_MP_INVMOD_SLOW_C | |
470 #endif | |
471 | |
472 #if defined(BN_MP_INVMOD_SLOW_C) | |
473 #define BN_MP_ISZERO_C | |
474 #define BN_MP_INIT_MULTI_C | |
475 #define BN_MP_MOD_C | |
476 #define BN_MP_COPY_C | |
477 #define BN_MP_ISEVEN_C | |
478 #define BN_MP_SET_C | |
479 #define BN_MP_DIV_2_C | |
480 #define BN_MP_ISODD_C | |
481 #define BN_MP_ADD_C | |
482 #define BN_MP_SUB_C | |
483 #define BN_MP_CMP_C | |
484 #define BN_MP_CMP_D_C | |
485 #define BN_MP_CMP_MAG_C | |
486 #define BN_MP_EXCH_C | |
487 #define BN_MP_CLEAR_MULTI_C | |
488 #endif | 575 #endif |
489 | 576 |
490 #if defined(BN_MP_IS_SQUARE_C) | 577 #if defined(BN_MP_IS_SQUARE_C) |
491 #define BN_MP_MOD_D_C | 578 # define BN_MP_CLEAR_C |
492 #define BN_MP_INIT_SET_INT_C | 579 # define BN_MP_CMP_MAG_C |
493 #define BN_MP_MOD_C | 580 # define BN_MP_GET_I32_C |
494 #define BN_MP_GET_INT_C | 581 # define BN_MP_INIT_U32_C |
495 #define BN_MP_SQRT_C | 582 # define BN_MP_MOD_C |
496 #define BN_MP_SQR_C | 583 # define BN_MP_MOD_D_C |
497 #define BN_MP_CMP_MAG_C | 584 # define BN_MP_SQRT_C |
498 #define BN_MP_CLEAR_C | 585 # define BN_MP_SQR_C |
499 #endif | 586 #endif |
500 | 587 |
501 #if defined(BN_MP_JACOBI_C) | 588 #if defined(BN_MP_ISEVEN_C) |
502 #define BN_MP_ISNEG_C | 589 #endif |
503 #define BN_MP_CMP_D_C | 590 |
504 #define BN_MP_ISZERO_C | 591 #if defined(BN_MP_ISODD_C) |
505 #define BN_MP_INIT_COPY_C | 592 #endif |
506 #define BN_MP_CNT_LSB_C | 593 |
507 #define BN_MP_DIV_2D_C | 594 #if defined(BN_MP_KRONECKER_C) |
508 #define BN_MP_MOD_C | 595 # define BN_MP_CLEAR_C |
509 #define BN_MP_CLEAR_C | 596 # define BN_MP_CMP_D_C |
510 #endif | 597 # define BN_MP_CNT_LSB_C |
511 | 598 # define BN_MP_COPY_C |
512 #if defined(BN_MP_KARATSUBA_MUL_C) | 599 # define BN_MP_DIV_2D_C |
513 #define BN_MP_MUL_C | 600 # define BN_MP_INIT_C |
514 #define BN_MP_INIT_SIZE_C | 601 # define BN_MP_INIT_COPY_C |
515 #define BN_MP_CLAMP_C | 602 # define BN_MP_MOD_C |
516 #define BN_S_MP_ADD_C | |
517 #define BN_MP_ADD_C | |
518 #define BN_S_MP_SUB_C | |
519 #define BN_MP_LSHD_C | |
520 #define BN_MP_CLEAR_C | |
521 #endif | |
522 | |
523 #if defined(BN_MP_KARATSUBA_SQR_C) | |
524 #define BN_MP_INIT_SIZE_C | |
525 #define BN_MP_CLAMP_C | |
526 #define BN_MP_SQR_C | |
527 #define BN_S_MP_ADD_C | |
528 #define BN_S_MP_SUB_C | |
529 #define BN_MP_LSHD_C | |
530 #define BN_MP_ADD_C | |
531 #define BN_MP_CLEAR_C | |
532 #endif | 603 #endif |
533 | 604 |
534 #if defined(BN_MP_LCM_C) | 605 #if defined(BN_MP_LCM_C) |
535 #define BN_MP_INIT_MULTI_C | 606 # define BN_MP_CLEAR_MULTI_C |
536 #define BN_MP_GCD_C | 607 # define BN_MP_CMP_MAG_C |
537 #define BN_MP_CMP_MAG_C | 608 # define BN_MP_DIV_C |
538 #define BN_MP_DIV_C | 609 # define BN_MP_GCD_C |
539 #define BN_MP_MUL_C | 610 # define BN_MP_INIT_MULTI_C |
540 #define BN_MP_CLEAR_MULTI_C | 611 # define BN_MP_MUL_C |
612 #endif | |
613 | |
614 #if defined(BN_MP_LOG_U32_C) | |
615 # define BN_MP_CLEAR_MULTI_C | |
616 # define BN_MP_CMP_C | |
617 # define BN_MP_CMP_D_C | |
618 # define BN_MP_COPY_C | |
619 # define BN_MP_COUNT_BITS_C | |
620 # define BN_MP_EXCH_C | |
621 # define BN_MP_EXPT_U32_C | |
622 # define BN_MP_INIT_MULTI_C | |
623 # define BN_MP_MUL_C | |
624 # define BN_MP_SET_C | |
625 # define BN_MP_SQR_C | |
541 #endif | 626 #endif |
542 | 627 |
543 #if defined(BN_MP_LSHD_C) | 628 #if defined(BN_MP_LSHD_C) |
544 #define BN_MP_GROW_C | 629 # define BN_MP_GROW_C |
545 #define BN_MP_RSHD_C | |
546 #endif | 630 #endif |
547 | 631 |
548 #if defined(BN_MP_MOD_C) | 632 #if defined(BN_MP_MOD_C) |
549 #define BN_MP_INIT_SIZE_C | 633 # define BN_MP_ADD_C |
550 #define BN_MP_DIV_C | 634 # define BN_MP_CLEAR_C |
551 #define BN_MP_CLEAR_C | 635 # define BN_MP_DIV_C |
552 #define BN_MP_ISZERO_C | 636 # define BN_MP_EXCH_C |
553 #define BN_MP_EXCH_C | 637 # define BN_MP_INIT_SIZE_C |
554 #define BN_MP_ADD_C | |
555 #endif | 638 #endif |
556 | 639 |
557 #if defined(BN_MP_MOD_2D_C) | 640 #if defined(BN_MP_MOD_2D_C) |
558 #define BN_MP_ZERO_C | 641 # define BN_MP_CLAMP_C |
559 #define BN_MP_COPY_C | 642 # define BN_MP_COPY_C |
560 #define BN_MP_CLAMP_C | 643 # define BN_MP_ZERO_C |
561 #endif | 644 #endif |
562 | 645 |
563 #if defined(BN_MP_MOD_D_C) | 646 #if defined(BN_MP_MOD_D_C) |
564 #define BN_MP_DIV_D_C | 647 # define BN_MP_DIV_D_C |
565 #endif | 648 #endif |
566 | 649 |
567 #if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C) | 650 #if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C) |
568 #define BN_MP_COUNT_BITS_C | 651 # define BN_MP_2EXPT_C |
569 #define BN_MP_2EXPT_C | 652 # define BN_MP_CMP_MAG_C |
570 #define BN_MP_SET_C | 653 # define BN_MP_COUNT_BITS_C |
571 #define BN_MP_MUL_2_C | 654 # define BN_MP_MUL_2_C |
572 #define BN_MP_CMP_MAG_C | 655 # define BN_MP_SET_C |
573 #define BN_S_MP_SUB_C | 656 # define BN_S_MP_SUB_C |
574 #endif | 657 #endif |
575 | 658 |
576 #if defined(BN_MP_MONTGOMERY_REDUCE_C) | 659 #if defined(BN_MP_MONTGOMERY_REDUCE_C) |
577 #define BN_FAST_MP_MONTGOMERY_REDUCE_C | 660 # define BN_MP_CLAMP_C |
578 #define BN_MP_GROW_C | 661 # define BN_MP_CMP_MAG_C |
579 #define BN_MP_CLAMP_C | 662 # define BN_MP_GROW_C |
580 #define BN_MP_RSHD_C | 663 # define BN_MP_RSHD_C |
581 #define BN_MP_CMP_MAG_C | 664 # define BN_S_MP_MONTGOMERY_REDUCE_FAST_C |
582 #define BN_S_MP_SUB_C | 665 # define BN_S_MP_SUB_C |
583 #endif | 666 #endif |
584 | 667 |
585 #if defined(BN_MP_MONTGOMERY_SETUP_C) | 668 #if defined(BN_MP_MONTGOMERY_SETUP_C) |
586 #endif | 669 #endif |
587 | 670 |
588 #if defined(BN_MP_MUL_C) | 671 #if defined(BN_MP_MUL_C) |
589 #define BN_MP_TOOM_MUL_C | 672 # define BN_S_MP_BALANCE_MUL_C |
590 #define BN_MP_KARATSUBA_MUL_C | 673 # define BN_S_MP_KARATSUBA_MUL_C |
591 #define BN_FAST_S_MP_MUL_DIGS_C | 674 # define BN_S_MP_MUL_DIGS_C |
592 #define BN_S_MP_MUL_C | 675 # define BN_S_MP_MUL_DIGS_FAST_C |
593 #define BN_S_MP_MUL_DIGS_C | 676 # define BN_S_MP_TOOM_MUL_C |
594 #endif | 677 #endif |
595 | 678 |
596 #if defined(BN_MP_MUL_2_C) | 679 #if defined(BN_MP_MUL_2_C) |
597 #define BN_MP_GROW_C | 680 # define BN_MP_GROW_C |
598 #endif | 681 #endif |
599 | 682 |
600 #if defined(BN_MP_MUL_2D_C) | 683 #if defined(BN_MP_MUL_2D_C) |
601 #define BN_MP_COPY_C | 684 # define BN_MP_CLAMP_C |
602 #define BN_MP_GROW_C | 685 # define BN_MP_COPY_C |
603 #define BN_MP_LSHD_C | 686 # define BN_MP_GROW_C |
604 #define BN_MP_CLAMP_C | 687 # define BN_MP_LSHD_C |
605 #endif | 688 #endif |
606 | 689 |
607 #if defined(BN_MP_MUL_D_C) | 690 #if defined(BN_MP_MUL_D_C) |
608 #define BN_MP_GROW_C | 691 # define BN_MP_CLAMP_C |
609 #define BN_MP_CLAMP_C | 692 # define BN_MP_GROW_C |
610 #endif | 693 #endif |
611 | 694 |
612 #if defined(BN_MP_MULMOD_C) | 695 #if defined(BN_MP_MULMOD_C) |
613 #define BN_MP_INIT_SIZE_C | 696 # define BN_MP_CLEAR_C |
614 #define BN_MP_MUL_C | 697 # define BN_MP_INIT_SIZE_C |
615 #define BN_MP_CLEAR_C | 698 # define BN_MP_MOD_C |
616 #define BN_MP_MOD_C | 699 # define BN_MP_MUL_C |
617 #endif | |
618 | |
619 #if defined(BN_MP_N_ROOT_C) | |
620 #define BN_MP_N_ROOT_EX_C | |
621 #endif | |
622 | |
623 #if defined(BN_MP_N_ROOT_EX_C) | |
624 #define BN_MP_INIT_C | |
625 #define BN_MP_SET_C | |
626 #define BN_MP_COPY_C | |
627 #define BN_MP_EXPT_D_EX_C | |
628 #define BN_MP_MUL_C | |
629 #define BN_MP_SUB_C | |
630 #define BN_MP_MUL_D_C | |
631 #define BN_MP_DIV_C | |
632 #define BN_MP_CMP_C | |
633 #define BN_MP_SUB_D_C | |
634 #define BN_MP_EXCH_C | |
635 #define BN_MP_CLEAR_C | |
636 #endif | 700 #endif |
637 | 701 |
638 #if defined(BN_MP_NEG_C) | 702 #if defined(BN_MP_NEG_C) |
639 #define BN_MP_COPY_C | 703 # define BN_MP_COPY_C |
640 #define BN_MP_ISZERO_C | |
641 #endif | 704 #endif |
642 | 705 |
643 #if defined(BN_MP_OR_C) | 706 #if defined(BN_MP_OR_C) |
644 #define BN_MP_INIT_COPY_C | 707 # define BN_MP_CLAMP_C |
645 #define BN_MP_CLAMP_C | 708 # define BN_MP_GROW_C |
646 #define BN_MP_EXCH_C | 709 #endif |
647 #define BN_MP_CLEAR_C | 710 |
711 #if defined(BN_MP_PACK_C) | |
712 # define BN_MP_CLEAR_C | |
713 # define BN_MP_DIV_2D_C | |
714 # define BN_MP_INIT_COPY_C | |
715 # define BN_MP_PACK_COUNT_C | |
716 #endif | |
717 | |
718 #if defined(BN_MP_PACK_COUNT_C) | |
719 # define BN_MP_COUNT_BITS_C | |
648 #endif | 720 #endif |
649 | 721 |
650 #if defined(BN_MP_PRIME_FERMAT_C) | 722 #if defined(BN_MP_PRIME_FERMAT_C) |
651 #define BN_MP_CMP_D_C | 723 # define BN_MP_CLEAR_C |
652 #define BN_MP_INIT_C | 724 # define BN_MP_CMP_C |
653 #define BN_MP_EXPTMOD_C | 725 # define BN_MP_CMP_D_C |
654 #define BN_MP_CMP_C | 726 # define BN_MP_EXPTMOD_C |
655 #define BN_MP_CLEAR_C | 727 # define BN_MP_INIT_C |
656 #endif | 728 #endif |
657 | 729 |
658 #if defined(BN_MP_PRIME_IS_DIVISIBLE_C) | 730 #if defined(BN_MP_PRIME_FROBENIUS_UNDERWOOD_C) |
659 #define BN_MP_MOD_D_C | 731 # define BN_MP_ADD_C |
732 # define BN_MP_ADD_D_C | |
733 # define BN_MP_CLEAR_MULTI_C | |
734 # define BN_MP_CMP_C | |
735 # define BN_MP_COUNT_BITS_C | |
736 # define BN_MP_EXCH_C | |
737 # define BN_MP_GCD_C | |
738 # define BN_MP_INIT_MULTI_C | |
739 # define BN_MP_KRONECKER_C | |
740 # define BN_MP_MOD_C | |
741 # define BN_MP_MUL_2_C | |
742 # define BN_MP_MUL_C | |
743 # define BN_MP_MUL_D_C | |
744 # define BN_MP_SET_C | |
745 # define BN_MP_SET_U32_C | |
746 # define BN_MP_SQR_C | |
747 # define BN_MP_SUB_C | |
748 # define BN_MP_SUB_D_C | |
749 # define BN_S_MP_GET_BIT_C | |
660 #endif | 750 #endif |
661 | 751 |
662 #if defined(BN_MP_PRIME_IS_PRIME_C) | 752 #if defined(BN_MP_PRIME_IS_PRIME_C) |
663 #define BN_MP_CMP_D_C | 753 # define BN_MP_CLEAR_C |
664 #define BN_MP_PRIME_IS_DIVISIBLE_C | 754 # define BN_MP_CMP_C |
665 #define BN_MP_INIT_C | 755 # define BN_MP_CMP_D_C |
666 #define BN_MP_SET_C | 756 # define BN_MP_COUNT_BITS_C |
667 #define BN_MP_PRIME_MILLER_RABIN_C | 757 # define BN_MP_DIV_2D_C |
668 #define BN_MP_CLEAR_C | 758 # define BN_MP_INIT_SET_C |
759 # define BN_MP_IS_SQUARE_C | |
760 # define BN_MP_PRIME_MILLER_RABIN_C | |
761 # define BN_MP_PRIME_STRONG_LUCAS_SELFRIDGE_C | |
762 # define BN_MP_RAND_C | |
763 # define BN_MP_READ_RADIX_C | |
764 # define BN_MP_SET_C | |
765 # define BN_S_MP_PRIME_IS_DIVISIBLE_C | |
669 #endif | 766 #endif |
670 | 767 |
671 #if defined(BN_MP_PRIME_MILLER_RABIN_C) | 768 #if defined(BN_MP_PRIME_MILLER_RABIN_C) |
672 #define BN_MP_CMP_D_C | 769 # define BN_MP_CLEAR_C |
673 #define BN_MP_INIT_COPY_C | 770 # define BN_MP_CMP_C |
674 #define BN_MP_SUB_D_C | 771 # define BN_MP_CMP_D_C |
675 #define BN_MP_CNT_LSB_C | 772 # define BN_MP_CNT_LSB_C |
676 #define BN_MP_DIV_2D_C | 773 # define BN_MP_DIV_2D_C |
677 #define BN_MP_EXPTMOD_C | 774 # define BN_MP_EXPTMOD_C |
678 #define BN_MP_CMP_C | 775 # define BN_MP_INIT_C |
679 #define BN_MP_SQRMOD_C | 776 # define BN_MP_INIT_COPY_C |
680 #define BN_MP_CLEAR_C | 777 # define BN_MP_SQRMOD_C |
778 # define BN_MP_SUB_D_C | |
681 #endif | 779 #endif |
682 | 780 |
683 #if defined(BN_MP_PRIME_NEXT_PRIME_C) | 781 #if defined(BN_MP_PRIME_NEXT_PRIME_C) |
684 #define BN_MP_CMP_D_C | 782 # define BN_MP_ADD_D_C |
685 #define BN_MP_SET_C | 783 # define BN_MP_CLEAR_C |
686 #define BN_MP_SUB_D_C | 784 # define BN_MP_CMP_D_C |
687 #define BN_MP_ISEVEN_C | 785 # define BN_MP_INIT_C |
688 #define BN_MP_MOD_D_C | 786 # define BN_MP_MOD_D_C |
689 #define BN_MP_INIT_C | 787 # define BN_MP_PRIME_IS_PRIME_C |
690 #define BN_MP_ADD_D_C | 788 # define BN_MP_SET_C |
691 #define BN_MP_PRIME_MILLER_RABIN_C | 789 # define BN_MP_SUB_D_C |
692 #define BN_MP_CLEAR_C | |
693 #endif | 790 #endif |
694 | 791 |
695 #if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C) | 792 #if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C) |
696 #endif | 793 #endif |
697 | 794 |
698 #if defined(BN_MP_PRIME_RANDOM_EX_C) | 795 #if defined(BN_MP_PRIME_RAND_C) |
699 #define BN_MP_READ_UNSIGNED_BIN_C | 796 # define BN_MP_ADD_D_C |
700 #define BN_MP_PRIME_IS_PRIME_C | 797 # define BN_MP_DIV_2_C |
701 #define BN_MP_SUB_D_C | 798 # define BN_MP_FROM_UBIN_C |
702 #define BN_MP_DIV_2_C | 799 # define BN_MP_MUL_2_C |
703 #define BN_MP_MUL_2_C | 800 # define BN_MP_PRIME_IS_PRIME_C |
704 #define BN_MP_ADD_D_C | 801 # define BN_MP_SUB_D_C |
802 # define BN_S_MP_PRIME_RANDOM_EX_C | |
803 # define BN_S_MP_RAND_CB_C | |
804 # define BN_S_MP_RAND_SOURCE_C | |
805 #endif | |
806 | |
807 #if defined(BN_MP_PRIME_STRONG_LUCAS_SELFRIDGE_C) | |
808 # define BN_MP_ADD_C | |
809 # define BN_MP_ADD_D_C | |
810 # define BN_MP_CLEAR_C | |
811 # define BN_MP_CLEAR_MULTI_C | |
812 # define BN_MP_CMP_C | |
813 # define BN_MP_CMP_D_C | |
814 # define BN_MP_CNT_LSB_C | |
815 # define BN_MP_COUNT_BITS_C | |
816 # define BN_MP_DIV_2D_C | |
817 # define BN_MP_DIV_2_C | |
818 # define BN_MP_GCD_C | |
819 # define BN_MP_INIT_C | |
820 # define BN_MP_INIT_MULTI_C | |
821 # define BN_MP_KRONECKER_C | |
822 # define BN_MP_MOD_C | |
823 # define BN_MP_MUL_2_C | |
824 # define BN_MP_MUL_C | |
825 # define BN_MP_SET_C | |
826 # define BN_MP_SET_I32_C | |
827 # define BN_MP_SET_U32_C | |
828 # define BN_MP_SQR_C | |
829 # define BN_MP_SUB_C | |
830 # define BN_MP_SUB_D_C | |
831 # define BN_S_MP_GET_BIT_C | |
832 # define BN_S_MP_MUL_SI_C | |
705 #endif | 833 #endif |
706 | 834 |
707 #if defined(BN_MP_RADIX_SIZE_C) | 835 #if defined(BN_MP_RADIX_SIZE_C) |
708 #define BN_MP_ISZERO_C | 836 # define BN_MP_CLEAR_C |
709 #define BN_MP_COUNT_BITS_C | 837 # define BN_MP_COUNT_BITS_C |
710 #define BN_MP_INIT_COPY_C | 838 # define BN_MP_DIV_D_C |
711 #define BN_MP_DIV_D_C | 839 # define BN_MP_INIT_COPY_C |
712 #define BN_MP_CLEAR_C | |
713 #endif | 840 #endif |
714 | 841 |
715 #if defined(BN_MP_RADIX_SMAP_C) | 842 #if defined(BN_MP_RADIX_SMAP_C) |
716 #define BN_MP_S_RMAP_C | |
717 #endif | 843 #endif |
718 | 844 |
719 #if defined(BN_MP_RAND_C) | 845 #if defined(BN_MP_RAND_C) |
720 #define BN_MP_ZERO_C | 846 # define BN_MP_GROW_C |
721 #define BN_MP_ADD_D_C | 847 # define BN_MP_RAND_SOURCE_C |
722 #define BN_MP_LSHD_C | 848 # define BN_MP_ZERO_C |
849 # define BN_S_MP_RAND_PLATFORM_C | |
850 # define BN_S_MP_RAND_SOURCE_C | |
723 #endif | 851 #endif |
724 | 852 |
725 #if defined(BN_MP_READ_RADIX_C) | 853 #if defined(BN_MP_READ_RADIX_C) |
726 #define BN_MP_ZERO_C | 854 # define BN_MP_ADD_D_C |
727 #define BN_MP_S_RMAP_C | 855 # define BN_MP_MUL_D_C |
728 #define BN_MP_MUL_D_C | 856 # define BN_MP_ZERO_C |
729 #define BN_MP_ADD_D_C | |
730 #define BN_MP_ISZERO_C | |
731 #endif | |
732 | |
733 #if defined(BN_MP_READ_SIGNED_BIN_C) | |
734 #define BN_MP_READ_UNSIGNED_BIN_C | |
735 #endif | |
736 | |
737 #if defined(BN_MP_READ_UNSIGNED_BIN_C) | |
738 #define BN_MP_GROW_C | |
739 #define BN_MP_ZERO_C | |
740 #define BN_MP_MUL_2D_C | |
741 #define BN_MP_CLAMP_C | |
742 #endif | 857 #endif |
743 | 858 |
744 #if defined(BN_MP_REDUCE_C) | 859 #if defined(BN_MP_REDUCE_C) |
745 #define BN_MP_REDUCE_SETUP_C | 860 # define BN_MP_ADD_C |
746 #define BN_MP_INIT_COPY_C | 861 # define BN_MP_CLEAR_C |
747 #define BN_MP_RSHD_C | 862 # define BN_MP_CMP_C |
748 #define BN_MP_MUL_C | 863 # define BN_MP_CMP_D_C |
749 #define BN_S_MP_MUL_HIGH_DIGS_C | 864 # define BN_MP_INIT_COPY_C |
750 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C | 865 # define BN_MP_LSHD_C |
751 #define BN_MP_MOD_2D_C | 866 # define BN_MP_MOD_2D_C |
752 #define BN_S_MP_MUL_DIGS_C | 867 # define BN_MP_MUL_C |
753 #define BN_MP_SUB_C | 868 # define BN_MP_RSHD_C |
754 #define BN_MP_CMP_D_C | 869 # define BN_MP_SET_C |
755 #define BN_MP_SET_C | 870 # define BN_MP_SUB_C |
756 #define BN_MP_LSHD_C | 871 # define BN_S_MP_MUL_DIGS_C |
757 #define BN_MP_ADD_C | 872 # define BN_S_MP_MUL_HIGH_DIGS_C |
758 #define BN_MP_CMP_C | 873 # define BN_S_MP_MUL_HIGH_DIGS_FAST_C |
759 #define BN_S_MP_SUB_C | 874 # define BN_S_MP_SUB_C |
760 #define BN_MP_CLEAR_C | |
761 #endif | 875 #endif |
762 | 876 |
763 #if defined(BN_MP_REDUCE_2K_C) | 877 #if defined(BN_MP_REDUCE_2K_C) |
764 #define BN_MP_INIT_C | 878 # define BN_MP_CLEAR_C |
765 #define BN_MP_COUNT_BITS_C | 879 # define BN_MP_CMP_MAG_C |
766 #define BN_MP_DIV_2D_C | 880 # define BN_MP_COUNT_BITS_C |
767 #define BN_MP_MUL_D_C | 881 # define BN_MP_DIV_2D_C |
768 #define BN_S_MP_ADD_C | 882 # define BN_MP_INIT_C |
769 #define BN_MP_CMP_MAG_C | 883 # define BN_MP_MUL_D_C |
770 #define BN_S_MP_SUB_C | 884 # define BN_S_MP_ADD_C |
771 #define BN_MP_CLEAR_C | 885 # define BN_S_MP_SUB_C |
772 #endif | 886 #endif |
773 | 887 |
774 #if defined(BN_MP_REDUCE_2K_L_C) | 888 #if defined(BN_MP_REDUCE_2K_L_C) |
775 #define BN_MP_INIT_C | 889 # define BN_MP_CLEAR_C |
776 #define BN_MP_COUNT_BITS_C | 890 # define BN_MP_CMP_MAG_C |
777 #define BN_MP_DIV_2D_C | 891 # define BN_MP_COUNT_BITS_C |
778 #define BN_MP_MUL_C | 892 # define BN_MP_DIV_2D_C |
779 #define BN_S_MP_ADD_C | 893 # define BN_MP_INIT_C |
780 #define BN_MP_CMP_MAG_C | 894 # define BN_MP_MUL_C |
781 #define BN_S_MP_SUB_C | 895 # define BN_S_MP_ADD_C |
782 #define BN_MP_CLEAR_C | 896 # define BN_S_MP_SUB_C |
783 #endif | 897 #endif |
784 | 898 |
785 #if defined(BN_MP_REDUCE_2K_SETUP_C) | 899 #if defined(BN_MP_REDUCE_2K_SETUP_C) |
786 #define BN_MP_INIT_C | 900 # define BN_MP_2EXPT_C |
787 #define BN_MP_COUNT_BITS_C | 901 # define BN_MP_CLEAR_C |
788 #define BN_MP_2EXPT_C | 902 # define BN_MP_COUNT_BITS_C |
789 #define BN_MP_CLEAR_C | 903 # define BN_MP_INIT_C |
790 #define BN_S_MP_SUB_C | 904 # define BN_S_MP_SUB_C |
791 #endif | 905 #endif |
792 | 906 |
793 #if defined(BN_MP_REDUCE_2K_SETUP_L_C) | 907 #if defined(BN_MP_REDUCE_2K_SETUP_L_C) |
794 #define BN_MP_INIT_C | 908 # define BN_MP_2EXPT_C |
795 #define BN_MP_2EXPT_C | 909 # define BN_MP_CLEAR_C |
796 #define BN_MP_COUNT_BITS_C | 910 # define BN_MP_COUNT_BITS_C |
797 #define BN_S_MP_SUB_C | 911 # define BN_MP_INIT_C |
798 #define BN_MP_CLEAR_C | 912 # define BN_S_MP_SUB_C |
799 #endif | 913 #endif |
800 | 914 |
801 #if defined(BN_MP_REDUCE_IS_2K_C) | 915 #if defined(BN_MP_REDUCE_IS_2K_C) |
802 #define BN_MP_REDUCE_2K_C | 916 # define BN_MP_COUNT_BITS_C |
803 #define BN_MP_COUNT_BITS_C | |
804 #endif | 917 #endif |
805 | 918 |
806 #if defined(BN_MP_REDUCE_IS_2K_L_C) | 919 #if defined(BN_MP_REDUCE_IS_2K_L_C) |
807 #endif | 920 #endif |
808 | 921 |
809 #if defined(BN_MP_REDUCE_SETUP_C) | 922 #if defined(BN_MP_REDUCE_SETUP_C) |
810 #define BN_MP_2EXPT_C | 923 # define BN_MP_2EXPT_C |
811 #define BN_MP_DIV_C | 924 # define BN_MP_DIV_C |
925 #endif | |
926 | |
927 #if defined(BN_MP_ROOT_U32_C) | |
928 # define BN_MP_2EXPT_C | |
929 # define BN_MP_ADD_D_C | |
930 # define BN_MP_CLEAR_MULTI_C | |
931 # define BN_MP_CMP_C | |
932 # define BN_MP_COPY_C | |
933 # define BN_MP_COUNT_BITS_C | |
934 # define BN_MP_DIV_C | |
935 # define BN_MP_EXCH_C | |
936 # define BN_MP_EXPT_U32_C | |
937 # define BN_MP_INIT_MULTI_C | |
938 # define BN_MP_MUL_C | |
939 # define BN_MP_MUL_D_C | |
940 # define BN_MP_SET_C | |
941 # define BN_MP_SUB_C | |
942 # define BN_MP_SUB_D_C | |
812 #endif | 943 #endif |
813 | 944 |
814 #if defined(BN_MP_RSHD_C) | 945 #if defined(BN_MP_RSHD_C) |
815 #define BN_MP_ZERO_C | 946 # define BN_MP_ZERO_C |
947 #endif | |
948 | |
949 #if defined(BN_MP_SBIN_SIZE_C) | |
950 # define BN_MP_UBIN_SIZE_C | |
816 #endif | 951 #endif |
817 | 952 |
818 #if defined(BN_MP_SET_C) | 953 #if defined(BN_MP_SET_C) |
819 #define BN_MP_ZERO_C | 954 #endif |
820 #endif | 955 |
821 | 956 #if defined(BN_MP_SET_I32_C) |
822 #if defined(BN_MP_SET_INT_C) | 957 # define BN_MP_SET_U32_C |
823 #define BN_MP_ZERO_C | 958 #endif |
824 #define BN_MP_MUL_2D_C | 959 |
825 #define BN_MP_CLAMP_C | 960 #if defined(BN_MP_SET_I64_C) |
826 #endif | 961 # define BN_MP_SET_U64_C |
827 | 962 #endif |
828 #if defined(BN_MP_SET_LONG_C) | 963 |
829 #endif | 964 #if defined(BN_MP_SET_L_C) |
830 | 965 # define BN_MP_SET_UL_C |
831 #if defined(BN_MP_SET_LONG_LONG_C) | 966 #endif |
967 | |
968 #if defined(BN_MP_SET_LL_C) | |
969 # define BN_MP_SET_ULL_C | |
970 #endif | |
971 | |
972 #if defined(BN_MP_SET_U32_C) | |
973 #endif | |
974 | |
975 #if defined(BN_MP_SET_U64_C) | |
976 #endif | |
977 | |
978 #if defined(BN_MP_SET_UL_C) | |
979 #endif | |
980 | |
981 #if defined(BN_MP_SET_ULL_C) | |
832 #endif | 982 #endif |
833 | 983 |
834 #if defined(BN_MP_SHRINK_C) | 984 #if defined(BN_MP_SHRINK_C) |
835 #endif | 985 #endif |
836 | 986 |
837 #if defined(BN_MP_SIGNED_BIN_SIZE_C) | 987 #if defined(BN_MP_SIGNED_RSH_C) |
838 #define BN_MP_UNSIGNED_BIN_SIZE_C | 988 # define BN_MP_ADD_D_C |
989 # define BN_MP_DIV_2D_C | |
990 # define BN_MP_SUB_D_C | |
839 #endif | 991 #endif |
840 | 992 |
841 #if defined(BN_MP_SQR_C) | 993 #if defined(BN_MP_SQR_C) |
842 #define BN_MP_TOOM_SQR_C | 994 # define BN_S_MP_KARATSUBA_SQR_C |
843 #define BN_MP_KARATSUBA_SQR_C | 995 # define BN_S_MP_SQR_C |
844 #define BN_FAST_S_MP_SQR_C | 996 # define BN_S_MP_SQR_FAST_C |
845 #define BN_S_MP_SQR_C | 997 # define BN_S_MP_TOOM_SQR_C |
846 #endif | 998 #endif |
847 | 999 |
848 #if defined(BN_MP_SQRMOD_C) | 1000 #if defined(BN_MP_SQRMOD_C) |
849 #define BN_MP_INIT_C | 1001 # define BN_MP_CLEAR_C |
850 #define BN_MP_SQR_C | 1002 # define BN_MP_INIT_C |
851 #define BN_MP_CLEAR_C | 1003 # define BN_MP_MOD_C |
852 #define BN_MP_MOD_C | 1004 # define BN_MP_SQR_C |
853 #endif | 1005 #endif |
854 | 1006 |
855 #if defined(BN_MP_SQRT_C) | 1007 #if defined(BN_MP_SQRT_C) |
856 #define BN_MP_N_ROOT_C | 1008 # define BN_MP_ADD_C |
857 #define BN_MP_ISZERO_C | 1009 # define BN_MP_CLEAR_C |
858 #define BN_MP_ZERO_C | 1010 # define BN_MP_CMP_MAG_C |
859 #define BN_MP_INIT_COPY_C | 1011 # define BN_MP_DIV_2_C |
860 #define BN_MP_RSHD_C | 1012 # define BN_MP_DIV_C |
861 #define BN_MP_DIV_C | 1013 # define BN_MP_EXCH_C |
862 #define BN_MP_ADD_C | 1014 # define BN_MP_INIT_C |
863 #define BN_MP_DIV_2_C | 1015 # define BN_MP_INIT_COPY_C |
864 #define BN_MP_CMP_MAG_C | 1016 # define BN_MP_RSHD_C |
865 #define BN_MP_EXCH_C | 1017 # define BN_MP_ZERO_C |
866 #define BN_MP_CLEAR_C | |
867 #endif | 1018 #endif |
868 | 1019 |
869 #if defined(BN_MP_SQRTMOD_PRIME_C) | 1020 #if defined(BN_MP_SQRTMOD_PRIME_C) |
870 #define BN_MP_CMP_D_C | 1021 # define BN_MP_ADD_D_C |
871 #define BN_MP_ZERO_C | 1022 # define BN_MP_CLEAR_MULTI_C |
872 #define BN_MP_JACOBI_C | 1023 # define BN_MP_CMP_D_C |
873 #define BN_MP_INIT_MULTI_C | 1024 # define BN_MP_COPY_C |
874 #define BN_MP_MOD_D_C | 1025 # define BN_MP_DIV_2_C |
875 #define BN_MP_ADD_D_C | 1026 # define BN_MP_EXPTMOD_C |
876 #define BN_MP_DIV_2_C | 1027 # define BN_MP_INIT_MULTI_C |
877 #define BN_MP_EXPTMOD_C | 1028 # define BN_MP_KRONECKER_C |
878 #define BN_MP_COPY_C | 1029 # define BN_MP_MOD_D_C |
879 #define BN_MP_SUB_D_C | 1030 # define BN_MP_MULMOD_C |
880 #define BN_MP_ISEVEN_C | 1031 # define BN_MP_SET_C |
881 #define BN_MP_SET_INT_C | 1032 # define BN_MP_SET_U32_C |
882 #define BN_MP_SQRMOD_C | 1033 # define BN_MP_SQRMOD_C |
883 #define BN_MP_MULMOD_C | 1034 # define BN_MP_SUB_D_C |
884 #define BN_MP_SET_C | 1035 # define BN_MP_ZERO_C |
885 #define BN_MP_CLEAR_MULTI_C | |
886 #endif | 1036 #endif |
887 | 1037 |
888 #if defined(BN_MP_SUB_C) | 1038 #if defined(BN_MP_SUB_C) |
889 #define BN_S_MP_ADD_C | 1039 # define BN_MP_CMP_MAG_C |
890 #define BN_MP_CMP_MAG_C | 1040 # define BN_S_MP_ADD_C |
891 #define BN_S_MP_SUB_C | 1041 # define BN_S_MP_SUB_C |
892 #endif | 1042 #endif |
893 | 1043 |
894 #if defined(BN_MP_SUB_D_C) | 1044 #if defined(BN_MP_SUB_D_C) |
895 #define BN_MP_GROW_C | 1045 # define BN_MP_ADD_D_C |
896 #define BN_MP_ADD_D_C | 1046 # define BN_MP_CLAMP_C |
897 #define BN_MP_CLAMP_C | 1047 # define BN_MP_GROW_C |
898 #endif | 1048 #endif |
899 | 1049 |
900 #if defined(BN_MP_SUBMOD_C) | 1050 #if defined(BN_MP_SUBMOD_C) |
901 #define BN_MP_INIT_C | 1051 # define BN_MP_CLEAR_C |
902 #define BN_MP_SUB_C | 1052 # define BN_MP_INIT_C |
903 #define BN_MP_CLEAR_C | 1053 # define BN_MP_MOD_C |
904 #define BN_MP_MOD_C | 1054 # define BN_MP_SUB_C |
905 #endif | 1055 #endif |
906 | 1056 |
907 #if defined(BN_MP_TO_SIGNED_BIN_C) | 1057 #if defined(BN_MP_TO_RADIX_C) |
908 #define BN_MP_TO_UNSIGNED_BIN_C | 1058 # define BN_MP_CLEAR_C |
909 #endif | 1059 # define BN_MP_DIV_D_C |
910 | 1060 # define BN_MP_INIT_COPY_C |
911 #if defined(BN_MP_TO_SIGNED_BIN_N_C) | 1061 # define BN_S_MP_REVERSE_C |
912 #define BN_MP_SIGNED_BIN_SIZE_C | 1062 #endif |
913 #define BN_MP_TO_SIGNED_BIN_C | 1063 |
914 #endif | 1064 #if defined(BN_MP_TO_SBIN_C) |
915 | 1065 # define BN_MP_TO_UBIN_C |
916 #if defined(BN_MP_TO_UNSIGNED_BIN_C) | 1066 #endif |
917 #define BN_MP_INIT_COPY_C | 1067 |
918 #define BN_MP_ISZERO_C | 1068 #if defined(BN_MP_TO_UBIN_C) |
919 #define BN_MP_DIV_2D_C | 1069 # define BN_MP_CLEAR_C |
920 #define BN_MP_CLEAR_C | 1070 # define BN_MP_DIV_2D_C |
921 #endif | 1071 # define BN_MP_INIT_COPY_C |
922 | 1072 # define BN_MP_UBIN_SIZE_C |
923 #if defined(BN_MP_TO_UNSIGNED_BIN_N_C) | 1073 #endif |
924 #define BN_MP_UNSIGNED_BIN_SIZE_C | 1074 |
925 #define BN_MP_TO_UNSIGNED_BIN_C | 1075 #if defined(BN_MP_UBIN_SIZE_C) |
926 #endif | 1076 # define BN_MP_COUNT_BITS_C |
927 | 1077 #endif |
928 #if defined(BN_MP_TOOM_MUL_C) | 1078 |
929 #define BN_MP_INIT_MULTI_C | 1079 #if defined(BN_MP_UNPACK_C) |
930 #define BN_MP_MOD_2D_C | 1080 # define BN_MP_CLAMP_C |
931 #define BN_MP_COPY_C | 1081 # define BN_MP_MUL_2D_C |
932 #define BN_MP_RSHD_C | 1082 # define BN_MP_ZERO_C |
933 #define BN_MP_MUL_C | |
934 #define BN_MP_MUL_2_C | |
935 #define BN_MP_ADD_C | |
936 #define BN_MP_SUB_C | |
937 #define BN_MP_DIV_2_C | |
938 #define BN_MP_MUL_2D_C | |
939 #define BN_MP_MUL_D_C | |
940 #define BN_MP_DIV_3_C | |
941 #define BN_MP_LSHD_C | |
942 #define BN_MP_CLEAR_MULTI_C | |
943 #endif | |
944 | |
945 #if defined(BN_MP_TOOM_SQR_C) | |
946 #define BN_MP_INIT_MULTI_C | |
947 #define BN_MP_MOD_2D_C | |
948 #define BN_MP_COPY_C | |
949 #define BN_MP_RSHD_C | |
950 #define BN_MP_SQR_C | |
951 #define BN_MP_MUL_2_C | |
952 #define BN_MP_ADD_C | |
953 #define BN_MP_SUB_C | |
954 #define BN_MP_DIV_2_C | |
955 #define BN_MP_MUL_2D_C | |
956 #define BN_MP_MUL_D_C | |
957 #define BN_MP_DIV_3_C | |
958 #define BN_MP_LSHD_C | |
959 #define BN_MP_CLEAR_MULTI_C | |
960 #endif | |
961 | |
962 #if defined(BN_MP_TORADIX_C) | |
963 #define BN_MP_ISZERO_C | |
964 #define BN_MP_INIT_COPY_C | |
965 #define BN_MP_DIV_D_C | |
966 #define BN_MP_CLEAR_C | |
967 #define BN_MP_S_RMAP_C | |
968 #endif | |
969 | |
970 #if defined(BN_MP_TORADIX_N_C) | |
971 #define BN_MP_ISZERO_C | |
972 #define BN_MP_INIT_COPY_C | |
973 #define BN_MP_DIV_D_C | |
974 #define BN_MP_CLEAR_C | |
975 #define BN_MP_S_RMAP_C | |
976 #endif | |
977 | |
978 #if defined(BN_MP_UNSIGNED_BIN_SIZE_C) | |
979 #define BN_MP_COUNT_BITS_C | |
980 #endif | 1083 #endif |
981 | 1084 |
982 #if defined(BN_MP_XOR_C) | 1085 #if defined(BN_MP_XOR_C) |
983 #define BN_MP_INIT_COPY_C | 1086 # define BN_MP_CLAMP_C |
984 #define BN_MP_CLAMP_C | 1087 # define BN_MP_GROW_C |
985 #define BN_MP_EXCH_C | |
986 #define BN_MP_CLEAR_C | |
987 #endif | 1088 #endif |
988 | 1089 |
989 #if defined(BN_MP_ZERO_C) | 1090 #if defined(BN_MP_ZERO_C) |
990 #endif | 1091 #endif |
991 | 1092 |
992 #if defined(BN_PRIME_TAB_C) | 1093 #if defined(BN_PRIME_TAB_C) |
993 #endif | 1094 #endif |
994 | 1095 |
995 #if defined(BN_REVERSE_C) | |
996 #endif | |
997 | |
998 #if defined(BN_S_MP_ADD_C) | 1096 #if defined(BN_S_MP_ADD_C) |
999 #define BN_MP_GROW_C | 1097 # define BN_MP_CLAMP_C |
1000 #define BN_MP_CLAMP_C | 1098 # define BN_MP_GROW_C |
1099 #endif | |
1100 | |
1101 #if defined(BN_S_MP_BALANCE_MUL_C) | |
1102 # define BN_MP_ADD_C | |
1103 # define BN_MP_CLAMP_C | |
1104 # define BN_MP_CLEAR_C | |
1105 # define BN_MP_CLEAR_MULTI_C | |
1106 # define BN_MP_EXCH_C | |
1107 # define BN_MP_INIT_MULTI_C | |
1108 # define BN_MP_INIT_SIZE_C | |
1109 # define BN_MP_LSHD_C | |
1110 # define BN_MP_MUL_C | |
1001 #endif | 1111 #endif |
1002 | 1112 |
1003 #if defined(BN_S_MP_EXPTMOD_C) | 1113 #if defined(BN_S_MP_EXPTMOD_C) |
1004 #define BN_MP_COUNT_BITS_C | 1114 # define BN_MP_CLEAR_C |
1005 #define BN_MP_INIT_C | 1115 # define BN_MP_COPY_C |
1006 #define BN_MP_CLEAR_C | 1116 # define BN_MP_COUNT_BITS_C |
1007 #define BN_MP_REDUCE_SETUP_C | 1117 # define BN_MP_EXCH_C |
1008 #define BN_MP_REDUCE_C | 1118 # define BN_MP_INIT_C |
1009 #define BN_MP_REDUCE_2K_SETUP_L_C | 1119 # define BN_MP_MOD_C |
1010 #define BN_MP_REDUCE_2K_L_C | 1120 # define BN_MP_MUL_C |
1011 #define BN_MP_MOD_C | 1121 # define BN_MP_REDUCE_2K_L_C |
1012 #define BN_MP_COPY_C | 1122 # define BN_MP_REDUCE_2K_SETUP_L_C |
1013 #define BN_MP_SQR_C | 1123 # define BN_MP_REDUCE_C |
1014 #define BN_MP_MUL_C | 1124 # define BN_MP_REDUCE_SETUP_C |
1015 #define BN_MP_SET_C | 1125 # define BN_MP_SET_C |
1016 #define BN_MP_EXCH_C | 1126 # define BN_MP_SQR_C |
1127 #endif | |
1128 | |
1129 #if defined(BN_S_MP_EXPTMOD_FAST_C) | |
1130 # define BN_MP_CLEAR_C | |
1131 # define BN_MP_COPY_C | |
1132 # define BN_MP_COUNT_BITS_C | |
1133 # define BN_MP_DR_REDUCE_C | |
1134 # define BN_MP_DR_SETUP_C | |
1135 # define BN_MP_EXCH_C | |
1136 # define BN_MP_INIT_SIZE_C | |
1137 # define BN_MP_MOD_C | |
1138 # define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C | |
1139 # define BN_MP_MONTGOMERY_REDUCE_C | |
1140 # define BN_MP_MONTGOMERY_SETUP_C | |
1141 # define BN_MP_MULMOD_C | |
1142 # define BN_MP_MUL_C | |
1143 # define BN_MP_REDUCE_2K_C | |
1144 # define BN_MP_REDUCE_2K_SETUP_C | |
1145 # define BN_MP_SET_C | |
1146 # define BN_MP_SQR_C | |
1147 # define BN_S_MP_MONTGOMERY_REDUCE_FAST_C | |
1148 #endif | |
1149 | |
1150 #if defined(BN_S_MP_GET_BIT_C) | |
1151 #endif | |
1152 | |
1153 #if defined(BN_S_MP_INVMOD_FAST_C) | |
1154 # define BN_MP_ADD_C | |
1155 # define BN_MP_CLEAR_MULTI_C | |
1156 # define BN_MP_CMP_C | |
1157 # define BN_MP_CMP_D_C | |
1158 # define BN_MP_CMP_MAG_C | |
1159 # define BN_MP_COPY_C | |
1160 # define BN_MP_DIV_2_C | |
1161 # define BN_MP_EXCH_C | |
1162 # define BN_MP_INIT_MULTI_C | |
1163 # define BN_MP_MOD_C | |
1164 # define BN_MP_SET_C | |
1165 # define BN_MP_SUB_C | |
1166 #endif | |
1167 | |
1168 #if defined(BN_S_MP_INVMOD_SLOW_C) | |
1169 # define BN_MP_ADD_C | |
1170 # define BN_MP_CLEAR_MULTI_C | |
1171 # define BN_MP_CMP_C | |
1172 # define BN_MP_CMP_D_C | |
1173 # define BN_MP_CMP_MAG_C | |
1174 # define BN_MP_COPY_C | |
1175 # define BN_MP_DIV_2_C | |
1176 # define BN_MP_EXCH_C | |
1177 # define BN_MP_INIT_MULTI_C | |
1178 # define BN_MP_MOD_C | |
1179 # define BN_MP_SET_C | |
1180 # define BN_MP_SUB_C | |
1181 #endif | |
1182 | |
1183 #if defined(BN_S_MP_KARATSUBA_MUL_C) | |
1184 # define BN_MP_ADD_C | |
1185 # define BN_MP_CLAMP_C | |
1186 # define BN_MP_CLEAR_C | |
1187 # define BN_MP_INIT_SIZE_C | |
1188 # define BN_MP_LSHD_C | |
1189 # define BN_MP_MUL_C | |
1190 # define BN_S_MP_ADD_C | |
1191 # define BN_S_MP_SUB_C | |
1192 #endif | |
1193 | |
1194 #if defined(BN_S_MP_KARATSUBA_SQR_C) | |
1195 # define BN_MP_ADD_C | |
1196 # define BN_MP_CLAMP_C | |
1197 # define BN_MP_CLEAR_C | |
1198 # define BN_MP_INIT_SIZE_C | |
1199 # define BN_MP_LSHD_C | |
1200 # define BN_MP_SQR_C | |
1201 # define BN_S_MP_ADD_C | |
1202 # define BN_S_MP_SUB_C | |
1203 #endif | |
1204 | |
1205 #if defined(BN_S_MP_MONTGOMERY_REDUCE_FAST_C) | |
1206 # define BN_MP_CLAMP_C | |
1207 # define BN_MP_CMP_MAG_C | |
1208 # define BN_MP_GROW_C | |
1209 # define BN_S_MP_SUB_C | |
1017 #endif | 1210 #endif |
1018 | 1211 |
1019 #if defined(BN_S_MP_MUL_DIGS_C) | 1212 #if defined(BN_S_MP_MUL_DIGS_C) |
1020 #define BN_FAST_S_MP_MUL_DIGS_C | 1213 # define BN_MP_CLAMP_C |
1021 #define BN_MP_INIT_SIZE_C | 1214 # define BN_MP_CLEAR_C |
1022 #define BN_MP_CLAMP_C | 1215 # define BN_MP_EXCH_C |
1023 #define BN_MP_EXCH_C | 1216 # define BN_MP_INIT_SIZE_C |
1024 #define BN_MP_CLEAR_C | 1217 # define BN_S_MP_MUL_DIGS_FAST_C |
1218 #endif | |
1219 | |
1220 #if defined(BN_S_MP_MUL_DIGS_FAST_C) | |
1221 # define BN_MP_CLAMP_C | |
1222 # define BN_MP_GROW_C | |
1025 #endif | 1223 #endif |
1026 | 1224 |
1027 #if defined(BN_S_MP_MUL_HIGH_DIGS_C) | 1225 #if defined(BN_S_MP_MUL_HIGH_DIGS_C) |
1028 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C | 1226 # define BN_MP_CLAMP_C |
1029 #define BN_MP_INIT_SIZE_C | 1227 # define BN_MP_CLEAR_C |
1030 #define BN_MP_CLAMP_C | 1228 # define BN_MP_EXCH_C |
1031 #define BN_MP_EXCH_C | 1229 # define BN_MP_INIT_SIZE_C |
1032 #define BN_MP_CLEAR_C | 1230 # define BN_S_MP_MUL_HIGH_DIGS_FAST_C |
1231 #endif | |
1232 | |
1233 #if defined(BN_S_MP_MUL_HIGH_DIGS_FAST_C) | |
1234 # define BN_MP_CLAMP_C | |
1235 # define BN_MP_GROW_C | |
1236 #endif | |
1237 | |
1238 #if defined(BN_S_MP_PRIME_IS_DIVISIBLE_C) | |
1239 # define BN_MP_MOD_D_C | |
1240 #endif | |
1241 | |
1242 #if defined(BN_S_MP_RAND_JENKINS_C) | |
1243 # define BN_S_MP_RAND_JENKINS_INIT_C | |
1244 #endif | |
1245 | |
1246 #if defined(BN_S_MP_RAND_PLATFORM_C) | |
1247 #endif | |
1248 | |
1249 #if defined(BN_S_MP_REVERSE_C) | |
1033 #endif | 1250 #endif |
1034 | 1251 |
1035 #if defined(BN_S_MP_SQR_C) | 1252 #if defined(BN_S_MP_SQR_C) |
1036 #define BN_MP_INIT_SIZE_C | 1253 # define BN_MP_CLAMP_C |
1037 #define BN_MP_CLAMP_C | 1254 # define BN_MP_CLEAR_C |
1038 #define BN_MP_EXCH_C | 1255 # define BN_MP_EXCH_C |
1039 #define BN_MP_CLEAR_C | 1256 # define BN_MP_INIT_SIZE_C |
1257 #endif | |
1258 | |
1259 #if defined(BN_S_MP_SQR_FAST_C) | |
1260 # define BN_MP_CLAMP_C | |
1261 # define BN_MP_GROW_C | |
1040 #endif | 1262 #endif |
1041 | 1263 |
1042 #if defined(BN_S_MP_SUB_C) | 1264 #if defined(BN_S_MP_SUB_C) |
1043 #define BN_MP_GROW_C | 1265 # define BN_MP_CLAMP_C |
1044 #define BN_MP_CLAMP_C | 1266 # define BN_MP_GROW_C |
1045 #endif | 1267 #endif |
1046 | 1268 |
1047 #if defined(BNCORE_C) | 1269 #if defined(BN_S_MP_TOOM_MUL_C) |
1048 #endif | 1270 # define BN_MP_ADD_C |
1049 | 1271 # define BN_MP_CLAMP_C |
1272 # define BN_MP_CLEAR_C | |
1273 # define BN_MP_CLEAR_MULTI_C | |
1274 # define BN_MP_DIV_2_C | |
1275 # define BN_MP_DIV_3_C | |
1276 # define BN_MP_INIT_MULTI_C | |
1277 # define BN_MP_INIT_SIZE_C | |
1278 # define BN_MP_LSHD_C | |
1279 # define BN_MP_MUL_2_C | |
1280 # define BN_MP_MUL_C | |
1281 # define BN_MP_SUB_C | |
1282 #endif | |
1283 | |
1284 #if defined(BN_S_MP_TOOM_SQR_C) | |
1285 # define BN_MP_ADD_C | |
1286 # define BN_MP_CLAMP_C | |
1287 # define BN_MP_CLEAR_C | |
1288 # define BN_MP_DIV_2_C | |
1289 # define BN_MP_INIT_C | |
1290 # define BN_MP_INIT_SIZE_C | |
1291 # define BN_MP_LSHD_C | |
1292 # define BN_MP_MUL_2_C | |
1293 # define BN_MP_MUL_C | |
1294 # define BN_MP_SQR_C | |
1295 # define BN_MP_SUB_C | |
1296 #endif | |
1297 | |
1298 #ifdef LTM_INSIDE | |
1299 #undef LTM_INSIDE | |
1050 #ifdef LTM3 | 1300 #ifdef LTM3 |
1051 #define LTM_LAST | 1301 # define LTM_LAST |
1052 #endif | 1302 #endif |
1303 | |
1053 #include "tommath_superclass.h" | 1304 #include "tommath_superclass.h" |
1054 #include "tommath_class.h" | 1305 #include "tommath_class.h" |
1055 #else | 1306 #else |
1056 #define LTM_LAST | 1307 # define LTM_LAST |
1057 #endif | 1308 #endif |
1058 | 1309 |
1059 /* Dropbear doesn't need these. */ | 1310 /* Dropbear doesn't need these. */ |
1060 #undef BN_MP_KARATSUBA_MUL_C | 1311 #undef BN_MP_KARATSUBA_MUL_C |
1061 #undef BN_MP_KARATSUBA_SQR_C | 1312 #undef BN_MP_KARATSUBA_SQR_C |
1062 #undef BN_MP_TOOM_MUL_C | 1313 #undef BN_MP_TOOM_MUL_C |
1063 #undef BN_MP_TOOM_SQR_C | 1314 #undef BN_MP_TOOM_SQR_C |
1064 | 1315 #undef BN_S_MP_KARATSUBA_MUL_C |
1065 void * m_malloc(size_t size); | 1316 #undef BN_S_MP_KARATSUBA_SQR_C |
1066 /* m_calloc is limited in size, enough for libtomcrypt */ | 1317 #undef BN_S_MP_TOOM_MUL_C |
1067 void * m_calloc(size_t nmemb, size_t size); | 1318 #undef BN_S_MP_TOOM_SQR_C |
1068 void * m_realloc(void* ptr, size_t size); | 1319 |
1069 void m_free_direct(void* ptr); | 1320 #include "dbmalloc.h" |
1070 | 1321 #define MP_MALLOC m_malloc |
1071 #define XMALLOC m_malloc | 1322 #define MP_FREE m_free_ltm |
1072 #define XFREE m_free_direct | 1323 #define MP_REALLOC m_realloc_ltm |
1073 #define XREALLOC m_realloc | 1324 #define MP_CALLOC m_calloc |
1074 #define XCALLOC m_calloc | |
1075 | |
1076 /* $Source$ */ | |
1077 /* $Revision$ */ | |
1078 /* $Date$ */ |