diff kex.h @ 848:6c69e7df3621 ecc

curve25519
author Matt Johnston <matt@ucc.asn.au>
date Fri, 08 Nov 2013 23:11:43 +0800
parents 7dcb46da72d9
children deed0571cacc
line wrap: on
line diff
--- a/kex.h	Fri Nov 01 00:21:59 2013 +0800
+++ b/kex.h	Fri Nov 08 23:11:43 2013 +0800
@@ -47,6 +47,13 @@
 		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 @@
 };
 #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_ */