Browse Subversion Repository
Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/crypt.c
Parent Directory
| Revision Log
| Patch
| 48 |
#define DEATTACK_DETECTED 1 |
#define DEATTACK_DETECTED 1 |
| 49 |
|
|
| 50 |
/* |
/* |
| 51 |
* $Id: crypt.c,v 1.17 2007-10-18 07:56:33 maya Exp $ Cryptographic attack |
* $Id: crypt.c,v 1.18 2008-01-10 16:34:08 maya Exp $ Cryptographic attack |
| 52 |
* detector for ssh - source code (C)1998 CORE-SDI, Buenos Aires Argentina |
* detector for ssh - source code (C)1998 CORE-SDI, Buenos Aires Argentina |
| 53 |
* Ariel Futoransky(futo@core-sdi.com) <http://www.core-sdi.com> |
* Ariel Futoransky(futo@core-sdi.com) <http://www.core-sdi.com> |
| 54 |
*/ |
*/ |
| 1107 |
const u_char *key, u_int keylen, |
const u_char *key, u_int keylen, |
| 1108 |
const u_char *iv, u_int ivlen, |
const u_char *iv, u_int ivlen, |
| 1109 |
int encrypt, |
int encrypt, |
| 1110 |
const EVP_CIPHER *(*func)(void), |
const EVP_CIPHER *type, |
| 1111 |
PTInstVar pvar) |
PTInstVar pvar) |
| 1112 |
{ |
{ |
|
EVP_CIPHER *type; |
|
| 1113 |
int klen; |
int klen; |
| 1114 |
char tmp[80]; |
char tmp[80]; |
| 1115 |
|
|
|
type = (EVP_CIPHER *)func(); |
|
|
|
|
| 1116 |
EVP_CIPHER_CTX_init(evp); |
EVP_CIPHER_CTX_init(evp); |
| 1117 |
if (EVP_CipherInit(evp, type, NULL, (u_char *)iv, (encrypt == CIPHER_ENCRYPT)) == 0) { |
if (EVP_CipherInit(evp, type, NULL, (u_char *)iv, (encrypt == CIPHER_ENCRYPT)) == 0) { |
| 1118 |
UTIL_get_lang_msg("MSG_CIPHER_INIT_ERROR", pvar, |
UTIL_get_lang_msg("MSG_CIPHER_INIT_ERROR", pvar, |
|
|
Legend:
| Removed from v.3046 |
|
| changed lines |
| |
Added in v.3093 |
|
|
| |