Lines Matching defs:digs
2248 fast_col_array_multiply(mp_int * a, mp_int * b, mp_int * c, int digs)
2256 if (c->alloc < digs) {
2257 if ((res = mp_grow(c, digs)) != MP_OKAY) {
2263 pa = MIN(digs, a->used + b->used);
2337 /* multiplies |a| * |b| and only computes upto digs digits of result
2342 basic_multiply_partial_lower(mp_int * a, mp_int * b, mp_int * c, int digs)
2351 if (can_use_fast_column_array(digs, MIN(a->used, b->used))) {
2352 return fast_col_array_multiply(a, b, c, digs);
2355 if ((res = mp_init_size(&t, digs)) != MP_OKAY) {
2358 t.used = digs;
2366 /* limit ourselves to making digs digits of output */
2367 pb = MIN(b->used, digs - ix);
2392 /* set carry if it is placed below digs */
2393 if (ix + iy < digs) {
2424 int digs = a->used + b->used + 1;
2426 if (can_use_fast_column_array(digs, MIN(a->used, b->used))) {
2427 res = fast_col_array_multiply(a, b, c, digs);
2437 * output digits *above* digs. See the comments for fast_s_mul_digs
2446 fast_basic_multiply_partial_upper(mp_int * a, mp_int * b, mp_int * c, int digs)
2463 for (ix = digs; ix < pa; ix++) {
2499 tmpc = c->dp + digs;
2500 for (ix = digs; ix < pa; ix++) {
2518 /* multiplies |a| * |b| and does not compute the lower digs digits
2522 basic_multiply_partial_upper(mp_int * a, mp_int * b, mp_int * c, int digs)
2532 return fast_basic_multiply_partial_upper(a, b, c, digs);
2550 tmpt = &(t.dp[digs]);
2553 tmpy = b->dp + (digs - ix);
2555 for (iy = digs - ix; iy < pb; iy++) {
3741 int ix, res, digs;
3750 digs = n->used * 2 + 1;
3751 if (can_use_fast_column_array(digs, n->used)) {
3756 if (x->alloc < digs) {
3757 if ((res = mp_grow(x, digs)) != MP_OKAY) {
3761 x->used = digs;
4899 int res, digs;
4921 /* digs is the digit count */
4922 digs = 0;
4926 ++digs;
4943 ++digs;
4947 /* return digs + 1, the 1 is for the NULL byte that would be required. */
4948 *size = digs + 1;
4961 int res, digs;
4995 digs = 0;
5007 ++digs;
5013 bn_reverse((unsigned char *)_s, digs);