Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92219 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94354 invoked from network); 12 Apr 2016 11:12:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2016 11:12:43 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:36307] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/89-28094-B28DC075 for ; Tue, 12 Apr 2016 07:12:43 -0400 Received: by mail-ob0-f170.google.com with SMTP id j9so9084129obd.3 for ; Tue, 12 Apr 2016 04:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=nbZ9nfdHp2QsNdPZMx4BVqdDQRiy3TnsCHJjJ/0BiNE=; b=rQUPrZVKK2kCCuzEFZ9R67LDDGdDCnD4CXozKaPj6ukFbDKIl7RjnPYMkiS8+yQC0e SUc/nONhMoFddw+hGervm0eajP6NtWVJUkDmwLc99aQV1ms394Ern6vLOY2ACswEgDfR wy+mqtJD8Xz99M/B74g8GDxof5kCwOL3u/0q8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=nbZ9nfdHp2QsNdPZMx4BVqdDQRiy3TnsCHJjJ/0BiNE=; b=NIJvZnOEwGgl8lH5HtkQeVyKUCDViIy9UKqsb7XmXtPjtyXnRBLYpPivXFX4TKDH1H maHuCtUJXHCj3kvL7S/p6EVBGxKYgFR5J0/NiUK5lSrGm1GR7riPjW5kDei8Lrb2nNKR EtukIak+YeaVOp5+6D9bD14nTMV23QIf9Es8Dje4YLUK1Sjhu9oL6+yDYwtT0CleMLKm eJ0m2Ec59Wv82Xg3+wF3akM5IIRh0KCSjovqdmSBaNO7yQP/5xliA+U/oAumRYx93Y3g em4sMrQgTMLI6kdcZfYLacurYEh/+6DoWWXEc9HUSec1xQUWNIXEhyrNhgrxfe9WIC2u jXpA== X-Gm-Message-State: AOPr4FXOcOoGfQ5HGzo95TH6TeeFiSCBDa1uQoSzXMeyDDkdNHRZ6L19uEjgOUcaZCvxftb9p6BmcZFfoM/+cA== MIME-Version: 1.0 X-Received: by 10.60.95.39 with SMTP id dh7mr1135129oeb.41.1460459560682; Tue, 12 Apr 2016 04:12:40 -0700 (PDT) Received: by 10.202.175.87 with HTTP; Tue, 12 Apr 2016 04:12:40 -0700 (PDT) In-Reply-To: References: <5706EEF3.3050705@gmail.com> <570CB007.2080503@php.net> Date: Tue, 12 Apr 2016 14:12:40 +0300 Message-ID: To: Yasuo Ohgaki Cc: Philip Hofstetter , Michael Wallner , Stanislav Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e011760e352e2a0053047bdba Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Session ID without hashing From: narf@devilix.net (Andrey Andreev) --089e011760e352e2a0053047bdba Content-Type: text/plain; charset=UTF-8 Hi, On Tue, Apr 12, 2016 at 2:04 PM, Yasuo Ohgaki wrote: > Hi Philip, > > On Tue, Apr 12, 2016 at 5:38 PM, Philip Hofstetter > wrote: > > On Tue, Apr 12, 2016 at 10:21 AM, Michael Wallner wrote: > >> On 08/04/16 04:17, Yasuo Ohgaki wrote: > >> > >>> PRNG like /dev/urandom is supposed to be secure, but fair point. It > >>> may be good idea keeping old hash based session ID just in case > >>> someone find vulnerability. I suppose it's unlikely with modern PRNGs, > >>> though. > >> > >> I've come to think that "unlikely" is still a bad precondition with > >> regards to security... :) > > > > however, if a vulnerability is found in /dev/urandom, that would be a > > stop-what-you're-doing-and-patch moment anyways because so much stuff > > depends on /dev/(u)random not producing predictable output. > > > > If /dev/urandom is not to be trusted, you have to bring your server > > offline right then. The fact that PHP would continue to produce more > > secure session IDs won't help you much. > > If there is such severe vulnerability, not only session but also many crypt > related features cannot be trusted. > > Anyway, I'll add mitigation that reads random length of bytes from PRNG. > This should be good enough to hide PRNG state. Expert comments on > this is appreciated. > > How are you going to read a *random* length of bytes from the randomness source itself? That's a chicken and egg problem. :) Cheers, Andrey. --089e011760e352e2a0053047bdba--