Lines Matching refs:dv
67 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
86 if (dv != NULL) BN_zero(dv);
92 if (dv == NULL) dv = BN_CTX_get(ctx);
94 if (D == NULL || dv == NULL || rem == NULL)
102 /* The next 2 are needed so we can do a dv->d[0]|=1 later
104 BN_zero(dv);
105 if(bn_wexpand(dv,1) == NULL) goto end;
106 dv->top=1;
111 if (!BN_lshift1(dv,dv)) goto end;
114 dv->d[0]|=1;
121 dv->neg=m->neg^d->neg;
172 /* BN_div[_no_branch] computes dv := num / divisor, rounding towards
173 * zero, and sets up rm such that dv*divisor + rm = num holds.
175 * dv->neg == num->neg ^ divisor->neg (unless the result is zero)
177 * If 'dv' or 'rm' is NULL, the respective value is not returned.
179 static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
181 int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
203 return BN_div_no_branch(dv, rm, num, divisor, ctx);
206 bn_check_top(dv);
221 if (dv != NULL) BN_zero(dv);
229 if (dv == NULL)
231 else res=dv;
426 static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
435 bn_check_top(dv);
450 if (dv == NULL)
452 else res=dv;