diff options
Diffstat (limited to 'algo.h')
-rw-r--r-- | algo.h | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -81,17 +81,27 @@ struct dropbear_hash { const unsigned char hashsize; }; +enum dropbear_kex_mode { + DROPBEAR_KEX_NORMAL_DH, + DROPBEAR_KEX_ECDH, + DROPBEAR_KEX_CURVE25519, +}; + struct dropbear_kex { - // "normal" DH KEX + enum dropbear_kex_mode mode; + + /* "normal" DH KEX */ const unsigned char *dh_p_bytes; const int dh_p_len; - // elliptic curve DH KEX + /* elliptic curve DH KEX */ #ifdef DROPBEAR_ECDH const struct dropbear_ecc_curve *ecc_curve; +#else + const void* dummy; #endif - // both + /* both */ const struct ltc_hash_descriptor *hash_desc; }; @@ -117,12 +127,6 @@ int check_user_algos(const char* user_algo_list, algo_type * algos, char * algolist_string(algo_type algos[]); #endif -#ifdef DROPBEAR_ECDH -#define IS_NORMAL_DH(algo) ((algo)->dh_p_bytes != NULL) -#else -#define IS_NORMAL_DH(algo) 1 -#endif - enum { DROPBEAR_COMP_NONE, DROPBEAR_COMP_ZLIB, |