diff -ru libssh-0.11/libssh/kex.c libssh-0.11-3des/libssh/kex.c
--- libssh-0.11/libssh/kex.c	2005-03-04 19:54:59.000000000 +0000
+++ libssh-0.11-3des/libssh/kex.c	2005-05-11 21:24:30.000000000 +0000
@@ -24,7 +24,7 @@
 #include "libssh/priv.h"
 #include "libssh/ssh2.h"
 #ifdef HAVE_OPENSSL_BLOWFISH_H
-#define BLOWFISH "blowfish-cbc"
+#define BLOWFISH "blowfish-cbc,"
 #else
 #define BLOWFISH ""
 #endif
@@ -33,16 +33,17 @@
 #else
 #define AES ""
 #endif
+#define DES "3des-cbc,"
 #ifdef HAVE_LIBZ
 #define ZLIB "none,zlib"
 #else
 #define ZLIB "none"
 #endif
 char *default_methods[]={
-	"diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH, AES BLOWFISH,
+	"diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH DES, AES BLOWFISH DES,
 	"hmac-sha1","hmac-sha1","none","none","","",NULL };
 char *supported_methods[]={
-    "diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH,AES BLOWFISH,
+    "diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH DES,AES BLOWFISH DES,
     "hmac-sha1","hmac-sha1",ZLIB,ZLIB,"","",NULL };
 /* descriptions of the key exchange packet */
 char *ssh_kex_nums[]={
diff -ru libssh-0.11/libssh/wrapper.c libssh-0.11-3des/libssh/wrapper.c
--- libssh-0.11/libssh/wrapper.c	2005-03-04 19:54:59.000000000 +0000
+++ libssh-0.11-3des/libssh/wrapper.c	2005-05-11 21:20:37.000000000 +0000
@@ -43,6 +43,8 @@
 #define HAS_BLOWFISH
 #include <openssl/blowfish.h>
 #endif
+#include <openssl/des.h>
+
 #if (OPENSSL_VERSION_NUMBER<0x009070000)
 #define OLD_CRYPTO
 #endif
@@ -149,6 +151,34 @@
     AES_cbc_encrypt(in,out,len,cipher->key,IV,AES_DECRYPT);
 }
 #endif
+
+
+static void des3_set_key(struct crypto_struct *cipher, void *key){
+    if(!cipher->key){
+        alloc_key(cipher);
+        DES_set_odd_parity(key);
+        DES_set_odd_parity(key+8);
+        DES_set_odd_parity(key+16);
+        DES_set_key_unchecked(key,cipher->key);
+        DES_set_key_unchecked(key+8,cipher->key+sizeof(DES_key_schedule));
+        DES_set_key_unchecked(key+16,cipher->key+2*sizeof(DES_key_schedule));
+    }
+}
+
+static void des3_encrypt(struct crypto_struct *cipher, void *in, void *out,
+        unsigned long len, void *IV){
+    DES_ede3_cbc_encrypt(in,out,len,cipher->key,cipher->key+
+            sizeof(DES_key_schedule),cipher->key+
+            2*sizeof(DES_key_schedule),IV,1);
+}
+
+static void des3_decrypt(struct crypto_struct *cipher, void *in, void *out,
+        unsigned long len, void *IV){
+    DES_ede3_cbc_encrypt(in,out,len,cipher->key,cipher->key+
+            sizeof(DES_key_schedule),cipher->key+
+            2*sizeof(DES_key_schedule),IV,0);
+}
+
 /* the table of supported ciphers */
 static struct crypto_struct ssh_ciphertab[]={
 #ifdef HAS_BLOWFISH
@@ -159,6 +189,8 @@
     { "aes192-cbc",16,sizeof(AES_KEY),NULL,192,aes_set_encrypt_key,aes_set_decrypt_key,aes_encrypt,aes_decrypt},
     { "aes256-cbc",16,sizeof(AES_KEY),NULL,256,aes_set_encrypt_key,aes_set_decrypt_key,aes_encrypt,aes_decrypt},
 #endif
+    { "3des-cbc",8,sizeof(DES_key_schedule)*3,NULL,192,des3_set_key,
+                    des3_set_key,des3_encrypt, des3_decrypt},
     { NULL,0,0,NULL,0,NULL,NULL,NULL}
 };
 #endif /* OPENSSL_CRYPTO */
Files libssh-0.11/samplesftp and libssh-0.11-3des/samplesftp differ
Files libssh-0.11/samplessh and libssh-0.11-3des/samplessh differ
Files libssh-0.11/samplesshd and libssh-0.11-3des/samplesshd differ
