From owner-freebsd-questions@FreeBSD.ORG Sat Apr 16 10:31:48 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B7CB16A4CE for ; Sat, 16 Apr 2005 10:31:48 +0000 (GMT) Received: from smtp11.wanadoo.fr (smtp11.wanadoo.fr [193.252.22.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id B991043D2F for ; Sat, 16 Apr 2005 10:31:47 +0000 (GMT) (envelope-from atkielski.anthony@wanadoo.fr) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1104.wanadoo.fr (SMTP Server) with ESMTP id 4DFF01C000B1 for ; Sat, 16 Apr 2005 12:31:46 +0200 (CEST) Received: from pix.atkielski.com (ASt-Lambert-111-2-1-3.w81-50.abo.wanadoo.fr [81.50.80.3]) by mwinf1104.wanadoo.fr (SMTP Server) with ESMTP id 33BE11C000A9 for ; Sat, 16 Apr 2005 12:31:46 +0200 (CEST) X-ME-UUID: 20050416103146212.33BE11C000A9@mwinf1104.wanadoo.fr Date: Sat, 16 Apr 2005 12:31:45 +0200 From: Anthony Atkielski X-Priority: 3 (Normal) Message-ID: <1197988274.20050416123145@wanadoo.fr> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Encryption of login passwords--where and how is it done? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 10:31:48 -0000 Where's the actual code that accepts the input of a password and/or encrypts it? I looked in login.c, but that only seems to call PAM or something; from that point on, I wasn't sure where to look. I'm especially interested in knowing how a very long password (up to the FreeBSD limit of, I think, 128 characters) is hashed and mashed into an encrypted password, but I'm also generally interested in the whole process. I'd like to think that a 128-byte password consisting of random words and special characters would be just as secure as a shorter, completely random password, but that's only true if FreeBSD is hashing the entire 128-byte string in some cryptographically secure way in order to produce an encrypt password that is a function of every bit of the plaintext password. -- Anthony