Lines Matching refs:mp_int

187 mp_err   s_mp_grow(mp_int *mp, mp_size min);   /* increase allocated size */
188 mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */
191 void s_mp_clamp(mp_int *mp); /* clip leading zeroes */
200 void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */
202 mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */
203 void s_mp_rshd(mp_int *mp, mp_size p); /* right-shift by p digits */
204 mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */
205 void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */
206 void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */
207 void s_mp_div_2(mp_int *mp); /* divide by 2 in place */
208 mp_err s_mp_mul_2(mp_int *mp); /* multiply by 2 in place */
209 mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd);
211 mp_err s_mp_add_d(mp_int *mp, mp_digit d); /* unsigned digit addition */
212 mp_err s_mp_sub_d(mp_int *mp, mp_digit d); /* unsigned digit subtract */
213 mp_err s_mp_mul_d(mp_int *mp, mp_digit d); /* unsigned digit multiply */
214 mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r);
216 mp_err s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu);
218 mp_err s_mp_add(mp_int *a, const mp_int *b); /* magnitude addition */
219 mp_err s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c);
220 mp_err s_mp_sub(mp_int *a, const mp_int *b); /* magnitude subtract */
221 mp_err s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c);
222 mp_err s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset);
224 mp_err s_mp_mul(mp_int *a, const mp_int *b); /* magnitude multiply */
226 mp_err s_mp_sqr(mp_int *a); /* magnitude square */
230 mp_err s_mp_div(mp_int *rem, mp_int *div, mp_int *quot); /* magnitude div */
231 mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
232 mp_err s_mp_2expt(mp_int *a, mp_digit k); /* a = 2^k */
233 int s_mp_cmp(const mp_int *a, const mp_int *b); /* magnitude comparison */
234 int s_mp_cmp_d(const mp_int *a, mp_digit d); /* magnitude digit compare */
235 int s_mp_ispow2(const mp_int *v); /* is v a power of 2? */
242 mp_err s_mp_invmod_odd_m( const mp_int *a, const mp_int *m, mp_int *c);
243 mp_err s_mp_invmod_2d( const mp_int *a, mp_size k, mp_int *c);
244 mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c);
250 void s_mp_mul_comba_4(const mp_int *A, const mp_int *B, mp_int *C);
251 void s_mp_mul_comba_8(const mp_int *A, const mp_int *B, mp_int *C);
252 void s_mp_mul_comba_16(const mp_int *A, const mp_int *B, mp_int *C);
253 void s_mp_mul_comba_32(const mp_int *A, const mp_int *B, mp_int *C);
255 void s_mp_sqr_comba_4(const mp_int *A, mp_int *B);
256 void s_mp_sqr_comba_8(const mp_int *A, mp_int *B);
257 void s_mp_sqr_comba_16(const mp_int *A, mp_int *B);
258 void s_mp_sqr_comba_32(const mp_int *A, mp_int *B);
262 /* ------ mpv functions, operate on arrays of digits, not on mp_int's ------ */
306 mp_int N; /* modulus N */
311 mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c,
313 mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm);