26 #include "libssh/crypto.h"
30 #define DH_CLIENT_KEYPAIR 0
31 #define DH_SERVER_KEYPAIR 1
37 #if !defined(HAVE_LIBCRYPTO) || OPENSSL_VERSION_NUMBER < 0x30000000L
38 int ssh_dh_get_parameters(
struct dh_ctx *ctx,
39 const_bignum *modulus, const_bignum *generator);
41 int ssh_dh_get_parameters(
struct dh_ctx *ctx,
42 bignum *modulus, bignum *generator);
44 int ssh_dh_set_parameters(
struct dh_ctx *ctx,
45 const bignum modulus,
const bignum generator);
47 int ssh_dh_keypair_gen_keys(
struct dh_ctx *ctx,
int peer);
48 #if !defined(HAVE_LIBCRYPTO) || OPENSSL_VERSION_NUMBER < 0x30000000L
49 int ssh_dh_keypair_get_keys(
struct dh_ctx *ctx,
int peer,
50 const_bignum *priv, const_bignum *pub);
52 int ssh_dh_keypair_get_keys(
struct dh_ctx *ctx,
int peer,
53 bignum *priv, bignum *pub);
55 int ssh_dh_keypair_set_keys(
struct dh_ctx *ctx,
int peer,
56 const bignum priv,
const bignum pub);
58 int ssh_dh_compute_shared_secret(
struct dh_ctx *ctx,
int local,
int remote,
64 int ssh_dh_init(
void);
65 void ssh_dh_finalize(
void);
67 int ssh_dh_import_next_pubkey_blob(
ssh_session session,
71 int ssh_dh_get_current_server_publickey_blob(
ssh_session session,
74 int ssh_dh_get_next_server_publickey_blob(
ssh_session session,
82 int ssh_fallback_group(uint32_t pmax, bignum *p, bignum *g);
83 bool ssh_dh_is_known_group(bignum modulus, bignum generator);
Definition: dh_crypto.c:47
Definition: session.h:110