Re: Password_hash salt generation refactor

From: Date: Mon, 19 Oct 2015 17:00:56 +0000
Subject: Re: Password_hash salt generation refactor
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-88878@lists.php.net to get a copy of this message
On 19 October 2015 at 16:22, Tom Worster <fsb@thefsb.org> wrote: > On 10/18/15 7:39 PM, Ángel González 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 seeded). > 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.

« previous php.internals (#88878) next »