+Wed Mar 15 13:44:23 1995 Keith Vetter (keithv@fusion.com)
+
+ * des.h: now includes des_int.h for proper prototypes.
+ * enc_dec.c: cast the types of the input/output buffers in calling
+ the encrypt routine.
+ * key_sched.c: removed prototype of a non-existent routine.
+ * new_rnd_key.c: removed prototypes in the file and instead include
+ header file with the real prototypes.
+ * random_key.c: code, as it was, could never have worked. Adding
+ prototypes revealed that it was passing KEY with the wrong level
+ of indirection.
+
Tue Mar 7 19:57:28 1995 Keith Vetter (keithv@fusion.com)
* pcbc_enc.c: added casts on the long->char assignments.
* str_to_key.c: converted int->long to match types.
- * read_passwd.c: converted int->long.
+
Wed Mar 8 17:13:44 1995 Theodore Y. Ts'o <tytso@dcl>
#define DES_DEFS
#include "k5-int.h"
+#include "des_int.h"
typedef mit_des_cblock des_cblock; /* crypto-block size */
krb5_octet *iv; /* 8 bytes of ivec */
int encrypt; /* 0 ==> decrypt, else encrypt */
{
- return(mit_des_cbc_encrypt(in,out,length,key,iv,encrypt));
+ return (mit_des_cbc_encrypt((const des_cblock *) in,
+ (des_cblock *) out,
+ length, key, iv, encrypt));
}
#include <stdio.h>
#include "des.h"
-typedef char key[64];
-
-/* the following are really void but cc86 doesnt allow it */
-static void make_key_sched PROTOTYPE((key, mit_des_key_schedule));
-
int INTERFACE
des_key_sched(k,schedule)
register mit_des_cblock k; /* r11 */
#include "des.h"
-extern int INTERFACE mit_des_init_random_number_generator();
-extern void INTERFACE mit_des_set_random_generator_seed();
-extern void INTERFACE mit_des_set_sequence_number();
-extern void INTERFACE mit_des_generate_random_block();
-extern int INTERFACE mit_des_new_random_key();
-
-
-void INTERFACE des_set_random_generator_seed();
-void INTERFACE des_set_sequence_number();
-void INTERFACE des_generate_random_block();
-
/*
* The secret des key schedule and sequence number for the current
* stream of random numbers
mit_des_cblock nullkey;
memset(nullkey, 0, sizeof(mit_des_cblock));
- mit_des_fixup_key_parity(key);
+ mit_des_fixup_key_parity(*key);
mit_des_init_random_number_generator(nullkey,&p_seed);
do {
- mit_des_generate_random_block(key, &p_seed);
- mit_des_fixup_key_parity(key);
- } while (mit_des_is_weak_key(key));
+ mit_des_generate_random_block(*key, &p_seed);
+ mit_des_fixup_key_parity(*key);
+ } while (mit_des_is_weak_key(*key));
return(0);
}