Searched refs:mp_digit (Results 1 - 25 of 71) sorted by relevance

123

/barrelfish-2018-10-04/lib/tommath/
H A Dbn_mp_dr_setup.c19 void mp_dr_setup(mp_int *a, mp_digit *d)
22 * the number of bits in a mp_digit [e.g. DIGIT_BIT==31]
24 *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) -
H A Dbn_mp_mod_d.c19 mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
H A Dbn_mp_count_bits.c23 mp_digit q;
35 while (q > ((mp_digit) 0)) {
37 q >>= ((mp_digit) 1);
H A Dbn_mp_shrink.c21 mp_digit *tmp;
28 if ((tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * used)) == NULL) {
H A Dbn_mp_mod_2d.c47 (mp_digit) ((((mp_digit) 1) << (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1));
H A Dbn_s_mp_sqr.c24 mp_digit u, tmpx, *tmpt;
41 t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK));
44 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
62 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));
65 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
68 while (u != ((mp_digit) 0)) {
70 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));
71 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
H A Dbn_mp_div_d.c18 static int s_is_power_of_two(mp_digit b, int *p)
28 if (b == (((mp_digit)1)<<x)) {
37 int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
41 mp_digit t;
63 *d = a->dp[0] & ((((mp_digit)1)<<ix) - 1);
90 t = (mp_digit)(w / b);
95 q.dp[ix] = (mp_digit)t;
99 *d = (mp_digit)w;
H A Dbn_mp_grow.c22 mp_digit *tmp;
35 tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size);
H A Dbn_mp_rand.c23 mp_digit d;
32 d = ((mp_digit) abs (rand ())) & MP_MASK;
44 if ((res = mp_add_d (a, ((mp_digit) abs (rand ())), a)) != MP_OKAY) {
H A Dbn_mp_init_set.c19 int mp_init_set (mp_int * a, mp_digit b)
H A Dbn_mp_mul_d.c20 mp_mul_d (mp_int * a, mp_digit b, mp_int * c)
22 mp_digit u, *tmpa, *tmpc;
54 *tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK));
57 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT));
H A Dbn_mp_set.c19 void mp_set (mp_int * a, mp_digit b)
H A Dbn_mp_init.c24 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC);
H A Dbn_mp_init_size.c27 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * size);
H A Dbn_mp_reduce_is_2k.c22 mp_digit iz;
39 if (iz > (mp_digit)MP_MASK) {
H A Dbn_mp_montgomery_reduce.c20 mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
23 mp_digit mu;
55 mu = (mp_digit) (((mp_word)x->dp[ix]) * ((mp_word)rho) & MP_MASK);
60 register mp_digit *tmpn, *tmpx, u;
79 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
82 *tmpx++ = (mp_digit)(r & ((mp_word) MP_MASK));
H A Dbn_fast_mp_montgomery_reduce.c26 int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
46 register mp_digit *tmpx;
72 * by casting the value down to a mp_digit. Note this requires
75 register mp_digit mu;
76 mu = (mp_digit) (((W[ix] & MP_MASK) * rho) & MP_MASK);
94 register mp_digit *tmpn;
118 register mp_digit *tmpx;
136 * array of mp_word to mp_digit than calling mp_rshd
147 *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK));
H A Dbn_s_mp_sub.c38 register mp_digit u, *tmpa, *tmpb, *tmpc;
57 u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1));
69 u = *tmpc >> ((mp_digit)(CHAR_BIT * sizeof (mp_digit) - 1));
H A Dbn_mp_mul_2.c34 register mp_digit r, rr, *tmpa, *tmpb;
49 rr = *tmpa >> ((mp_digit)(DIGIT_BIT - 1));
52 *tmpb++ = ((*tmpa++ << ((mp_digit)1)) | r) & MP_MASK;
H A Dbn_mp_montgomery_setup.c20 mp_montgomery_setup (mp_int * n, mp_digit * rho)
22 mp_digit x, b;
H A Dbn_fast_s_mp_mul_digs.c37 mp_digit W[MP_WARRAY];
55 mp_digit *tmpx, *tmpy;
77 W[ix] = ((mp_digit)_W) & MP_MASK;
88 register mp_digit *tmpc;
H A Dbn_fast_s_mp_mul_high_digs.c30 mp_digit W[MP_WARRAY];
46 mp_digit *tmpx, *tmpy;
67 W[ix] = ((mp_digit)_W) & MP_MASK;
78 register mp_digit *tmpc;
H A Dbn_mp_2expt.c40 a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT);
H A Dbn_mp_cmp_d.c19 int mp_cmp_d(mp_int * a, mp_digit b)
/barrelfish-2018-10-04/lib/tommath/mtest/
H A Dmpi-types.h3 typedef unsigned short mp_digit; /* 2 byte type */ typedef
8 #define MP_DIGIT_BIT (CHAR_BIT*sizeof(mp_digit))

Completed in 54 milliseconds

123