1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22: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:
Ben Harris
2005-04-23 16:22:51 +00:00
parent b28330fc35
commit f2b0335c48
6 changed files with 48 additions and 19 deletions

View File

@ -1173,49 +1173,49 @@ static const struct ssh2_cipher ssh_aes128_ctr = {
aes_make_context, aes_free_context, aes_iv, aes128_key,
aes_ssh2_sdctr, aes_ssh2_sdctr,
"aes128-ctr",
16, 128, "AES-128 SDCTR"
16, 128, 0, "AES-128 SDCTR"
};
static const struct ssh2_cipher ssh_aes192_ctr = {
aes_make_context, aes_free_context, aes_iv, aes192_key,
aes_ssh2_sdctr, aes_ssh2_sdctr,
"aes192-ctr",
16, 192, "AES-192 SDCTR"
16, 192, 0, "AES-192 SDCTR"
};
static const struct ssh2_cipher ssh_aes256_ctr = {
aes_make_context, aes_free_context, aes_iv, aes256_key,
aes_ssh2_sdctr, aes_ssh2_sdctr,
"aes256-ctr",
16, 256, "AES-256 SDCTR"
16, 256, 0, "AES-256 SDCTR"
};
static const struct ssh2_cipher ssh_aes128 = {
aes_make_context, aes_free_context, aes_iv, aes128_key,
aes_ssh2_encrypt_blk, aes_ssh2_decrypt_blk,
"aes128-cbc",
16, 128, "AES-128 CBC"
16, 128, SSH_CIPHER_IS_CBC, "AES-128 CBC"
};
static const struct ssh2_cipher ssh_aes192 = {
aes_make_context, aes_free_context, aes_iv, aes192_key,
aes_ssh2_encrypt_blk, aes_ssh2_decrypt_blk,
"aes192-cbc",
16, 192, "AES-192 CBC"
16, 192, SSH_CIPHER_IS_CBC, "AES-192 CBC"
};
static const struct ssh2_cipher ssh_aes256 = {
aes_make_context, aes_free_context, aes_iv, aes256_key,
aes_ssh2_encrypt_blk, aes_ssh2_decrypt_blk,
"aes256-cbc",
16, 256, "AES-256 CBC"
16, 256, SSH_CIPHER_IS_CBC, "AES-256 CBC"
};
static const struct ssh2_cipher ssh_rijndael_lysator = {
aes_make_context, aes_free_context, aes_iv, aes256_key,
aes_ssh2_encrypt_blk, aes_ssh2_decrypt_blk,
"rijndael-cbc@lysator.liu.se",
16, 256, "AES-256 CBC"
16, 256, SSH_CIPHER_IS_CBC, "AES-256 CBC"
};
static const struct ssh2_cipher *const aes_list[] = {