Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72378 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76523 invoked from network); 7 Feb 2014 11:46:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2014 11:46:19 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-qc0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:58811] helo=mail-qc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/E6-34013-A87C4F25 for ; Fri, 07 Feb 2014 06:46:18 -0500 Received: by mail-qc0-f172.google.com with SMTP id c9so5652115qcz.3 for ; Fri, 07 Feb 2014 03:46:15 -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=DuqLXD0s5Xx2sGJnb3huKq2UfcJUjspb9z4CpuUJvwA=; b=N9wvWudRgu4/78P12OdTpRy7KubqoLxZuEpOgD24uZHF5tROZksgIza65SkZ9mZKFC hPAdP/joLZS5vUSiJ9j+IIVYhL89OUnU1oVXA71PfL9gVirdr03s3h2UeSromY5/uEzO vMqHyaqMV3zEPOQNblKsEkwBDICVA+R2tY+7bvzOq1kYDir3Sigfkc7GGtAUJMDgYCzT e5W/XKUn7gahUqucU2jIYnC8nmcIpyX+U8vOYRE4hm626VRqmFXAXv9J6Me1VQ6TxXXn DPHOwW5Z7PEBEpp93ro6gvi7YY/NJ8NzMhYLhp1nHtn2JpnkWYlfZZwZVm4dyzCTuUrQ A/Zg== MIME-Version: 1.0 X-Received: by 10.140.50.131 with SMTP id s3mr19767252qga.12.1391773575836; Fri, 07 Feb 2014 03:46:15 -0800 (PST) Received: by 10.140.18.145 with HTTP; Fri, 7 Feb 2014 03:46:15 -0800 (PST) In-Reply-To: References: Date: Fri, 7 Feb 2014 12:46:15 +0100 Message-ID: To: Tjerk Meesters Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] unify entropy source for all php related functions From: pierre.php@gmail.com (Pierre Joye) On Fri, Feb 7, 2014 at 12:42 PM, Tjerk Meesters wrote: > Here's a wild idea; assuming for a second that `rand()` is actually fed by a > proper entropy source, are there BC implications if we did that? :) > > Alternatively, we would be looking at dedicated `random_` functions that > provide a similar functionality and end up with an API such as: > > int random_integer($min, $max) > string random_string($length, $crypto_safe) > > etc... A good PRNG APIs will provides various weak implementations as well as strong and crypto safe backend. However, I would really try to only focus on the unification for the entropy sources setting. We do not have the time to actually do a good job/discussion/design about what would be a good PNRG APIs and features, for 5.6. Cheers, -- Pierre @pierrejoye | http://www.libgd.org