comparison common-algo.c @ 1248:739b3909c499

Get rid of group15, move group16 to sha512. New groups are disabled by default pending draft-ietf-curdle-ssh-kex-sha2-02 being finalised
author Matt Johnston <matt@ucc.asn.au>
date Sat, 12 Mar 2016 16:21:13 +0800
parents 6a7938ba004a
children 139935236c72
comparison
equal deleted inserted replaced
1247:428d83f2e5db 1248:739b3909c499
246 {"ssh-dss", DROPBEAR_SIGNKEY_DSS, NULL, 1, NULL}, 246 {"ssh-dss", DROPBEAR_SIGNKEY_DSS, NULL, 1, NULL},
247 #endif 247 #endif
248 {NULL, 0, NULL, 0, NULL} 248 {NULL, 0, NULL, 0, NULL}
249 }; 249 };
250 250
251 #if DROPBEAR_DH_GROUP1
251 static const struct dropbear_kex kex_dh_group1 = {DROPBEAR_KEX_NORMAL_DH, dh_p_1, DH_P_1_LEN, NULL, &sha1_desc }; 252 static const struct dropbear_kex kex_dh_group1 = {DROPBEAR_KEX_NORMAL_DH, dh_p_1, DH_P_1_LEN, NULL, &sha1_desc };
253 #endif
254 #if DROPBEAR_DH_GROUP14
252 static const struct dropbear_kex kex_dh_group14_sha1 = {DROPBEAR_KEX_NORMAL_DH, dh_p_14, DH_P_14_LEN, NULL, &sha1_desc }; 255 static const struct dropbear_kex kex_dh_group14_sha1 = {DROPBEAR_KEX_NORMAL_DH, dh_p_14, DH_P_14_LEN, NULL, &sha1_desc };
256 #if DROPBEAR_DH_GROUP14_256
253 static const struct dropbear_kex kex_dh_group14_sha256 = {DROPBEAR_KEX_NORMAL_DH, dh_p_14, DH_P_14_LEN, NULL, &sha256_desc }; 257 static const struct dropbear_kex kex_dh_group14_sha256 = {DROPBEAR_KEX_NORMAL_DH, dh_p_14, DH_P_14_LEN, NULL, &sha256_desc };
254 #ifdef DROPBEAR_DH_GROUP15 258 #endif
255 static const struct dropbear_kex kex_dh_group15_sha256 = {DROPBEAR_KEX_NORMAL_DH, dh_p_15, DH_P_15_LEN, NULL, &sha256_desc }; 259 #endif
256 #endif 260 #if DROPBEAR_DH_GROUP16
257 #ifdef DROPBEAR_DH_GROUP16 261 static const struct dropbear_kex kex_dh_group16_sha512 = {DROPBEAR_KEX_NORMAL_DH, dh_p_16, DH_P_16_LEN, NULL, &sha512_desc };
258 static const struct dropbear_kex kex_dh_group16_sha256 = {DROPBEAR_KEX_NORMAL_DH, dh_p_16, DH_P_16_LEN, NULL, &sha256_desc };
259 #endif 262 #endif
260 263
261 /* These can't be const since dropbear_ecc_fill_dp() fills out 264 /* These can't be const since dropbear_ecc_fill_dp() fills out
262 ecc_curve at runtime */ 265 ecc_curve at runtime */
263 #ifdef DROPBEAR_ECDH 266 #ifdef DROPBEAR_ECDH
290 #endif 293 #endif
291 #ifdef DROPBEAR_ECC_256 294 #ifdef DROPBEAR_ECC_256
292 {"ecdh-sha2-nistp256", 0, &kex_ecdh_nistp256, 1, NULL}, 295 {"ecdh-sha2-nistp256", 0, &kex_ecdh_nistp256, 1, NULL},
293 #endif 296 #endif
294 #endif 297 #endif
298 #if DROPBEAR_DH_GROUP14
299 #if DROPBEAR_DH_GROUP14_256
295 {"diffie-hellman-group14-sha256", 0, &kex_dh_group14_sha256, 1, NULL}, 300 {"diffie-hellman-group14-sha256", 0, &kex_dh_group14_sha256, 1, NULL},
301 #endif
296 {"diffie-hellman-group14-sha1", 0, &kex_dh_group14_sha1, 1, NULL}, 302 {"diffie-hellman-group14-sha1", 0, &kex_dh_group14_sha1, 1, NULL},
303 #endif
304 #if DROPBEAR_DH_GROUP1
297 {"diffie-hellman-group1-sha1", 0, &kex_dh_group1, 1, NULL}, 305 {"diffie-hellman-group1-sha1", 0, &kex_dh_group1, 1, NULL},
298 #ifdef DROPBEAR_DH_GROUP15 306 #endif
299 {"diffie-hellman-group15-sha256", 0, &kex_dh_group15_sha256, 1, NULL}, 307 #if DROPBEAR_DH_GROUP16
300 #endif 308 {"diffie-hellman-group16-sha512", 0, &kex_dh_group16_sha512, 1, NULL},
301 #ifdef DROPBEAR_DH_GROUP16
302 {"diffie-hellman-group16-sha256", 0, &kex_dh_group16_sha256, 1, NULL},
303 #endif 309 #endif
304 #ifdef USE_KEXGUESS2 310 #ifdef USE_KEXGUESS2
305 {KEXGUESS2_ALGO_NAME, KEXGUESS2_ALGO_ID, NULL, 1, NULL}, 311 {KEXGUESS2_ALGO_NAME, KEXGUESS2_ALGO_ID, NULL, 1, NULL},
306 #endif 312 #endif
307 {NULL, 0, NULL, 0, NULL} 313 {NULL, 0, NULL, 0, NULL}