[2569] in Kerberos_V5_Development
DES implementation goofs (was Re: Prototype hell)
daemon@ATHENA.MIT.EDU (Tom Yu)
Tue Oct 14 02:21:50 1997
Date: Tue, 14 Oct 1997 02:12:13 -0400
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>, "Theodore Y. Ts'o" <tytso@MIT.EDU>,
krbdev@MIT.EDU
From: Tom Yu <tlyu@MIT.EDU>
In-Reply-To: <199710130750.DAA17145@tesla-coil.MIT.EDU>
The krb5 glue to the Ferguson DES library is broken w.r.t. the size of
a "KRB_INT32". Basically it assumes that the elements of the key
schedule are exactly 32 bits * 2 wide. The following patch should fix
it; let me know if it works for you on a Cray. I tested it on an
Alpha by forcing a KRB_INT32 to be a long.
Now, on to fixing type width dependencies elsewhere.... whee!
---Tom
--- des_int.h 1996/06/13 00:13:56 5.39
+++ des_int.h 1997/10/14 06:06:26
@@ -28,6 +28,8 @@
#ifndef DES_INTERNAL_DEFS
#define DES_INTERNAL_DEFS
+#include "des.h"
+
/*
* Begin "mit-des.h"
*/
@@ -46,7 +48,7 @@
/* Key schedule--used internally by DES routines to gain some speed
*/
typedef struct mit_des_ks_struct {
- mit_des_cblock _;
+ KRB_UINT32 _[2];
} mit_des_key_schedule[16];
/* Triple-DES structures */