Lines Matching defs:rr
146 BIGNUM *v, *rr;
157 rr = BN_CTX_get(ctx);
159 rr = r;
161 if (rr == NULL || v == NULL)
169 if (BN_copy(rr, a) == NULL)
172 if (!BN_one(rr))
180 if (!BN_mul(rr, rr, v, ctx))
184 if (r != rr && BN_copy(r, rr) == NULL)
408 int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
422 return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
438 BN_zero(rr);
440 ret = BN_one(rr);
472 BN_zero(rr);
574 if (!BN_mod_mul_montgomery(rr, r, val[0], mont, ctx))
578 if (!BN_from_montgomery(rr, r, mont, ctx))
585 bn_check_top(rr);
703 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
740 BN_zero(rr);
742 ret = BN_one(rr);
770 if (NULL == bn_wexpand(rr, 16))
772 RSAZ_1024_mod_exp_avx2(rr->d, a->d, p->d, m->d, mont->RR.d,
774 rr->top = 16;
775 rr->neg = 0;
776 bn_correct_top(rr);
780 if (NULL == bn_wexpand(rr, 8))
782 RSAZ_512_mod_exp(rr->d, a->d, p->d, m->d, mont->n0[0], mont->RR.d);
783 rr->top = 8;
784 rr->neg = 0;
785 bn_correct_top(rr);
1113 if (!BN_copy(rr, &tmp))
1191 if (!BN_mod_mul_montgomery(rr, &tmp, &am, mont, ctx))
1195 if (!BN_from_montgomery(rr, &tmp, mont, ctx))
1210 int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
1258 BN_zero(rr);
1260 ret = BN_one(rr);
1265 BN_zero(rr);
1343 if (!BN_one(rr))
1346 if (!BN_from_montgomery(rr, r, mont, ctx))
1354 bn_check_top(rr);