Lines Matching defs:digs
414 int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
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)
535 for (ix = digs; ix < pa; ix++) {
571 tmpc = c->dp + digs;
572 for (ix = digs; ix < pa; ix++) {
4752 int ix, res, digs;
4761 digs = n->used * 2 + 1;
4762 if ((digs < MP_WARRAY) &&
4769 if (x->alloc < digs) {
4770 if ((res = mp_grow (x, digs)) != MP_OKAY) {
4774 x->used = digs;
4958 int digs = a->used + b->used + 1;
4961 if ((digs < MP_WARRAY) &&
4964 res = fast_s_mp_mul_digs (a, b, c, digs);
6215 int res, digs;
6237 /* digs is the digit count */
6238 digs = 0;
6242 ++digs;
6259 ++digs;
6263 /* return digs + 1, the 1 is for the NULL byte that would be required. */
6264 *size = digs + 1;
8359 int res, digs;
8387 digs = 0;
8394 ++digs;
8400 bn_reverse ((unsigned char *)_s, digs);
8441 int res, digs;
8475 digs = 0;
8486 ++digs;
8492 bn_reverse ((unsigned char *)_s, digs);
9131 /* multiplies |a| * |b| and only computes upto digs digits of result
9135 int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
9144 if (((digs) < MP_WARRAY) &&
9147 return fast_s_mp_mul_digs (a, b, c, digs);
9150 if ((res = mp_init_size (&t, digs)) != MP_OKAY) {
9153 t.used = digs;
9161 /* limit ourselves to making digs digits of output */
9162 pb = MIN (b->used, digs - ix);
9187 /* set carry if it is placed below digs */
9188 if (ix + iy < digs) {
9225 /* multiplies |a| * |b| and does not compute the lower digs digits
9229 s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
9241 return fast_s_mp_mul_high_digs (a, b, c, digs);
9260 tmpt = &(t.dp[digs]);
9263 tmpy = b->dp + (digs - ix);
9265 for (iy = digs - ix; iy < pb; iy++) {