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