Lines Matching refs:mp_digit

71 typedef unsigned long mp_digit;  typedef
83 #define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
119 mp_digit *dp;
145 static void mp_set(mp_int * a, mp_digit b);
182 static int mp_mul_d (mp_int * a, mp_digit b, mp_int * c);
241 register mp_digit u, *tmpa, *tmpb, *tmpc; in s_mp_add()
262 u = *tmpc >> ((mp_digit)DIGIT_BIT); in s_mp_add()
277 u = *tmpc >> ((mp_digit)DIGIT_BIT); in s_mp_add()
318 register mp_digit u, *tmpa, *tmpb, *tmpc; in s_mp_sub()
337 u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1)); in s_mp_sub()
349 u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1)); in s_mp_sub()
373 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC); in mp_init()
706 mp_cmp_d(mp_int * a, mp_digit b) in mp_cmp_d()
932 mp_digit *tmpa, *tmpb; in mp_cmp_mag()
1032 mp_digit D, r, rr; in mp_div_2d()
1070 D = (mp_digit) (b % DIGIT_BIT); in mp_div_2d()
1072 register mp_digit *tmpc, mask, shift; in mp_div_2d()
1075 mask = (((mp_digit)1) << D) - 1; in mp_div_2d()
1123 mp_digit *tmp; in mp_zero()
1155 register mp_digit *tmpa, *tmpb; in mp_copy()
1201 register mp_digit *bottom, *top; in mp_rshd()
1279 mp_digit *tmp; in mp_grow()
1292 tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size); in mp_grow()
1339 mp_set (mp_int * a, mp_digit b) in mp_set()
1364 register mp_digit r, rr, *tmpa, *tmpb; in mp_div_2()
1402 mp_digit d; in mp_mul_2d()
1426 d = (mp_digit) (b % DIGIT_BIT); in mp_mul_2d()
1428 register mp_digit *tmpc, shift, mask, r, rr; in mp_mul_2d()
1432 mask = (((mp_digit)1) << d) - 1; in mp_mul_2d()
1539 register mp_digit *top, *bottom; in mp_lshd()
1573 mp_digit q; in mp_count_bits()
1585 while (q > ((mp_digit) 0)) { in mp_count_bits()
1587 q >>= ((mp_digit) 1); in mp_count_bits()
1622 (mp_digit) ((((mp_digit) 1) << (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1)); in mp_mod_2d()
1805 q.dp[i - t - 1] = ((((mp_digit)1) << DIGIT_BIT) - 1); in mp_div()
1813 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
1911 mp_digit buf; in s_mp_exptmod()
2044 y = (buf >> (mp_digit)(DIGIT_BIT - 1)) & 1; in s_mp_exptmod()
2045 buf <<= (mp_digit)1; in s_mp_exptmod()
2263 a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT); in mp_2expt()
2303 if (((unsigned long) um) > (((mp_digit)1) << (DIGIT_BIT - 1))) { in mp_reduce()
2377 mp_digit u; in s_mp_mul_digs()
2379 mp_digit tmpx, *tmpt, *tmpy; in s_mp_mul_digs()
2420 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_mul_digs()
2423 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_digs()
2459 mp_digit W[MP_WARRAY]; in fast_s_mp_mul_digs()
2477 mp_digit *tmpx, *tmpy; in fast_s_mp_mul_digs()
2499 W[ix] = ((mp_digit)_W) & MP_MASK; in fast_s_mp_mul_digs()
2510 register mp_digit *tmpc; in fast_s_mp_mul_digs()
2537 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * size); in mp_init_size()
2563 mp_digit u, tmpx, *tmpt; in s_mp_sqr()
2580 t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2583 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2601 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2604 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2607 while (u != ((mp_digit) 0)) { in s_mp_sqr()
2609 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2610 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2629 mp_digit u; in s_mp_mul_high_digs()
2631 mp_digit tmpx, *tmpt, *tmpy; in s_mp_mul_high_digs()
2668 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_mul_high_digs()
2671 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_high_digs()
2685 mp_montgomery_setup (mp_int * n, mp_digit * rho) in mp_montgomery_setup()
2687 mp_digit x, b; in mp_montgomery_setup()
2733 fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) in fast_mp_montgomery_reduce()
2753 register mp_digit *tmpx; in fast_mp_montgomery_reduce()
2782 register mp_digit mu; in fast_mp_montgomery_reduce()
2783 mu = (mp_digit) (((W[ix] & MP_MASK) * rho) & MP_MASK); in fast_mp_montgomery_reduce()
2801 register mp_digit *tmpn; in fast_mp_montgomery_reduce()
2825 register mp_digit *tmpx; in fast_mp_montgomery_reduce()
2854 *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK)); in fast_mp_montgomery_reduce()
2896 register mp_digit r, rr, *tmpa, *tmpb; in mp_mul_2()
2911 rr = *tmpa >> ((mp_digit)(DIGIT_BIT - 1)); in mp_mul_2()
2914 *tmpb++ = ((*tmpa++ << ((mp_digit)1)) | r) & MP_MASK; in mp_mul_2()
2998 mp_digit buf, mp; in mp_exptmod_fast()
3005 int (*redux)(mp_int*,mp_int*,mp_digit); in mp_exptmod_fast()
3177 y = (mp_digit)(buf >> (DIGIT_BIT - 1)) & 1; in mp_exptmod_fast()
3178 buf <<= (mp_digit)1; in mp_exptmod_fast()
3297 mp_digit W[MP_WARRAY], *tmpx; in fast_s_mp_sqr()
3313 mp_digit *tmpy; in fast_s_mp_sqr()
3351 W[ix] = (mp_digit)(_W & MP_MASK); in fast_s_mp_sqr()
3362 mp_digit *tmpb; in fast_s_mp_sqr()
3382 mp_mul_d (mp_int * a, mp_digit b, mp_int * c) in mp_mul_d()
3384 mp_digit u, *tmpa, *tmpc; in mp_mul_d()
3416 *tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK)); in mp_mul_d()
3419 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in mp_mul_d()