From owner-freebsd-questions Thu May 18 18:38:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fremont.bolingbroke.com (adsl-216-102-90-210.dsl.snfc21.pacbell.net [216.102.90.210]) by hub.freebsd.org (Postfix) with ESMTP id 2E43637B91B for ; Thu, 18 May 2000 18:38:52 -0700 (PDT) (envelope-from hacker@bolingbroke.com) Received: from fremont.bolingbroke.com (fremont.bolingbroke.com [216.102.90.210]) by fremont.bolingbroke.com (Pro-8.9.3/Pro-8.9.3) with ESMTP id SAA66555 for ; Thu, 18 May 2000 18:38:51 -0700 (PDT) Date: Thu, 18 May 2000 18:38:51 -0700 (PDT) From: Ken Bolingbroke To: freebsd-questions@FreeBSD.ORG Subject: Re: MD5 --> DES ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 17 May 2000, Ken Bolingbroke wrote: > So my question is, how do I create DES encrypted passwords from Perl? I > tried compiling a new perl binary pointing at libdescrypt, but somehow > crypt() still uses MD5. For the archives, here's what I ended up doing... Made a small test program using crypt() to see what's happening. Compiling with -ldescrypt still makes a binary that uses MD5. A friend, more experienced in these matters than I, rooted around and says: It turns out that when FreeBSD compiles libscrypt and libdescrypt, they use a tricky argument to the linker that causes it to always link with libcrypt instead. So even if you specify libscrypt or libdescrypt on the link line, it gets translated to libcrypt. Is that a bug? In any case, I switched the libcrypt* links to DES, compiled static, then switched the links back to MD5, and now I have what I wanted, the ability to make DES passwords on a MD5 system... Ken Bolingbroke hacker@bolingbroke.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message