• Home
  • Raw
  • Download

Lines Matching refs:mp_int

118 } mp_int;  typedef
129 static int s_mp_exptmod(mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
130 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
131 static int s_mp_sqr(mp_int * a, mp_int * b);
132 static int s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs);
134 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
137 static int mp_init_multi(mp_int *mp, ...);
140 static void mp_clear_multi(mp_int *mp, ...);
142 static int mp_lshd(mp_int * a, int b);
143 static void mp_set(mp_int * a, mp_digit b);
144 static void mp_clamp(mp_int * a);
145 static void mp_exch(mp_int * a, mp_int * b);
146 static void mp_rshd(mp_int * a, int b);
147 static void mp_zero(mp_int * a);
148 static int mp_mod_2d(mp_int * a, int b, mp_int * c);
149 static int mp_div_2d(mp_int * a, int b, mp_int * c, mp_int * d);
150 static int mp_init_copy(mp_int * a, mp_int * b);
151 static int mp_mul_2d(mp_int * a, int b, mp_int * c);
153 static int mp_div_2(mp_int * a, mp_int * b);
154 static int mp_invmod(mp_int * a, mp_int * b, mp_int * c);
155 static int mp_invmod_slow(mp_int * a, mp_int * b, mp_int * c);
157 static int mp_copy(mp_int * a, mp_int * b);
158 static int mp_count_bits(mp_int * a);
159 static int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d);
160 static int mp_mod(mp_int * a, mp_int * b, mp_int * c);
161 static int mp_grow(mp_int * a, int size);
162 static int mp_cmp_mag(mp_int * a, mp_int * b);
164 static int mp_abs(mp_int * a, mp_int * b);
166 static int mp_sqr(mp_int * a, mp_int * b);
167 static int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d);
168 static int mp_reduce_2k_setup_l(mp_int *a, mp_int *d);
169 static int mp_2expt(mp_int * a, int b);
170 static int mp_reduce_setup(mp_int * a, mp_int * b);
171 static int mp_reduce(mp_int * x, mp_int * m, mp_int * mu);
172 static int mp_init_size(mp_int * a, int size);
174 static int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
177 static int fast_s_mp_sqr (mp_int * a, mp_int * b);
180 static int mp_mul_d (mp_int * a, mp_digit b, mp_int * c);
207 static int s_mp_add (mp_int * a, mp_int * b, mp_int * c) in s_mp_add()
209 mp_int *x; in s_mp_add()
295 static int s_mp_sub (mp_int * a, mp_int * b, mp_int * c) in s_mp_sub()
362 static int mp_init (mp_int * a) in mp_init()
388 static void mp_clear (mp_int * a) in mp_clear()
411 static int mp_add (mp_int * a, mp_int * b, mp_int * c) in mp_add()
443 static int mp_sub (mp_int * a, mp_int * b, mp_int * c) in mp_sub()
480 static int mp_mul (mp_int * a, mp_int * b, mp_int * c) in mp_mul()
527 static int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_mulmod()
530 mp_int t; in mp_mulmod()
547 static int mp_mod (mp_int * a, mp_int * b, mp_int * c) in mp_mod()
549 mp_int t; in mp_mod()
578 static int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) in mp_exptmod()
593 mp_int tmpG, tmpX; in mp_exptmod()
670 static int mp_cmp (mp_int * a, mp_int * b) in mp_cmp()
692 static int mp_cmp_d(mp_int * a, mp_digit b) in mp_cmp_d()
717 static int mp_invmod (mp_int * a, mp_int * b, mp_int * c) in mp_invmod()
746 static int mp_unsigned_bin_size (mp_int * a) in mp_unsigned_bin_size()
755 static int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c) in mp_invmod_slow()
757 mp_int x, y, u, v, A, B, C, D; in mp_invmod_slow()
911 static int mp_cmp_mag (mp_int * a, mp_int * b) in mp_cmp_mag()
946 static int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) in mp_read_unsigned_bin()
981 static int mp_to_unsigned_bin (mp_int * a, unsigned char *b) in mp_to_unsigned_bin()
984 mp_int t; in mp_to_unsigned_bin()
1009 static int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) in mp_div_2d()
1013 mp_int t; in mp_div_2d()
1085 static int mp_init_copy (mp_int * a, mp_int * b) in mp_init_copy()
1097 static void mp_zero (mp_int * a) in mp_zero()
1113 static int mp_copy (mp_int * a, mp_int * b) in mp_copy()
1160 static void mp_rshd (mp_int * a, int b) in mp_rshd()
1214 static void mp_exch (mp_int * a, mp_int * b) in mp_exch()
1216 mp_int t; in mp_exch()
1231 static void mp_clamp (mp_int * a) in mp_clamp()
1248 static int mp_grow (mp_int * a, int size) in mp_grow()
1289 static int mp_abs (mp_int * a, mp_int * b) in mp_abs()
1309 static void mp_set (mp_int * a, mp_digit b) in mp_set()
1319 static int mp_div_2(mp_int * a, mp_int * b) in mp_div_2()
1368 static int mp_mul_2d (mp_int * a, int b, mp_int * c) in mp_mul_2d()
1433 static int mp_init_multi(mp_int *mp, ...) in mp_init_multi()
1437 mp_int* cur_arg = mp; in mp_init_multi()
1456 cur_arg = va_arg(clean_args, mp_int*); in mp_init_multi()
1463 cur_arg = va_arg(args, mp_int*); in mp_init_multi()
1472 static void mp_clear_multi(mp_int *mp, ...) in mp_clear_multi()
1474 mp_int* next_mp = mp; in mp_clear_multi()
1479 next_mp = va_arg(args, mp_int*); in mp_clear_multi()
1487 static int mp_lshd (mp_int * a, int b) in mp_lshd()
1534 static int mp_count_bits (mp_int * a) in mp_count_bits()
1558 static int mp_mod_2d (mp_int * a, int b, mp_int * c) in mp_mod_2d()
1594 static int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_div()
1596 mp_int ta, tb, tq, q; in mp_div()
1676 static int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_div()
1678 mp_int q, x, y, t1, t2; in mp_div()
1868 static int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) in s_mp_exptmod()
1870 mp_int M[TAB_SIZE], res, mu; in s_mp_exptmod()
1873 int (*redux)(mp_int*,mp_int*,mp_int*); in s_mp_exptmod()
2096 static int mp_sqr (mp_int * a, mp_int * b) in mp_sqr()
2137 static int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d) in mp_reduce_2k_l()
2139 mp_int q; in mp_reduce_2k_l()
2175 static int mp_reduce_2k_setup_l(mp_int *a, mp_int *d) in mp_reduce_2k_setup_l()
2178 mp_int tmp; in mp_reduce_2k_setup_l()
2203 static int mp_2expt (mp_int * a, int b) in mp_2expt()
2228 static int mp_reduce_setup (mp_int * a, mp_int * b) in mp_reduce_setup()
2243 static int mp_reduce (mp_int * x, mp_int * m, mp_int * mu) in mp_reduce()
2245 mp_int q; in mp_reduce()
2326 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in s_mp_mul_digs()
2328 mp_int t; in s_mp_mul_digs()
2408 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in fast_s_mp_mul_digs()
2480 static int mp_init_size (mp_int * a, int size) in mp_init_size()
2508 static int s_mp_sqr (mp_int * a, mp_int * b) in s_mp_sqr()
2510 mp_int t; in s_mp_sqr()
2574 static int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in s_mp_mul_high_digs()
2576 mp_int t; in s_mp_mul_high_digs()
2634 mp_montgomery_setup (mp_int * n, mp_digit * rho) in mp_montgomery_setup()
2681 static int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) in fast_mp_montgomery_reduce()
2828 static int mp_mul_2(mp_int * a, mp_int * b) in mp_mul_2()
2897 static int mp_montgomery_calc_normalization (mp_int * a, mp_int * b) in mp_montgomery_calc_normalization()
2940 static int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) in mp_exptmod_fast()
2942 mp_int M[TAB_SIZE], res; in mp_exptmod_fast()
2950 int (*redux)(mp_int*,mp_int*,mp_digit); in mp_exptmod_fast()
3238 static int fast_s_mp_sqr (mp_int * a, mp_int * b) in fast_s_mp_sqr()
3326 mp_mul_d (mp_int * a, mp_digit b, mp_int * c) in mp_mul_d()