mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Add a key length indication to each SSH2 cipher structure, in
preparation for needing to know how much key material each cipher needs in order to select a suitable Diffie-Hellman group. [originally from svn r961]
This commit is contained in:
parent
f72b5aa95f
commit
862d6a496d
1
ssh.h
1
ssh.h
@ -103,6 +103,7 @@ struct ssh_cipher {
|
|||||||
void (*decrypt)(unsigned char *blk, int len);
|
void (*decrypt)(unsigned char *blk, int len);
|
||||||
char *name;
|
char *name;
|
||||||
int blksize;
|
int blksize;
|
||||||
|
int keylen;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ssh_mac {
|
struct ssh_mac {
|
||||||
|
@ -514,7 +514,7 @@ struct ssh_cipher ssh_blowfish_ssh1 = {
|
|||||||
blowfish_ssh1_encrypt_blk,
|
blowfish_ssh1_encrypt_blk,
|
||||||
blowfish_ssh1_decrypt_blk,
|
blowfish_ssh1_decrypt_blk,
|
||||||
"blowfish-cbc",
|
"blowfish-cbc",
|
||||||
8
|
8, 256
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ssh_cipher ssh_blowfish_ssh2 = {
|
struct ssh_cipher ssh_blowfish_ssh2 = {
|
||||||
@ -524,5 +524,5 @@ struct ssh_cipher ssh_blowfish_ssh2 = {
|
|||||||
blowfish_ssh2_encrypt_blk,
|
blowfish_ssh2_encrypt_blk,
|
||||||
blowfish_ssh2_decrypt_blk,
|
blowfish_ssh2_decrypt_blk,
|
||||||
"blowfish-cbc",
|
"blowfish-cbc",
|
||||||
8
|
8, 128
|
||||||
};
|
};
|
||||||
|
6
sshdes.c
6
sshdes.c
@ -797,7 +797,7 @@ struct ssh_cipher ssh_3des_ssh2 = {
|
|||||||
des3_ssh2_encrypt_blk,
|
des3_ssh2_encrypt_blk,
|
||||||
des3_ssh2_decrypt_blk,
|
des3_ssh2_decrypt_blk,
|
||||||
"3des-cbc",
|
"3des-cbc",
|
||||||
8
|
8, 168
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ssh_cipher ssh_3des = {
|
struct ssh_cipher ssh_3des = {
|
||||||
@ -806,7 +806,7 @@ struct ssh_cipher ssh_3des = {
|
|||||||
des3_encrypt_blk,
|
des3_encrypt_blk,
|
||||||
des3_decrypt_blk,
|
des3_decrypt_blk,
|
||||||
"3des-cbc",
|
"3des-cbc",
|
||||||
8
|
8, 168
|
||||||
};
|
};
|
||||||
|
|
||||||
static void des_sesskey(unsigned char *key) {
|
static void des_sesskey(unsigned char *key) {
|
||||||
@ -829,5 +829,5 @@ struct ssh_cipher ssh_des = {
|
|||||||
des_encrypt_blk,
|
des_encrypt_blk,
|
||||||
des_decrypt_blk,
|
des_decrypt_blk,
|
||||||
"des-cbc", /* should never be used - not a valid cipher in ssh2 */
|
"des-cbc", /* should never be used - not a valid cipher in ssh2 */
|
||||||
8
|
8, 56
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user