Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72293 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71710 invoked from network); 5 Feb 2014 20:18:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2014 20:18:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.213.44 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.44 mail-yh0-f44.google.com Received: from [209.85.213.44] ([209.85.213.44:56823] helo=mail-yh0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/96-38005-C8C92F25 for ; Wed, 05 Feb 2014 15:18:20 -0500 Received: by mail-yh0-f44.google.com with SMTP id f73so1017251yha.31 for ; Wed, 05 Feb 2014 12:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=GWXeOxIca6VayhfasDnVxbxZiZ+SOEpECO/WK/FctYM=; b=XpggR8DEnX50P+RZvjL+PreBkNlmO+qNtyUN1i3y7dTrNYWcdDqUskuUYzgqCz+0Jr ZZNfSARy6zwM2VBQ7JiscPFQJXg2S4n8tawkrLIW06KOLDClq80ftGiIiKRHKPFS1Ngn UK6XaCxfW5Ol7I1iPWDZByxd93LhOCH+oDJbM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=GWXeOxIca6VayhfasDnVxbxZiZ+SOEpECO/WK/FctYM=; b=OSLP0AfUP+Ne7FnZEunxQvyKM03zEq8NMWvmdXdK7n6P0E+NptyWJYm28nUtdrWr5v nJGMxUuQTIKNvSUwf+JrcjS+fu7TWkhM9+nxYR5aW6pj/ifDog0vFmhEPgvtgwh1dLhf MfX3uXLdKTFIimZdug+9z0L4Yic19fMEUNF7tZP205ofyLdElswogkP77pxiNJV7jf7u bby7Bj7qe+7RKbo2tTFSFTCH0HbzFk8bpGhR8kQEmI9CWlXm8k7vKvgMbu9H3kjnW0g1 3iF381a5U7PoUX51H2kUxoPETjOYbpwteoRSkP1OIyCzIdUjNjRLGXT+hpg8d3a+WOKT h8mA== X-Gm-Message-State: ALoCoQn6t34fsoHgVBSfO0zT89+crk8tLHIUQPkXlz2QuNg1CyXV5+MMkzIw06HepTNib23wfwBw MIME-Version: 1.0 X-Received: by 10.236.172.33 with SMTP id s21mr3058502yhl.71.1391631498089; Wed, 05 Feb 2014 12:18:18 -0800 (PST) Received: by 10.170.144.85 with HTTP; Wed, 5 Feb 2014 12:18:17 -0800 (PST) Date: Wed, 5 Feb 2014 22:18:17 +0200 Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE] Timing attack safe string comparison function From: narf@devilix.net (Andrey Andreev) Hi, Incidentally, I've been doing some research on this problem, so here's my 2 cents: Why not add a third parameter to specify the minimum length? Something like a time-attack-safe strncmp(). Give that parameter a sane enough value for today and it could be increased in the future without changing APIs and upsetting users. +1 on E_WARNING for non-string input. Cheers, Andrey.