Lines Matching defs:snum
194 BIGNUM *tmp, wnum, *snum, *sdiv, *res;
240 snum = BN_CTX_get(ctx);
246 if (sdiv == NULL || res == NULL || tmp == NULL || snum == NULL)
255 if (!(BN_lshift(snum, num, norm_shift)))
257 snum->neg = 0;
259 num_n = snum->top;
262 * Lets setup a 'window' into snum This is the part that corresponds to
266 wnum.d = &(snum->d[loop]);
271 wnum.dmax = snum->dmax - loop; /* so we don't step out of bounds */
278 /* pointer to the 'top' of snum */
279 wnump = &(snum->d[num_n - 1]);
315 * the first part of the loop uses the top two words of snum and sdiv
428 bn_correct_top(snum);
435 BN_rshift(rm, snum, norm_shift);
456 BIGNUM *tmp, wnum, *snum, *sdiv, *res;
475 snum = BN_CTX_get(ctx);
490 if (!(BN_lshift(snum, num, norm_shift)))
492 snum->neg = 0;
495 * Since we don't know whether snum is larger than sdiv, we pad snum with
498 if (snum->top <= sdiv->top + 1) {
499 if (bn_wexpand(snum, sdiv->top + 2) == NULL)
501 for (i = snum->top; i < sdiv->top + 2; i++)
502 snum->d[i] = 0;
503 snum->top = sdiv->top + 2;
505 if (bn_wexpand(snum, snum->top + 1) == NULL)
507 snum->d[snum->top] = 0;
508 snum->top++;
512 num_n = snum->top;
515 * Lets setup a 'window' into snum This is the part that corresponds to
519 wnum.d = &(snum->d[loop]);
524 wnum.dmax = snum->dmax - loop; /* so we don't step out of bounds */
531 /* pointer to the 'top' of snum */
532 wnump = &(snum->d[num_n - 1]);
557 * the first part of the loop uses the top two words of snum and sdiv
670 bn_correct_top(snum);
677 BN_rshift(rm, snum, norm_shift);