Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94379 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60851 invoked from network); 5 Jul 2016 00:36:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jul 2016 00:36:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.161.170 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.161.170 mail-yw0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:35979] helo=mail-yw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/B3-30328-AF00B775 for ; Mon, 04 Jul 2016 20:36:10 -0400 Received: by mail-yw0-f170.google.com with SMTP id b72so50026529ywa.3 for ; Mon, 04 Jul 2016 17:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H3TR/iBkAjOtSji5/KZD7xGzDk2/UPSx9N5DqlvXjxI=; b=PzxA+/MlA+INWLvW/jMEvtjHabI47Hklo/Nlie+aBsW/Jgg359CuUS6GD44CSzqCKX k/4lRofuRmV6JNXBYT8xE+TLyjTJeeDi+jtV0JLjt3Tkk3uZP/fOTsaCWXpo+nGTQyu0 mAcUEaQGKsjcHHZEaBheBZdoP8XLNqc4gEQR3vllgfU2tzA37rKq0PT9ojhRre4j9LU6 l2Ez6vrYR/QbHCOGYxj6NwcXSK2wkJYBZZF4lHaGiERlkIkPwl897/Fi3m54Lcp+0ypZ zMTAkH5U2PzREIl/jPtPRHmkTA1eZmoknYuBV0JZeAzRuqcF0qN6paD3e9+XJUay3uoE tC/Q== 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:from:date :message-id:subject:to:cc; bh=H3TR/iBkAjOtSji5/KZD7xGzDk2/UPSx9N5DqlvXjxI=; b=l8yyda+yEDLw+LuYvWle+dcU8KE9R8ce3Q8oQ38ebEzZK2eTg9VmXHvMGES9Ss+Jvi qAilnVrNQhnfG3/OPopO6cAgpJogXJOj2nAH89OklpyhlsderR7qaa0A7Uq5EWhF38DT ogctOAoFVc7a9sbi/KXn+lr9wQD+VyyhMTYQ0hcaptlCdCcxGUOXZYhPlAL3VP915jLH loUky+/hMTt6ARFde3voSCWCrCZyfhoeVym5Veg8qPibE8Lhgeh+QlqgChXABWlf4eno zCmvBKfGmRw9KDRY/pQ8c6IGJB+Q7u+OeDoZzLcDjx782x9PVbDDb06chGNGbRU3Tztb KSZA== X-Gm-Message-State: ALyK8tLoY8Rq8tVB1OA0BkDv5epemEBj5n2Oiw4QMiwnv0EjHZk8/Hvt2Z9rnwh9QH9V5NARW/UBcfFrTax2wA== X-Received: by 10.129.123.85 with SMTP id w82mr9015978ywc.251.1467678967696; Mon, 04 Jul 2016 17:36:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.207.139 with HTTP; Mon, 4 Jul 2016 17:36:07 -0700 (PDT) X-Originating-IP: [78.145.241.54] In-Reply-To: References: Date: Tue, 5 Jul 2016 01:36:07 +0100 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" , Dan Ackroyd , Stanislav Malyshev Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC][VOTE] Session ID without hashing From: danack@basereality.com (Dan Ackroyd) Hi Yasuo, > Could you share the reason why against this change? The RFC is doing separate things: * Using a proper random number generator - which is probably a good thing, and I probably would vote/support that change by itself. * Removing old stuff for performance reasons - probably a bad thing, as minor performance improvements don't justify changing the ini settings imo. * Slipping in a change to make 'session.use_strict_mode' be enbled by default. I actually agree with this change, but I don't like how it's been combined into an unrelated RFC. * Exposing information that could be useful to an attacker, from the RFC: > If PRNG has vulnerability that generates predictable value, exposing > raw PRNG state helps attackers. Although, this is unlikely with modern PRNGs, but > risk is there. I don't agree that faster session generation is worth exposing the random number generator in a completely known way to the outside world. Reading an extra 60 bytes almost certainly does nothing to mitigate that exposure. > cryptographers recommends > not to reinvent crypt related functions/features. They also recommend reducing your attack surface as much as possible, not opening it up to the point where you're relying on the CSPRNG to work perfectly to avoid having a security hole. But more importantly, as I wrote before (http://news.php.net/php.internals/90940) I don't think the session extension is in a state where incremental improvements are a good way to proceed: > The problem is that you're trying to build on a foundation of sand. > The session handling works but is incredibly fragile. > To me, there are two good ways to proceed: > i) Develop a new session extension, that doesn't depend on magic > behaviour of globals and leave the current session handler as it is. > The new session extension could be shipped as a 'work in progress' when > it's good enough, before PHP 8. Then when it's stable, we could figure > out how to transition users from the old extension. > > ii) Develop a session handler in userland code only. PHP is powerful > enough to support this. Although obviously there are big benefits to > shipping a session handler with PHP, I don't see any need for it to be > done internally other than we don't currently have a way of shipping > userland code with an extension. I'm hoping that before PHP 8, the > ability to ship PHP code as part of extensions would be in place. cheers Dan