From 79ac024fca717a1d3bf7da156ef3d38c7c87ec0d Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Fri, 8 Nov 2013 23:11:43 +0800 Subject: curve25519 --- kex.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'kex.h') diff --git a/kex.h b/kex.h index e2e186b..144df59 100644 --- a/kex.h +++ b/kex.h @@ -47,6 +47,13 @@ void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them, sign_key *hostkey); #endif +#ifdef DROPBEAR_CURVE25519 +struct kex_curve25519_param *gen_kexcurve25519_param(); +void free_kexcurve25519_param(struct kex_curve25519_param *param); +void kexcurve25519_comb_key(struct kex_curve25519_param *param, buffer *pub_them, + sign_key *hostkey); +#endif + #ifndef DISABLE_ZLIB int is_compress_trans(); int is_compress_recv(); @@ -92,6 +99,18 @@ struct kex_ecdh_param { }; #endif +#ifdef DROPBEAR_CURVE25519 +#define CURVE25519_LEN 32 +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 + + #define MAX_KEXHASHBUF 2000 #endif /* _KEX_H_ */ -- cgit v1.2.1