From 9e11a09d070a7e507c2b5aaf2c3aa9785f03c1f9 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 31 Oct 2013 22:49:15 +0800 Subject: Default to some larger key sizes --- common-algo.c | 8 ++++---- dropbearkey.c | 2 +- ecdsa.h | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common-algo.c b/common-algo.c index a8d9669..8076358 100644 --- a/common-algo.c +++ b/common-algo.c @@ -246,14 +246,14 @@ static struct dropbear_kex kex_ecdh_nistp521 = {NULL, 0, &ecc_curve_nistp521, &s 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 --git a/dropbearkey.c b/dropbearkey.c index eecfbcc..ba10ea9 100644 --- a/dropbearkey.c +++ b/dropbearkey.c @@ -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 --git a/ecdsa.h b/ecdsa.h index 84e4000..316235f 100644 --- a/ecdsa.h +++ b/ecdsa.h @@ -7,12 +7,12 @@ #ifdef DROPBEAR_ECDSA -#ifdef DROPBEAR_ECC_256 -#define ECDSA_DEFAULT_SIZE 256 -#elif DROPBEAR_ECC_384 -#define ECDSA_DEFAULT_SIZE 384 -#elif DROPBEAR_ECC_521 +#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 #else #define ECDSA_DEFAULT_SIZE 0 #endif -- cgit v1.2.1