Set the modular-exponentiation callback on a DH_METHOD (deprecated).
Declared in <openssl/dh.h>
[[deprecated]]
int
DH_meth_set_bn_mod_exp(
DH_METHOD* dhm,
int(* bn_mod_exp)(DH const*, BIGNUM*, BIGNUM const*, BIGNUM const*, BIGNUM const*, BN_CTX*, BN_MONT_CTX*));
Deprecated. Use of this entity is allowed but discouraged.
The callback computes r = a^p mod m and is used by the default DH_generate_key() implementation. Prefer provider APIs for new code.
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| dhm | Method table to update. |
| bn_mod_exp | Callback implementing modular exponentiation, or NULL to clear (must be non-NULL when using the default generate_key). |