Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75677 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21088 invoked from network); 17 Jul 2014 21:56:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2014 21:56:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.177 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.220.177 mail-vc0-f177.google.com Received: from [209.85.220.177] ([209.85.220.177:38697] helo=mail-vc0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/05-18859-6A648C35 for ; Thu, 17 Jul 2014 17:56:55 -0400 Received: by mail-vc0-f177.google.com with SMTP id hy4so5917640vcb.36 for ; Thu, 17 Jul 2014 14:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VtYzUPLPkHovdfUN6xJQVwMQTWbTDDPFSyOfEBcBGSY=; b=ntPZur9Ogs1MgPOr41PsX3UGCYlqngPHBLXTNZVLxzQSwqBvEqrhetUpEq2LMt3ria Adx5xjwnfkqa3nNaZHiJMCx1FSV5Slux9KE8lzyet7MvL2zgYXYDX5YkWKsmaNOSZOQG ubGqxUaaRMMJE+XIh6K91qAkFZX77JdD+5MHUOlnspFJeSLBEYIGKFtAz1ddvz1TswWJ eXfrh2cAGnjTvq7f8mCLCopeh8Unqz9S95eJecSCz5vnZxzLQiQp9FHsSei58btTd2K4 ILQGEmpZk8SSC2uWrv9c+7NYqWbQpi0YjpJybXSooXEDum4MeX7t1xzh4YPhLbgCthGH YIVg== MIME-Version: 1.0 X-Received: by 10.220.2.136 with SMTP id 8mr139690vcj.17.1405634212336; Thu, 17 Jul 2014 14:56:52 -0700 (PDT) Received: by 10.58.45.137 with HTTP; Thu, 17 Jul 2014 14:56:52 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 Jul 2014 17:56:52 -0400 Message-ID: To: Yasuo Ohgaki Cc: Adam Harvey , Tjerk Meesters , Sara Golemon , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] crypt() BC issue From: ircmaxell@gmail.com (Anthony Ferrara) Yasuo > Anthony, do you have suggestion for removing 72 char restriction of > PASSWORD_BCRYPT? My suggestion is to leave it there (it's no longer bcrypt if you do something to remove it). Here's a deeper explanation: http://stackoverflow.com/a/16597402/338665 Once scrypt (or yescrypt, or whatever comes out of PHC) gets crypt(3) bindings, then we can implement that and pull it into the password API. Until then, implementing anything else is a step backwards (crypt-sha256/512 is weaker than bcrypt, as is PBKDF2+sha512). So since the 72 character restrict has little if any practical effect (see my answer above), it's not worth making a practical weakening (measurably harming everyone) of the overall algorithm for no reason. My assertion is that, for the average developer, they are far more likely to screw something up than actually improve security. The documentation should be updated (and was, but instead of fixing a misleading line, someone simply removed it, making the overall statement more misleading). Could we pre-hash internally ourselves? Sure. But at that point it's no longer bcrypt (but our own hybrid) which was not what we were after. My stance here is that password_hash() should use standard algorithms and formats **only**. The last thing we should be doing is inventing crypto ourselves. Even if it "seems safe". Even if it "seems better". Let's stick with the current implementation, make the "72 character warning" a lot less scary, and move on. Once there are crypt(3) bindings to a more secure algorithm (again, scrypt or yescrypt, or whatever), then move to it.... Anthony