comparison 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
comparison
equal deleted inserted replaced
845:774ad9b112ef 848:6c69e7df3621
45 void free_kexecdh_param(struct kex_ecdh_param *param); 45 void free_kexecdh_param(struct kex_ecdh_param *param);
46 void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them, 46 void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them,
47 sign_key *hostkey); 47 sign_key *hostkey);
48 #endif 48 #endif
49 49
50 #ifdef DROPBEAR_CURVE25519
51 struct kex_curve25519_param *gen_kexcurve25519_param();
52 void free_kexcurve25519_param(struct kex_curve25519_param *param);
53 void kexcurve25519_comb_key(struct kex_curve25519_param *param, buffer *pub_them,
54 sign_key *hostkey);
55 #endif
56
50 #ifndef DISABLE_ZLIB 57 #ifndef DISABLE_ZLIB
51 int is_compress_trans(); 58 int is_compress_trans();
52 int is_compress_recv(); 59 int is_compress_recv();
53 #endif 60 #endif
54 61
90 struct kex_ecdh_param { 97 struct kex_ecdh_param {
91 ecc_key key; 98 ecc_key key;
92 }; 99 };
93 #endif 100 #endif
94 101
102 #ifdef DROPBEAR_CURVE25519
103 #define CURVE25519_LEN 32
104 struct kex_curve25519_param {
105 unsigned char priv[CURVE25519_LEN];
106 unsigned char pub[CURVE25519_LEN];
107 };
108
109 /* No header file for curve25519_donna */
110 int curve25519_donna(unsigned char *out, const unsigned char *secret, const unsigned char *other);
111 #endif
112
113
95 #define MAX_KEXHASHBUF 2000 114 #define MAX_KEXHASHBUF 2000
96 115
97 #endif /* _KEX_H_ */ 116 #endif /* _KEX_H_ */