comparison 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
comparison
equal deleted inserted replaced
725:49f68a7b7a55 755:b07eb3dc23ec
58 58
59 /* success/failure defines */ 59 /* success/failure defines */
60 #define DROPBEAR_SUCCESS 0 60 #define DROPBEAR_SUCCESS 0
61 #define DROPBEAR_FAILURE -1 61 #define DROPBEAR_FAILURE -1
62 62
63 /* various algorithm identifiers */
64 #define DROPBEAR_KEX_DH_GROUP1 0
65 #define DROPBEAR_KEX_DH_GROUP14 1
66
67 #define DROPBEAR_SIGNKEY_ANY 0 63 #define DROPBEAR_SIGNKEY_ANY 0
68 #define DROPBEAR_SIGNKEY_RSA 1 64 #define DROPBEAR_SIGNKEY_RSA 1
69 #define DROPBEAR_SIGNKEY_DSS 2 65 #define DROPBEAR_SIGNKEY_DSS 2
70 #define DROPBEAR_SIGNKEY_NONE 3 66 #define DROPBEAR_SIGNKEY_NONE 3
71 67
72 #define DROPBEAR_COMP_NONE 0
73 #define DROPBEAR_COMP_ZLIB 1
74 #define DROPBEAR_COMP_ZLIB_DELAY 2
75
76 /* Required for pubkey auth */ 68 /* Required for pubkey auth */
77 #if defined(ENABLE_SVR_PUBKEY_AUTH) || defined(DROPBEAR_CLIENT) 69 #if defined(ENABLE_SVR_PUBKEY_AUTH) || defined(DROPBEAR_CLIENT)
78 #define DROPBEAR_SIGNKEY_VERIFY 70 #define DROPBEAR_SIGNKEY_VERIFY
71 #endif
72
73 #ifdef DROPBEAR_ECDH
74 #define DROPBEAR_LTC_PRNG
79 #endif 75 #endif
80 76
81 #define SHA1_HASH_SIZE 20 77 #define SHA1_HASH_SIZE 20
82 #define MD5_HASH_SIZE 16 78 #define MD5_HASH_SIZE 16
83 79
91 #define MAX_MAC_LEN 32 87 #define MAX_MAC_LEN 32
92 #else 88 #else
93 #define MAX_MAC_LEN 20 89 #define MAX_MAC_LEN 20
94 #endif 90 #endif
95 91
92 #if defined(DROPBEAR_ECDH) || defined (DROPBEAR_ECDSA)
93 #define DROPBEAR_ECC
94 #endif
95
96 // roughly 2x 521 bits
97 #define MAX_ECC_SIZE 140
98
96 #define MAX_NAME_LEN 64 /* maximum length of a protocol name, isn't 99 #define MAX_NAME_LEN 64 /* maximum length of a protocol name, isn't
97 explicitly specified for all protocols (just 100 explicitly specified for all protocols (just
98 for algos) but seems valid */ 101 for algos) but seems valid */
99 102
100 #define MAX_PROPOSED_ALGO 20 103 #define MAX_PROPOSED_ALGO 20