Searched refs:digs (Results 1 - 12 of 12) sorted by relevance

/barrelfish-2018-10-04/lib/tommath/
H A Dbn_mp_radix_size.c21 int res, digs; local
43 /* digs is the digit count */
44 digs = 0;
48 ++digs;
65 ++digs;
69 /* return digs + 1, the 1 is for the NULL byte that would be required. */
70 *size = digs + 1;
H A Dbn_s_mp_mul_digs.c18 /* multiplies |a| * |b| and only computes upto digs digits of result
22 int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) argument
31 if (((digs) < MP_WARRAY) &&
34 return fast_s_mp_mul_digs (a, b, c, digs);
37 if ((res = mp_init_size (&t, digs)) != MP_OKAY) {
40 t.used = digs;
48 /* limit ourselves to making digs digits of output */
49 pb = MIN (b->used, digs - ix);
74 /* set carry if it is placed below digs */
75 if (ix + iy < digs) {
[all...]
H A Dbn_mp_toradix.c21 int res, digs; local
49 digs = 0;
56 ++digs;
62 bn_reverse ((unsigned char *)_s, digs);
H A Dbn_mp_toradix_n.c24 int res, digs; local
58 digs = 0;
69 ++digs;
75 bn_reverse ((unsigned char *)_s, digs);
H A Dbn_mp_montgomery_reduce.c22 int ix, res, digs; local
31 digs = n->used * 2 + 1;
32 if ((digs < MP_WARRAY) &&
39 if (x->alloc < digs) {
40 if ((res = mp_grow (x, digs)) != MP_OKAY) {
44 x->used = digs;
H A Dbn_s_mp_mul_high_digs.c18 /* multiplies |a| * |b| and does not compute the lower digs digits
22 s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) argument
34 return fast_s_mp_mul_high_digs (a, b, c, digs);
53 tmpt = &(t.dp[digs]);
56 tmpy = b->dp + (digs - ix);
58 for (iy = digs - ix; iy < pb; iy++) {
H A Dbn_mp_mul.c43 int digs = a->used + b->used + 1; local
46 if ((digs < MP_WARRAY) &&
49 res = fast_s_mp_mul_digs (a, b, c, digs);
H A Dbn_fast_s_mp_mul_digs.c34 int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) argument
41 if (c->alloc < digs) {
42 if ((res = mp_grow (c, digs)) != MP_OKAY) {
48 pa = MIN(digs, a->used + b->used);
H A Dbn_fast_s_mp_mul_high_digs.c19 * output digits *above* digs. See the comments for fast_s_mul_digs
27 int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) argument
44 for (ix = digs; ix < pa; ix++) {
80 tmpc = c->dp + digs;
81 for (ix = digs; ix < pa; ix++) {
H A Dtommath.h555 int fast_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
556 int s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
557 int fast_s_mp_mul_high_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
558 int s_mp_mul_high_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
H A Dtommath.tex2521 \textbf{Input}. mp\_int $a$, mp\_int $b$ and an integer $digs$ \\
2522 \textbf{Output}. $c \leftarrow \vert a \vert \cdot \vert b \vert \mbox{ (mod }\beta^{digs}\mbox{)}$. \\
2529 2. Init $t$ to be of size $digs$ \\
2531 4. $t.used \leftarrow digs$ \\
2536 \hspace{3mm}5.2 $pb \leftarrow \mbox{min}(b.used, digs - ix)$ \\
2542 \hspace{3mm}5.5 if $ix + pb < digs$ then do \\
2556 This algorithm computes the unsigned product of two inputs $a$ and $b$, limited to an output precision of $digs$ digits. While it may seem
2567 All of step 5 is the infamous $O(n^2)$ multiplication loop slightly modified to only produce upto $digs$ digits of output. The $pb$ variable
2600 digit since that digit is assumed to be zero at this point. However, if $ix + pb \ge digs$ the carry is not set as it would make the result
2739 \textbf{Input}. mp\_int $a$, mp\_int $b$ and an integer $digs
[all...]
/barrelfish-2018-10-04/lib/tommath/pre_gen/
H A Dmpi.c414 int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) argument
421 if (c->alloc < digs) {
422 if ((res = mp_grow (c, digs)) != MP_OKAY) {
428 pa = MIN(digs, a->used + b->used);
510 * output digits *above* digs. See the comments for fast_s_mul_digs
518 int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) argument
535 for (ix = digs; ix < pa; ix++) {
571 tmpc = c->dp + digs;
572 for (ix = digs; ix < pa; ix++) {
4757 int ix, res, digs; local
4963 int digs = a->used + b->used + 1; local
6220 int res, digs; local
8369 int res, digs; local
8451 int res, digs; local
9145 s_mp_mul_digs(mp_int * a, mp_int * b, mp_int * c, int digs) argument
9239 s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs) argument
[all...]

Completed in 81 milliseconds