Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45950 invoked from network); 22 Jun 2016 13:40:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2016 13:40:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=fsb@thefsb.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=fsb@thefsb.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thefsb.org designates 173.203.187.99 as permitted sender) X-PHP-List-Original-Sender: fsb@thefsb.org X-Host-Fingerprint: 173.203.187.99 smtp99.iad3a.emailsrvr.com Linux 2.6 Received: from [173.203.187.99] ([173.203.187.99:37743] helo=smtp99.iad3a.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/9F-43024-0459A675 for ; Wed, 22 Jun 2016 09:40:16 -0400 Received: from smtp5.relay.iad3a.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp5.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 430D2803FC; Wed, 22 Jun 2016 09:40:14 -0400 (EDT) X-Auth-ID: fsb@thefsb.org Received: by smtp5.relay.iad3a.emailsrvr.com (Authenticated sender: fsb-AT-thefsb.org) with ESMTPSA id 239E380422; Wed, 22 Jun 2016 09:40:14 -0400 (EDT) X-Sender-Id: fsb@thefsb.org Received: from yossy.local (c-66-30-62-12.hsd1.ma.comcast.net [66.30.62.12]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:587 (trex/5.5.4); Wed, 22 Jun 2016 09:40:14 -0400 To: Stanislav Malyshev , internals@lists.php.net References: <2f92fa26-5f50-0e68-c1fc-de79f17c201e@fleshgrinder.com> <8e046aae-b87b-6c6d-da41-986f8ad9aa54@gmail.com> Message-ID: Date: Wed, 22 Jun 2016 09:40:08 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <8e046aae-b87b-6c6d-da41-986f8ad9aa54@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] RNG fixes From: fsb@thefsb.org (Tom Worster) On 6/21/16 2:32 PM, Stanislav Malyshev wrote: > What is for you "obviously faulty stuff" for literally thousands of > people is "code that works". I appreciate that there's a number of new > hip randomness tests that mt_rand may not satisfy As far as I can tell https://gist.github.com/tom--/a12175047578b3ae9ef8 mt_rand() tests just the same as MT19337 and both produce "good quality" random variates. (Btw: there's nothing hip or new about this kind of testing. It's old and boring :p) The issue I have with mt_rand() is speed and memory efficiency, where it is orders of magnitude worse than alternatives. But this won't matter in many uses of mt_rand(). I checked and it doesn't matter in any of the uses in my software. The only argument for removing it that has any legs is: "people use it for security-related unpredictable randoms and PHP should fix that." My judgement is that the real world benefits of doing this don't justify the disruption. Tom