Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83701 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62514 invoked from network); 24 Feb 2015 21:39:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 21:39:45 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.172 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.220.172 mail-vc0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:48760] helo=mail-vc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/F6-24698-0AFECE45 for ; Tue, 24 Feb 2015 16:39:44 -0500 Received: by mail-vc0-f172.google.com with SMTP id kv7so10976304vcb.3 for ; Tue, 24 Feb 2015 13:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=J8pqAvh7ptwN9emXaOEjom7zI5IKLVAibJ8i8VYURh0=; b=Ozu5Yz+iz3HNL/I9290/k+35zcmCf/JeGmWhGM/aQss8IkutEsjcswpdrLaaMHvuQQ OmpWgMuBquY19vZNlgWZLf7DRCGAlwVqji1RkloOSluPE7veAcWCYTHZ+TuybCs4P/h/ 71kvAXcbICeSVGqZPcKnrY+oUa3XFZXDI0SQg3vRim83kZb0Qa8Gr6/FCRP7g1lglw1T 9aspIpfg9waqLUik2YomvBPef8ZFxZMD+4SZq+Nu3C9nOSmNzX8HSIhX3XN2QSPNfB1O BKxY2WzwQZ2uG8z8e+yF9fSNjp595gjJETrgvSorpi0hoyrFjvDTSV5VwgSFB4qQ2CvN d5kg== MIME-Version: 1.0 X-Received: by 10.52.28.19 with SMTP id x19mr17826722vdg.39.1424813981940; Tue, 24 Feb 2015 13:39:41 -0800 (PST) Received: by 10.52.4.104 with HTTP; Tue, 24 Feb 2015 13:39:41 -0800 (PST) In-Reply-To: References: Date: Tue, 24 Feb 2015 21:39:41 +0000 Message-ID: To: Pierre Joye Cc: Anthony Ferrara , Sammy Kaye Powers , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Reliable user-land CSPRNG From: leight@gmail.com (Leigh) On 24 February 2015 at 20:54, Pierre Joye wrote: > On Feb 24, 2015 12:04 PM, "Anthony Ferrara" wrote: >> PERHAPS, it could be written in such a way that a PECL extension can >> alter the RNG to accommodate that usecase. But I'd be wary of that and >> core supporting userland RNGs. > > Yes, driver based. That brings some risk but worth exploring this > possibility. We can make the function a pointer. That's not a problem. The problem is when people assign their own function to this pointer :) > You actually reduce the data set, bytes level or higher, the randomness of > the data is then restricted or limited and sequences may happen, worst case > it could make it less hard (or easier) to predict. I have seen these cases > in a couple of projects which rely heavily on entropy. If you need very high quality and high throughput entropy I can add that to this patch. I left it out for now, because I didn't want this to become over-complicated. If not having an fd-less crypto-quality high throughput is a show stopper for you then let me know, we can fix this.