Mercurial > dropbear
diff sysoptions.h @ 755:b07eb3dc23ec ecc
refactor kexdh code a bit, start working on ecdh etc
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 26 Mar 2013 01:35:22 +0800 |
parents | 4a274f47eabd |
children | bf9dc2d9c2b1 |
line wrap: on
line diff
--- a/sysoptions.h Sun Mar 24 00:02:20 2013 +0800 +++ b/sysoptions.h Tue Mar 26 01:35:22 2013 +0800 @@ -60,24 +60,20 @@ #define DROPBEAR_SUCCESS 0 #define DROPBEAR_FAILURE -1 -/* various algorithm identifiers */ -#define DROPBEAR_KEX_DH_GROUP1 0 -#define DROPBEAR_KEX_DH_GROUP14 1 - #define DROPBEAR_SIGNKEY_ANY 0 #define DROPBEAR_SIGNKEY_RSA 1 #define DROPBEAR_SIGNKEY_DSS 2 #define DROPBEAR_SIGNKEY_NONE 3 -#define DROPBEAR_COMP_NONE 0 -#define DROPBEAR_COMP_ZLIB 1 -#define DROPBEAR_COMP_ZLIB_DELAY 2 - /* Required for pubkey auth */ #if defined(ENABLE_SVR_PUBKEY_AUTH) || defined(DROPBEAR_CLIENT) #define DROPBEAR_SIGNKEY_VERIFY #endif +#ifdef DROPBEAR_ECDH +#define DROPBEAR_LTC_PRNG +#endif + #define SHA1_HASH_SIZE 20 #define MD5_HASH_SIZE 16 @@ -93,6 +89,13 @@ #define MAX_MAC_LEN 20 #endif +#if defined(DROPBEAR_ECDH) || defined (DROPBEAR_ECDSA) +#define DROPBEAR_ECC +#endif + +// roughly 2x 521 bits +#define MAX_ECC_SIZE 140 + #define MAX_NAME_LEN 64 /* maximum length of a protocol name, isn't explicitly specified for all protocols (just for algos) but seems valid */