| 48 |
#define DEATTACK_DETECTED 1 |
#define DEATTACK_DETECTED 1 |
| 49 |
|
|
| 50 |
/* |
/* |
| 51 |
* $Id: crypt.c,v 1.22 2008-11-17 08:45:12 maya Exp $ Cryptographic attack |
* $Id: crypt.c,v 1.23 2008-11-17 13:30:38 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 |
*/ |
*/ |
| 232 |
if (bytes % block_size) { |
if (bytes % block_size) { |
| 233 |
char tmp[80]; |
char tmp[80]; |
| 234 |
UTIL_get_lang_msg("MSG_AES128_ENCRYPT_ERROR1", pvar, |
UTIL_get_lang_msg("MSG_AES128_ENCRYPT_ERROR1", pvar, |
| 235 |
"AES128 encrypt error(1): bytes %d (%d)"); |
"AES128/192/256 encrypt error(1): bytes %d (%d)"); |
| 236 |
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, |
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, |
| 237 |
pvar->ts->UIMsg, bytes, block_size); |
pvar->ts->UIMsg, bytes, block_size); |
| 238 |
notify_fatal_error(pvar, tmp); |
notify_fatal_error(pvar, tmp); |
| 241 |
|
|
| 242 |
if (EVP_Cipher(&pvar->evpcip[MODE_OUT], newbuf, buf, bytes) == 0) { |
if (EVP_Cipher(&pvar->evpcip[MODE_OUT], newbuf, buf, bytes) == 0) { |
| 243 |
UTIL_get_lang_msg("MSG_AES128_ENCRYPT_ERROR2", pvar, |
UTIL_get_lang_msg("MSG_AES128_ENCRYPT_ERROR2", pvar, |
| 244 |
"AES128 encrypt error(2)"); |
"AES128/192/256 encrypt error(2)"); |
| 245 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 246 |
goto error; |
goto error; |
| 247 |
|
|
| 279 |
if (bytes % block_size) { |
if (bytes % block_size) { |
| 280 |
char tmp[80]; |
char tmp[80]; |
| 281 |
UTIL_get_lang_msg("MSG_AES128_DECRYPT_ERROR1", pvar, |
UTIL_get_lang_msg("MSG_AES128_DECRYPT_ERROR1", pvar, |
| 282 |
"AES128 decrypt error(1): bytes %d (%d)"); |
"AES128/192/256 decrypt error(1): bytes %d (%d)"); |
| 283 |
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, pvar->ts->UIMsg, bytes, block_size); |
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, pvar->ts->UIMsg, bytes, block_size); |
| 284 |
notify_fatal_error(pvar, tmp); |
notify_fatal_error(pvar, tmp); |
| 285 |
goto error; |
goto error; |
| 287 |
|
|
| 288 |
if (EVP_Cipher(&pvar->evpcip[MODE_IN], newbuf, buf, bytes) == 0) { |
if (EVP_Cipher(&pvar->evpcip[MODE_IN], newbuf, buf, bytes) == 0) { |
| 289 |
UTIL_get_lang_msg("MSG_AES128_DECRYPT_ERROR2", pvar, |
UTIL_get_lang_msg("MSG_AES128_DECRYPT_ERROR2", pvar, |
| 290 |
"AES128 decrypt error(2)"); |
"AES128/192/256 decrypt error(2)"); |
| 291 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 292 |
goto error; |
goto error; |
| 293 |
|
|