HomeSort by relevance Sort by last modified time
    Searched full:mp_digit (Results 1 - 25 of 75) sorted by null

1 2 3

  /external/dropbear/libtommath/
bn_mp_div_d.c 18 static int s_is_power_of_two(mp_digit b, int *p)
23 if (b == (((mp_digit)1)<<x)) {
32 int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
36 mp_digit t;
58 *d = a->dp[0] & ((((mp_digit)1)<<ix) - 1);
85 t = (mp_digit)(w / b);
90 q.dp[ix] = (mp_digit)t;
94 *d = (mp_digit)w;
bn_s_mp_sqr.c 24 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));
bn_mp_mod_d.c 19 mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
bn_mp_div_3.c 20 mp_div_3 (mp_int * a, mp_int *c, mp_digit * d)
24 mp_digit b;
57 q.dp[ix] = (mp_digit)t;
62 *d = (mp_digit)w;
bn_mp_mod_2d.c 47 (mp_digit) ((((mp_digit) 1) << (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1));
bn_mp_mul_d.c 20 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));
bn_mp_count_bits.c 23 mp_digit q;
35 while (q > ((mp_digit) 0)) {
37 q >>= ((mp_digit) 1);
bn_mp_dr_setup.c 19 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)) -
bn_mp_expt_d.c 19 int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
39 if ((b & (mp_digit) (((mp_digit)1) << (DIGIT_BIT - 1))) != 0) {
bn_mp_rand.c 23 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) {
bn_mp_shrink.c 21 mp_digit *tmp;
23 if ((tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * a->used)) == NULL) {
bn_s_mp_sub.c 38 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));
bn_mp_montgomery_reduce.c 20 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));
bn_mp_grow.c 22 mp_digit *tmp;
35 tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size);
bn_fast_mp_montgomery_reduce.c 26 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));
bn_fast_s_mp_mul_high_digs.c 30 mp_digit W[MP_WARRAY];
46 mp_digit *tmpx, *tmpy;
67 W[ix] = ((mp_digit)_W) & MP_MASK;
78 register mp_digit *tmpc;
bn_mp_div_2d.c 21 mp_digit D, r, rr;
59 D = (mp_digit) (b % DIGIT_BIT);
61 register mp_digit *tmpc, mask, shift;
64 mask = (((mp_digit)1) << D) - 1;
bn_mp_dr_reduce.c 33 mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k)
37 mp_digit mu, *tmpx1, *tmpx2;
66 *tmpx1++ = (mp_digit)(r & MP_MASK);
67 mu = (mp_digit)(r >> ((mp_word)DIGIT_BIT));
bn_mp_mul_2d.c 21 mp_digit d;
45 d = (mp_digit) (b % DIGIT_BIT);
47 register mp_digit *tmpc, shift, mask, r, rr;
51 mask = (((mp_digit)1) << d) - 1;
bn_mp_sub_d.c 20 mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
22 mp_digit *tmpa, *tmpc, mu;
70 mu = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1);
76 mu = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1);
bn_s_mp_mul_digs.c 26 mp_digit u;
28 mp_digit tmpx, *tmpt, *tmpy;
69 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));
72 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT));
bn_s_mp_mul_high_digs.c 26 mp_digit u;
28 mp_digit tmpx, *tmpt, *tmpy;
65 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));
68 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT));
tommath.h 37 /* C++ compilers don't like assigning void * to mp_digit * */
57 * A "mp_digit" must be able to hold DIGIT_BIT + 1 bits
60 * At the very least a mp_digit must be able to hold 7 bits
64 typedef unsigned char mp_digit; typedef
67 typedef unsigned short mp_digit; typedef
76 typedef unsigned long mp_digit; typedef
94 typedef unsigned long mp_digit; typedef
125 /* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
127 #define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) /* bits per digit */
131 #define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1)
    [all...]
  /external/dropbear/libtommath/mtest/
mpi-types.h 3 typedef unsigned short mp_digit; /* 2 byte type */ typedef
8 #define MP_DIGIT_BIT (CHAR_BIT*sizeof(mp_digit))
  /external/dropbear/libtommath/etc/
pprime.c 14 static mp_digit
36 mp_digit r, x, y, next;
42 r = 3; fwrite(&r, 1, sizeof(mp_digit), out);
43 r = 5; fwrite(&r, 1, sizeof(mp_digit), out);
44 r = 7; fwrite(&r, 1, sizeof(mp_digit), out);
45 r = 11; fwrite(&r, 1, sizeof(mp_digit), out);
46 r = 13; fwrite(&r, 1, sizeof(mp_digit), out);
47 r = 17; fwrite(&r, 1, sizeof(mp_digit), out);
48 r = 19; fwrite(&r, 1, sizeof(mp_digit), out);
49 r = 23; fwrite(&r, 1, sizeof(mp_digit), out)
    [all...]

Completed in 182 milliseconds

1 2 3