Lines Matching defs:mod
20 BIGNUM *mod; /* just a reference */
30 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod)
34 bn_check_top(mod);
60 /* save a copy of mod in the BN_BLINDING structure */
61 if ((ret->mod = BN_dup(mod)) == NULL)
64 if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
65 BN_set_flags(ret->mod, BN_FLG_CONSTTIME);
88 BN_free(r->mod);
116 if (!BN_mod_mul(b->Ai, b->Ai, b->Ai, b->mod, ctx)
117 || !BN_mod_mul(b->A, b->A, b->A, b->mod, ctx))
157 ret = BN_mod_mul(n, n, b->A, b->mod, ctx);
197 ret = BN_mod_mul(n, n, r, b->mod, ctx);
274 if (!BN_priv_rand_range_ex(ret->A, ret->mod, 0, ctx))
276 if (int_bn_mod_inverse(ret->Ai, ret->A, ret->mod, ctx, &rv))
292 if (!ret->bn_mod_exp(ret->A, ret->A, ret->e, ret->mod, ctx, ret->m_ctx))
295 if (!BN_mod_exp(ret->A, ret->A, ret->e, ret->mod, ctx))