diff options
author | nectar <nectar@FreeBSD.org> | 2003-01-29 18:14:29 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-01-29 18:14:29 +0000 |
commit | 637cc179f5d0e82dfd99e85e20f6200d21ad09c9 (patch) | |
tree | 35ede372953bd23d387eaae5364ee7720ca52d47 /crypto/telnet/libtelnet | |
parent | 224d4fa7016e3053b02edc999bef91300ba90811 (diff) | |
download | FreeBSD-src-637cc179f5d0e82dfd99e85e20f6200d21ad09c9.zip FreeBSD-src-637cc179f5d0e82dfd99e85e20f6200d21ad09c9.tar.gz |
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.
Diffstat (limited to 'crypto/telnet/libtelnet')
-rw-r--r-- | crypto/telnet/libtelnet/enc_des.c | 8 | ||||
-rw-r--r-- | crypto/telnet/libtelnet/kerberos.c | 8 |
2 files changed, 2 insertions, 14 deletions
diff --git a/crypto/telnet/libtelnet/enc_des.c b/crypto/telnet/libtelnet/enc_des.c index 5ac693b..cb70b57 100644 --- a/crypto/telnet/libtelnet/enc_des.c +++ b/crypto/telnet/libtelnet/enc_des.c @@ -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 diff --git a/crypto/telnet/libtelnet/kerberos.c b/crypto/telnet/libtelnet/kerberos.c index 39b2dd5..2380c27 100644 --- a/crypto/telnet/libtelnet/kerberos.c +++ b/crypto/telnet/libtelnet/kerberos.c @@ -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)); /* |