Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72780 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37888 invoked from network); 24 Feb 2014 04:22:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2014 04:22:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:60553] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/18-57053-319CA035 for ; Sun, 23 Feb 2014 23:22:43 -0500 Received: by mail-la0-f53.google.com with SMTP id e16so4995854lan.12 for ; Sun, 23 Feb 2014 20:22:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=EXEp5utiFJCo6CnGrFf4Tz4TulQUX3i3MS10cVRjXDw=; b=hwy0w0FjTu5OHbsXgkX9qXa03OE0nKhobI009cRpl0t61WHdJ32mq8DsSFpfdPDnpR p9ppoGgbB6e/2pMxD2a/yQjeLJOj76O3LrfwMvmyOGchqPQqxGzeSY0SSnp3nlFQzxsy WpkESFEBU/yRN1hugsupYVdqDIJmVXbEelRbGsMS5ROtNKDaCe5DzRlHepENifLNUBF7 jZOOzVLO8UEWtxeB5ySguJ12CHHhG7/ybl/tc2GBspvcj94s4yG7PRX/5kO76aqhJfMw 8jlB7YcifOvBMle0t7nsGrZtjSW1bWcB4bGTczF+bQiy3cLaM11NLIKONnY6u/yhakB8 sSgQ== X-Received: by 10.112.134.134 with SMTP id pk6mr10096139lbb.85.1393215760359; Sun, 23 Feb 2014 20:22:40 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Sun, 23 Feb 2014 20:22:00 -0800 (PST) In-Reply-To: <8092191F-9B60-43C3-91A8-095FB74C02A5@rouvenwessling.de> References: <9E3AA302-1EC1-4497-996F-716555CAAB64@rouvenwessling.de> <3EAEC401-F0FF-42E6-8B93-41D2E8658A80@rouvenwessling.de> <47C11B57-84E9-4805-9952-1E78A9F112C5@rouvenwessling.de> <8092191F-9B60-43C3-91A8-095FB74C02A5@rouvenwessling.de> Date: Mon, 24 Feb 2014 13:22:00 +0900 X-Google-Sender-Auth: TeHkqIuqDT7ixOkoBy8SDPFK3-M Message-ID: To: =?UTF-8?Q?Rouven_We=C3=9Fling?= Cc: PHP internals , Solar Designer Content-Type: multipart/alternative; boundary=089e01175e7d7de42d04f31f526a Subject: Re: [PHP-DEV] [VOTE] Timing attack safe string comparison function From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e01175e7d7de42d04f31f526a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Rouven, On Mon, Feb 24, 2014 at 6:05 AM, Rouven We=C3=9Fling = wrote: > > I did some experiments. It seems it's good to implement timing safe > comparison in engine. i.e. We can make =3D=3D/=3D=3D=3D secure by default= like > Python. It would be much safer get rid of all timing from PHP. > > > > We need new RFC to include the change in engine. > > > That's not how I read that discussion (though I might have missed a mail)= . > Also personally I don't like it. I don't see that the supposed gain in > security is worth the performance implication. Also if it turns out there= 's > a bug, and we'd have to make it 100 times slower for some reason, than > that's not a big deal for a function like hash_equals. It is however if i= t > affects all comparisons. > > Since I don't believe in that change, I'm not interested in proposing tha= t > RFC. Understood. This is OK. From the experiment, performance implication is not much. Automatic protection in any place would worth the trade off. IMHO. Python even uses less efficient hash for comparison. I heard they use optimized version of SipHash, we may better try it before deciding algorithm, though. Any other comments regarding =3D=3D/=3D=3D=3D timing safety? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e01175e7d7de42d04f31f526a--