Mercurial > dropbear
comparison kex.h @ 1295:750ec4ec4cbe
Convert #ifdef to #if, other build changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 04 May 2016 15:33:40 +0200 |
parents | 9169e4e7cbee |
children | a90fdd2d2ed8 06d52bcb8094 |
comparison
equal
deleted
inserted
replaced
1294:56aba7dedbea | 1295:750ec4ec4cbe |
---|---|
38 struct kex_dh_param *gen_kexdh_param(void); | 38 struct kex_dh_param *gen_kexdh_param(void); |
39 void free_kexdh_param(struct kex_dh_param *param); | 39 void free_kexdh_param(struct kex_dh_param *param); |
40 void kexdh_comb_key(struct kex_dh_param *param, mp_int *dh_pub_them, | 40 void kexdh_comb_key(struct kex_dh_param *param, mp_int *dh_pub_them, |
41 sign_key *hostkey); | 41 sign_key *hostkey); |
42 | 42 |
43 #ifdef DROPBEAR_ECDH | 43 #if DROPBEAR_ECDH |
44 struct kex_ecdh_param *gen_kexecdh_param(void); | 44 struct kex_ecdh_param *gen_kexecdh_param(void); |
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 | 50 #if DROPBEAR_CURVE25519 |
51 struct kex_curve25519_param *gen_kexcurve25519_param(void); | 51 struct kex_curve25519_param *gen_kexcurve25519_param(void); |
52 void free_kexcurve25519_param(struct kex_curve25519_param *param); | 52 void free_kexcurve25519_param(struct kex_curve25519_param *param); |
53 void kexcurve25519_comb_key(struct kex_curve25519_param *param, buffer *pub_them, | 53 void kexcurve25519_comb_key(struct kex_curve25519_param *param, buffer *pub_them, |
54 sign_key *hostkey); | 54 sign_key *hostkey); |
55 #endif | 55 #endif |
86 struct kex_dh_param { | 86 struct kex_dh_param { |
87 mp_int pub; /* e */ | 87 mp_int pub; /* e */ |
88 mp_int priv; /* x */ | 88 mp_int priv; /* x */ |
89 }; | 89 }; |
90 | 90 |
91 #ifdef DROPBEAR_ECDH | 91 #if DROPBEAR_ECDH |
92 struct kex_ecdh_param { | 92 struct kex_ecdh_param { |
93 ecc_key key; | 93 ecc_key key; |
94 }; | 94 }; |
95 #endif | 95 #endif |
96 | 96 |
97 #ifdef DROPBEAR_CURVE25519 | 97 #if DROPBEAR_CURVE25519 |
98 #define CURVE25519_LEN 32 | 98 #define CURVE25519_LEN 32 |
99 struct kex_curve25519_param { | 99 struct kex_curve25519_param { |
100 unsigned char priv[CURVE25519_LEN]; | 100 unsigned char priv[CURVE25519_LEN]; |
101 unsigned char pub[CURVE25519_LEN]; | 101 unsigned char pub[CURVE25519_LEN]; |
102 }; | 102 }; |