comparison common-algo.c @ 756:bf9dc2d9c2b1 ecc

more bits on ecc branch
author Matt Johnston <matt@ucc.asn.au>
date Wed, 27 Mar 2013 00:38:03 +0800
parents b07eb3dc23ec
children 76fba0856749
comparison
equal deleted inserted replaced
755:b07eb3dc23ec 756:bf9dc2d9c2b1
210 {"ssh-dss", DROPBEAR_SIGNKEY_DSS, NULL, 1, NULL}, 210 {"ssh-dss", DROPBEAR_SIGNKEY_DSS, NULL, 1, NULL},
211 #endif 211 #endif
212 {NULL, 0, NULL, 0, NULL} 212 {NULL, 0, NULL, 0, NULL}
213 }; 213 };
214 214
215 static struct dropbear_kex kex_dh_group1 {dh_p_1, DH_P_1_LEN, NULL, sha1_desc };
216 static struct dropbear_kex kex_dh_group14 {dh_p_14, DH_P_14_LEN, NULL, sha1_desc };
217
218 #ifdef DROPBEAR_ECC_DH
219 #ifdef DROPBEAR_ECC_256
220 static struct dropbear_kex kex_ecdh_secp256r1 {NULL, 0, &ecc_curve_secp256r1, sha256_desc };
221 #endif
222 #ifdef DROPBEAR_ECC_384
223 static struct dropbear_kex kex_ecdh_secp384r1 {NULL, 0, &ecc_curve_secp384r1, sha384_desc };
224 #endif
225 #ifdef DROPBEAR_ECC_521
226 static struct dropbear_kex kex_ecdh_secp521r1 {NULL, 0, &ecc_curve_secp521r1, sha512_desc };
227 #endif
228 #endif // DROPBEAR_ECC_DH
229
230
215 algo_type sshkex[] = { 231 algo_type sshkex[] = {
216 // {"ecdh-sha2-secp256r1", DROPBEAR_KEX_ECDH_SECP256R1, NULL, 1, NULL}, 232 #ifdef DROPBEAR_ECC_DH
217 {"diffie-hellman-group1-sha1", DROPBEAR_KEX_DH_GROUP1, NULL, 1, NULL}, 233 #ifdef DROPBEAR_ECC_256
218 {"diffie-hellman-group14-sha1", DROPBEAR_KEX_DH_GROUP14, NULL, 1, NULL}, 234 {"ecdh-sha2-secp256r1", 0, &kex_ecdh_descp256r1, 1, NULL},
235 #endif
236 #ifdef DROPBEAR_ECC_384
237 {"ecdh-sha2-secp384r1", 0, &kex_ecdh_descp384r1, 1, NULL},
238 #endif
239 #ifdef DROPBEAR_ECC_521
240 {"ecdh-sha2-secp521r1", 0, &kex_ecdh_descp521r1, 1, NULL},
241 #endif
242 #endif
243 {"diffie-hellman-group1-sha1", 0, &kex_dh_group1, 1, NULL},
244 {"diffie-hellman-group14-sha1", 0, &kex_dh_group14, 1, NULL},
219 {NULL, 0, NULL, 0, NULL} 245 {NULL, 0, NULL, 0, NULL}
220 }; 246 };
221 247
222 248
223 /* Register the compiled in ciphers. 249 /* Register the compiled in ciphers.