Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67462 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11103 invoked from network); 23 May 2013 20:31:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2013 20:31:19 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.180 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.180 mail-ob0-f180.google.com Received: from [209.85.214.180] ([209.85.214.180:43553] helo=mail-ob0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/A0-07805-69C7E915 for ; Thu, 23 May 2013 16:31:19 -0400 Received: by mail-ob0-f180.google.com with SMTP id xk17so4462661obc.25 for ; Thu, 23 May 2013 13:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yA+b7lwjCktIydLmmANg3UhsZmDY0qT3D0RtC45XXRg=; b=W33qp+0xxUpYyWeXOr9SCgEgtszSeDBnS19Q5ETsAwtRRCktv3d7Ezzw0/1AT6rWdb PkH9Wi51uf5AI5aqT7DO9m+jSGPNZLTQiTY3bAMsOoPec70ttWUaFpYWb6YM17tu5KLZ OoaPhSvBtjQhwtfoNjJzU0zFjJyRIk9CQIUmsi6iVuY5R3cDX8g+bnAtJEhLrUpos64y vqpBseEKfqc7Ohm98+jCQPQibNIPXulhAxM1YY7+s53X+5U9oQW7+/uFAFRmeRmkXG1m Sr9fWpZrhrqB14FP0NTbdnr4FGmClP5/5atLbNkQ6EbdwVJK1SG7Wu0ViORXek3L0OjS /ojQ== MIME-Version: 1.0 X-Received: by 10.60.99.10 with SMTP id em10mr9527420oeb.58.1369341075546; Thu, 23 May 2013 13:31:15 -0700 (PDT) Received: by 10.182.59.108 with HTTP; Thu, 23 May 2013 13:31:15 -0700 (PDT) Date: Thu, 23 May 2013 22:31:15 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=047d7b33d7586285f404dd689029 Subject: Re: hash_pbkdf2 vs openssl_pbkdf2 From: nikita.ppv@gmail.com (Nikita Popov) --047d7b33d7586285f404dd689029 Content-Type: text/plain; charset=ISO-8859-1 On Sat, May 18, 2013 at 11:48 AM, Nikita Popov wrote: > Hi internals! > > I just noticed that we added the PBKDF2 algorithm two times in PHP 5.5. > Once in the hash extension, once in the OpenSSL extension. > > The hash_pbkdf2 function was added via this RFC: > https://wiki.php.net/rfc/hash_pbkdf2 > > The openssl_pbkdf2 function probably was not noticed at that time because > it was just commited, but not mentioned anywhere else (NEWS, UPGRADING, > etc). Only saw it in vrana's documentation updates just now. The relevant > commit is here: https://github.com/php/php-src/commit/f4847ef > > It would be nice if we could have only one of those functions. I'm > currently tending towards the hash_ variant because of the commit message > of the openssl_ function: > > > No easy way to put these in the hash extension since we don't really > support optional > > parameters to certain algorithms. Implemented in openssl for now since > it has it already > > and is pretty stable. > > > > Only SHA1 is confirmed to work as an algorithm but openssl has a > parameter so it can be > > changed in the future. > > It seems that the author already would have preferred it in the hash > extension and that the openssl variant only works with sha1 (or was only > tested with it? not sure). > > Nikita > No more opinions? It would be nice to have this resolved before 5.5, otherwise there will be no way back. Nikita --047d7b33d7586285f404dd689029--