1
0
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:
Simon Tatham
2000-10-19 15:43:08 +00:00
parent 8e7a270f7f
commit 8d0bee8629
12 changed files with 1118 additions and 57 deletions

View File

@ -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,