/** * Performs m = c^d mod n */ bigint *RSA_private(const RSA_CTX *c, bigint *bi_msg) { #ifdef CONFIG_BIGINT_CRT return bi_crt(c->bi_ctx, bi_msg, c->dP, c->dQ, c->p, c->q, c->qInv); #else BI_CTX *ctx = c->bi_ctx; ctx->mod_offset = BIGINT_M_OFFSET; return bi_mod_power(ctx, bi_msg, c->d); #endif }
/** * Performs m = c^d mod n */ bigint *RSA_private(const RSA_CTX *c, bigint *bi_msg) { return bi_crt(c->bi_ctx, bi_msg, c->dP, c->dQ, c->p, c->q, c->qInv); }