Compute modular exponentiation using reciprocal reduction: r = (a ^ p) mod m.
Declared in <openssl/bn.h>
int
BN_mod_exp_recp(
BIGNUM* r,
BIGNUM const* a,
BIGNUM const* p,
BIGNUM const* m,
BN_CTX* ctx);
1 on success, or 0 on error.
| Name | Description |
|---|---|
| r | Destination for the result. |
| a | Base. |
| p | Exponent. |
| m | Modulus. |
| ctx | BN_CTX scratch space. |