# HG changeset patch # User Matt Johnston # Date 1383230955 -28800 # Node ID 5128e525c8fa4139f40eb6236fc246d78b548011 # Parent 4095b6d7c9fce985fe87d2d8cde0c77fe0caec37 Default to some larger key sizes diff -r 4095b6d7c9fc -r 5128e525c8fa common-algo.c --- a/common-algo.c Fri Oct 18 21:38:01 2013 +0800 +++ b/common-algo.c Thu Oct 31 22:49:15 2013 +0800 @@ -246,14 +246,14 @@ algo_type sshkex[] = { #ifdef DROPBEAR_ECDH -#ifdef DROPBEAR_ECC_256 - {"ecdh-sha2-nistp256", 0, &kex_ecdh_nistp256, 1, NULL}, +#ifdef DROPBEAR_ECC_521 + {"ecdh-sha2-nistp521", 0, &kex_ecdh_nistp521, 1, NULL}, #endif #ifdef DROPBEAR_ECC_384 {"ecdh-sha2-nistp384", 0, &kex_ecdh_nistp384, 1, NULL}, #endif -#ifdef DROPBEAR_ECC_521 - {"ecdh-sha2-nistp521", 0, &kex_ecdh_nistp521, 1, NULL}, +#ifdef DROPBEAR_ECC_256 + {"ecdh-sha2-nistp256", 0, &kex_ecdh_nistp256, 1, NULL}, #endif #endif {"diffie-hellman-group1-sha1", 0, &kex_dh_group1, 1, NULL}, diff -r 4095b6d7c9fc -r 5128e525c8fa dropbearkey.c --- a/dropbearkey.c Fri Oct 18 21:38:01 2013 +0800 +++ b/dropbearkey.c Thu Oct 31 22:49:15 2013 +0800 @@ -57,7 +57,7 @@ static void printhelp(char * progname); -#define RSA_DEFAULT_SIZE 1024 +#define RSA_DEFAULT_SIZE 2048 #define DSS_DEFAULT_SIZE 1024 static void buf_writefile(buffer * buf, const char * filename); diff -r 4095b6d7c9fc -r 5128e525c8fa ecdsa.h --- a/ecdsa.h Fri Oct 18 21:38:01 2013 +0800 +++ b/ecdsa.h Thu Oct 31 22:49:15 2013 +0800 @@ -7,12 +7,12 @@ #ifdef DROPBEAR_ECDSA -#ifdef DROPBEAR_ECC_256 +#if defined(DROPBEAR_ECC_521) +#define ECDSA_DEFAULT_SIZE 521 +#elif defined(DROPBEAR_ECC_384) +#define ECDSA_DEFAULT_SIZE 384 +#elif defined(DROPBEAR_ECC_256) #define ECDSA_DEFAULT_SIZE 256 -#elif DROPBEAR_ECC_384 -#define ECDSA_DEFAULT_SIZE 384 -#elif DROPBEAR_ECC_521 -#define ECDSA_DEFAULT_SIZE 521 #else #define ECDSA_DEFAULT_SIZE 0 #endif