Lines Matching refs: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;
183 * BN_div computes dv := num / divisor, rounding towards
184 * zero, and sets up rm such that dv*divisor + rm = num holds.
186 * dv->neg == num->neg ^ divisor->neg (unless the result is zero)
188 * If 'dv' or 'rm' is NULL, the respective value is not returned.
190 int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
219 bn_check_top(dv);
238 if (dv != NULL)
239 BN_zero(dv);
247 if (dv == NULL)
250 res = dv;