Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61943 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35707 invoked from network); 1 Aug 2012 20:36:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2012 20:36:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=jbondc@openmv.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jbondc@openmv.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain openmv.com from 64.15.152.204 cause and error) X-PHP-List-Original-Sender: jbondc@openmv.com X-Host-Fingerprint: 64.15.152.204 mail.ca.gdesolutions.com Received: from [64.15.152.204] ([64.15.152.204:63612] helo=mail.ca.gdesolutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/43-32875-86399105 for ; Wed, 01 Aug 2012 16:36:57 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 480FC5DB8; Wed, 1 Aug 2012 16:36:54 -0400 (EDT) X-Virus-Scanned: amavisd-new at gdesolutions.com Received: from mail.ca.gdesolutions.com ([127.0.0.1]) by localhost (mail.ca.gdesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BAjt37-m7gKb; Wed, 1 Aug 2012 16:36:53 -0400 (EDT) Received: from djbondc (modemcable166.116-70-69.static.videotron.ca [69.70.116.166]) by mail.ca.gdesolutions.com (Postfix) with ESMTPSA id 429AD5DB7; Wed, 1 Aug 2012 16:36:53 -0400 (EDT) To: "'Anthony Ferrara'" Cc: References: <4FFF1831.8070902@sugarcrm.com> <005101cd6f18$9da38510$d8ea8f30$@com> <009401cd6f28$b71c69c0$25553d40$@com> <00b701cd6f35$b2d621a0$188264e0$@com> In-Reply-To: Date: Wed, 1 Aug 2012 16:36:57 -0400 Message-ID: <000601cd7025$659fe150$30dfa3f0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac1vOKKSI8ymSmMuTPqm7+0aarzfogA7IGhQ Content-Language: en-ca Subject: RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions From: jbondc@openmv.com ("Jonathan Bond-Caron") On Tue Jul 31 12:21 PM, Anthony Ferrara wrote: > Jonathan, > > > Again, implementing something in the core that's not verified and > can't be implemented well by the vast majority of developers out > there. Alright so I found some people supporting my claims: http://blog.mozilla.org/webappsec/2011/05/10/sha-512-w-per-user-salts-is-not -enough/ http://blog.mozilla.org/webdev/2012/06/08/lets-talk-about-password-storage/ It looks like Mozilla is using what you suggested, to be honest I don't quite understand the difference between: a) password_hash_rfc( hash_hmac('sha-512', 'password', '1024-bytes secret') ); b) password_hash_rfc('password' . '1024-bytes secret' ); It seems to me that (b) would more computationally expensive to break since you have more bytes in a slower algo. Interestingly enough, there was a proposal for MD6 to be a keyed hash (with pepper) http://people.csail.mit.edu/rivest/pubs/RABCx08.pdf (3.5 A keyed hash function) There does seem to be some research on keyed hash functions here (4.2 MAC construction): http://research.microsoft.com/pubs/64588/hash_survey.pdf But this use case has nothing to do with securing passwords SHA1(k||M) I guess my final point is a lot of code out there already do hash passwords with a secret key, it would be nice to have that facility in PHP core.