Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88864 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94444 invoked from network); 18 Oct 2015 23:18:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2015 23:18:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.176 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.160.176 mail-yk0-f176.google.com Received: from [209.85.160.176] ([209.85.160.176:35314] helo=mail-yk0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/87-06385-9C824265 for ; Sun, 18 Oct 2015 19:18:34 -0400 Received: by ykaz22 with SMTP id z22so125378448yka.2 for ; Sun, 18 Oct 2015 16:18:31 -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=pqFBI8xfbPUCpGTlgCEGNONn0BQXmVuYCHzuG1nNMl0=; b=qaWcm7GHc7YSrJpLUXK0IHdmYEblLwQhtQA44nvy/bOHGArsn26Tm51qBWwwuCMHY3 jA5A+Fhv+J1Ocn0AW9ONmvv+O//wOeMUzh3B3b1bFr7BUUUX/P4aKvlV4zwYsRYqeo3b mI6LmevwKFYQ7ybKqOQ1NaXCFzNz2rwsXYleVnK4antGfkKp79JD2cOAsIhBcWOERCqn wquXzA3Q5m/tO5OeeLhphLYuJTFF9bmZ2YZhVzU8qlg9euxuFKzVqNj/UT1dTgmgq4SY KfI7aikD/wa5beduHyQrpxkV8zLJxqjlBycZnccIBVuKdl9DVmt3e7prHVyYvoX+Hb2f FqNw== MIME-Version: 1.0 X-Received: by 10.129.104.196 with SMTP id d187mr17584821ywc.94.1445210311293; Sun, 18 Oct 2015 16:18:31 -0700 (PDT) Received: by 10.37.209.209 with HTTP; Sun, 18 Oct 2015 16:18:31 -0700 (PDT) In-Reply-To: References: Date: Sun, 18 Oct 2015 19:18:31 -0400 Message-ID: To: Anthony Ferrara Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11490ee23b02550522693fea Subject: Re: [PHP-DEV] Password_hash salt generation refactor From: theanomaly.is@gmail.com (Sherif Ramadan) --001a11490ee23b02550522693fea Content-Type: text/plain; charset=UTF-8 If I'm understanding this correctly, this change doesn't effect actual behavior, right? It's just taking advantage of reusing code for random_bytes / random_int ? If that is true I don't think it much matters whether the change goes through 7.0 or 7.1 since it has no real end-user impact. On Sun, Oct 18, 2015 at 6:59 PM, Anthony Ferrara wrote: > All, > > With PHP 7 comes random_bytes and random_int. This duplicates some of > the logic internally that password_hash uses to generate its salt. > > I would like to refactor this to unify generation. I've opened a PR > against master: https://github.com/php/php-src/pull/1585 > > I don't feel comfortable pulling against 7 this far into RC status. > Perhaps wait until after it goes gold? Or should this target 7.1? It's > not a big deal in either direction. Though it does add a side-effect, > where if it can't gather enough entropy it will throw an exception and > return failure (where prior it would simply make a "best effort". > > Thoughts? > > Anthony > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11490ee23b02550522693fea--