mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
PuTTYgen initial version. Still to do are basic user-friendliness
features (prompt for passphrase twice, prompt before overwriting a file, check the key file was actually saved OK), testing of the generated keys to make sure I got the file format right, and support for a variable key size. I think what's already here is basically sound though. [originally from svn r715]
This commit is contained in:
12
sshdes.c
12
sshdes.c
@ -778,6 +778,18 @@ void des3_decrypt_pubkey(unsigned char *key,
|
||||
des_3cbc_decrypt(blk, blk, len, ourkeys);
|
||||
}
|
||||
|
||||
void des3_encrypt_pubkey(unsigned char *key,
|
||||
unsigned char *blk, int len) {
|
||||
DESContext ourkeys[3];
|
||||
des_key_setup(GET_32BIT_MSB_FIRST(key),
|
||||
GET_32BIT_MSB_FIRST(key+4), &ourkeys[0]);
|
||||
des_key_setup(GET_32BIT_MSB_FIRST(key+8),
|
||||
GET_32BIT_MSB_FIRST(key+12), &ourkeys[1]);
|
||||
des_key_setup(GET_32BIT_MSB_FIRST(key),
|
||||
GET_32BIT_MSB_FIRST(key+4), &ourkeys[2]);
|
||||
des_3cbc_encrypt(blk, blk, len, ourkeys);
|
||||
}
|
||||
|
||||
struct ssh_cipher ssh_3des_ssh2 = {
|
||||
NULL,
|
||||
des3_csiv, des3_cskey,
|
||||
|
Reference in New Issue
Block a user