From b38eff8e4ff901df9cf1113a9f14d64c3565a401 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 1 Apr 2000 11:09:21 +1000 Subject: - Big OpenBSD CVS update (mainly beginnings of SSH2 infrastructure) - [auth.c session.c sshd.c auth.h] split sshd.c -> auth.c session.c sshd.c plus cleanup and goto-removal - [bufaux.c bufaux.h] support ssh2 bignums - [channels.c channels.h clientloop.c sshd.c nchan.c nchan.h packet.c] [readconf.c ssh.c ssh.h serverloop.c] replace big switch() with function tables (prepare for ssh2) - [ssh2.h] ssh2 message type codes - [sshd.8] reorder Xr to avoid cutting - [serverloop.c] close(fdin) if fdin != fdout, shutdown otherwise, ok theo@ - [channels.c] missing close allow bigger packets - [cipher.c cipher.h] support ssh2 ciphers - [compress.c] cleanup, less code - [dispatch.c dispatch.h] function tables for different message types - [log-server.c] do not log() if debuggin to stderr rename a cpp symbol, to avoid param.h collision - [mpaux.c] KNF - [nchan.c] sync w/ channels.c --- cipher.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'cipher.h') diff --git a/cipher.h b/cipher.h index c323a6c50..6cfeb6399 100644 --- a/cipher.h +++ b/cipher.h @@ -11,7 +11,7 @@ * */ -/* RCSID("$Id: cipher.h,v 1.6 2000/03/26 03:04:52 damien Exp $"); */ +/* RCSID("$Id: cipher.h,v 1.7 2000/04/01 01:09:23 damien Exp $"); */ #ifndef CIPHER_H #define CIPHER_H @@ -21,10 +21,14 @@ #ifdef HAVE_OPENSSL #include #include +#include +#include #endif #ifdef HAVE_SSL #include #include +#include +#include #endif /* Cipher types. New types can be added, but old types should not be removed @@ -37,6 +41,13 @@ #define SSH_CIPHER_BROKEN_TSS 4 /* TRI's Simple Stream encryption CBC */ #define SSH_CIPHER_BROKEN_RC4 5 /* Alleged RC4 */ #define SSH_CIPHER_BLOWFISH 6 +#define SSH_CIPHER_RESERVED 7 + +/* these ciphers are used in SSH2: */ +#define SSH_CIPHER_BLOWFISH_CBC 8 +#define SSH_CIPHER_3DES_CBC 9 +#define SSH_CIPHER_ARCFOUR 10 /* Alleged RC4 */ +#define SSH_CIPHER_CAST128_CBC 11 typedef struct { unsigned int type; @@ -52,6 +63,11 @@ typedef struct { struct bf_key_st key; unsigned char iv[8]; } bf; + struct { + CAST_KEY key; + unsigned char iv[8]; + } cast; + RC4_KEY rc4; } u; } CipherContext; /* @@ -77,6 +93,10 @@ int cipher_number(const char *name); void cipher_set_key(CipherContext * context, int cipher, const unsigned char *key, int keylen, int for_encryption); +void +cipher_set_key_iv(CipherContext * context, int cipher, + const unsigned char *key, int keylen, + const unsigned char *iv, int ivlen); /* * Sets key for the cipher by computing the MD5 checksum of the passphrase, -- cgit v1.2.3