Lines Matching refs:mp_int
129 } mp_int; typedef
140 static int s_mp_exptmod(mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
141 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
142 static int s_mp_sqr(mp_int * a, mp_int * b);
143 static int s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs);
146 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
150 static int mp_init_multi(mp_int *mp, ...);
153 static void mp_clear_multi(mp_int *mp, ...);
155 static int mp_lshd(mp_int * a, int b);
156 static void mp_set(mp_int * a, mp_digit b);
157 static void mp_clamp(mp_int * a);
158 static void mp_exch(mp_int * a, mp_int * b);
159 static void mp_rshd(mp_int * a, int b);
160 static void mp_zero(mp_int * a);
161 static int mp_mod_2d(mp_int * a, int b, mp_int * c);
162 static int mp_div_2d(mp_int * a, int b, mp_int * c, mp_int * d);
163 static int mp_init_copy(mp_int * a, mp_int * b);
164 static int mp_mul_2d(mp_int * a, int b, mp_int * c);
166 static int mp_div_2(mp_int * a, mp_int * b);
167 static int mp_invmod(mp_int * a, mp_int * b, mp_int * c);
168 static int mp_invmod_slow(mp_int * a, mp_int * b, mp_int * c);
170 static int mp_copy(mp_int * a, mp_int * b);
171 static int mp_count_bits(mp_int * a);
172 static int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d);
173 static int mp_mod(mp_int * a, mp_int * b, mp_int * c);
174 static int mp_grow(mp_int * a, int size);
175 static int mp_cmp_mag(mp_int * a, mp_int * b);
177 static int mp_abs(mp_int * a, mp_int * b);
179 static int mp_sqr(mp_int * a, mp_int * b);
180 static int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d);
181 static int mp_reduce_2k_setup_l(mp_int *a, mp_int *d);
182 static int mp_2expt(mp_int * a, int b);
183 static int mp_reduce_setup(mp_int * a, mp_int * b);
184 static int mp_reduce(mp_int * x, mp_int * m, mp_int * mu);
185 static int mp_init_size(mp_int * a, int size);
187 static int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
190 static int fast_s_mp_sqr (mp_int * a, mp_int * b);
193 static int mp_mul_d (mp_int * a, mp_digit b, mp_int * c);
220 static int s_mp_add (mp_int * a, mp_int * b, mp_int * c) in s_mp_add()
222 mp_int *x; in s_mp_add()
308 static int s_mp_sub (mp_int * a, mp_int * b, mp_int * c) in s_mp_sub()
375 static int mp_init (mp_int * a) in mp_init()
401 static void mp_clear (mp_int * a) in mp_clear()
424 static int mp_add (mp_int * a, mp_int * b, mp_int * c) in mp_add()
456 static int mp_sub (mp_int * a, mp_int * b, mp_int * c) in mp_sub()
493 static int mp_mul (mp_int * a, mp_int * b, mp_int * c) in mp_mul()
540 static int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_mulmod()
543 mp_int t; in mp_mulmod()
560 static int mp_mod (mp_int * a, mp_int * b, mp_int * c) in mp_mod()
562 mp_int t; in mp_mod()
591 static int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) in mp_exptmod()
606 mp_int tmpG, tmpX; in mp_exptmod()
686 static int mp_cmp (mp_int * a, mp_int * b) in mp_cmp()
708 static int mp_cmp_d(mp_int * a, mp_digit b) in mp_cmp_d()
733 static int mp_invmod (mp_int * a, mp_int * b, mp_int * c) in mp_invmod()
762 static int mp_unsigned_bin_size (mp_int * a) in mp_unsigned_bin_size()
771 static int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c) in mp_invmod_slow()
773 mp_int x, y, u, v, A, B, C, D; in mp_invmod_slow()
927 static int mp_cmp_mag (mp_int * a, mp_int * b) in mp_cmp_mag()
962 static int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) in mp_read_unsigned_bin()
997 static int mp_to_unsigned_bin (mp_int * a, unsigned char *b) in mp_to_unsigned_bin()
1000 mp_int t; in mp_to_unsigned_bin()
1025 static int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) in mp_div_2d()
1029 mp_int t; in mp_div_2d()
1101 static int mp_init_copy (mp_int * a, mp_int * b) in mp_init_copy()
1113 static void mp_zero (mp_int * a) in mp_zero()
1129 static int mp_copy (mp_int * a, mp_int * b) in mp_copy()
1176 static void mp_rshd (mp_int * a, int b) in mp_rshd()
1230 static void mp_exch (mp_int * a, mp_int * b) in mp_exch()
1232 mp_int t; in mp_exch()
1247 static void mp_clamp (mp_int * a) in mp_clamp()
1264 static int mp_grow (mp_int * a, int size) in mp_grow()
1305 static int mp_abs (mp_int * a, mp_int * b) in mp_abs()
1325 static void mp_set (mp_int * a, mp_digit b) in mp_set()
1335 static int mp_div_2(mp_int * a, mp_int * b) in mp_div_2()
1384 static int mp_mul_2d (mp_int * a, int b, mp_int * c) in mp_mul_2d()
1449 static int mp_init_multi(mp_int *mp, ...) in mp_init_multi()
1453 mp_int* cur_arg = mp; in mp_init_multi()
1472 cur_arg = va_arg(clean_args, mp_int*); in mp_init_multi()
1478 cur_arg = va_arg(args, mp_int*); in mp_init_multi()
1487 static void mp_clear_multi(mp_int *mp, ...) in mp_clear_multi()
1489 mp_int* next_mp = mp; in mp_clear_multi()
1494 next_mp = va_arg(args, mp_int*); in mp_clear_multi()
1502 static int mp_lshd (mp_int * a, int b) in mp_lshd()
1549 static int mp_count_bits (mp_int * a) in mp_count_bits()
1573 static int mp_mod_2d (mp_int * a, int b, mp_int * c) in mp_mod_2d()
1609 static int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_div()
1611 mp_int ta, tb, tq, q; in mp_div()
1691 static int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_div()
1693 mp_int q, x, y, t1, t2; in mp_div()
1883 static int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) in s_mp_exptmod()
1885 mp_int M[TAB_SIZE], res, mu; in s_mp_exptmod()
1888 int (*redux)(mp_int*,mp_int*,mp_int*); in s_mp_exptmod()
2111 static int mp_sqr (mp_int * a, mp_int * b) in mp_sqr()
2152 static int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d) in mp_reduce_2k_l()
2154 mp_int q; in mp_reduce_2k_l()
2190 static int mp_reduce_2k_setup_l(mp_int *a, mp_int *d) in mp_reduce_2k_setup_l()
2193 mp_int tmp; in mp_reduce_2k_setup_l()
2218 static int mp_2expt (mp_int * a, int b) in mp_2expt()
2243 static int mp_reduce_setup (mp_int * a, mp_int * b) in mp_reduce_setup()
2258 static int mp_reduce (mp_int * x, mp_int * m, mp_int * mu) in mp_reduce()
2260 mp_int q; in mp_reduce()
2341 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in s_mp_mul_digs()
2343 mp_int t; in s_mp_mul_digs()
2426 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in fast_s_mp_mul_digs()
2499 static int mp_init_size (mp_int * a, int size) in mp_init_size()
2527 static int s_mp_sqr (mp_int * a, mp_int * b) in s_mp_sqr()
2529 mp_int t; in s_mp_sqr()
2593 static int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in s_mp_mul_high_digs()
2595 mp_int t; in s_mp_mul_high_digs()
2653 mp_montgomery_setup (mp_int * n, mp_digit * rho) in mp_montgomery_setup()
2700 static int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) in fast_mp_montgomery_reduce()
2847 static int mp_mul_2(mp_int * a, mp_int * b) in mp_mul_2()
2916 static int mp_montgomery_calc_normalization (mp_int * a, mp_int * b) in mp_montgomery_calc_normalization()
2959 static int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) in mp_exptmod_fast()
2961 mp_int M[TAB_SIZE], res; in mp_exptmod_fast()
2969 int (*redux)(mp_int*,mp_int*,mp_digit); in mp_exptmod_fast()
3257 static int fast_s_mp_sqr (mp_int * a, mp_int * b) in fast_s_mp_sqr()
3345 mp_mul_d (mp_int * a, mp_digit b, mp_int * c) in mp_mul_d()