From owner-freebsd-hackers Wed Jul 7 5: 8:15 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from adelphi.physics.adelaide.edu.au (adelphi.physics.adelaide.edu.au [129.127.36.247]) by hub.freebsd.org (Postfix) with ESMTP id 80BB314BB8 for ; Wed, 7 Jul 1999 05:08:11 -0700 (PDT) (envelope-from kkennawa@physics.adelaide.edu.au) Received: from bragg (bragg [129.127.36.34]) by adelphi.physics.adelaide.edu.au (8.8.8/8.8.8/UofA-1.5) with SMTP id VAA19131; Wed, 7 Jul 1999 21:38:07 +0930 (CST) Received: from localhost by bragg; (5.65/1.1.8.2/05Aug95-0227PM) id AA13845; Wed, 7 Jul 1999 21:38:07 +0930 Date: Wed, 7 Jul 1999 21:38:07 +0930 (CST) From: Kris Kennaway X-Sender: kkennawa@bragg To: Peter Wemm Cc: hackers@freebsd.org Subject: Re: Improved libcrypt ready for testing In-Reply-To: <19990706175814.3A9CE78@overcee.netplex.com.au> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 7 Jul 1999, Peter Wemm wrote: > Say... you wouldn't like to impliment an NT-style password hash, would you? This is actually very easy, it turns out - the NT hash is just an MD4 over the unicode version of the password, which is (for the default english locale or whatever you call it), just the ascii character string padded out to be 16-bit little-endian (i.e. alternating the 8bit characters with zero bytes). MS-CHAP then takes this password hash and encrypts it with the challenge which is communicated to the peer, so the password hash is effectively plaintext equivalent for the purpose of the handshake. I'm not sure whether this would help out ppp at all except by breaking out the code into libcrypt(), since you're not authenticating with your local account password, and since PPPD is maintained externally the code would stay there for the general (non-FreeBSD) case. This would make samba account management easier as there's only one password file to keep in sync. Even though MD4 is insecure and therefore makes a bad password hashing algorithm, if you're running samba for the purposes of authenticating a user against an NT domain then you already have a copy of the (samba) password file on-hand so you can just break that one if you're evil. I should have the code ready by tomorrow night. Kris ----- "Never criticize anybody until you have walked a mile in their shoes, because by that time you will be a mile away and have their shoes." -- Unknown To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message