From d8ac17dc6c892c7a129eac3702e4d5a0f70494bf Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Fri, 12 May 1995 06:47:10 +0000 Subject: [PATCH] * key_sched.c (mit_des_key_sched): *always* fill in the schedule, regardless of the key failing other tests, as a defense against telnet-style bugs. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5802 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/des/ChangeLog | 6 ++++++ src/lib/crypto/des/key_sched.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/crypto/des/ChangeLog b/src/lib/crypto/des/ChangeLog index 8b24e7d86..e731379a9 100644 --- a/src/lib/crypto/des/ChangeLog +++ b/src/lib/crypto/des/ChangeLog @@ -1,3 +1,9 @@ +Fri May 12 02:46:13 1995 Mark Eichin + + * key_sched.c (mit_des_key_sched): *always* fill in the schedule, + regardless of the key failing other tests, as a defense against + telnet-style bugs. + Thu Apr 13 15:49:16 1995 Keith Vetter (keithv@fusion.com) * *.[ch]: removed unneeded INTERFACE from non-api functions. diff --git a/src/lib/crypto/des/key_sched.c b/src/lib/crypto/des/key_sched.c index dfe973dcf..651af88ef 100644 --- a/src/lib/crypto/des/key_sched.c +++ b/src/lib/crypto/des/key_sched.c @@ -47,14 +47,14 @@ mit_des_key_sched(k,schedule) mit_des_cblock k; mit_des_key_schedule schedule; { + make_key_sched(k,schedule); + if (!mit_des_check_key_parity(k)) /* bad parity --> return -1 */ return(-1); if (mit_des_is_weak_key(k)) return(-2); - make_key_sched(k,schedule); - /* if key was good, return 0 */ return 0; } -- 2.26.2