summaryrefslogtreecommitdiffhomepage
path: root/common-kex.c
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@users.noreply.github.com>2020-05-28 20:01:48 +0500
committerGitHub <noreply@github.com>2020-05-28 23:01:48 +0800
commit413eaf1ba1dc99e1eb7d2375bd6a7c6d8759ff17 (patch)
tree9979669ca65c7efcdac1a0fe06d228533367cb5c /common-kex.c
parent3b359050b464e9fede85cd299902adea79f027bf (diff)
Allow DH to be completely disabled (#97)
Reduces binary size by ~2kB by default and by 21kB with no other libtommath functions users, ex. with curve25519 kex and ed25519 key only.
Diffstat (limited to 'common-kex.c')
-rw-r--r--common-kex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common-kex.c b/common-kex.c
index 3dca3a5..4caa06e 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -548,6 +548,7 @@ void recv_msg_kexinit() {
TRACE(("leave recv_msg_kexinit"))
}
+#if DROPBEAR_NORMAL_DH
static void load_dh_p(mp_int * dh_p)
{
bytes_to_mp(dh_p, ses.newkeys->algo_kex->dh_p_bytes,
@@ -656,6 +657,7 @@ void kexdh_comb_key(struct kex_dh_param *param, mp_int *dh_pub_them,
/* calculate the hash H to sign */
finish_kexhashbuf();
}
+#endif
#if DROPBEAR_ECDH
struct kex_ecdh_param *gen_kexecdh_param() {