Lines Matching full:snum
185 BIGNUM *tmp,wnum,*snum,*sdiv,*res;
227 snum=BN_CTX_get(ctx);
232 if (sdiv == NULL || res == NULL || tmp == NULL || snum == NULL)
240 if (!(BN_lshift(snum,num,norm_shift))) goto err;
241 snum->neg=0;
243 num_n=snum->top;
245 /* Lets setup a 'window' into snum
249 wnum.d = &(snum->d[loop]);
252 wnum.dmax = snum->dmax - loop; /* so we don't step out of bounds */
259 /* pointer to the 'top' of snum */
260 wnump= &(snum->d[num_n-1]);
293 * snum and sdiv to calculate a BN_ULONG q such that
399 bn_correct_top(snum);
406 BN_rshift(rm,snum,norm_shift);
427 BIGNUM *tmp,wnum,*snum,*sdiv,*res;
445 snum=BN_CTX_get(ctx);
457 if (!(BN_lshift(snum,num,norm_shift))) goto err;
458 snum->neg=0;
460 /* Since we don't know whether snum is larger than sdiv,
461 * we pad snum with enough zeroes without changing its
464 if (snum->top <= sdiv->top+1)
466 if (bn_wexpand(snum, sdiv->top + 2) == NULL) goto err;
467 for (i = snum->top; i < sdiv->top + 2; i++) snum->d[i] = 0;
468 snum->top = sdiv->top + 2;
472 if (bn_wexpand(snum, snum->top + 1) == NULL) goto err;
473 snum->d[snum->top] = 0;
474 snum->top ++;
478 num_n=snum->top;
480 /* Lets setup a 'window' into snum
484 wnum.d = &(snum->d[loop]);
487 wnum.dmax = snum->dmax - loop; /* so we don't step out of bounds */
494 /* pointer to the 'top' of snum */
495 wnump= &(snum->d[num_n-1]);
517 * snum and sdiv to calculate a BN_ULONG q such that
623 bn_correct_top(snum);
630 BN_rshift(rm,snum,norm_shift);