ssh lib

Dependents:   OS

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mpi_class.h Source File

mpi_class.h

00001 /* mpi_class.h
00002  *
00003  * Copyright (C) 2006-2017 wolfSSL Inc.
00004  *
00005  * This file is part of wolfSSL.
00006  *
00007  * wolfSSL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * wolfSSL is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
00020  */
00021 
00022 
00023 
00024 #if !(defined(LTM1) && defined(LTM2) && defined(LTM3))
00025 #if defined(LTM2)
00026 #define LTM3
00027 #endif
00028 #if defined(LTM1)
00029 #define LTM2
00030 #endif
00031 #define LTM1
00032 
00033 #if defined(LTM_ALL)
00034 #define BN_ERROR_C
00035 #define BN_FAST_MP_INVMOD_C
00036 #define BN_FAST_MP_MONTGOMERY_REDUCE_C
00037 #define BN_FAST_S_MP_MUL_DIGS_C
00038 #define BN_FAST_S_MP_MUL_HIGH_DIGS_C
00039 #define BN_FAST_S_MP_SQR_C
00040 #define BN_MP_2EXPT_C
00041 #define BN_MP_ABS_C
00042 #define BN_MP_ADD_C
00043 #define BN_MP_ADD_D_C
00044 #define BN_MP_ADDMOD_C
00045 #define BN_MP_AND_C
00046 #define BN_MP_CLAMP_C
00047 #define BN_MP_CLEAR_C
00048 #define BN_MP_CLEAR_MULTI_C
00049 #define BN_MP_CMP_C
00050 #define BN_MP_CMP_D_C
00051 #define BN_MP_CMP_MAG_C
00052 #define BN_MP_CNT_LSB_C
00053 #define BN_MP_COPY_C
00054 #define BN_MP_COUNT_BITS_C
00055 #define BN_MP_DIV_C
00056 #define BN_MP_DIV_2_C
00057 #define BN_MP_DIV_2D_C
00058 #define BN_MP_DIV_3_C
00059 #define BN_MP_DIV_D_C
00060 #define BN_MP_DR_IS_MODULUS_C
00061 #define BN_MP_DR_REDUCE_C
00062 #define BN_MP_DR_SETUP_C
00063 #define BN_MP_EXCH_C
00064 #define BN_MP_EXPT_D_C
00065 #define BN_MP_EXPTMOD_C
00066 #define BN_MP_EXPTMOD_FAST_C
00067 #define BN_MP_EXTEUCLID_C
00068 #define BN_MP_FREAD_C
00069 #define BN_MP_FWRITE_C
00070 #define BN_MP_GCD_C
00071 #define BN_MP_GET_INT_C
00072 #define BN_MP_GROW_C
00073 #define BN_MP_INIT_C
00074 #define BN_MP_INIT_COPY_C
00075 #define BN_MP_INIT_MULTI_C
00076 #define BN_MP_INIT_SET_C
00077 #define BN_MP_INIT_SET_INT_C
00078 #define BN_MP_INIT_SIZE_C
00079 #define BN_MP_INVMOD_C
00080 #define BN_MP_INVMOD_SLOW_C
00081 #define BN_MP_IS_SQUARE_C
00082 #define BN_MP_JACOBI_C
00083 #define BN_MP_KARATSUBA_MUL_C
00084 #define BN_MP_KARATSUBA_SQR_C
00085 #define BN_MP_LCM_C
00086 #define BN_MP_LSHD_C
00087 #define BN_MP_MOD_C
00088 #define BN_MP_MOD_2D_C
00089 #define BN_MP_MOD_D_C
00090 #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C
00091 #define BN_MP_MONTGOMERY_REDUCE_C
00092 #define BN_MP_MONTGOMERY_SETUP_C
00093 #define BN_MP_MUL_C
00094 #define BN_MP_MUL_2_C
00095 #define BN_MP_MUL_2D_C
00096 #define BN_MP_MUL_D_C
00097 #define BN_MP_MULMOD_C
00098 #define BN_MP_N_ROOT_C
00099 #define BN_MP_NEG_C
00100 #define BN_MP_OR_C
00101 #define BN_MP_PRIME_FERMAT_C
00102 #define BN_MP_PRIME_IS_DIVISIBLE_C
00103 #define BN_MP_PRIME_IS_PRIME_C
00104 #define BN_MP_PRIME_MILLER_RABIN_C
00105 #define BN_MP_PRIME_NEXT_PRIME_C
00106 #define BN_MP_PRIME_RABIN_MILLER_TRIALS_C
00107 #define BN_MP_PRIME_RANDOM_EX_C
00108 #define BN_MP_RADIX_SIZE_C
00109 #define BN_MP_RADIX_SMAP_C
00110 #define BN_MP_RAND_C
00111 #define BN_MP_READ_RADIX_C
00112 #define BN_MP_READ_SIGNED_BIN_C
00113 #define BN_MP_READ_UNSIGNED_BIN_C
00114 #define BN_MP_REDUCE_C
00115 #define BN_MP_REDUCE_2K_C
00116 #define BN_MP_REDUCE_2K_L_C
00117 #define BN_MP_REDUCE_2K_SETUP_C
00118 #define BN_MP_REDUCE_2K_SETUP_L_C
00119 #define BN_MP_REDUCE_IS_2K_C
00120 #define BN_MP_REDUCE_IS_2K_L_C
00121 #define BN_MP_REDUCE_SETUP_C
00122 #define BN_MP_RSHD_C
00123 #define BN_MP_SET_C
00124 #define BN_MP_SET_INT_C
00125 #define BN_MP_SHRINK_C
00126 #define BN_MP_SIGNED_BIN_SIZE_C
00127 #define BN_MP_SQR_C
00128 #define BN_MP_SQRMOD_C
00129 #define BN_MP_SQRT_C
00130 #define BN_MP_SUB_C
00131 #define BN_MP_SUB_D_C
00132 #define BN_MP_SUBMOD_C
00133 #define BN_MP_TO_SIGNED_BIN_C
00134 #define BN_MP_TO_SIGNED_BIN_N_C
00135 #define BN_MP_TO_UNSIGNED_BIN_C
00136 #define BN_MP_TO_UNSIGNED_BIN_N_C
00137 #define BN_MP_TOOM_MUL_C
00138 #define BN_MP_TOOM_SQR_C
00139 #define BN_MP_TORADIX_C
00140 #define BN_MP_TORADIX_N_C
00141 #define BN_MP_UNSIGNED_BIN_SIZE_C
00142 #define BN_MP_XOR_C
00143 #define BN_MP_ZERO_C
00144 #define BN_PRIME_TAB_C
00145 #define BN_REVERSE_C
00146 #define BN_S_MP_ADD_C
00147 #define BN_S_MP_EXPTMOD_C
00148 #define BN_S_MP_MUL_DIGS_C
00149 #define BN_S_MP_MUL_HIGH_DIGS_C
00150 #define BN_S_MP_SQR_C
00151 #define BN_S_MP_SUB_C
00152 #define BNCORE_C
00153 #endif
00154 
00155 #if defined(BN_ERROR_C)
00156    #define BN_MP_ERROR_TO_STRING_C
00157 #endif
00158 
00159 #if defined(BN_FAST_MP_INVMOD_C)
00160    #define BN_MP_ISEVEN_C
00161    #define BN_MP_INIT_MULTI_C
00162    #define BN_MP_COPY_C
00163    #define BN_MP_MOD_C
00164    #define BN_MP_SET_C
00165    #define BN_MP_DIV_2_C
00166    #define BN_MP_ISODD_C
00167    #define BN_MP_SUB_C
00168    #define BN_MP_CMP_C
00169    #define BN_MP_ISZERO_C
00170    #define BN_MP_CMP_D_C
00171    #define BN_MP_ADD_C
00172    #define BN_MP_EXCH_C
00173    #define BN_MP_CLEAR_MULTI_C
00174 #endif
00175 
00176 #if defined(BN_FAST_MP_MONTGOMERY_REDUCE_C)
00177    #define BN_MP_GROW_C
00178    #define BN_MP_RSHD_C
00179    #define BN_MP_CLAMP_C
00180    #define BN_MP_CMP_MAG_C
00181    #define BN_S_MP_SUB_C
00182 #endif
00183 
00184 #if defined(BN_FAST_S_MP_MUL_DIGS_C)
00185    #define BN_MP_GROW_C
00186    #define BN_MP_CLAMP_C
00187 #endif
00188 
00189 #if defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C)
00190    #define BN_MP_GROW_C
00191    #define BN_MP_CLAMP_C
00192 #endif
00193 
00194 #if defined(BN_FAST_S_MP_SQR_C)
00195    #define BN_MP_GROW_C
00196    #define BN_MP_CLAMP_C
00197 #endif
00198 
00199 #if defined(BN_MP_2EXPT_C)
00200    #define BN_MP_ZERO_C
00201    #define BN_MP_GROW_C
00202 #endif
00203 
00204 #if defined(BN_MP_ABS_C)
00205    #define BN_MP_COPY_C
00206 #endif
00207 
00208 #if defined(BN_MP_ADD_C)
00209    #define BN_S_MP_ADD_C
00210    #define BN_MP_CMP_MAG_C
00211    #define BN_S_MP_SUB_C
00212 #endif
00213 
00214 #if defined(BN_MP_ADD_D_C)
00215    #define BN_MP_GROW_C
00216    #define BN_MP_SUB_D_C
00217    #define BN_MP_CLAMP_C
00218 #endif
00219 
00220 #if defined(BN_MP_ADDMOD_C)
00221    #define BN_MP_INIT_C
00222    #define BN_MP_ADD_C
00223    #define BN_MP_CLEAR_C
00224    #define BN_MP_MOD_C
00225 #endif
00226 
00227 #if defined(BN_MP_AND_C)
00228    #define BN_MP_INIT_COPY_C
00229    #define BN_MP_CLAMP_C
00230    #define BN_MP_EXCH_C
00231    #define BN_MP_CLEAR_C
00232 #endif
00233 
00234 #if defined(BN_MP_CLAMP_C)
00235 #endif
00236 
00237 #if defined(BN_MP_CLEAR_C)
00238 #endif
00239 
00240 #if defined(BN_MP_CLEAR_MULTI_C)
00241    #define BN_MP_CLEAR_C
00242 #endif
00243 
00244 #if defined(BN_MP_CMP_C)
00245    #define BN_MP_CMP_MAG_C
00246 #endif
00247 
00248 #if defined(BN_MP_CMP_D_C)
00249 #endif
00250 
00251 #if defined(BN_MP_CMP_MAG_C)
00252 #endif
00253 
00254 #if defined(BN_MP_CNT_LSB_C)
00255    #define BN_MP_ISZERO_C
00256 #endif
00257 
00258 #if defined(BN_MP_COPY_C)
00259    #define BN_MP_GROW_C
00260 #endif
00261 
00262 #if defined(BN_MP_COUNT_BITS_C)
00263 #endif
00264 
00265 #if defined(BN_MP_DIV_C)
00266    #define BN_MP_ISZERO_C
00267    #define BN_MP_CMP_MAG_C
00268    #define BN_MP_COPY_C
00269    #define BN_MP_ZERO_C
00270    #define BN_MP_INIT_MULTI_C
00271    #define BN_MP_SET_C
00272    #define BN_MP_COUNT_BITS_C
00273    #define BN_MP_ABS_C
00274    #define BN_MP_MUL_2D_C
00275    #define BN_MP_CMP_C
00276    #define BN_MP_SUB_C
00277    #define BN_MP_ADD_C
00278    #define BN_MP_DIV_2D_C
00279    #define BN_MP_EXCH_C
00280    #define BN_MP_CLEAR_MULTI_C
00281    #define BN_MP_INIT_SIZE_C
00282    #define BN_MP_INIT_C
00283    #define BN_MP_INIT_COPY_C
00284    #define BN_MP_LSHD_C
00285    #define BN_MP_RSHD_C
00286    #define BN_MP_MUL_D_C
00287    #define BN_MP_CLAMP_C
00288    #define BN_MP_CLEAR_C
00289 #endif
00290 
00291 #if defined(BN_MP_DIV_2_C)
00292    #define BN_MP_GROW_C
00293    #define BN_MP_CLAMP_C
00294 #endif
00295 
00296 #if defined(BN_MP_DIV_2D_C)
00297    #define BN_MP_COPY_C
00298    #define BN_MP_ZERO_C
00299    #define BN_MP_INIT_C
00300    #define BN_MP_MOD_2D_C
00301    #define BN_MP_CLEAR_C
00302    #define BN_MP_RSHD_C
00303    #define BN_MP_CLAMP_C
00304    #define BN_MP_EXCH_C
00305 #endif
00306 
00307 #if defined(BN_MP_DIV_3_C)
00308    #define BN_MP_INIT_SIZE_C
00309    #define BN_MP_CLAMP_C
00310    #define BN_MP_EXCH_C
00311    #define BN_MP_CLEAR_C
00312 #endif
00313 
00314 #if defined(BN_MP_DIV_D_C)
00315    #define BN_MP_ISZERO_C
00316    #define BN_MP_COPY_C
00317    #define BN_MP_DIV_2D_C
00318    #define BN_MP_DIV_3_C
00319    #define BN_MP_INIT_SIZE_C
00320    #define BN_MP_CLAMP_C
00321    #define BN_MP_EXCH_C
00322    #define BN_MP_CLEAR_C
00323 #endif
00324 
00325 #if defined(BN_MP_DR_IS_MODULUS_C)
00326 #endif
00327 
00328 #if defined(BN_MP_DR_REDUCE_C)
00329    #define BN_MP_GROW_C
00330    #define BN_MP_CLAMP_C
00331    #define BN_MP_CMP_MAG_C
00332    #define BN_S_MP_SUB_C
00333 #endif
00334 
00335 #if defined(BN_MP_DR_SETUP_C)
00336 #endif
00337 
00338 #if defined(BN_MP_EXCH_C)
00339 #endif
00340 
00341 #if defined(BN_MP_EXPT_D_C)
00342    #define BN_MP_INIT_COPY_C
00343    #define BN_MP_SET_C
00344    #define BN_MP_SQR_C
00345    #define BN_MP_CLEAR_C
00346    #define BN_MP_MUL_C
00347 #endif
00348 
00349 #if defined(BN_MP_EXPTMOD_C)
00350    #define BN_MP_INIT_C
00351    #define BN_MP_INVMOD_C
00352    #define BN_MP_CLEAR_C
00353    #define BN_MP_ABS_C
00354    #define BN_MP_CLEAR_MULTI_C
00355    #define BN_MP_REDUCE_IS_2K_L_C
00356    #define BN_S_MP_EXPTMOD_C
00357    #define BN_MP_DR_IS_MODULUS_C
00358    #define BN_MP_REDUCE_IS_2K_C
00359    #define BN_MP_ISODD_C
00360    #define BN_MP_EXPTMOD_FAST_C
00361 #endif
00362 
00363 #if defined(BN_MP_EXPTMOD_FAST_C)
00364    #define BN_MP_COUNT_BITS_C
00365    #define BN_MP_INIT_C
00366    #define BN_MP_CLEAR_C
00367    #define BN_MP_MONTGOMERY_SETUP_C
00368    #define BN_FAST_MP_MONTGOMERY_REDUCE_C
00369    #define BN_MP_MONTGOMERY_REDUCE_C
00370    #define BN_MP_DR_SETUP_C
00371    #define BN_MP_DR_REDUCE_C
00372    #define BN_MP_REDUCE_2K_SETUP_C
00373    #define BN_MP_REDUCE_2K_C
00374    #define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C
00375    #define BN_MP_MULMOD_C
00376    #define BN_MP_SET_C
00377    #define BN_MP_MOD_C
00378    #define BN_MP_COPY_C
00379    #define BN_MP_SQR_C
00380    #define BN_MP_MUL_C
00381    #define BN_MP_EXCH_C
00382 #endif
00383 
00384 #if defined(BN_MP_EXTEUCLID_C)
00385    #define BN_MP_INIT_MULTI_C
00386    #define BN_MP_SET_C
00387    #define BN_MP_COPY_C
00388    #define BN_MP_ISZERO_C
00389    #define BN_MP_DIV_C
00390    #define BN_MP_MUL_C
00391    #define BN_MP_SUB_C
00392    #define BN_MP_NEG_C
00393    #define BN_MP_EXCH_C
00394    #define BN_MP_CLEAR_MULTI_C
00395 #endif
00396 
00397 #if defined(BN_MP_FREAD_C)
00398    #define BN_MP_ZERO_C
00399    #define BN_MP_S_RMAP_C
00400    #define BN_MP_MUL_D_C
00401    #define BN_MP_ADD_D_C
00402    #define BN_MP_CMP_D_C
00403 #endif
00404 
00405 #if defined(BN_MP_FWRITE_C)
00406    #define BN_MP_RADIX_SIZE_C
00407    #define BN_MP_TORADIX_C
00408 #endif
00409 
00410 #if defined(BN_MP_GCD_C)
00411    #define BN_MP_ISZERO_C
00412    #define BN_MP_ABS_C
00413    #define BN_MP_ZERO_C
00414    #define BN_MP_INIT_COPY_C
00415    #define BN_MP_CNT_LSB_C
00416    #define BN_MP_DIV_2D_C
00417    #define BN_MP_CMP_MAG_C
00418    #define BN_MP_EXCH_C
00419    #define BN_S_MP_SUB_C
00420    #define BN_MP_MUL_2D_C
00421    #define BN_MP_CLEAR_C
00422 #endif
00423 
00424 #if defined(BN_MP_GET_INT_C)
00425 #endif
00426 
00427 #if defined(BN_MP_GROW_C)
00428 #endif
00429 
00430 #if defined(BN_MP_INIT_C)
00431 #endif
00432 
00433 #if defined(BN_MP_INIT_COPY_C)
00434    #define BN_MP_COPY_C
00435 #endif
00436 
00437 #if defined(BN_MP_INIT_MULTI_C)
00438    #define BN_MP_ERR_C
00439    #define BN_MP_INIT_C
00440    #define BN_MP_CLEAR_C
00441 #endif
00442 
00443 #if defined(BN_MP_INIT_SET_C)
00444    #define BN_MP_INIT_C
00445    #define BN_MP_SET_C
00446 #endif
00447 
00448 #if defined(BN_MP_INIT_SET_INT_C)
00449    #define BN_MP_INIT_C
00450    #define BN_MP_SET_INT_C
00451 #endif
00452 
00453 #if defined(BN_MP_INIT_SIZE_C)
00454    #define BN_MP_INIT_C
00455 #endif
00456 
00457 #if defined(BN_MP_INVMOD_C)
00458    #define BN_MP_ISZERO_C
00459    #define BN_MP_ISODD_C
00460    #define BN_FAST_MP_INVMOD_C
00461    #define BN_MP_INVMOD_SLOW_C
00462 #endif
00463 
00464 #if defined(BN_MP_INVMOD_SLOW_C)
00465    #define BN_MP_ISZERO_C
00466    #define BN_MP_INIT_MULTI_C
00467    #define BN_MP_MOD_C
00468    #define BN_MP_COPY_C
00469    #define BN_MP_ISEVEN_C
00470    #define BN_MP_SET_C
00471    #define BN_MP_DIV_2_C
00472    #define BN_MP_ISODD_C
00473    #define BN_MP_ADD_C
00474    #define BN_MP_SUB_C
00475    #define BN_MP_CMP_C
00476    #define BN_MP_CMP_D_C
00477    #define BN_MP_CMP_MAG_C
00478    #define BN_MP_EXCH_C
00479    #define BN_MP_CLEAR_MULTI_C
00480 #endif
00481 
00482 #if defined(BN_MP_IS_SQUARE_C)
00483    #define BN_MP_MOD_D_C
00484    #define BN_MP_INIT_SET_INT_C
00485    #define BN_MP_MOD_C
00486    #define BN_MP_GET_INT_C
00487    #define BN_MP_SQRT_C
00488    #define BN_MP_SQR_C
00489    #define BN_MP_CMP_MAG_C
00490    #define BN_MP_CLEAR_C
00491 #endif
00492 
00493 #if defined(BN_MP_JACOBI_C)
00494    #define BN_MP_CMP_D_C
00495    #define BN_MP_ISZERO_C
00496    #define BN_MP_INIT_COPY_C
00497    #define BN_MP_CNT_LSB_C
00498    #define BN_MP_DIV_2D_C
00499    #define BN_MP_MOD_C
00500    #define BN_MP_CLEAR_C
00501 #endif
00502 
00503 #if defined(BN_MP_KARATSUBA_MUL_C)
00504    #define BN_MP_MUL_C
00505    #define BN_MP_INIT_SIZE_C
00506    #define BN_MP_CLAMP_C
00507    #define BN_MP_SUB_C
00508    #define BN_MP_ADD_C
00509    #define BN_MP_LSHD_C
00510    #define BN_MP_CLEAR_C
00511 #endif
00512 
00513 #if defined(BN_MP_KARATSUBA_SQR_C)
00514    #define BN_MP_INIT_SIZE_C
00515    #define BN_MP_CLAMP_C
00516    #define BN_MP_SQR_C
00517    #define BN_MP_SUB_C
00518    #define BN_S_MP_ADD_C
00519    #define BN_MP_LSHD_C
00520    #define BN_MP_ADD_C
00521    #define BN_MP_CLEAR_C
00522 #endif
00523 
00524 #if defined(BN_MP_LCM_C)
00525    #define BN_MP_INIT_MULTI_C
00526    #define BN_MP_GCD_C
00527    #define BN_MP_CMP_MAG_C
00528    #define BN_MP_DIV_C
00529    #define BN_MP_MUL_C
00530    #define BN_MP_CLEAR_MULTI_C
00531 #endif
00532 
00533 #if defined(BN_MP_LSHD_C)
00534    #define BN_MP_GROW_C
00535    #define BN_MP_RSHD_C
00536 #endif
00537 
00538 #if defined(BN_MP_MOD_C)
00539    #define BN_MP_INIT_C
00540    #define BN_MP_DIV_C
00541    #define BN_MP_CLEAR_C
00542    #define BN_MP_ADD_C
00543    #define BN_MP_EXCH_C
00544 #endif
00545 
00546 #if defined(BN_MP_MOD_2D_C)
00547    #define BN_MP_ZERO_C
00548    #define BN_MP_COPY_C
00549    #define BN_MP_CLAMP_C
00550 #endif
00551 
00552 #if defined(BN_MP_MOD_D_C)
00553    #define BN_MP_DIV_D_C
00554 #endif
00555 
00556 #if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C)
00557    #define BN_MP_COUNT_BITS_C
00558    #define BN_MP_2EXPT_C
00559    #define BN_MP_SET_C
00560    #define BN_MP_MUL_2_C
00561    #define BN_MP_CMP_MAG_C
00562    #define BN_S_MP_SUB_C
00563 #endif
00564 
00565 #if defined(BN_MP_MONTGOMERY_REDUCE_C)
00566    #define BN_FAST_MP_MONTGOMERY_REDUCE_C
00567    #define BN_MP_GROW_C
00568    #define BN_MP_CLAMP_C
00569    #define BN_MP_RSHD_C
00570    #define BN_MP_CMP_MAG_C
00571    #define BN_S_MP_SUB_C
00572 #endif
00573 
00574 #if defined(BN_MP_MONTGOMERY_SETUP_C)
00575 #endif
00576 
00577 #if defined(BN_MP_MUL_C)
00578    #define BN_MP_TOOM_MUL_C
00579    #define BN_MP_KARATSUBA_MUL_C
00580    #define BN_FAST_S_MP_MUL_DIGS_C
00581    #define BN_S_MP_MUL_C
00582    #define BN_S_MP_MUL_DIGS_C
00583 #endif
00584 
00585 #if defined(BN_MP_MUL_2_C)
00586    #define BN_MP_GROW_C
00587 #endif
00588 
00589 #if defined(BN_MP_MUL_2D_C)
00590    #define BN_MP_COPY_C
00591    #define BN_MP_GROW_C
00592    #define BN_MP_LSHD_C
00593    #define BN_MP_CLAMP_C
00594 #endif
00595 
00596 #if defined(BN_MP_MUL_D_C)
00597    #define BN_MP_GROW_C
00598    #define BN_MP_CLAMP_C
00599 #endif
00600 
00601 #if defined(BN_MP_MULMOD_C)
00602    #define BN_MP_INIT_C
00603    #define BN_MP_MUL_C
00604    #define BN_MP_CLEAR_C
00605    #define BN_MP_MOD_C
00606 #endif
00607 
00608 #if defined(BN_MP_N_ROOT_C)
00609    #define BN_MP_INIT_C
00610    #define BN_MP_SET_C
00611    #define BN_MP_COPY_C
00612    #define BN_MP_EXPT_D_C
00613    #define BN_MP_MUL_C
00614    #define BN_MP_SUB_C
00615    #define BN_MP_MUL_D_C
00616    #define BN_MP_DIV_C
00617    #define BN_MP_CMP_C
00618    #define BN_MP_SUB_D_C
00619    #define BN_MP_EXCH_C
00620    #define BN_MP_CLEAR_C
00621 #endif
00622 
00623 #if defined(BN_MP_NEG_C)
00624    #define BN_MP_COPY_C
00625    #define BN_MP_ISZERO_C
00626 #endif
00627 
00628 #if defined(BN_MP_OR_C)
00629    #define BN_MP_INIT_COPY_C
00630    #define BN_MP_CLAMP_C
00631    #define BN_MP_EXCH_C
00632    #define BN_MP_CLEAR_C
00633 #endif
00634 
00635 #if defined(BN_MP_PRIME_FERMAT_C)
00636    #define BN_MP_CMP_D_C
00637    #define BN_MP_INIT_C
00638    #define BN_MP_EXPTMOD_C
00639    #define BN_MP_CMP_C
00640    #define BN_MP_CLEAR_C
00641 #endif
00642 
00643 #if defined(BN_MP_PRIME_IS_DIVISIBLE_C)
00644    #define BN_MP_MOD_D_C
00645 #endif
00646 
00647 #if defined(BN_MP_PRIME_IS_PRIME_C)
00648    #define BN_MP_CMP_D_C
00649    #define BN_MP_PRIME_IS_DIVISIBLE_C
00650    #define BN_MP_INIT_C
00651    #define BN_MP_SET_C
00652    #define BN_MP_PRIME_MILLER_RABIN_C
00653    #define BN_MP_CLEAR_C
00654 #endif
00655 
00656 #if defined(BN_MP_PRIME_MILLER_RABIN_C)
00657    #define BN_MP_CMP_D_C
00658    #define BN_MP_INIT_COPY_C
00659    #define BN_MP_SUB_D_C
00660    #define BN_MP_CNT_LSB_C
00661    #define BN_MP_DIV_2D_C
00662    #define BN_MP_EXPTMOD_C
00663    #define BN_MP_CMP_C
00664    #define BN_MP_SQRMOD_C
00665    #define BN_MP_CLEAR_C
00666 #endif
00667 
00668 #if defined(BN_MP_PRIME_NEXT_PRIME_C)
00669    #define BN_MP_CMP_D_C
00670    #define BN_MP_SET_C
00671    #define BN_MP_SUB_D_C
00672    #define BN_MP_ISEVEN_C
00673    #define BN_MP_MOD_D_C
00674    #define BN_MP_INIT_C
00675    #define BN_MP_ADD_D_C
00676    #define BN_MP_PRIME_MILLER_RABIN_C
00677    #define BN_MP_CLEAR_C
00678 #endif
00679 
00680 #if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C)
00681 #endif
00682 
00683 #if defined(BN_MP_PRIME_RANDOM_EX_C)
00684    #define BN_MP_READ_UNSIGNED_BIN_C
00685    #define BN_MP_PRIME_IS_PRIME_C
00686    #define BN_MP_SUB_D_C
00687    #define BN_MP_DIV_2_C
00688    #define BN_MP_MUL_2_C
00689    #define BN_MP_ADD_D_C
00690 #endif
00691 
00692 #if defined(BN_MP_RADIX_SIZE_C)
00693    #define BN_MP_COUNT_BITS_C
00694    #define BN_MP_INIT_COPY_C
00695    #define BN_MP_ISZERO_C
00696    #define BN_MP_DIV_D_C
00697    #define BN_MP_CLEAR_C
00698 #endif
00699 
00700 #if defined(BN_MP_RADIX_SMAP_C)
00701    #define BN_MP_S_RMAP_C
00702 #endif
00703 
00704 #if defined(BN_MP_RAND_C)
00705    #define BN_MP_ZERO_C
00706    #define BN_MP_ADD_D_C
00707    #define BN_MP_LSHD_C
00708 #endif
00709 
00710 #if defined(BN_MP_READ_RADIX_C)
00711    #define BN_MP_ZERO_C
00712    #define BN_MP_S_RMAP_C
00713    #define BN_MP_RADIX_SMAP_C
00714    #define BN_MP_MUL_D_C
00715    #define BN_MP_ADD_D_C
00716    #define BN_MP_ISZERO_C
00717 #endif
00718 
00719 #if defined(BN_MP_READ_SIGNED_BIN_C)
00720    #define BN_MP_READ_UNSIGNED_BIN_C
00721 #endif
00722 
00723 #if defined(BN_MP_READ_UNSIGNED_BIN_C)
00724    #define BN_MP_GROW_C
00725    #define BN_MP_ZERO_C
00726    #define BN_MP_MUL_2D_C
00727    #define BN_MP_CLAMP_C
00728 #endif
00729 
00730 #if defined(BN_MP_REDUCE_C)
00731    #define BN_MP_REDUCE_SETUP_C
00732    #define BN_MP_INIT_COPY_C
00733    #define BN_MP_RSHD_C
00734    #define BN_MP_MUL_C
00735    #define BN_S_MP_MUL_HIGH_DIGS_C
00736    #define BN_FAST_S_MP_MUL_HIGH_DIGS_C
00737    #define BN_MP_MOD_2D_C
00738    #define BN_S_MP_MUL_DIGS_C
00739    #define BN_MP_SUB_C
00740    #define BN_MP_CMP_D_C
00741    #define BN_MP_SET_C
00742    #define BN_MP_LSHD_C
00743    #define BN_MP_ADD_C
00744    #define BN_MP_CMP_C
00745    #define BN_S_MP_SUB_C
00746    #define BN_MP_CLEAR_C
00747 #endif
00748 
00749 #if defined(BN_MP_REDUCE_2K_C)
00750    #define BN_MP_INIT_C
00751    #define BN_MP_COUNT_BITS_C
00752    #define BN_MP_DIV_2D_C
00753    #define BN_MP_MUL_D_C
00754    #define BN_S_MP_ADD_C
00755    #define BN_MP_CMP_MAG_C
00756    #define BN_S_MP_SUB_C
00757    #define BN_MP_CLEAR_C
00758 #endif
00759 
00760 #if defined(BN_MP_REDUCE_2K_L_C)
00761    #define BN_MP_INIT_C
00762    #define BN_MP_COUNT_BITS_C
00763    #define BN_MP_DIV_2D_C
00764    #define BN_MP_MUL_C
00765    #define BN_S_MP_ADD_C
00766    #define BN_MP_CMP_MAG_C
00767    #define BN_S_MP_SUB_C
00768    #define BN_MP_CLEAR_C
00769 #endif
00770 
00771 #if defined(BN_MP_REDUCE_2K_SETUP_C)
00772    #define BN_MP_INIT_C
00773    #define BN_MP_COUNT_BITS_C
00774    #define BN_MP_2EXPT_C
00775    #define BN_MP_CLEAR_C
00776    #define BN_S_MP_SUB_C
00777 #endif
00778 
00779 #if defined(BN_MP_REDUCE_2K_SETUP_L_C)
00780    #define BN_MP_INIT_C
00781    #define BN_MP_2EXPT_C
00782    #define BN_MP_COUNT_BITS_C
00783    #define BN_S_MP_SUB_C
00784    #define BN_MP_CLEAR_C
00785 #endif
00786 
00787 #if defined(BN_MP_REDUCE_IS_2K_C)
00788    #define BN_MP_REDUCE_2K_C
00789    #define BN_MP_COUNT_BITS_C
00790 #endif
00791 
00792 #if defined(BN_MP_REDUCE_IS_2K_L_C)
00793 #endif
00794 
00795 #if defined(BN_MP_REDUCE_SETUP_C)
00796    #define BN_MP_2EXPT_C
00797    #define BN_MP_DIV_C
00798 #endif
00799 
00800 #if defined(BN_MP_RSHD_C)
00801    #define BN_MP_ZERO_C
00802 #endif
00803 
00804 #if defined(BN_MP_SET_C)
00805    #define BN_MP_ZERO_C
00806 #endif
00807 
00808 #if defined(BN_MP_SET_INT_C)
00809    #define BN_MP_ZERO_C
00810    #define BN_MP_MUL_2D_C
00811    #define BN_MP_CLAMP_C
00812 #endif
00813 
00814 #if defined(BN_MP_SHRINK_C)
00815 #endif
00816 
00817 #if defined(BN_MP_SIGNED_BIN_SIZE_C)
00818    #define BN_MP_UNSIGNED_BIN_SIZE_C
00819 #endif
00820 
00821 #if defined(BN_MP_SQR_C)
00822    #define BN_MP_TOOM_SQR_C
00823    #define BN_MP_KARATSUBA_SQR_C
00824    #define BN_FAST_S_MP_SQR_C
00825    #define BN_S_MP_SQR_C
00826 #endif
00827 
00828 #if defined(BN_MP_SQRMOD_C)
00829    #define BN_MP_INIT_C
00830    #define BN_MP_SQR_C
00831    #define BN_MP_CLEAR_C
00832    #define BN_MP_MOD_C
00833 #endif
00834 
00835 #if defined(BN_MP_SQRT_C)
00836    #define BN_MP_N_ROOT_C
00837    #define BN_MP_ISZERO_C
00838    #define BN_MP_ZERO_C
00839    #define BN_MP_INIT_COPY_C
00840    #define BN_MP_RSHD_C
00841    #define BN_MP_DIV_C
00842    #define BN_MP_ADD_C
00843    #define BN_MP_DIV_2_C
00844    #define BN_MP_CMP_MAG_C
00845    #define BN_MP_EXCH_C
00846    #define BN_MP_CLEAR_C
00847 #endif
00848 
00849 #if defined(BN_MP_SUB_C)
00850    #define BN_S_MP_ADD_C
00851    #define BN_MP_CMP_MAG_C
00852    #define BN_S_MP_SUB_C
00853 #endif
00854 
00855 #if defined(BN_MP_SUB_D_C)
00856    #define BN_MP_GROW_C
00857    #define BN_MP_ADD_D_C
00858    #define BN_MP_CLAMP_C
00859 #endif
00860 
00861 #if defined(BN_MP_SUBMOD_C)
00862    #define BN_MP_INIT_C
00863    #define BN_MP_SUB_C
00864    #define BN_MP_CLEAR_C
00865    #define BN_MP_MOD_C
00866 #endif
00867 
00868 #if defined(BN_MP_TO_SIGNED_BIN_C)
00869    #define BN_MP_TO_UNSIGNED_BIN_C
00870 #endif
00871 
00872 #if defined(BN_MP_TO_SIGNED_BIN_N_C)
00873    #define BN_MP_SIGNED_BIN_SIZE_C
00874    #define BN_MP_TO_SIGNED_BIN_C
00875 #endif
00876 
00877 #if defined(BN_MP_TO_UNSIGNED_BIN_C)
00878    #define BN_MP_INIT_COPY_C
00879    #define BN_MP_ISZERO_C
00880    #define BN_MP_DIV_2D_C
00881    #define BN_MP_CLEAR_C
00882 #endif
00883 
00884 #if defined(BN_MP_TO_UNSIGNED_BIN_N_C)
00885    #define BN_MP_UNSIGNED_BIN_SIZE_C
00886    #define BN_MP_TO_UNSIGNED_BIN_C
00887 #endif
00888 
00889 #if defined(BN_MP_TOOM_MUL_C)
00890    #define BN_MP_INIT_MULTI_C
00891    #define BN_MP_MOD_2D_C
00892    #define BN_MP_COPY_C
00893    #define BN_MP_RSHD_C
00894    #define BN_MP_MUL_C
00895    #define BN_MP_MUL_2_C
00896    #define BN_MP_ADD_C
00897    #define BN_MP_SUB_C
00898    #define BN_MP_DIV_2_C
00899    #define BN_MP_MUL_2D_C
00900    #define BN_MP_MUL_D_C
00901    #define BN_MP_DIV_3_C
00902    #define BN_MP_LSHD_C
00903    #define BN_MP_CLEAR_MULTI_C
00904 #endif
00905 
00906 #if defined(BN_MP_TOOM_SQR_C)
00907    #define BN_MP_INIT_MULTI_C
00908    #define BN_MP_MOD_2D_C
00909    #define BN_MP_COPY_C
00910    #define BN_MP_RSHD_C
00911    #define BN_MP_SQR_C
00912    #define BN_MP_MUL_2_C
00913    #define BN_MP_ADD_C
00914    #define BN_MP_SUB_C
00915    #define BN_MP_DIV_2_C
00916    #define BN_MP_MUL_2D_C
00917    #define BN_MP_MUL_D_C
00918    #define BN_MP_DIV_3_C
00919    #define BN_MP_LSHD_C
00920    #define BN_MP_CLEAR_MULTI_C
00921 #endif
00922 
00923 #if defined(BN_MP_TORADIX_C)
00924    #define BN_MP_ISZERO_C
00925    #define BN_MP_INIT_COPY_C
00926    #define BN_MP_DIV_D_C
00927    #define BN_MP_CLEAR_C
00928    #define BN_MP_S_RMAP_C
00929 #endif
00930 
00931 #if defined(BN_MP_TORADIX_N_C)
00932    #define BN_MP_ISZERO_C
00933    #define BN_MP_INIT_COPY_C
00934    #define BN_MP_DIV_D_C
00935    #define BN_MP_CLEAR_C
00936    #define BN_MP_S_RMAP_C
00937 #endif
00938 
00939 #if defined(BN_MP_UNSIGNED_BIN_SIZE_C)
00940    #define BN_MP_COUNT_BITS_C
00941 #endif
00942 
00943 #if defined(BN_MP_XOR_C)
00944    #define BN_MP_INIT_COPY_C
00945    #define BN_MP_CLAMP_C
00946    #define BN_MP_EXCH_C
00947    #define BN_MP_CLEAR_C
00948 #endif
00949 
00950 #if defined(BN_MP_ZERO_C)
00951 #endif
00952 
00953 #if defined(BN_PRIME_TAB_C)
00954 #endif
00955 
00956 #if defined(BN_REVERSE_C)
00957 #endif
00958 
00959 #if defined(BN_S_MP_ADD_C)
00960    #define BN_MP_GROW_C
00961    #define BN_MP_CLAMP_C
00962 #endif
00963 
00964 #if defined(BN_S_MP_EXPTMOD_C)
00965    #define BN_MP_COUNT_BITS_C
00966    #define BN_MP_INIT_C
00967    #define BN_MP_CLEAR_C
00968    #define BN_MP_REDUCE_SETUP_C
00969    #define BN_MP_REDUCE_C
00970    #define BN_MP_REDUCE_2K_SETUP_L_C
00971    #define BN_MP_REDUCE_2K_L_C
00972    #define BN_MP_MOD_C
00973    #define BN_MP_COPY_C
00974    #define BN_MP_SQR_C
00975    #define BN_MP_MUL_C
00976    #define BN_MP_SET_C
00977    #define BN_MP_EXCH_C
00978 #endif
00979 
00980 #if defined(BN_S_MP_MUL_DIGS_C)
00981    #define BN_FAST_S_MP_MUL_DIGS_C
00982    #define BN_MP_INIT_SIZE_C
00983    #define BN_MP_CLAMP_C
00984    #define BN_MP_EXCH_C
00985    #define BN_MP_CLEAR_C
00986 #endif
00987 
00988 #if defined(BN_S_MP_MUL_HIGH_DIGS_C)
00989    #define BN_FAST_S_MP_MUL_HIGH_DIGS_C
00990    #define BN_MP_INIT_SIZE_C
00991    #define BN_MP_CLAMP_C
00992    #define BN_MP_EXCH_C
00993    #define BN_MP_CLEAR_C
00994 #endif
00995 
00996 #if defined(BN_S_MP_SQR_C)
00997    #define BN_MP_INIT_SIZE_C
00998    #define BN_MP_CLAMP_C
00999    #define BN_MP_EXCH_C
01000    #define BN_MP_CLEAR_C
01001 #endif
01002 
01003 #if defined(BN_S_MP_SUB_C)
01004    #define BN_MP_GROW_C
01005    #define BN_MP_CLAMP_C
01006 #endif
01007 
01008 #if defined(BNCORE_C)
01009 #endif
01010 
01011 #ifdef LTM3
01012 #define LTM_LAST
01013 #endif
01014 #include "mpi_superclass.h"
01015 #include "mpi_class.h"
01016 #else
01017 #define LTM_LAST
01018 #endif
01019 
01020