mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Now that we've got at least some SDCTR modes working (and aes256-ctr is our
default preferred cipher), add code to inject SSH_MSG_IGNOREs to randomise the IV when using CBC-mode ciphers. Each cipher has a flag to indicate whether it needs this workaround, and the SSH packet output maze has gained some extra complexity to implement it. [originally from svn r5659]
This commit is contained in:
8
sshdes.c
8
sshdes.c
@ -965,7 +965,7 @@ static const struct ssh2_cipher ssh_3des_ssh2 = {
|
||||
des3_make_context, des3_free_context, des3_iv, des3_key,
|
||||
des3_ssh2_encrypt_blk, des3_ssh2_decrypt_blk,
|
||||
"3des-cbc",
|
||||
8, 168, "triple-DES CBC"
|
||||
8, 168, SSH_CIPHER_IS_CBC, "triple-DES CBC"
|
||||
};
|
||||
|
||||
#ifdef ENABLE_3DES_SSH2_CTR
|
||||
@ -973,7 +973,7 @@ static const struct ssh2_cipher ssh_3des_ssh2_ctr = {
|
||||
des3_make_context, des3_free_context, des3_iv, des3_key,
|
||||
des3_ssh2_sdctr, des3_ssh2_sdctr,
|
||||
"3des-ctr",
|
||||
8, 168, "triple-DES SDCTR"
|
||||
8, 168, 0, "triple-DES SDCTR"
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -989,14 +989,14 @@ static const struct ssh2_cipher ssh_des_ssh2 = {
|
||||
des_make_context, des3_free_context, des3_iv, des_key,
|
||||
des_ssh2_encrypt_blk, des_ssh2_decrypt_blk,
|
||||
"des-cbc",
|
||||
8, 56, "single-DES CBC"
|
||||
8, 56, SSH_CIPHER_IS_CBC, "single-DES CBC"
|
||||
};
|
||||
|
||||
static const struct ssh2_cipher ssh_des_sshcom_ssh2 = {
|
||||
des_make_context, des3_free_context, des3_iv, des_key,
|
||||
des_ssh2_encrypt_blk, des_ssh2_decrypt_blk,
|
||||
"des-cbc@ssh.com",
|
||||
8, 56, "single-DES CBC"
|
||||
8, 56, SSH_CIPHER_IS_CBC, "single-DES CBC"
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user