Re: More powerful (and backward compatible) API of random number generator functions

From: Date: Sun, 01 Sep 2013 22:01:18 +0000
Subject: Re: More powerful (and backward compatible) API of random number generator functions
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-68822@lists.php.net to get a copy of this message
On Sun, Sep 1, 2013 at 3:12 PM, Jakub Zelenka <bukka@php.net> wrote: > The whole proposal is a bit confusing for me. The combination of PRNG > algorithm (MT) with libraries (libc, OpenSSL, GMP) that implements one or > more PRNG algorithms just doesn't make sense to me. It doesn't say anything > about the speed and crypto strength of the algorithms. I think that much > better solution would be an extension that implements a couple of > algorithms. Then you could select what algorithm you want to use. The good > idea would be to have some reasonable default algorithm that would be used > if the user doesn't know anything about algorithms. This could be > implemented as an extension and if it's good enough then it could be > proposed as the core addition. Except a few very well known algorithm (MT, SIMD MT and the likes) with well tested implementation, I would not even try to implement anything else on our own, even less for crypto safe algorithms. This is something really hard to implement and I know very little new algorithm or new implementations actually working as expected, and they were done by experts, not people like you and me :) Relying on well tested libraries or devices (harware like those avaiable in the new haswel serie, /dev/*random, etc.) is a much better approach and let us focus on the APIs we will provide in the userland side. Cheers, -- Pierre @pierrejoye | http://www.libgd.org

« previous php.internals (#68822) next »