From: ben Date: Wed, 27 Apr 2005 12:39:52 +0000 (+0000) Subject: Use the correct key order for 3des-ctr. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/6a38e3113938a10d52893799a96e702dddc3ee1b Use the correct key order for 3des-ctr. git-svn-id: svn://svn.tartarus.org/sgt/putty@5687 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/sshdes.c b/sshdes.c index 833c6897..f926fca3 100644 --- a/sshdes.c +++ b/sshdes.c @@ -744,9 +744,9 @@ static void des_sdctr3(unsigned char *dest, const unsigned char *src, iv0 = scheds->iv0; iv1 = scheds->iv1; for (i = 0; i < len; i += 8) { - des_encipher(b, iv0, iv1, &scheds[2]); + des_encipher(b, iv0, iv1, &scheds[0]); des_decipher(b, b[0], b[1], &scheds[1]); - des_encipher(b, b[0], b[1], &scheds[0]); + des_encipher(b, b[0], b[1], &scheds[2]); tmp = GET_32BIT_MSB_FIRST(src); PUT_32BIT_MSB_FIRST(dest, tmp ^ b[0]); src += 4;