|
Lines 55-60
Link Here
|
| 55 |
extern const EVP_CIPHER *evp_ssh1_3des(void); |
55 |
extern const EVP_CIPHER *evp_ssh1_3des(void); |
| 56 |
extern void ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int); |
56 |
extern void ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int); |
| 57 |
extern const EVP_CIPHER *evp_aes_128_ctr(void); |
57 |
extern const EVP_CIPHER *evp_aes_128_ctr(void); |
|
|
58 |
#ifdef USE_CIPHER_CAMELLIA |
| 59 |
extern const EVP_CIPHER *evp_camellia_128_ctr(void); |
| 60 |
#endif |
| 58 |
extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); |
61 |
extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); |
| 59 |
|
62 |
|
| 60 |
struct Cipher { |
63 |
struct Cipher { |
|
Lines 87-92
Link Here
|
| 87 |
#ifdef USE_CIPHER_ACSS |
90 |
#ifdef USE_CIPHER_ACSS |
| 88 |
{ "acss@openssh.org", SSH_CIPHER_SSH2, 16, 5, 0, EVP_acss }, |
91 |
{ "acss@openssh.org", SSH_CIPHER_SSH2, 16, 5, 0, EVP_acss }, |
| 89 |
#endif |
92 |
#endif |
|
|
93 |
#ifdef USE_CIPHER_CAMELLIA |
| 94 |
{ "camellia128-cbc@openssh.org", SSH_CIPHER_SSH2, 16, 16, 0, EVP_camellia_128_cbc }, |
| 95 |
{ "camellia192-cbc@openssh.org", SSH_CIPHER_SSH2, 16, 24, 0, EVP_camellia_192_cbc }, |
| 96 |
{ "camellia256-cbc@openssh.org", SSH_CIPHER_SSH2, 16, 32, 0, EVP_camellia_256_cbc }, |
| 97 |
{ "camellia128-ctr@openssh.org", SSH_CIPHER_SSH2, 16, 16, 0, evp_camellia_128_ctr }, |
| 98 |
{ "camellia192-ctr@openssh.org", SSH_CIPHER_SSH2, 16, 24, 0, evp_camellia_128_ctr }, |
| 99 |
{ "camellia256-ctr@openssh.org", SSH_CIPHER_SSH2, 16, 32, 0, evp_camellia_128_ctr }, |
| 100 |
#endif |
| 90 |
{ NULL, SSH_CIPHER_INVALID, 0, 0, 0, NULL } |
101 |
{ NULL, SSH_CIPHER_INVALID, 0, 0, 0, NULL } |
| 91 |
}; |
102 |
}; |
| 92 |
|
103 |
|
|
Lines 346-351
Link Here
|
| 346 |
#endif |
357 |
#endif |
| 347 |
if (c->evptype == evp_aes_128_ctr) |
358 |
if (c->evptype == evp_aes_128_ctr) |
| 348 |
ssh_aes_ctr_iv(&cc->evp, 0, iv, len); |
359 |
ssh_aes_ctr_iv(&cc->evp, 0, iv, len); |
|
|
360 |
#ifdef USE_CIPHER_CAMELLIA |
| 361 |
else if (c->evptype == evp_camellia_128_ctr) |
| 362 |
ssh_camellia_ctr_iv(&cc->evp, 0, iv, len); |
| 363 |
#endif |
| 349 |
else |
364 |
else |
| 350 |
memcpy(iv, cc->evp.iv, len); |
365 |
memcpy(iv, cc->evp.iv, len); |
| 351 |
break; |
366 |
break; |
|
Lines 377-382
Link Here
|
| 377 |
#endif |
392 |
#endif |
| 378 |
if (c->evptype == evp_aes_128_ctr) |
393 |
if (c->evptype == evp_aes_128_ctr) |
| 379 |
ssh_aes_ctr_iv(&cc->evp, 1, iv, evplen); |
394 |
ssh_aes_ctr_iv(&cc->evp, 1, iv, evplen); |
|
|
395 |
#ifdef USE_CIPHER_CAMELLIA |
| 396 |
else if (c->evptype == evp_camellia_128_ctr) |
| 397 |
ssh_camellia_ctr_iv(&cc->evp, 1, iv, evplen); |
| 398 |
#endif |
| 380 |
else |
399 |
else |
| 381 |
memcpy(cc->evp.iv, iv, evplen); |
400 |
memcpy(cc->evp.iv, iv, evplen); |
| 382 |
break; |
401 |
break; |