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;
174 /* BN_div computes dv := num / divisor, rounding towards
175 * zero, and sets up rm such that dv*divisor + rm = num holds.
177 * dv->neg == num->neg ^ divisor->neg (unless the result is zero)
179 * If 'dv' or 'rm' is NULL, the respective value is not returned.
181 int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
207 bn_check_top(dv);
222 if (dv != NULL) BN_zero(dv);
230 if (dv == NULL)
232 else res=dv;