mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Support for selecting AES from the GUI. In the process, I've had to
introduce another layer of abstraction in SSH2 ciphers, such that a single `logical cipher' (as desired by a user) can equate to more than one `physical cipher'. This is because AES comes in several key lengths (PuTTY will pick the highest supported by the remote end) and several different SSH2-protocol-level names (aes*-cbc, rijndael*-cbc, and an unofficial one rijndael-cbc@lysator.liu.se). [originally from svn r967]
This commit is contained in:
20
sshdes.c
20
sshdes.c
@ -790,8 +790,7 @@ void des3_encrypt_pubkey(unsigned char *key,
|
||||
des_3cbc_encrypt(blk, blk, len, ourkeys);
|
||||
}
|
||||
|
||||
struct ssh_cipher ssh_3des_ssh2 = {
|
||||
NULL,
|
||||
static struct ssh2_cipher ssh_3des_ssh2 = {
|
||||
des3_csiv, des3_cskey,
|
||||
des3_sciv, des3_sckey,
|
||||
des3_ssh2_encrypt_blk,
|
||||
@ -800,13 +799,20 @@ struct ssh_cipher ssh_3des_ssh2 = {
|
||||
8, 168
|
||||
};
|
||||
|
||||
static struct ssh2_cipher *des3_list[] = {
|
||||
&ssh_3des_ssh2
|
||||
};
|
||||
|
||||
struct ssh2_ciphers ssh2_3des = {
|
||||
sizeof(des3_list) / sizeof(*des3_list),
|
||||
des3_list
|
||||
};
|
||||
|
||||
struct ssh_cipher ssh_3des = {
|
||||
des3_sesskey,
|
||||
NULL, NULL, NULL, NULL,
|
||||
des3_encrypt_blk,
|
||||
des3_decrypt_blk,
|
||||
"3des-cbc",
|
||||
8, 168
|
||||
8
|
||||
};
|
||||
|
||||
static void des_sesskey(unsigned char *key) {
|
||||
@ -825,9 +831,7 @@ static void des_decrypt_blk(unsigned char *blk, int len) {
|
||||
|
||||
struct ssh_cipher ssh_des = {
|
||||
des_sesskey,
|
||||
NULL, NULL, NULL, NULL, /* SSH 2 bits - unused */
|
||||
des_encrypt_blk,
|
||||
des_decrypt_blk,
|
||||
"des-cbc", /* should never be used - not a valid cipher in ssh2 */
|
||||
8, 56
|
||||
8
|
||||
};
|
||||
|
Reference in New Issue
Block a user