summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/authfile.c3
-rw-r--r--usr.bin/ssh/cipher.c47
-rw-r--r--usr.bin/ssh/cipher.h13
3 files changed, 4 insertions, 59 deletions
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index 3fea2d14b1f..5238a8f4af1 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/authfile.c
@@ -15,11 +15,10 @@ for reading the passphrase from the user.
*/
#include "includes.h"
-RCSID("$Id: authfile.c,v 1.1 1999/09/26 20:53:33 deraadt Exp $");
+RCSID("$Id: authfile.c,v 1.2 1999/09/26 21:02:15 deraadt Exp $");
#include <gmp.h>
#include "xmalloc.h"
-#include "idea.h"
#include "buffer.h"
#include "bufaux.h"
#include "cipher.h"
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c
index 4711d9afce3..a155fb584a3 100644
--- a/usr.bin/ssh/cipher.c
+++ b/usr.bin/ssh/cipher.c
@@ -12,7 +12,7 @@ Created: Wed Apr 19 17:41:39 1995 ylo
*/
#include "includes.h"
-RCSID("$Id: cipher.c,v 1.1 1999/09/26 20:53:34 deraadt Exp $");
+RCSID("$Id: cipher.c,v 1.2 1999/09/26 21:02:15 deraadt Exp $");
#include "ssh.h"
#include "cipher.h"
@@ -119,29 +119,11 @@ detect_cbc_attack(const unsigned char *src,
cipher_attack_detected("CRC-32 CBC insertion attack detected");
}
-#ifdef WITH_IDEA
-static inline
-void
-detect_cfb_attack(const unsigned char *src,
- unsigned int len,
- const unsigned char iv[8])
-{
- return;
-
- log("CRC-32 CFB insertion attack detected");
- cipher_attack_detected("CRC-32 CFB insertion attack detected");
-}
-#endif /* WITH_IDEA */
-
/* Names of all encryption algorithms. These must match the numbers defined
int cipher.h. */
static char *cipher_names[] =
{ "none",
-#ifdef WITH_IDEA
- "idea",
-#else
"no idea",
-#endif
#ifdef WITH_DES
"des",
#else
@@ -169,9 +151,6 @@ unsigned int cipher_mask()
{
unsigned int mask = 0;
mask |= 1 << SSH_CIPHER_NONE;
-#ifdef WITH_IDEA
- mask |= 1 << SSH_CIPHER_IDEA;
-#endif /* WITH_IDEA */
#ifdef WITH_DES
mask |= 1 << SSH_CIPHER_DES;
#endif
@@ -246,15 +225,6 @@ void cipher_set_key(CipherContext *context, int cipher,
case SSH_CIPHER_NONE:
break;
-#ifdef WITH_IDEA
- case SSH_CIPHER_IDEA:
- if (keylen < 16)
- error("Key length %d is insufficient for IDEA.", keylen);
- idea_set_key(&context->u.idea.key, padded);
- memset(context->u.idea.iv, 0, sizeof(context->u.idea.iv));
- break;
-#endif /* WITH_IDEA */
-
#ifdef WITH_DES
case SSH_CIPHER_DES:
/* Note: the least significant bit of each byte of key is parity,
@@ -315,13 +285,6 @@ void cipher_encrypt(CipherContext *context, unsigned char *dest,
memcpy(dest, src, len);
break;
-#ifdef WITH_IDEA
- case SSH_CIPHER_IDEA:
- idea_cfb_encrypt(&context->u.idea.key, context->u.idea.iv,
- dest, src, len);
- break;
-#endif /* WITH_IDEA */
-
#ifdef WITH_DES
case SSH_CIPHER_DES:
des_cbc_encrypt((void*)src, (void*)dest, len,
@@ -370,14 +333,6 @@ void cipher_decrypt(CipherContext *context, unsigned char *dest,
memcpy(dest, src, len);
break;
-#ifdef WITH_IDEA
- case SSH_CIPHER_IDEA:
- detect_cfb_attack(src, len, context->u.idea.iv);
- idea_cfb_decrypt(&context->u.idea.key, context->u.idea.iv,
- dest, src, len);
- break;
-#endif /* WITH_IDEA */
-
#ifdef WITH_DES
case SSH_CIPHER_DES:
detect_cbc_attack(src, len);
diff --git a/usr.bin/ssh/cipher.h b/usr.bin/ssh/cipher.h
index 3979006728d..c0530b492ec 100644
--- a/usr.bin/ssh/cipher.h
+++ b/usr.bin/ssh/cipher.h
@@ -11,14 +11,11 @@ Created: Wed Apr 19 16:50:42 1995 ylo
*/
-/* RCSID("$Id: cipher.h,v 1.1 1999/09/26 20:53:34 deraadt Exp $"); */
+/* RCSID("$Id: cipher.h,v 1.2 1999/09/26 21:02:15 deraadt Exp $"); */
#ifndef CIPHER_H
#define CIPHER_H
-#ifdef WITH_IDEA
-#include "idea.h"
-#endif /* WITH_IDEA */
#include "des.h"
#ifdef WITH_RC4
#include "rc4.h"
@@ -31,7 +28,7 @@ Created: Wed Apr 19 16:50:42 1995 ylo
for compatibility. The maximum allowed value is 31. */
#define SSH_CIPHER_NOT_SET -1 /* None selected (invalid number). */
#define SSH_CIPHER_NONE 0 /* no encryption */
-#define SSH_CIPHER_IDEA 1 /* IDEA CFB */
+#define SSH_CIPHER_IDEA 1 /* IDEA CFB -- not implemented */
#define SSH_CIPHER_DES 2 /* DES CBC */
#define SSH_CIPHER_3DES 3 /* 3DES CBC */
#define SSH_CIPHER_TSS 4 /* TRI's Simple Stream encryption CBC */
@@ -41,12 +38,6 @@ Created: Wed Apr 19 16:50:42 1995 ylo
typedef struct {
unsigned int type;
union {
-#ifdef WITH_IDEA
- struct {
- IDEAContext key;
- unsigned char iv[8];
- } idea;
-#endif /* WITH_IDEA */
#ifdef WITH_DES
struct {
des_key_schedule key;