Mercurial > dropbear
annotate tommath_class.h @ 146:81bc23421b45 libtommath
Clean up the merge, remove some unneeded files etc
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 19 Dec 2004 16:18:40 +0000 |
parents | d29b64170cf0 |
children | 3a616069cc21 |
rev | line source |
---|---|
142 | 1 #if !(defined(LTM1) && defined(LTM2) && defined(LTM3)) |
2 #if defined(LTM2) | |
3 #define LTM3 | |
4 #endif | |
5 #if defined(LTM1) | |
6 #define LTM2 | |
7 #endif | |
8 #define LTM1 | |
9 | |
10 #if defined(LTM_ALL) | |
11 #define BN_ERROR_C | |
12 #define BN_FAST_MP_INVMOD_C | |
13 #define BN_FAST_MP_MONTGOMERY_REDUCE_C | |
14 #define BN_FAST_S_MP_MUL_DIGS_C | |
15 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C | |
16 #define BN_FAST_S_MP_SQR_C | |
17 #define BN_MP_2EXPT_C | |
18 #define BN_MP_ABS_C | |
19 #define BN_MP_ADD_C | |
20 #define BN_MP_ADD_D_C | |
21 #define BN_MP_ADDMOD_C | |
22 #define BN_MP_AND_C | |
23 #define BN_MP_CLAMP_C | |
24 #define BN_MP_CLEAR_C | |
25 #define BN_MP_CLEAR_MULTI_C | |
26 #define BN_MP_CMP_C | |
27 #define BN_MP_CMP_D_C | |
28 #define BN_MP_CMP_MAG_C | |
29 #define BN_MP_CNT_LSB_C | |
30 #define BN_MP_COPY_C | |
31 #define BN_MP_COUNT_BITS_C | |
32 #define BN_MP_DIV_C | |
33 #define BN_MP_DIV_2_C | |
34 #define BN_MP_DIV_2D_C | |
35 #define BN_MP_DIV_3_C | |
36 #define BN_MP_DIV_D_C | |
37 #define BN_MP_DR_IS_MODULUS_C | |
38 #define BN_MP_DR_REDUCE_C | |
39 #define BN_MP_DR_SETUP_C | |
40 #define BN_MP_EXCH_C | |
41 #define BN_MP_EXPT_D_C | |
42 #define BN_MP_EXPTMOD_C | |
43 #define BN_MP_EXPTMOD_FAST_C | |
44 #define BN_MP_EXTEUCLID_C | |
45 #define BN_MP_FREAD_C | |
46 #define BN_MP_FWRITE_C | |
47 #define BN_MP_GCD_C | |
48 #define BN_MP_GET_INT_C | |
49 #define BN_MP_GROW_C | |
50 #define BN_MP_INIT_C | |
51 #define BN_MP_INIT_COPY_C | |
52 #define BN_MP_INIT_MULTI_C | |
53 #define BN_MP_INIT_SET_C | |
54 #define BN_MP_INIT_SET_INT_C | |
55 #define BN_MP_INIT_SIZE_C | |
56 #define BN_MP_INVMOD_C | |
57 #define BN_MP_INVMOD_SLOW_C | |
58 #define BN_MP_IS_SQUARE_C | |
59 #define BN_MP_JACOBI_C | |
146
81bc23421b45
Clean up the merge, remove some unneeded files etc
Matt Johnston <matt@ucc.asn.au>
parents:
142
diff
changeset
|
60 /* matt - dropbear doesn't need these |
142 | 61 #define BN_MP_KARATSUBA_MUL_C |
62 #define BN_MP_KARATSUBA_SQR_C | |
146
81bc23421b45
Clean up the merge, remove some unneeded files etc
Matt Johnston <matt@ucc.asn.au>
parents:
142
diff
changeset
|
63 */ |
142 | 64 #define BN_MP_LCM_C |
65 #define BN_MP_LSHD_C | |
66 #define BN_MP_MOD_C | |
67 #define BN_MP_MOD_2D_C | |
68 #define BN_MP_MOD_D_C | |
69 #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C | |
70 #define BN_MP_MONTGOMERY_REDUCE_C | |
71 #define BN_MP_MONTGOMERY_SETUP_C | |
72 #define BN_MP_MUL_C | |
73 #define BN_MP_MUL_2_C | |
74 #define BN_MP_MUL_2D_C | |
75 #define BN_MP_MUL_D_C | |
76 #define BN_MP_MULMOD_C | |
77 #define BN_MP_N_ROOT_C | |
78 #define BN_MP_NEG_C | |
79 #define BN_MP_OR_C | |
80 #define BN_MP_PRIME_FERMAT_C | |
81 #define BN_MP_PRIME_IS_DIVISIBLE_C | |
82 #define BN_MP_PRIME_IS_PRIME_C | |
83 #define BN_MP_PRIME_MILLER_RABIN_C | |
84 #define BN_MP_PRIME_NEXT_PRIME_C | |
85 #define BN_MP_PRIME_RABIN_MILLER_TRIALS_C | |
86 #define BN_MP_PRIME_RANDOM_EX_C | |
87 #define BN_MP_RADIX_SIZE_C | |
88 #define BN_MP_RADIX_SMAP_C | |
89 #define BN_MP_RAND_C | |
90 #define BN_MP_READ_RADIX_C | |
91 #define BN_MP_READ_SIGNED_BIN_C | |
92 #define BN_MP_READ_UNSIGNED_BIN_C | |
93 #define BN_MP_REDUCE_C | |
94 #define BN_MP_REDUCE_2K_C | |
95 #define BN_MP_REDUCE_2K_SETUP_C | |
96 #define BN_MP_REDUCE_IS_2K_C | |
97 #define BN_MP_REDUCE_SETUP_C | |
98 #define BN_MP_RSHD_C | |
99 #define BN_MP_SET_C | |
100 #define BN_MP_SET_INT_C | |
101 #define BN_MP_SHRINK_C | |
102 #define BN_MP_SIGNED_BIN_SIZE_C | |
103 #define BN_MP_SQR_C | |
104 #define BN_MP_SQRMOD_C | |
105 #define BN_MP_SQRT_C | |
106 #define BN_MP_SUB_C | |
107 #define BN_MP_SUB_D_C | |
108 #define BN_MP_SUBMOD_C | |
109 #define BN_MP_TO_SIGNED_BIN_C | |
110 #define BN_MP_TO_UNSIGNED_BIN_C | |
146
81bc23421b45
Clean up the merge, remove some unneeded files etc
Matt Johnston <matt@ucc.asn.au>
parents:
142
diff
changeset
|
111 /* matt - dropbear doesn't need these |
142 | 112 #define BN_MP_TOOM_MUL_C |
113 #define BN_MP_TOOM_SQR_C | |
146
81bc23421b45
Clean up the merge, remove some unneeded files etc
Matt Johnston <matt@ucc.asn.au>
parents:
142
diff
changeset
|
114 */ |
142 | 115 #define BN_MP_TORADIX_C |
116 #define BN_MP_TORADIX_N_C | |
117 #define BN_MP_UNSIGNED_BIN_SIZE_C | |
118 #define BN_MP_XOR_C | |
119 #define BN_MP_ZERO_C | |
120 #define BN_PRIME_TAB_C | |
121 #define BN_REVERSE_C | |
122 #define BN_S_MP_ADD_C | |
123 #define BN_S_MP_EXPTMOD_C | |
124 #define BN_S_MP_MUL_DIGS_C | |
125 #define BN_S_MP_MUL_HIGH_DIGS_C | |
126 #define BN_S_MP_SQR_C | |
127 #define BN_S_MP_SUB_C | |
128 #define BNCORE_C | |
129 #endif | |
130 | |
131 #if defined(BN_ERROR_C) | |
132 #define BN_MP_ERROR_TO_STRING_C | |
133 #endif | |
134 | |
135 #if defined(BN_FAST_MP_INVMOD_C) | |
136 #define BN_MP_ISEVEN_C | |
137 #define BN_MP_INIT_MULTI_C | |
138 #define BN_MP_COPY_C | |
139 #define BN_MP_ABS_C | |
140 #define BN_MP_SET_C | |
141 #define BN_MP_DIV_2_C | |
142 #define BN_MP_ISODD_C | |
143 #define BN_MP_SUB_C | |
144 #define BN_MP_CMP_C | |
145 #define BN_MP_ISZERO_C | |
146 #define BN_MP_CMP_D_C | |
147 #define BN_MP_ADD_C | |
148 #define BN_MP_EXCH_C | |
149 #define BN_MP_CLEAR_MULTI_C | |
150 #endif | |
151 | |
152 #if defined(BN_FAST_MP_MONTGOMERY_REDUCE_C) | |
153 #define BN_MP_GROW_C | |
154 #define BN_MP_RSHD_C | |
155 #define BN_MP_CLAMP_C | |
156 #define BN_MP_CMP_MAG_C | |
157 #define BN_S_MP_SUB_C | |
158 #endif | |
159 | |
160 #if defined(BN_FAST_S_MP_MUL_DIGS_C) | |
161 #define BN_MP_GROW_C | |
162 #define BN_MP_CLAMP_C | |
163 #endif | |
164 | |
165 #if defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C) | |
166 #define BN_MP_GROW_C | |
167 #define BN_MP_CLAMP_C | |
168 #endif | |
169 | |
170 #if defined(BN_FAST_S_MP_SQR_C) | |
171 #define BN_MP_GROW_C | |
172 #define BN_MP_CLAMP_C | |
173 #endif | |
174 | |
175 #if defined(BN_MP_2EXPT_C) | |
176 #define BN_MP_ZERO_C | |
177 #define BN_MP_GROW_C | |
178 #endif | |
179 | |
180 #if defined(BN_MP_ABS_C) | |
181 #define BN_MP_COPY_C | |
182 #endif | |
183 | |
184 #if defined(BN_MP_ADD_C) | |
185 #define BN_S_MP_ADD_C | |
186 #define BN_MP_CMP_MAG_C | |
187 #define BN_S_MP_SUB_C | |
188 #endif | |
189 | |
190 #if defined(BN_MP_ADD_D_C) | |
191 #define BN_MP_GROW_C | |
192 #define BN_MP_SUB_D_C | |
193 #define BN_MP_CLAMP_C | |
194 #endif | |
195 | |
196 #if defined(BN_MP_ADDMOD_C) | |
197 #define BN_MP_INIT_C | |
198 #define BN_MP_ADD_C | |
199 #define BN_MP_CLEAR_C | |
200 #define BN_MP_MOD_C | |
201 #endif | |
202 | |
203 #if defined(BN_MP_AND_C) | |
204 #define BN_MP_INIT_COPY_C | |
205 #define BN_MP_CLAMP_C | |
206 #define BN_MP_EXCH_C | |
207 #define BN_MP_CLEAR_C | |
208 #endif | |
209 | |
210 #if defined(BN_MP_CLAMP_C) | |
211 #endif | |
212 | |
213 #if defined(BN_MP_CLEAR_C) | |
214 #endif | |
215 | |
216 #if defined(BN_MP_CLEAR_MULTI_C) | |
217 #define BN_MP_CLEAR_C | |
218 #endif | |
219 | |
220 #if defined(BN_MP_CMP_C) | |
221 #define BN_MP_CMP_MAG_C | |
222 #endif | |
223 | |
224 #if defined(BN_MP_CMP_D_C) | |
225 #endif | |
226 | |
227 #if defined(BN_MP_CMP_MAG_C) | |
228 #endif | |
229 | |
230 #if defined(BN_MP_CNT_LSB_C) | |
231 #define BN_MP_ISZERO_C | |
232 #endif | |
233 | |
234 #if defined(BN_MP_COPY_C) | |
235 #define BN_MP_GROW_C | |
236 #endif | |
237 | |
238 #if defined(BN_MP_COUNT_BITS_C) | |
239 #endif | |
240 | |
241 #if defined(BN_MP_DIV_C) | |
242 #define BN_MP_ISZERO_C | |
243 #define BN_MP_CMP_MAG_C | |
244 #define BN_MP_COPY_C | |
245 #define BN_MP_ZERO_C | |
246 #define BN_MP_INIT_MULTI_C | |
247 #define BN_MP_SET_C | |
248 #define BN_MP_COUNT_BITS_C | |
249 #define BN_MP_MUL_2D_C | |
250 #define BN_MP_CMP_C | |
251 #define BN_MP_SUB_C | |
252 #define BN_MP_ADD_C | |
253 #define BN_MP_DIV_2D_C | |
254 #define BN_MP_EXCH_C | |
255 #define BN_MP_CLEAR_MULTI_C | |
256 #define BN_MP_INIT_SIZE_C | |
257 #define BN_MP_INIT_C | |
258 #define BN_MP_INIT_COPY_C | |
259 #define BN_MP_LSHD_C | |
260 #define BN_MP_RSHD_C | |
261 #define BN_MP_MUL_D_C | |
262 #define BN_MP_CLAMP_C | |
263 #define BN_MP_CLEAR_C | |
264 #endif | |
265 | |
266 #if defined(BN_MP_DIV_2_C) | |
267 #define BN_MP_GROW_C | |
268 #define BN_MP_CLAMP_C | |
269 #endif | |
270 | |
271 #if defined(BN_MP_DIV_2D_C) | |
272 #define BN_MP_COPY_C | |
273 #define BN_MP_ZERO_C | |
274 #define BN_MP_INIT_C | |
275 #define BN_MP_MOD_2D_C | |
276 #define BN_MP_CLEAR_C | |
277 #define BN_MP_RSHD_C | |
278 #define BN_MP_CLAMP_C | |
279 #define BN_MP_EXCH_C | |
280 #endif | |
281 | |
282 #if defined(BN_MP_DIV_3_C) | |
283 #define BN_MP_INIT_SIZE_C | |
284 #define BN_MP_CLAMP_C | |
285 #define BN_MP_EXCH_C | |
286 #define BN_MP_CLEAR_C | |
287 #endif | |
288 | |
289 #if defined(BN_MP_DIV_D_C) | |
290 #define BN_MP_ISZERO_C | |
291 #define BN_MP_COPY_C | |
292 #define BN_MP_DIV_2D_C | |
293 #define BN_MP_DIV_3_C | |
294 #define BN_MP_INIT_SIZE_C | |
295 #define BN_MP_CLAMP_C | |
296 #define BN_MP_EXCH_C | |
297 #define BN_MP_CLEAR_C | |
298 #endif | |
299 | |
300 #if defined(BN_MP_DR_IS_MODULUS_C) | |
301 #endif | |
302 | |
303 #if defined(BN_MP_DR_REDUCE_C) | |
304 #define BN_MP_GROW_C | |
305 #define BN_MP_CLAMP_C | |
306 #define BN_MP_CMP_MAG_C | |
307 #define BN_S_MP_SUB_C | |
308 #endif | |
309 | |
310 #if defined(BN_MP_DR_SETUP_C) | |
311 #endif | |
312 | |
313 #if defined(BN_MP_EXCH_C) | |
314 #endif | |
315 | |
316 #if defined(BN_MP_EXPT_D_C) | |
317 #define BN_MP_INIT_COPY_C | |
318 #define BN_MP_SET_C | |
319 #define BN_MP_SQR_C | |
320 #define BN_MP_CLEAR_C | |
321 #define BN_MP_MUL_C | |
322 #endif | |
323 | |
324 #if defined(BN_MP_EXPTMOD_C) | |
325 #define BN_MP_INIT_C | |
326 #define BN_MP_INVMOD_C | |
327 #define BN_MP_CLEAR_C | |
328 #define BN_MP_ABS_C | |
329 #define BN_MP_CLEAR_MULTI_C | |
330 #define BN_MP_DR_IS_MODULUS_C | |
331 #define BN_MP_REDUCE_IS_2K_C | |
332 #define BN_MP_ISODD_C | |
333 #define BN_MP_EXPTMOD_FAST_C | |
334 #define BN_S_MP_EXPTMOD_C | |
335 #endif | |
336 | |
337 #if defined(BN_MP_EXPTMOD_FAST_C) | |
338 #define BN_MP_COUNT_BITS_C | |
339 #define BN_MP_INIT_C | |
340 #define BN_MP_CLEAR_C | |
341 #define BN_MP_MONTGOMERY_SETUP_C | |
342 #define BN_FAST_MP_MONTGOMERY_REDUCE_C | |
343 #define BN_MP_MONTGOMERY_REDUCE_C | |
344 #define BN_MP_DR_SETUP_C | |
345 #define BN_MP_DR_REDUCE_C | |
346 #define BN_MP_REDUCE_2K_SETUP_C | |
347 #define BN_MP_REDUCE_2K_C | |
348 #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C | |
349 #define BN_MP_MULMOD_C | |
350 #define BN_MP_SET_C | |
351 #define BN_MP_MOD_C | |
352 #define BN_MP_COPY_C | |
353 #define BN_MP_SQR_C | |
354 #define BN_MP_MUL_C | |
355 #define BN_MP_EXCH_C | |
356 #endif | |
357 | |
358 #if defined(BN_MP_EXTEUCLID_C) | |
359 #define BN_MP_INIT_MULTI_C | |
360 #define BN_MP_SET_C | |
361 #define BN_MP_COPY_C | |
362 #define BN_MP_ISZERO_C | |
363 #define BN_MP_DIV_C | |
364 #define BN_MP_MUL_C | |
365 #define BN_MP_SUB_C | |
366 #define BN_MP_EXCH_C | |
367 #define BN_MP_CLEAR_MULTI_C | |
368 #endif | |
369 | |
370 #if defined(BN_MP_FREAD_C) | |
371 #define BN_MP_ZERO_C | |
372 #define BN_MP_S_RMAP_C | |
373 #define BN_MP_MUL_D_C | |
374 #define BN_MP_ADD_D_C | |
375 #define BN_MP_CMP_D_C | |
376 #endif | |
377 | |
378 #if defined(BN_MP_FWRITE_C) | |
379 #define BN_MP_RADIX_SIZE_C | |
380 #define BN_MP_TORADIX_C | |
381 #endif | |
382 | |
383 #if defined(BN_MP_GCD_C) | |
384 #define BN_MP_ISZERO_C | |
385 #define BN_MP_ABS_C | |
386 #define BN_MP_ZERO_C | |
387 #define BN_MP_INIT_COPY_C | |
388 #define BN_MP_CNT_LSB_C | |
389 #define BN_MP_DIV_2D_C | |
390 #define BN_MP_CMP_MAG_C | |
391 #define BN_MP_EXCH_C | |
392 #define BN_S_MP_SUB_C | |
393 #define BN_MP_MUL_2D_C | |
394 #define BN_MP_CLEAR_C | |
395 #endif | |
396 | |
397 #if defined(BN_MP_GET_INT_C) | |
398 #endif | |
399 | |
400 #if defined(BN_MP_GROW_C) | |
401 #endif | |
402 | |
403 #if defined(BN_MP_INIT_C) | |
404 #endif | |
405 | |
406 #if defined(BN_MP_INIT_COPY_C) | |
407 #define BN_MP_COPY_C | |
408 #endif | |
409 | |
410 #if defined(BN_MP_INIT_MULTI_C) | |
411 #define BN_MP_ERR_C | |
412 #define BN_MP_INIT_C | |
413 #define BN_MP_CLEAR_C | |
414 #endif | |
415 | |
416 #if defined(BN_MP_INIT_SET_C) | |
417 #define BN_MP_INIT_C | |
418 #define BN_MP_SET_C | |
419 #endif | |
420 | |
421 #if defined(BN_MP_INIT_SET_INT_C) | |
422 #define BN_MP_INIT_C | |
423 #define BN_MP_SET_INT_C | |
424 #endif | |
425 | |
426 #if defined(BN_MP_INIT_SIZE_C) | |
427 #define BN_MP_INIT_C | |
428 #endif | |
429 | |
430 #if defined(BN_MP_INVMOD_C) | |
431 #define BN_MP_ISZERO_C | |
432 #define BN_MP_ISODD_C | |
433 #define BN_FAST_MP_INVMOD_C | |
434 #define BN_MP_INVMOD_SLOW_C | |
435 #endif | |
436 | |
437 #if defined(BN_MP_INVMOD_SLOW_C) | |
438 #define BN_MP_ISZERO_C | |
439 #define BN_MP_INIT_MULTI_C | |
440 #define BN_MP_COPY_C | |
441 #define BN_MP_ISEVEN_C | |
442 #define BN_MP_SET_C | |
443 #define BN_MP_DIV_2_C | |
444 #define BN_MP_ISODD_C | |
445 #define BN_MP_ADD_C | |
446 #define BN_MP_SUB_C | |
447 #define BN_MP_CMP_C | |
448 #define BN_MP_CMP_D_C | |
449 #define BN_MP_CMP_MAG_C | |
450 #define BN_MP_EXCH_C | |
451 #define BN_MP_CLEAR_MULTI_C | |
452 #endif | |
453 | |
454 #if defined(BN_MP_IS_SQUARE_C) | |
455 #define BN_MP_MOD_D_C | |
456 #define BN_MP_INIT_SET_INT_C | |
457 #define BN_MP_MOD_C | |
458 #define BN_MP_GET_INT_C | |
459 #define BN_MP_SQRT_C | |
460 #define BN_MP_SQR_C | |
461 #define BN_MP_CMP_MAG_C | |
462 #define BN_MP_CLEAR_C | |
463 #endif | |
464 | |
465 #if defined(BN_MP_JACOBI_C) | |
466 #define BN_MP_CMP_D_C | |
467 #define BN_MP_ISZERO_C | |
468 #define BN_MP_INIT_COPY_C | |
469 #define BN_MP_CNT_LSB_C | |
470 #define BN_MP_DIV_2D_C | |
471 #define BN_MP_MOD_C | |
472 #define BN_MP_CLEAR_C | |
473 #endif | |
474 | |
475 #if defined(BN_MP_KARATSUBA_MUL_C) | |
476 #define BN_MP_MUL_C | |
477 #define BN_MP_INIT_SIZE_C | |
478 #define BN_MP_CLAMP_C | |
479 #define BN_MP_SUB_C | |
480 #define BN_MP_ADD_C | |
481 #define BN_MP_LSHD_C | |
482 #define BN_MP_CLEAR_C | |
483 #endif | |
484 | |
485 #if defined(BN_MP_KARATSUBA_SQR_C) | |
486 #define BN_MP_INIT_SIZE_C | |
487 #define BN_MP_CLAMP_C | |
488 #define BN_MP_SQR_C | |
489 #define BN_MP_SUB_C | |
490 #define BN_S_MP_ADD_C | |
491 #define BN_MP_LSHD_C | |
492 #define BN_MP_ADD_C | |
493 #define BN_MP_CLEAR_C | |
494 #endif | |
495 | |
496 #if defined(BN_MP_LCM_C) | |
497 #define BN_MP_INIT_MULTI_C | |
498 #define BN_MP_GCD_C | |
499 #define BN_MP_CMP_MAG_C | |
500 #define BN_MP_DIV_C | |
501 #define BN_MP_MUL_C | |
502 #define BN_MP_CLEAR_MULTI_C | |
503 #endif | |
504 | |
505 #if defined(BN_MP_LSHD_C) | |
506 #define BN_MP_GROW_C | |
507 #define BN_MP_RSHD_C | |
508 #endif | |
509 | |
510 #if defined(BN_MP_MOD_C) | |
511 #define BN_MP_INIT_C | |
512 #define BN_MP_DIV_C | |
513 #define BN_MP_CLEAR_C | |
514 #define BN_MP_ADD_C | |
515 #define BN_MP_EXCH_C | |
516 #endif | |
517 | |
518 #if defined(BN_MP_MOD_2D_C) | |
519 #define BN_MP_ZERO_C | |
520 #define BN_MP_COPY_C | |
521 #define BN_MP_CLAMP_C | |
522 #endif | |
523 | |
524 #if defined(BN_MP_MOD_D_C) | |
525 #define BN_MP_DIV_D_C | |
526 #endif | |
527 | |
528 #if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C) | |
529 #define BN_MP_COUNT_BITS_C | |
530 #define BN_MP_2EXPT_C | |
531 #define BN_MP_SET_C | |
532 #define BN_MP_MUL_2_C | |
533 #define BN_MP_CMP_MAG_C | |
534 #define BN_S_MP_SUB_C | |
535 #endif | |
536 | |
537 #if defined(BN_MP_MONTGOMERY_REDUCE_C) | |
538 #define BN_FAST_MP_MONTGOMERY_REDUCE_C | |
539 #define BN_MP_GROW_C | |
540 #define BN_MP_CLAMP_C | |
541 #define BN_MP_RSHD_C | |
542 #define BN_MP_CMP_MAG_C | |
543 #define BN_S_MP_SUB_C | |
544 #endif | |
545 | |
546 #if defined(BN_MP_MONTGOMERY_SETUP_C) | |
547 #endif | |
548 | |
549 #if defined(BN_MP_MUL_C) | |
550 #define BN_MP_TOOM_MUL_C | |
551 #define BN_MP_KARATSUBA_MUL_C | |
552 #define BN_FAST_S_MP_MUL_DIGS_C | |
553 #define BN_S_MP_MUL_C | |
554 #define BN_S_MP_MUL_DIGS_C | |
555 #endif | |
556 | |
557 #if defined(BN_MP_MUL_2_C) | |
558 #define BN_MP_GROW_C | |
559 #endif | |
560 | |
561 #if defined(BN_MP_MUL_2D_C) | |
562 #define BN_MP_COPY_C | |
563 #define BN_MP_GROW_C | |
564 #define BN_MP_LSHD_C | |
565 #define BN_MP_CLAMP_C | |
566 #endif | |
567 | |
568 #if defined(BN_MP_MUL_D_C) | |
569 #define BN_MP_GROW_C | |
570 #define BN_MP_CLAMP_C | |
571 #endif | |
572 | |
573 #if defined(BN_MP_MULMOD_C) | |
574 #define BN_MP_INIT_C | |
575 #define BN_MP_MUL_C | |
576 #define BN_MP_CLEAR_C | |
577 #define BN_MP_MOD_C | |
578 #endif | |
579 | |
580 #if defined(BN_MP_N_ROOT_C) | |
581 #define BN_MP_INIT_C | |
582 #define BN_MP_SET_C | |
583 #define BN_MP_COPY_C | |
584 #define BN_MP_EXPT_D_C | |
585 #define BN_MP_MUL_C | |
586 #define BN_MP_SUB_C | |
587 #define BN_MP_MUL_D_C | |
588 #define BN_MP_DIV_C | |
589 #define BN_MP_CMP_C | |
590 #define BN_MP_SUB_D_C | |
591 #define BN_MP_EXCH_C | |
592 #define BN_MP_CLEAR_C | |
593 #endif | |
594 | |
595 #if defined(BN_MP_NEG_C) | |
596 #define BN_MP_COPY_C | |
597 #define BN_MP_ISZERO_C | |
598 #endif | |
599 | |
600 #if defined(BN_MP_OR_C) | |
601 #define BN_MP_INIT_COPY_C | |
602 #define BN_MP_CLAMP_C | |
603 #define BN_MP_EXCH_C | |
604 #define BN_MP_CLEAR_C | |
605 #endif | |
606 | |
607 #if defined(BN_MP_PRIME_FERMAT_C) | |
608 #define BN_MP_CMP_D_C | |
609 #define BN_MP_INIT_C | |
610 #define BN_MP_EXPTMOD_C | |
611 #define BN_MP_CMP_C | |
612 #define BN_MP_CLEAR_C | |
613 #endif | |
614 | |
615 #if defined(BN_MP_PRIME_IS_DIVISIBLE_C) | |
616 #define BN_MP_MOD_D_C | |
617 #endif | |
618 | |
619 #if defined(BN_MP_PRIME_IS_PRIME_C) | |
620 #define BN_MP_CMP_D_C | |
621 #define BN_MP_PRIME_IS_DIVISIBLE_C | |
622 #define BN_MP_INIT_C | |
623 #define BN_MP_SET_C | |
624 #define BN_MP_PRIME_MILLER_RABIN_C | |
625 #define BN_MP_CLEAR_C | |
626 #endif | |
627 | |
628 #if defined(BN_MP_PRIME_MILLER_RABIN_C) | |
629 #define BN_MP_CMP_D_C | |
630 #define BN_MP_INIT_COPY_C | |
631 #define BN_MP_SUB_D_C | |
632 #define BN_MP_CNT_LSB_C | |
633 #define BN_MP_DIV_2D_C | |
634 #define BN_MP_EXPTMOD_C | |
635 #define BN_MP_CMP_C | |
636 #define BN_MP_SQRMOD_C | |
637 #define BN_MP_CLEAR_C | |
638 #endif | |
639 | |
640 #if defined(BN_MP_PRIME_NEXT_PRIME_C) | |
641 #define BN_MP_CMP_D_C | |
642 #define BN_MP_SET_C | |
643 #define BN_MP_SUB_D_C | |
644 #define BN_MP_ISEVEN_C | |
645 #define BN_MP_MOD_D_C | |
646 #define BN_MP_INIT_C | |
647 #define BN_MP_ADD_D_C | |
648 #define BN_MP_PRIME_MILLER_RABIN_C | |
649 #define BN_MP_CLEAR_C | |
650 #endif | |
651 | |
652 #if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C) | |
653 #endif | |
654 | |
655 #if defined(BN_MP_PRIME_RANDOM_EX_C) | |
656 #define BN_MP_READ_UNSIGNED_BIN_C | |
657 #define BN_MP_PRIME_IS_PRIME_C | |
658 #define BN_MP_SUB_D_C | |
659 #define BN_MP_DIV_2_C | |
660 #define BN_MP_MUL_2_C | |
661 #define BN_MP_ADD_D_C | |
662 #endif | |
663 | |
664 #if defined(BN_MP_RADIX_SIZE_C) | |
665 #define BN_MP_COUNT_BITS_C | |
666 #define BN_MP_INIT_COPY_C | |
667 #define BN_MP_ISZERO_C | |
668 #define BN_MP_DIV_D_C | |
669 #define BN_MP_CLEAR_C | |
670 #endif | |
671 | |
672 #if defined(BN_MP_RADIX_SMAP_C) | |
673 #define BN_MP_S_RMAP_C | |
674 #endif | |
675 | |
676 #if defined(BN_MP_RAND_C) | |
677 #define BN_MP_ZERO_C | |
678 #define BN_MP_ADD_D_C | |
679 #define BN_MP_LSHD_C | |
680 #endif | |
681 | |
682 #if defined(BN_MP_READ_RADIX_C) | |
683 #define BN_MP_ZERO_C | |
684 #define BN_MP_S_RMAP_C | |
685 #define BN_MP_MUL_D_C | |
686 #define BN_MP_ADD_D_C | |
687 #define BN_MP_ISZERO_C | |
688 #endif | |
689 | |
690 #if defined(BN_MP_READ_SIGNED_BIN_C) | |
691 #define BN_MP_READ_UNSIGNED_BIN_C | |
692 #endif | |
693 | |
694 #if defined(BN_MP_READ_UNSIGNED_BIN_C) | |
695 #define BN_MP_GROW_C | |
696 #define BN_MP_ZERO_C | |
697 #define BN_MP_MUL_2D_C | |
698 #define BN_MP_CLAMP_C | |
699 #endif | |
700 | |
701 #if defined(BN_MP_REDUCE_C) | |
702 #define BN_MP_REDUCE_SETUP_C | |
703 #define BN_MP_INIT_COPY_C | |
704 #define BN_MP_RSHD_C | |
705 #define BN_MP_MUL_C | |
706 #define BN_S_MP_MUL_HIGH_DIGS_C | |
707 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C | |
708 #define BN_MP_MOD_2D_C | |
709 #define BN_S_MP_MUL_DIGS_C | |
710 #define BN_MP_SUB_C | |
711 #define BN_MP_CMP_D_C | |
712 #define BN_MP_SET_C | |
713 #define BN_MP_LSHD_C | |
714 #define BN_MP_ADD_C | |
715 #define BN_MP_CMP_C | |
716 #define BN_S_MP_SUB_C | |
717 #define BN_MP_CLEAR_C | |
718 #endif | |
719 | |
720 #if defined(BN_MP_REDUCE_2K_C) | |
721 #define BN_MP_INIT_C | |
722 #define BN_MP_COUNT_BITS_C | |
723 #define BN_MP_DIV_2D_C | |
724 #define BN_MP_MUL_D_C | |
725 #define BN_S_MP_ADD_C | |
726 #define BN_MP_CMP_MAG_C | |
727 #define BN_S_MP_SUB_C | |
728 #define BN_MP_CLEAR_C | |
729 #endif | |
730 | |
731 #if defined(BN_MP_REDUCE_2K_SETUP_C) | |
732 #define BN_MP_INIT_C | |
733 #define BN_MP_COUNT_BITS_C | |
734 #define BN_MP_2EXPT_C | |
735 #define BN_MP_CLEAR_C | |
736 #define BN_S_MP_SUB_C | |
737 #endif | |
738 | |
739 #if defined(BN_MP_REDUCE_IS_2K_C) | |
740 #define BN_MP_REDUCE_2K_C | |
741 #define BN_MP_COUNT_BITS_C | |
742 #endif | |
743 | |
744 #if defined(BN_MP_REDUCE_SETUP_C) | |
745 #define BN_MP_2EXPT_C | |
746 #define BN_MP_DIV_C | |
747 #endif | |
748 | |
749 #if defined(BN_MP_RSHD_C) | |
750 #define BN_MP_ZERO_C | |
751 #endif | |
752 | |
753 #if defined(BN_MP_SET_C) | |
754 #define BN_MP_ZERO_C | |
755 #endif | |
756 | |
757 #if defined(BN_MP_SET_INT_C) | |
758 #define BN_MP_ZERO_C | |
759 #define BN_MP_MUL_2D_C | |
760 #define BN_MP_CLAMP_C | |
761 #endif | |
762 | |
763 #if defined(BN_MP_SHRINK_C) | |
764 #endif | |
765 | |
766 #if defined(BN_MP_SIGNED_BIN_SIZE_C) | |
767 #define BN_MP_UNSIGNED_BIN_SIZE_C | |
768 #endif | |
769 | |
770 #if defined(BN_MP_SQR_C) | |
771 #define BN_MP_TOOM_SQR_C | |
772 #define BN_MP_KARATSUBA_SQR_C | |
773 #define BN_FAST_S_MP_SQR_C | |
774 #define BN_S_MP_SQR_C | |
775 #endif | |
776 | |
777 #if defined(BN_MP_SQRMOD_C) | |
778 #define BN_MP_INIT_C | |
779 #define BN_MP_SQR_C | |
780 #define BN_MP_CLEAR_C | |
781 #define BN_MP_MOD_C | |
782 #endif | |
783 | |
784 #if defined(BN_MP_SQRT_C) | |
785 #define BN_MP_N_ROOT_C | |
786 #define BN_MP_ISZERO_C | |
787 #define BN_MP_ZERO_C | |
788 #define BN_MP_INIT_COPY_C | |
789 #define BN_MP_RSHD_C | |
790 #define BN_MP_DIV_C | |
791 #define BN_MP_ADD_C | |
792 #define BN_MP_DIV_2_C | |
793 #define BN_MP_CMP_MAG_C | |
794 #define BN_MP_EXCH_C | |
795 #define BN_MP_CLEAR_C | |
796 #endif | |
797 | |
798 #if defined(BN_MP_SUB_C) | |
799 #define BN_S_MP_ADD_C | |
800 #define BN_MP_CMP_MAG_C | |
801 #define BN_S_MP_SUB_C | |
802 #endif | |
803 | |
804 #if defined(BN_MP_SUB_D_C) | |
805 #define BN_MP_GROW_C | |
806 #define BN_MP_ADD_D_C | |
807 #define BN_MP_CLAMP_C | |
808 #endif | |
809 | |
810 #if defined(BN_MP_SUBMOD_C) | |
811 #define BN_MP_INIT_C | |
812 #define BN_MP_SUB_C | |
813 #define BN_MP_CLEAR_C | |
814 #define BN_MP_MOD_C | |
815 #endif | |
816 | |
817 #if defined(BN_MP_TO_SIGNED_BIN_C) | |
818 #define BN_MP_TO_UNSIGNED_BIN_C | |
819 #endif | |
820 | |
821 #if defined(BN_MP_TO_UNSIGNED_BIN_C) | |
822 #define BN_MP_INIT_COPY_C | |
823 #define BN_MP_ISZERO_C | |
824 #define BN_MP_DIV_2D_C | |
825 #define BN_MP_CLEAR_C | |
826 #endif | |
827 | |
828 #if defined(BN_MP_TOOM_MUL_C) | |
829 #define BN_MP_INIT_MULTI_C | |
830 #define BN_MP_MOD_2D_C | |
831 #define BN_MP_COPY_C | |
832 #define BN_MP_RSHD_C | |
833 #define BN_MP_MUL_C | |
834 #define BN_MP_MUL_2_C | |
835 #define BN_MP_ADD_C | |
836 #define BN_MP_SUB_C | |
837 #define BN_MP_DIV_2_C | |
838 #define BN_MP_MUL_2D_C | |
839 #define BN_MP_MUL_D_C | |
840 #define BN_MP_DIV_3_C | |
841 #define BN_MP_LSHD_C | |
842 #define BN_MP_CLEAR_MULTI_C | |
843 #endif | |
844 | |
845 #if defined(BN_MP_TOOM_SQR_C) | |
846 #define BN_MP_INIT_MULTI_C | |
847 #define BN_MP_MOD_2D_C | |
848 #define BN_MP_COPY_C | |
849 #define BN_MP_RSHD_C | |
850 #define BN_MP_SQR_C | |
851 #define BN_MP_MUL_2_C | |
852 #define BN_MP_ADD_C | |
853 #define BN_MP_SUB_C | |
854 #define BN_MP_DIV_2_C | |
855 #define BN_MP_MUL_2D_C | |
856 #define BN_MP_MUL_D_C | |
857 #define BN_MP_DIV_3_C | |
858 #define BN_MP_LSHD_C | |
859 #define BN_MP_CLEAR_MULTI_C | |
860 #endif | |
861 | |
862 #if defined(BN_MP_TORADIX_C) | |
863 #define BN_MP_ISZERO_C | |
864 #define BN_MP_INIT_COPY_C | |
865 #define BN_MP_DIV_D_C | |
866 #define BN_MP_CLEAR_C | |
867 #define BN_MP_S_RMAP_C | |
868 #endif | |
869 | |
870 #if defined(BN_MP_TORADIX_N_C) | |
871 #define BN_MP_ISZERO_C | |
872 #define BN_MP_INIT_COPY_C | |
873 #define BN_MP_DIV_D_C | |
874 #define BN_MP_CLEAR_C | |
875 #define BN_MP_S_RMAP_C | |
876 #endif | |
877 | |
878 #if defined(BN_MP_UNSIGNED_BIN_SIZE_C) | |
879 #define BN_MP_COUNT_BITS_C | |
880 #endif | |
881 | |
882 #if defined(BN_MP_XOR_C) | |
883 #define BN_MP_INIT_COPY_C | |
884 #define BN_MP_CLAMP_C | |
885 #define BN_MP_EXCH_C | |
886 #define BN_MP_CLEAR_C | |
887 #endif | |
888 | |
889 #if defined(BN_MP_ZERO_C) | |
890 #endif | |
891 | |
892 #if defined(BN_PRIME_TAB_C) | |
893 #endif | |
894 | |
895 #if defined(BN_REVERSE_C) | |
896 #endif | |
897 | |
898 #if defined(BN_S_MP_ADD_C) | |
899 #define BN_MP_GROW_C | |
900 #define BN_MP_CLAMP_C | |
901 #endif | |
902 | |
903 #if defined(BN_S_MP_EXPTMOD_C) | |
904 #define BN_MP_COUNT_BITS_C | |
905 #define BN_MP_INIT_C | |
906 #define BN_MP_CLEAR_C | |
907 #define BN_MP_REDUCE_SETUP_C | |
908 #define BN_MP_MOD_C | |
909 #define BN_MP_COPY_C | |
910 #define BN_MP_SQR_C | |
911 #define BN_MP_REDUCE_C | |
912 #define BN_MP_MUL_C | |
913 #define BN_MP_SET_C | |
914 #define BN_MP_EXCH_C | |
915 #endif | |
916 | |
917 #if defined(BN_S_MP_MUL_DIGS_C) | |
918 #define BN_FAST_S_MP_MUL_DIGS_C | |
919 #define BN_MP_INIT_SIZE_C | |
920 #define BN_MP_CLAMP_C | |
921 #define BN_MP_EXCH_C | |
922 #define BN_MP_CLEAR_C | |
923 #endif | |
924 | |
925 #if defined(BN_S_MP_MUL_HIGH_DIGS_C) | |
926 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C | |
927 #define BN_MP_INIT_SIZE_C | |
928 #define BN_MP_CLAMP_C | |
929 #define BN_MP_EXCH_C | |
930 #define BN_MP_CLEAR_C | |
931 #endif | |
932 | |
933 #if defined(BN_S_MP_SQR_C) | |
934 #define BN_MP_INIT_SIZE_C | |
935 #define BN_MP_CLAMP_C | |
936 #define BN_MP_EXCH_C | |
937 #define BN_MP_CLEAR_C | |
938 #endif | |
939 | |
940 #if defined(BN_S_MP_SUB_C) | |
941 #define BN_MP_GROW_C | |
942 #define BN_MP_CLAMP_C | |
943 #endif | |
944 | |
945 #if defined(BNCORE_C) | |
946 #endif | |
947 | |
948 #ifdef LTM3 | |
949 #define LTM_LAST | |
950 #endif | |
951 #include <tommath_superclass.h> | |
952 #include <tommath_class.h> | |
953 #else | |
954 #define LTM_LAST | |
955 #endif |