version 1.47.2.3, 2002/06/22 07:23:17 |
version 1.47.2.4, 2002/06/26 18:22:34 |
|
|
{ |
{ |
return (c->block_size); |
return (c->block_size); |
} |
} |
|
|
u_int |
u_int |
cipher_keylen(Cipher *c) |
cipher_keylen(Cipher *c) |
{ |
{ |
return (c->key_len); |
return (c->key_len); |
} |
} |
|
|
u_int |
u_int |
cipher_get_number(Cipher *c) |
cipher_get_number(Cipher *c) |
{ |
{ |
|
|
{ |
{ |
EVP_CIPHER_CTX k1, k2, k3; |
EVP_CIPHER_CTX k1, k2, k3; |
}; |
}; |
|
|
static int |
static int |
ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, |
ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, |
int enc) |
int enc) |
|
|
} |
} |
return (1); |
return (1); |
} |
} |
|
|
static int |
static int |
ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len) |
ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len) |
{ |
{ |
|
|
return (0); |
return (0); |
return (1); |
return (1); |
} |
} |
|
|
static int |
static int |
ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx) |
ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx) |
{ |
{ |
|
|
} |
} |
return (1); |
return (1); |
} |
} |
|
|
static const EVP_CIPHER * |
static const EVP_CIPHER * |
evp_ssh1_3des(void) |
evp_ssh1_3des(void) |
{ |
{ |
|
|
*dst++ = c[3]; |
*dst++ = c[3]; |
} |
} |
} |
} |
|
|
static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL; |
static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL; |
|
|
static int |
static int |
bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len) |
bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len) |
{ |
{ |
|
|
swap_bytes(out, out, len); |
swap_bytes(out, out, len); |
return (ret); |
return (ret); |
} |
} |
|
|
static const EVP_CIPHER * |
static const EVP_CIPHER * |
evp_ssh1_bf(void) |
evp_ssh1_bf(void) |
{ |
{ |
|
|
memcpy(c->r_iv, iv, RIJNDAEL_BLOCKSIZE); |
memcpy(c->r_iv, iv, RIJNDAEL_BLOCKSIZE); |
return (1); |
return (1); |
} |
} |
|
|
static int |
static int |
ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, |
ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, |
u_int len) |
u_int len) |
|
|
} |
} |
return (1); |
return (1); |
} |
} |
|
|
static int |
static int |
ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx) |
ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx) |
{ |
{ |
|
|
} |
} |
return (1); |
return (1); |
} |
} |
|
|
static const EVP_CIPHER * |
static const EVP_CIPHER * |
evp_rijndael(void) |
evp_rijndael(void) |
{ |
{ |