Lines Matching defs:dv
66 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
85 if (dv != NULL)
86 BN_zero(dv);
92 if (dv == NULL)
93 dv = BN_CTX_get(ctx);
96 if (D == NULL || dv == NULL || rem == NULL)
107 * The next 2 are needed so we can do a dv->d[0]|=1 later since
110 BN_zero(dv);
111 if (bn_wexpand(dv, 1) == NULL)
113 dv->top = 1;
118 if (!BN_lshift1(dv, dv))
121 dv->d[0] |= 1;
130 dv->neg = m->neg ^ d->neg;
181 * BN_div[_no_branch] computes dv := num / divisor, rounding towards
182 * zero, and sets up rm such that dv*divisor + rm = num holds.
184 * dv->neg == num->neg ^ divisor->neg (unless the result is zero)
186 * If 'dv' or 'rm' is NULL, the respective value is not returned.
188 static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
190 int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
213 return BN_div_no_branch(dv, rm, num, divisor, ctx);
216 bn_check_top(dv);
233 if (dv != NULL)
234 BN_zero(dv);
242 if (dv == NULL)
245 res = dv;
452 static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
461 bn_check_top(dv);
477 if (dv == NULL)
480 res = dv;