diff --git a/common-algo.c b/common-algo.c
index 4a8f49c4bd7fb2960c293ac37d38a368146a7236..cc91c88f9d0bcfdf66874d66fbdf05e2d6f902d5 100644
--- a/common-algo.c
+++ b/common-algo.c
@@ -84,6 +84,13 @@ const struct dropbear_hash dropbear_nohash =
 /* The following map ssh names to internal values */
 
 algo_type sshciphers[] = {
+#ifdef DROPBEAR_TWOFISH256_CBC
+	{"twofish256-cbc", 0, (void*)&dropbear_twofish256, 1},
+	{"twofish-cbc", 0, (void*)&dropbear_twofish256, 1},
+#endif
+#ifdef DROPBEAR_TWOFISH128_CBC
+	{"twofish128-cbc", 0, (void*)&dropbear_twofish128, 1},
+#endif
 #ifdef DROPBEAR_AES128_CBC
 	{"aes128-cbc", 0, (void*)&dropbear_aes128, 1},
 #endif
@@ -95,12 +102,6 @@ algo_type sshciphers[] = {
 #endif
 #ifdef DROPBEAR_BLOWFISH_CBC
 	{"blowfish-cbc", 0, (void*)&dropbear_blowfish, 1},
-#endif
-#ifdef DROPBEAR_TWOFISH256_CBC
-	{"twofish256-cbc", 0, (void*)&dropbear_twofish256, 1},
-#endif
-#ifdef DROPBEAR_TWOFISH128_CBC
-	{"twofish128-cbc", 0, (void*)&dropbear_twofish128, 1},
 #endif
 	{NULL, 0, NULL, 0}
 };
diff --git a/options.h b/options.h
index adfcb448d300f88e26c65b23d2a91ec614fbf9c9..7a9cb64a2f794f246bf22c1518bd5638f281e7a6 100644
--- a/options.h
+++ b/options.h
@@ -278,7 +278,7 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */
 #define MAX_MAC_LEN SHA1_HASH_SIZE
 
 
-#define MAX_KEY_LEN 24 /* 3DES requires a 24 byte key */
+#define MAX_KEY_LEN 32 /* 256 bytes for aes256 etc */
 #define MAX_IV_LEN 20 /* must be same as max blocksize, 
 						 and >= SHA1_HASH_SIZE */
 #define MAX_MAC_KEY 20