Lines Matching refs:dp
128 mp_digit *dp; member
134 #define mp_iseven(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
135 #define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
256 tmpa = a->dp; in s_mp_add()
259 tmpb = b->dp; in s_mp_add()
262 tmpc = c->dp; in s_mp_add()
283 *tmpc = x->dp[i] + u; in s_mp_add()
330 tmpa = a->dp; in s_mp_sub()
331 tmpb = b->dp; in s_mp_sub()
332 tmpc = c->dp; in s_mp_sub()
380 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC); in mp_init()
381 if (a->dp == NULL) { in mp_init()
387 a->dp[i] = 0; in mp_init()
406 if (a->dp != NULL) { in mp_clear()
409 a->dp[i] = 0; in mp_clear()
413 XFREE(a->dp); in mp_clear()
416 a->dp = NULL; in mp_clear()
721 if (a->dp[0] > b) { in mp_cmp_d()
723 } else if (a->dp[0] < b) { in mp_cmp_d()
942 tmpa = a->dp + (a->used - 1); in mp_cmp_mag()
945 tmpb = b->dp + (a->used - 1); in mp_cmp_mag()
983 a->dp[0] |= *b++; in mp_read_unsigned_bin()
986 a->dp[0] = (*b & MP_MASK); in mp_read_unsigned_bin()
987 a->dp[1] |= ((*b++ >> 7U) & 1); in mp_read_unsigned_bin()
1009 b[x++] = (unsigned char) (t.dp[0] & 255); in mp_to_unsigned_bin()
1011 b[x++] = (unsigned char) (t.dp[0] | ((t.dp[1] & 0x01) << 7)); in mp_to_unsigned_bin()
1076 tmpc = c->dp + (c->used - 1); in mp_div_2d()
1121 tmp = a->dp; in mp_zero()
1152 tmpa = a->dp; in mp_copy()
1155 tmpb = b->dp; in mp_copy()
1197 bottom = a->dp; in mp_rshd()
1200 top = a->dp + b; in mp_rshd()
1252 while (a->used > 0 && a->dp[a->used - 1] == 0) { in mp_clamp()
1280 tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size); in mp_grow()
1287 a->dp = tmp; in mp_grow()
1293 a->dp[i] = 0; in mp_grow()
1328 a->dp[0] = b & MP_MASK; in mp_set()
1329 a->used = (a->dp[0] != 0) ? 1 : 0; in mp_set()
1352 tmpa = a->dp + b->used - 1; in mp_div_2()
1355 tmpb = b->dp + b->used - 1; in mp_div_2()
1371 tmpb = b->dp + b->used; in mp_div_2()
1422 tmpc = c->dp; in mp_mul_2d()
1440 c->dp[(c->used)++] = r; in mp_mul_2d()
1525 top = a->dp + a->used - 1; in mp_lshd()
1528 bottom = a->dp + a->used - 1 - b; in mp_lshd()
1539 top = a->dp; in mp_lshd()
1563 q = a->dp[a->used - 1]; in mp_count_bits()
1596 c->dp[x] = 0; in mp_mod_2d()
1599 c->dp[b / DIGIT_BIT] &= in mp_mod_2d()
1763 ++(q.dp[n - t]); in mp_div()
1780 if (x.dp[i] == y.dp[t]) { in mp_div()
1781 q.dp[i - t - 1] = ((((mp_digit)1) << DIGIT_BIT) - 1); in mp_div()
1784 tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT); in mp_div()
1785 tmp |= ((mp_word) x.dp[i - 1]); in mp_div()
1786 tmp /= ((mp_word) y.dp[t]); in mp_div()
1789 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
1797 q.dp[i - t - 1] = (q.dp[i - t - 1] + 1) & MP_MASK; in mp_div()
1799 q.dp[i - t - 1] = (q.dp[i - t - 1] - 1) & MP_MASK; in mp_div()
1803 t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1]; in mp_div()
1804 t1.dp[1] = y.dp[t]; in mp_div()
1806 if ((res = mp_mul_d (&t1, q.dp[i - t - 1], &t1)) != MP_OKAY) { in mp_div()
1811 t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2]; in mp_div()
1812 t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1]; in mp_div()
1813 t2.dp[2] = x.dp[i]; in mp_div()
1818 if ((res = mp_mul_d (&y, q.dp[i - t - 1], &t1)) != MP_OKAY) { in mp_div()
1842 q.dp[i - t - 1] = (q.dp[i - t - 1] - 1UL) & MP_MASK; in mp_div()
2014 buf = X->dp[digidx--]; in s_mp_exptmod()
2234 a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT); in mp_2expt()
2374 tmpx = a->dp[ix]; in s_mp_mul_digs()
2377 tmpt = t.dp + ix; in s_mp_mul_digs()
2380 tmpy = b->dp; in s_mp_mul_digs()
2454 tmpx = a->dp + tx; in fast_s_mp_mul_digs()
2455 tmpy = b->dp + ty; in fast_s_mp_mul_digs()
2481 tmpc = c->dp; in fast_s_mp_mul_digs()
2507 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * size); in mp_init_size()
2508 if (a->dp == NULL) { in mp_init_size()
2519 a->dp[x] = 0; in mp_init_size()
2545 r = ((mp_word) t.dp[2*ix]) + in s_mp_sqr()
2546 ((mp_word)a->dp[ix])*((mp_word)a->dp[ix]); in s_mp_sqr()
2549 t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2555 tmpx = a->dp[ix]; in s_mp_sqr()
2558 tmpt = t.dp + (2*ix + 1); in s_mp_sqr()
2562 r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]); in s_mp_sqr()
2621 tmpx = a->dp[ix]; in s_mp_mul_high_digs()
2624 tmpt = &(t.dp[digs]); in s_mp_mul_high_digs()
2627 tmpy = b->dp + (digs - ix); in s_mp_mul_high_digs()
2665 b = n->dp[0]; in mp_montgomery_setup()
2726 tmpx = x->dp; in fast_mp_montgomery_reduce()
2772 tmpn = n->dp; in fast_mp_montgomery_reduce()
2815 tmpx = x->dp; in fast_mp_montgomery_reduce()
2865 tmpa = a->dp; in mp_mul_2()
2868 tmpb = b->dp; in mp_mul_2()
2898 tmpb = b->dp + b->used; in mp_mul_2()
3136 buf = X->dp[digidx--]; in mp_exptmod_fast()
3286 tmpx = a->dp + tx; in fast_s_mp_sqr()
3287 tmpy = a->dp + ty; in fast_s_mp_sqr()
3310 _W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]); in fast_s_mp_sqr()
3326 tmpb = b->dp; in fast_s_mp_sqr()
3365 tmpa = a->dp; in mp_mul_d()
3368 tmpc = c->dp; in mp_mul_d()