=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/cipher.c,v retrieving revision 1.47.2.3 retrieving revision 1.47.2.4 diff -u -r1.47.2.3 -r1.47.2.4 --- src/usr.bin/ssh/cipher.c 2002/06/22 07:23:17 1.47.2.3 +++ src/usr.bin/ssh/cipher.c 2002/06/26 18:22:34 1.47.2.4 @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher.c,v 1.47.2.3 2002/06/22 07:23:17 miod Exp $"); +RCSID("$OpenBSD: cipher.c,v 1.47.2.4 2002/06/26 18:22:34 miod Exp $"); #include "xmalloc.h" #include "log.h" @@ -90,11 +90,13 @@ { return (c->block_size); } + u_int cipher_keylen(Cipher *c) { return (c->key_len); } + u_int cipher_get_number(Cipher *c) { @@ -287,6 +289,7 @@ { EVP_CIPHER_CTX k1, k2, k3; }; + static int ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, int enc) @@ -323,6 +326,7 @@ } return (1); } + static int ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len) { @@ -338,6 +342,7 @@ return (0); return (1); } + static int ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx) { @@ -350,6 +355,7 @@ } return (1); } + static const EVP_CIPHER * evp_ssh1_3des(void) { @@ -389,7 +395,9 @@ *dst++ = c[3]; } } + static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL; + static int bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len) { @@ -400,6 +408,7 @@ swap_bytes(out, out, len); return (ret); } + static const EVP_CIPHER * evp_ssh1_bf(void) { @@ -442,6 +451,7 @@ memcpy(c->r_iv, iv, RIJNDAEL_BLOCKSIZE); return (1); } + static int ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len) @@ -487,6 +497,7 @@ } return (1); } + static int ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx) { @@ -499,6 +510,7 @@ } return (1); } + static const EVP_CIPHER * evp_rijndael(void) {