Background:

When libdes was replaced with OpenSSL's libcrypto, there were a few
 interfaces that the former implemented but the latter did not.  Because
 some software in the base system still depended upon these interfaces,
 we simply included them in our libcrypto (rnd_keys.c).

Now, finally get around to removing the dependencies on these
interfaces.  There were basically two cases:

  des_new_random_key -- This is just a wrapper for des_random_key, and
     these calls were replaced.

  des_init_random_number_generator et. al. -- A few functions were used
     by the application to seed libdes's PRNG.  These are not necessary
     when using libcrypto, as OpenSSL internally seeds the PRNG from
     /dev/random.  These calls were simply removed.

Again, some of the Kerberos 4 files have been taken off the vendor
branch.  I do not expect there to be future imports of KTH Kerberos 4.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@110049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
nectar 2003-01-29 18:14:29 +00:00
parent ea4f5f77e7
commit a6a592c797
2 changed files with 2 additions and 14 deletions

View File

@ -54,7 +54,6 @@ static const char sccsid[] = "@(#)enc_des.c 8.3 (Berkeley) 5/30/95";
#include "misc-proto.h"
extern int encrypt_debug_mode;
void des_set_random_generator_seed(des_cblock *); /* XXX */
#define CFB 0
#define OFB 1
@ -75,7 +74,6 @@ struct fb {
int need_start;
int state[2];
int keyid[2];
int once;
struct stinfo {
Block str_output;
Block str_feed;
@ -211,7 +209,7 @@ fb64_start(struct fb *fbp, int dir, int server __unused)
/*
* Create a random feed and send it over.
*/
des_new_random_key((Block *)fbp->temp_feed);
des_random_key((Block *)fbp->temp_feed);
des_ecb_encrypt((Block *)fbp->temp_feed, (Block *)fbp->temp_feed,
fbp->krbdes_sched, 1);
p = fbp->fb_feed + 3;
@ -397,10 +395,6 @@ fb64_session(Session_Key *key, int server, struct fb *fbp)
fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_ENCRYPT-1]);
fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_DECRYPT-1]);
if (fbp->once == 0) {
des_set_random_generator_seed((Block *)fbp->krbdes_key);
fbp->once = 1;
}
des_key_sched((Block *)fbp->krbdes_key, fbp->krbdes_sched);
/*
* Now look to see if krbdes_start() was was waiting for

View File

@ -207,8 +207,7 @@ kerberos4_send(Authenticator *ap)
register int i;
des_key_sched(&cred.session, sched);
des_init_random_number_generator(&cred.session);
des_new_random_key(&session_key);
des_random_key(&session_key);
des_ecb_encrypt(&session_key, &session_key, sched, 0);
des_ecb_encrypt(&session_key, &challenge, sched, 0);
/*
@ -299,11 +298,6 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
break;
}
/*
* Initialize the random number generator since it's
* used later on by the encryption routine.
*/
des_init_random_number_generator(&session_key);
des_key_sched(&session_key, sched);
memmove((void *)datablock, (void *)data, sizeof(Block));
/*