Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62897 invoked from network); 19 Oct 2015 17:00:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2015 17:00:59 -0000 Authentication-Results: pb1.pair.com header.from=t.carnage@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=t.carnage@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: t.carnage@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:36990] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/11-54881-BC125265 for ; Mon, 19 Oct 2015 13:00:59 -0400 Received: by wicfv8 with SMTP id fv8so15369528wic.0 for ; Mon, 19 Oct 2015 10:00:56 -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=z5biq2fVFX/ISaWB0BdTDcjWFYlLuABAylp45A1FOJw=; b=y+8H8J4hDQAHA4IUGDjkmwjdynEeok/D0TqdfFM2PWNC4Ykdl8W8AOU33bNR6Jbvir FhIe3RYDdJ/vw/vUDaxOwBEruMkorvQyniPh/zSl4LSNpA0nx6PZYGyLFajKls7uTj2a /8W9tzqP9Do24TRj/Uv7PpwfhF0KW+mQX2T2tTNjICbS9MlSwRqAXFjmsHNlgSF6H1wZ 3ZEIsnhPD5pXjHx2erk3nwIk4LydaJQa8o2qAKgP+gG98exWJY/PcbRwlKY0VfsST8pY F2jj3w4Yqc3eXDgJNWLZRs2XZ0u/McQM28EDml7jpr9utVg6X0nvuTg+WW2wBq0GLbJx kvBw== MIME-Version: 1.0 X-Received: by 10.180.210.234 with SMTP id mx10mr22606705wic.31.1445274056234; Mon, 19 Oct 2015 10:00:56 -0700 (PDT) Received: by 10.27.170.143 with HTTP; Mon, 19 Oct 2015 10:00:56 -0700 (PDT) In-Reply-To: <56250A9C.3050304@thefsb.org> References: <56242DC5.7010306@gmail.com> <56250A9C.3050304@thefsb.org> Date: Mon, 19 Oct 2015 18:00:56 +0100 Message-ID: To: Tom Worster Cc: =?UTF-8?B?w4FuZ2VsIEdvbnrDoWxleg==?= , Anthony Ferrara , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c38d20b99c770522781672 Subject: Re: [PHP-DEV] Password_hash salt generation refactor From: t.carnage@gmail.com (Chris Riley) --001a11c38d20b99c770522781672 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 19 October 2015 at 16:22, Tom Worster wrote: > On 10/18/15 7:39 PM, =C3=81ngel Gonz=C3=A1lez wrote: > >> Korvin wrote: >> >>> +1 for 7.0.x security patch release, best effort sounds scary. >>> >> This is a salt. It doesn't need to be cryptographically secure. Using >> php_rand() >> there should pose no problem. >> I would actually include that into the patch (move old lines 154-156 >> into the >> FAILURE if). >> > > A password salt needs to be unique. It does not need to be drawn from a > CSPRNG but that is one of the few ways we can be reasonably confident of > uniqueness (since, as usual, we assume the platform RNG is properly seede= d). > A password salt should not be predictable, allowing a salt to potentially become predictable is a bad idea. Solution is to use a CSPRNG for generation of salts. --001a11c38d20b99c770522781672--