diff options
author | Vladislav Grishenko <themiron@users.noreply.github.com> | 2020-05-28 20:01:48 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 23:01:48 +0800 |
commit | 413eaf1ba1dc99e1eb7d2375bd6a7c6d8759ff17 (patch) | |
tree | 9979669ca65c7efcdac1a0fe06d228533367cb5c /kex.h | |
parent | 3b359050b464e9fede85cd299902adea79f027bf (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 'kex.h')
-rw-r--r-- | kex.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -36,10 +36,12 @@ void recv_msg_newkeys(void); void kexfirstinitialise(void); void finish_kexhashbuf(void); +#if DROPBEAR_NORMAL_DH struct kex_dh_param *gen_kexdh_param(void); void free_kexdh_param(struct kex_dh_param *param); void kexdh_comb_key(struct kex_dh_param *param, mp_int *dh_pub_them, sign_key *hostkey); +#endif #if DROPBEAR_ECDH struct kex_ecdh_param *gen_kexecdh_param(void); @@ -87,10 +89,12 @@ struct KEXState { }; +#if DROPBEAR_NORMAL_DH struct kex_dh_param { mp_int pub; /* e */ mp_int priv; /* x */ }; +#endif #if DROPBEAR_ECDH struct kex_ecdh_param { @@ -104,9 +108,6 @@ struct kex_curve25519_param { unsigned char priv[CURVE25519_LEN]; unsigned char pub[CURVE25519_LEN]; }; - -/* No header file for curve25519_donna */ -int curve25519_donna(unsigned char *out, const unsigned char *secret, const unsigned char *other); #endif #endif /* DROPBEAR_KEX_H_ */ |