*/
#include "includes.h"
-RCSID("$OpenBSD: cipher.c,v 1.59 2002/06/19 18:01:00 markus Exp $");
+RCSID("$OpenBSD: cipher.c,v 1.60 2002/06/23 03:26:52 deraadt Exp $");
#include "xmalloc.h"
#include "log.h"
{
return (c->block_size);
}
+
u_int
cipher_keylen(Cipher *c)
{
return (c->key_len);
}
+
u_int
cipher_get_number(Cipher *c)
{
{
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)
#endif
return (1);
}
+
static int
ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
{
#endif
return (1);
}
+
static int
ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
{
}
return (1);
}
+
static const EVP_CIPHER *
evp_ssh1_3des(void)
{
*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)
{
swap_bytes(out, out, len);
return (ret);
}
+
static const EVP_CIPHER *
evp_ssh1_bf(void)
{
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)
}
return (1);
}
+
static int
ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx)
{
}
return (1);
}
+
static const EVP_CIPHER *
evp_rijndael(void)
{