Home
last modified time | relevance | path

Searched refs:mp_word (Results 1 – 25 of 25) sorted by relevance

/external/dropbear/libtommath/
Dbn_s_mp_sqr.c23 mp_word r; in s_mp_sqr()
37 r = ((mp_word) t.dp[2*ix]) + in s_mp_sqr()
38 ((mp_word)a->dp[ix])*((mp_word)a->dp[ix]); in s_mp_sqr()
41 t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
44 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
54 r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]); in s_mp_sqr()
59 r = ((mp_word) *tmpt) + r + r + ((mp_word) u); in s_mp_sqr()
62 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
65 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
69 r = ((mp_word) *tmpt) + ((mp_word) u); in s_mp_sqr()
[all …]
Dbn_mp_montgomery_reduce.c34 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_montgomery_reduce()
55 mu = (mp_digit) (((mp_word)x->dp[ix]) * ((mp_word)rho) & MP_MASK); in mp_montgomery_reduce()
61 register mp_word r; in mp_montgomery_reduce()
75 r = ((mp_word)mu) * ((mp_word)*tmpn++) + in mp_montgomery_reduce()
76 ((mp_word) u) + ((mp_word) * tmpx); in mp_montgomery_reduce()
79 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in mp_montgomery_reduce()
82 *tmpx++ = (mp_digit)(r & ((mp_word) MP_MASK)); in mp_montgomery_reduce()
Dbn_mp_div_3.c23 mp_word w, t; in mp_div_3()
28 b = (((mp_word)1) << ((mp_word)DIGIT_BIT)) / ((mp_word)3); in mp_div_3()
38 w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]); in mp_div_3()
42 t = (w * ((mp_word)b)) >> ((mp_word)DIGIT_BIT); in mp_div_3()
Dbn_s_mp_mul_digs.c27 mp_word r; in s_mp_mul_digs()
33 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in s_mp_mul_digs()
64 r = ((mp_word)*tmpt) + in s_mp_mul_digs()
65 ((mp_word)tmpx) * ((mp_word)*tmpy++) + in s_mp_mul_digs()
66 ((mp_word) u); in s_mp_mul_digs()
69 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_mul_digs()
72 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_digs()
Dbn_fast_mp_montgomery_reduce.c29 mp_word W[MP_WARRAY]; in fast_mp_montgomery_reduce()
45 register mp_word *_W; in fast_mp_montgomery_reduce()
95 register mp_word *_W; in fast_mp_montgomery_reduce()
105 *_W++ += ((mp_word)mu) * ((mp_word)*tmpn++); in fast_mp_montgomery_reduce()
110 W[ix + 1] += W[ix] >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
119 register mp_word *_W, *_W1; in fast_mp_montgomery_reduce()
130 *_W++ += *_W1++ >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
147 *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK)); in fast_mp_montgomery_reduce()
Dbn_s_mp_mul_high_digs.c27 mp_word r; in s_mp_mul_high_digs()
33 && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in s_mp_mul_high_digs()
60 r = ((mp_word)*tmpt) + in s_mp_mul_high_digs()
61 ((mp_word)tmpx) * ((mp_word)*tmpy++) + in s_mp_mul_high_digs()
62 ((mp_word) u); in s_mp_mul_high_digs()
65 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_mul_high_digs()
68 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_high_digs()
Dbn_mp_mul_d.c23 mp_word r; in mp_mul_d()
51 r = ((mp_word) u) + ((mp_word)*tmpa++) * ((mp_word)b); in mp_mul_d()
54 *tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK)); in mp_mul_d()
57 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in mp_mul_d()
Dbn_fast_s_mp_sqr.c32 mp_word W1; in fast_s_mp_sqr()
46 mp_word _W; in fast_s_mp_sqr()
73 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); in fast_s_mp_sqr()
81 _W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]); in fast_s_mp_sqr()
88 W1 = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_sqr()
Dbn_mp_div_d.c35 mp_word w; in mp_div_d()
82 w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]); in mp_div_d()
86 w -= ((mp_word)t) * ((mp_word)b); in mp_div_d()
Dbn_mp_dr_reduce.c36 mp_word r; in mp_dr_reduce()
65 r = ((mp_word)*tmpx2++) * ((mp_word)k) + *tmpx1 + mu; in mp_dr_reduce()
67 mu = (mp_digit)(r >> ((mp_word)DIGIT_BIT)); in mp_dr_reduce()
Dbn_mp_dr_setup.c24 *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) - in mp_dr_setup()
25 ((mp_word)a->dp[0])); in mp_dr_setup()
Dbn_fast_s_mp_mul_digs.c38 register mp_word _W; in fast_s_mp_mul_digs()
72 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); in fast_s_mp_mul_digs()
80 _W = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_mul_digs()
Dbn_fast_s_mp_mul_high_digs.c31 mp_word _W; in fast_s_mp_mul_high_digs()
63 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); in fast_s_mp_mul_high_digs()
70 _W = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_mul_high_digs()
Dbn_mp_div.c195 mp_word tmp; in mp_div()
196 tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT); in mp_div()
197 tmp |= ((mp_word) x.dp[i - 1]); in mp_div()
198 tmp /= ((mp_word) y.dp[t]); in mp_div()
199 if (tmp > (mp_word) MP_MASK) in mp_div()
201 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
Dbn_mp_montgomery_setup.c51 *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK; in mp_montgomery_setup()
Dtommath.h65 typedef unsigned short mp_word; typedef
68 typedef unsigned long mp_word;
77 typedef unsigned long mp_word __attribute__ ((mode(TI)));
95 typedef ulong64 mp_word;
176 #define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
Dbn_mp_sqr.c41 (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) { in mp_sqr()
Dbn_mp_mul.c48 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_mul()
Dbn_mp_exptmod_fast.c100 P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_exptmod_fast()
/external/wpa_supplicant_8/src/tls/
Dlibtommath.c71 typedef unsigned long mp_word __attribute__((mode(TI))); typedef
77 typedef u64 mp_word; typedef
120 #define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
517 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_mul()
1776 mp_word tmp; in mp_div()
1777 tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT); in mp_div()
1778 tmp |= ((mp_word) x.dp[i - 1]); in mp_div()
1779 tmp /= ((mp_word) y.dp[t]); in mp_div()
1780 if (tmp > (mp_word) MP_MASK) in mp_div()
1782 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/tls/
Dlibtommath.c70 typedef u64 mp_word; typedef
112 #define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
509 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_mul()
1768 mp_word tmp; in mp_div()
1769 tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT); in mp_div()
1770 tmp |= ((mp_word) x.dp[i - 1]); in mp_div()
1771 tmp /= ((mp_word) y.dp[t]); in mp_div()
1772 if (tmp > (mp_word) MP_MASK) in mp_div()
1774 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
2117 (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) { in mp_sqr()
[all …]
/external/dropbear/libtommath/pre_gen/
Dmpi.c233 mp_word W[MP_WARRAY]; in fast_mp_montgomery_reduce()
249 register mp_word *_W; in fast_mp_montgomery_reduce()
299 register mp_word *_W; in fast_mp_montgomery_reduce()
309 *_W++ += ((mp_word)mu) * ((mp_word)*tmpn++); in fast_mp_montgomery_reduce()
314 W[ix + 1] += W[ix] >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
323 register mp_word *_W, *_W1; in fast_mp_montgomery_reduce()
334 *_W++ += *_W1++ >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
351 *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK)); in fast_mp_montgomery_reduce()
418 register mp_word _W; in fast_s_mp_mul_digs()
452 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); in fast_s_mp_mul_digs()
[all …]
/external/dropbear/libtommath/mtest/
Dmpi-types.h4 typedef unsigned int mp_word; /* 4 byte type */ typedef
10 #define MP_WORD_BIT (CHAR_BIT*sizeof(mp_word))
Dmpi.c3090 mp_word w, k = 0; in s_mp_add_d()
3125 mp_word w, b = 0; in s_mp_sub_d()
3160 mp_word w, k = 0; in s_mp_mul_d()
3214 mp_word w = 0, t; in s_mp_div_d()
3267 mp_word w = 0; in s_mp_add()
3324 mp_word w = 0; in s_mp_sub()
3425 mp_word w, k = 0; in s_mp_mul()
3476 mp_word w, k = 0;
3513 mp_word w, k = 0; in s_mp_sqr()
3549 mp_word u = 0, v; in s_mp_sqr()
[all …]
/external/dropbear/libtommath/etc/
Dpprime.c15 i_sqrt (mp_word x) in i_sqrt()
17 mp_word x1, x2; in i_sqrt()