Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94399 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55345 invoked from network); 6 Jul 2016 01:52:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2016 01:52:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:57770] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/30-52794-6646C775 for ; Tue, 05 Jul 2016 21:52:40 -0400 Received: (qmail 117686 invoked by uid 89); 6 Jul 2016 01:52:35 -0000 Received: from unknown (HELO mail-qt0-f182.google.com) (yohgaki@ohgaki.net@209.85.216.182) by 0 with ESMTPA; 6 Jul 2016 01:52:35 -0000 Received: by mail-qt0-f182.google.com with SMTP id m2so110286866qtd.1 for ; Tue, 05 Jul 2016 18:52:35 -0700 (PDT) X-Gm-Message-State: ALyK8tKFIUPMPEFRzYoTlUiqF6J8bon8zsNOVGQyhWAHeMZBW1VUsAZJjSxgDgvNREvu4th7y+VeweuLn2tMAA== X-Received: by 10.200.49.50 with SMTP id g47mr32148918qtb.76.1467769947964; Tue, 05 Jul 2016 18:52:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.17.33 with HTTP; Tue, 5 Jul 2016 18:51:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Jul 2016 10:51:48 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Christoph Becker Cc: Leigh , Pierre Joye , Dan Ackroyd , PHP internals , Stanislav Malyshev Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [RFC][VOTE] Session ID without hashing From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Christoph, On Wed, Jul 6, 2016 at 12:37 AM, Christoph Becker wrote: > On 05.07.2016 at 16:32, Leigh wrote: > >> On 5 July 2016 at 04:02, Pierre Joye wrote: >>> We can argue about the provided pnrng being CS but it is not php's job to >>> decide. >> >> I think we need to drop the concerns about exposing "RNG state". >> >> A reminder of what php_random_bytes looks at (in order): >> * CryptGenRandom on Windows >> * arc4random_buf on modern BSD (where ChaCha20 is used) >> * Linux getrandom(2) syscall where available >> * /dev/urandom where available >> * Throws an exception if it cannot access one of the above > > Would that imply that in this latter case sessions couldn't be used > anymore? What would be the fallback in that case? From a quick glance > at the current PR there appears to be none! It relies on php_random_bytes() defined in ext/standard/random.c Current PHP does not build without decent PRNG. The patch uses php_random_bytes() simply. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net