From 24aed8a13c24b4cf85aabb6e321f342d2c8ca1ac Mon Sep 17 00:00:00 2001 From: Richard Basch Date: Tue, 12 Dec 1995 19:32:56 +0000 Subject: [PATCH] * d3_str2ky.c: Updated to include some of the randomness throughout the entire key. The second 3-DES CBC encryption of the block should use an ivec of the last cipher block. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7208 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/des/d3_str2ky.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/lib/crypto/des/d3_str2ky.c b/src/lib/crypto/des/d3_str2ky.c index 67c0bf1ce..8e64ad4d9 100644 --- a/src/lib/crypto/des/d3_str2ky.c +++ b/src/lib/crypto/des/d3_str2ky.c @@ -107,20 +107,16 @@ const krb5_data FAR * salt; /* Now, CBC encrypt with itself */ (void) mit_des3_key_sched(*((mit_des3_cblock *)key), ks); - (void) mit_des3_cbc_encrypt((mit_des_cblock *)key, - (mit_des_cblock *)key, - keyblock->length, + (void) mit_des3_cbc_encrypt(key, key, keyblock->length, ((mit_des_key_schedule *)ks)[0], ((mit_des_key_schedule *)ks)[1], ((mit_des_key_schedule *)ks)[2], zero_ivec, TRUE); - (void) mit_des3_cbc_encrypt((mit_des_cblock *)key, - (mit_des_cblock *)key, - keyblock->length, + (void) mit_des3_cbc_encrypt(key, key, keyblock->length, ((mit_des_key_schedule *)ks)[0], ((mit_des_key_schedule *)ks)[1], ((mit_des_key_schedule *)ks)[2], - zero_ivec, TRUE); + key[2], TRUE); /* erase key_sked */ memset((char *)ks, 0, sizeof(ks)); -- 2.26.2