Re: Randomize hash-function in php
| From: | Tjerk Anne Meesters | Date: | Sun, 18 Mar 2012 05:56:33 +0000 |
| Subject: | Re: Randomize hash-function in php | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-58993@lists.php.net to get a copy of this message | ||
On Sun, Mar 18, 2012 at 8:12 AM, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
> Obvious solution would be to use a salt for the hash, which prevents blind
> pre-computing of hash collisions. However, due to the fact that PHP hash
> values can be reused in different processes by bytecode caches, implementing
> it properly is not trivial.
What if php uses salts for specific hashes only, such as GPC (or all
hashes whose lifetime is limited to the current reuqest), and use a
zero-value salt for all others?