summaryrefslogtreecommitdiffhomepage
path: root/common-algo.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2005-08-30 16:58:57 +0000
committerMatt Johnston <matt@ucc.asn.au>2005-08-30 16:58:57 +0000
commitca77392bd1bde7e42b8254f82ca9b0b569b4f74d (patch)
treed5596e1db4fa372f3f1edfd09429dbbbcb4daf0e /common-algo.c
parent71c07ed930e0e8c9402c7dc259650e08dd36eb4d (diff)
- Fixed twofish algorithm naming so it actually works.
- Added support for aes256, twofish256 and sha1-96 - Fixed some debugging statements --HG-- extra : convert_revision : 598835dadaddb1e95d4ac99f8a1be4ba51639000
Diffstat (limited to 'common-algo.c')
-rw-r--r--common-algo.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/common-algo.c b/common-algo.c
index 31902d1..4a8f49c 100644
--- a/common-algo.c
+++ b/common-algo.c
@@ -32,6 +32,10 @@
/* Mappings for ciphers, parameters are
{&cipher_desc, keysize, blocksize} */
+#ifdef DROPBEAR_AES256_CBC
+static const struct dropbear_cipher dropbear_aes256 =
+ {&aes_desc, 32, 16};
+#endif
#ifdef DROPBEAR_AES128_CBC
static const struct dropbear_cipher dropbear_aes128 =
{&aes_desc, 16, 16};
@@ -40,6 +44,10 @@ static const struct dropbear_cipher dropbear_aes128 =
static const struct dropbear_cipher dropbear_blowfish =
{&blowfish_desc, 16, 8};
#endif
+#ifdef DROPBEAR_TWOFISH256_CBC
+static const struct dropbear_cipher dropbear_twofish256 =
+ {&twofish_desc, 32, 16};
+#endif
#ifdef DROPBEAR_TWOFISH128_CBC
static const struct dropbear_cipher dropbear_twofish128 =
{&twofish_desc, 16, 16};
@@ -60,6 +68,10 @@ const struct dropbear_cipher dropbear_nocipher =
static const struct dropbear_hash dropbear_sha1 =
{&sha1_desc, 20, 20};
#endif
+#ifdef DROPBEAR_SHA1_96_HMAC
+static const struct dropbear_hash dropbear_sha1_96 =
+ {&sha1_desc, 20, 12};
+#endif
#ifdef DROPBEAR_MD5_HMAC
static const struct dropbear_hash dropbear_md5 =
{&md5_desc, 16, 16};
@@ -75,19 +87,28 @@ algo_type sshciphers[] = {
#ifdef DROPBEAR_AES128_CBC
{"aes128-cbc", 0, (void*)&dropbear_aes128, 1},
#endif
+#ifdef DROPBEAR_3DES_CBC
+ {"3des-cbc", 0, (void*)&dropbear_3des, 1},
+#endif
+#ifdef DROPBEAR_AES256_CBC
+ {"aes256-cbc", 0, (void*)&dropbear_aes256, 1},
+#endif
#ifdef DROPBEAR_BLOWFISH_CBC
{"blowfish-cbc", 0, (void*)&dropbear_blowfish, 1},
#endif
-#ifdef DROPBEAR_TWOFISH128_CBC
- {"twofish-cbc", 0, (void*)&dropbear_twofish128, 1},
+#ifdef DROPBEAR_TWOFISH256_CBC
+ {"twofish256-cbc", 0, (void*)&dropbear_twofish256, 1},
#endif
-#ifdef DROPBEAR_3DES_CBC
- {"3des-cbc", 0, (void*)&dropbear_3des, 1},
+#ifdef DROPBEAR_TWOFISH128_CBC
+ {"twofish128-cbc", 0, (void*)&dropbear_twofish128, 1},
#endif
{NULL, 0, NULL, 0}
};
algo_type sshhashes[] = {
+#ifdef DROPBEAR_SHA1_96_HMAC
+ {"hmac-sha1-96", 0, (void*)&dropbear_sha1_96, 1},
+#endif
#ifdef DROPBEAR_SHA1_HMAC
{"hmac-sha1", 0, (void*)&dropbear_sha1, 1},
#endif