Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
DH_set_default_method, DH_get_default_method, DH_set_method, DH_new_method, DH_OpenSSL — select DH methodSYNOPSIS
#include <openssl/dh.h>DH_set_default_method(const DH_METHOD *meth);
DH_get_default_method(void);
DH_set_method(DH *dh, const DH_METHOD *meth);
DH_new_method(ENGINE *engine);
DH_OpenSSL(void);
DESCRIPTION
A DH_METHOD object contains pointers to the functions used for Diffie-Hellman operations. By default, the internal implementation returned by DH_OpenSSL() is used. By selecting another method, alternative implementations such as hardware accelerators may be used.
typedef struct dh_meth_st
{
/* name of the implementation */
const char *name;
/* generate private and public DH values for key agreement */
int (*generate_key)(DH *dh);
/* compute shared secret */
int (*compute_key)(unsigned char *key, BIGNUM *pub_key, DH *dh);
/* compute r = a ^ p mod m (May be NULL for some implementations) */
int (*bn_mod_exp)(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *m_ctx);
/* called at DH_new */
int (*init)(DH *dh);
/* called at DH_free */
int (*finish)(DH *dh);
int flags;
char *app_data; /* ?? */
} DH_METHOD;