From owner-freebsd-current Wed May 28 05:53:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id FAA09774 for current-outgoing; Wed, 28 May 1997 05:53:27 -0700 (PDT) Received: (from wpaul@localhost) by hub.freebsd.org (8.8.5/8.8.5) id FAA09706; Wed, 28 May 1997 05:50:24 -0700 (PDT) From: Bill Paul Message-Id: <199705281250.FAA09706@hub.freebsd.org> Subject: Re: Duplicate DES code in libc/rpc and secure/lib/des To: ache@nagual.pp.ru (=?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?=) Date: Wed, 28 May 1997 05:50:24 -0700 (PDT) Cc: current@freebsd.org, markm@freebsd.org In-Reply-To: from "=?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?=" at May 28, 97 02:10:11 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I found the same DES code in des/rpc_* files and rpc/des_* files and > have two questions: > > 1) What about export restrictions (rpc/des* affected), is situation > changed? There isn't actually any DES crypto code in src/lib/libc/rpc. The way I set it up, the core _des_crypt() function makes an RPC call to the local keyserv(8) process to do all the crypting/decrypting. If you actually have /usr/lib/libdes.so.3.x installed when you start keyserv, then it will dlopen() libdes and use the _des_crypt() routine in there, giving you correct DES operation. If you _don't_ have libdes.so, then keyserv falls back to using RC4 encryption with a 40 bit key. > 2) Do we really need to duplicate the same code in several places? > I think that secure/lib/des/rpc_* files should be removed. Er... by secure/lib/des, I'm assuming you mean secure/lib/libdes, correct? If so, please tell me exactly which files contain duplicated code. Eric Young's libdes has a _des_crypt() routine specially written to accomodate Secure RPC, but it shouldn't contain anything in common with the actual RPC library (other than maybe a header that describes the structure that the RPc code passws to _des_crypt(). -Bill