Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68757 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95786 invoked from network); 30 Aug 2013 19:58:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Aug 2013 19:58:48 -0000 Authentication-Results: pb1.pair.com header.from=php@marc-bennewitz.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@marc-bennewitz.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain marc-bennewitz.de from 80.237.132.171 cause and error) X-PHP-List-Original-Sender: php@marc-bennewitz.de X-Host-Fingerprint: 80.237.132.171 wp164.webpack.hosteurope.de Received: from [80.237.132.171] ([80.237.132.171:40640] helo=wp164.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/5D-32511-779F0225 for ; Fri, 30 Aug 2013 15:58:48 -0400 Received: from dslb-088-072-006-167.pools.arcor-ip.net ([88.72.6.167] helo=[192.168.178.27]); authenticated by wp164.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1VFUqC-0004kD-KU; Fri, 30 Aug 2013 21:58:44 +0200 Message-ID: <5220F973.5000000@marc-bennewitz.de> Date: Fri, 30 Aug 2013 21:58:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: internals@lists.php.net References: <521E64B6.30703@marc-bennewitz.de> <521F37E5.5040203@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;php@marc-bennewitz.de;1377892728;805c25bc; Subject: Re: [PHP-DEV] More powerful (and backward compatible) API of random number generator functions From: php@marc-bennewitz.de (Marc Bennewitz) Am 30.08.2013 04:30, schrieb Yasuo Ohgaki: > On Thu, Aug 29, 2013 at 9:00 PM, Ángel González wrote: > >> Marc Bennewitz wrote: >> >>> Idea for an RFC for a more powerful (and backward compatible) API of >>> random number generator functions. >>> >>> The following psaudocode is self explained (hopfully) >>> >>> const RAND_ALGO_LIBC >>> const RAND_ALGO_MERSENNE_TWISTER >>> const RAND_ALGO_OPENSSL >>> const RAND_ALGO_GMP >>> >> (...) >> >>> What do you think? >>> >> >> Why do you want them? > > > This proposal is good because we need the best random function available in > a system > with easy to use API. I would like to see the best algorithm in a system as > default. > Defining the "best" algorithm as the standard default would be great but what is the best algorithm? Some are fast but less secure and other are more secure but slow. Some times ago i read a feature request to implement the mersenne twister algorithm for rand/shuffle/array_rand but this was closed because it would be a bc break. (can't find it new). Best Regards Marc