Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94857 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13420 invoked from network); 5 Aug 2016 14:50:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2016 14:50:08 -0000 Authentication-Results: pb1.pair.com header.from=charlesportwoodii@ethreal.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=charlesportwoodii@ethreal.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ethreal.net designates 209.85.218.48 as permitted sender) X-PHP-List-Original-Sender: charlesportwoodii@ethreal.net X-Host-Fingerprint: 209.85.218.48 mail-oi0-f48.google.com Received: from [209.85.218.48] ([209.85.218.48:36845] helo=mail-oi0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/0C-33134-E97A4A75 for ; Fri, 05 Aug 2016 10:50:08 -0400 Received: by mail-oi0-f48.google.com with SMTP id f189so92212868oig.3 for ; Fri, 05 Aug 2016 07:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ethreal.net; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OnUQKhSUBK0Rbk80zjRSwx3m6Cw0/puu4P6d8hNX1Og=; b=UudHUcHSVPtGYH0VL+8oQzXGaJXkLALP8D/g1DSF9zBH6dS9lLIfSn9AWkaLLko4Fc cLbUUApzHMZxDvC7MuuqLaHrcB/RrS7mZ2uLx5OsJzl55tpWIzPZmZPuaWVTTwdGLwi5 k4hu8lp4WQLUhaWbQxc6ePVxIytoWIuniTchA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erianna.com; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OnUQKhSUBK0Rbk80zjRSwx3m6Cw0/puu4P6d8hNX1Og=; b=gsRlfQaeo/fUoWGmlHjLb65q/zD9WqUnClehbezzOE+HRKjOOQEHW/YaNuoWXg8w2r ezaS8OFYlds3Zd8pfQ89McRxOW1LjIKQQ8mnEnfZvMjJfEkHVVpvXb225SDWsE1Ibdrn LHsZrK0S1SFy0tsxuyYQ6rcfHp9x6tcjgnmSI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OnUQKhSUBK0Rbk80zjRSwx3m6Cw0/puu4P6d8hNX1Og=; b=Dq6tpF+Ci6yEA3LmaAnw/sXBo20VlDZ+seLGJm990vj+31kv/UMML7Ra8oaRlZ6uxl iHrXWwvzYuUX6MUObfR41AOxqnEolDswBPhLGAeXUIJJNMUEGPelyEJ6BHI4t/quEmW0 cPjBOc4RVkF6pCsPAuRKfCApyCWh8jDM0VWTzq1lC2NTj0unuNpM7mpifKU05yXCczW/ GhZN2afdV6dUgKaMKz+064vrTTbsR5N5GaJUprthEUFHf7eva+9WcLOW4NLrzKLO9lzm h7UyGfGyCc2O/OmsnE6LRu8VnSP1lYObcOJ5M4lID6B7z8UDgGuG3+w2I66slbOvmb6f 5bXQ== X-Gm-Message-State: AEkooutvhL7qLD/RFFFSKL3nqa7794JZx1eAQkVQRiSTRR/u93+fvbbSqGw6M5ga5fzBUIxUy32VrVTf2AMjAQ== X-Received: by 10.157.45.80 with SMTP id v74mr8933003ota.181.1470408603722; Fri, 05 Aug 2016 07:50:03 -0700 (PDT) MIME-Version: 1.0 Sender: charlesportwoodii@ethreal.net Received: by 10.182.191.72 with HTTP; Fri, 5 Aug 2016 07:49:43 -0700 (PDT) X-Originating-IP: [38.140.54.114] In-Reply-To: <81b5a129-9c90-0a54-921f-7e1f9b5f727f@thefsb.org> References: <81b5a129-9c90-0a54-921f-7e1f9b5f727f@thefsb.org> Date: Fri, 5 Aug 2016 09:49:43 -0500 X-Google-Sender-Auth: 4hqFVXbviZysmHdftx1V5afQa3k Message-ID: To: Tom Worster Cc: PHP internals Content-Type: multipart/alternative; boundary=001a113adc3e8010080539542e56 Subject: Re: [RFC][DISCUSSION] Argon2 Password Hash From: charlesportwoodii@erianna.com ("Charles R. Portwood II") --001a113adc3e8010080539542e56 Content-Type: text/plain; charset=UTF-8 On Fri, Aug 5, 2016 at 9:19 AM, Tom Worster wrote: > On 8/5/16 8:47 AM, Charles R. Portwood II wrote: > > The RFC is available at: https://wiki.php.net/rfc/argon2_password_hash >> >> . >> > > Hi Charles, > > Thanks for doing this. I'm glad Argon2 is coming to PHP. > Hi Tom, Thanks for the feedback! You can have a longer voting period if you like, which I think would be > a good idea. Sounds good to me. I think it's confusing to have two consts to identify the algorithm. I > don't understand the analogy to PASSWORD_DEFAULT. If we only provide > Argon2i, one const is easier. If we anticipate adding another Argon2 > algo in the future that is not backward compatible with this one then I > don't think we would want to change PASSWORD_ARGON2 to point to it. I agree. Originally there was PASSWORD_ARGON2I and PASSWORD_ARGON2D, with PASSWORD_ARGON2 aliasing to PASSWORD_ARGON2I, but with Argon2d removed from scope the extra constant is now largely unnecessary. I don't anticipate Argon2 adding any additional algorithms at this point, given the spec and reference library is finalized. I think for clarity, PASSWORD_ARGON2I would be sufficient. What are your thoughts? Finally, I wonder if it wouldn't be better if, for the time being, we > do not provide default costs constants. Argon2 is new (as crypto algos > go) and very early in a gradual introduction in deployments. And it is > hard to use because of the three cost factors. Correctly tuning those > for different machines is not yet a commonly-understood skill. (You > even can find conflicting advice on how to tune Bcrypt's time factor.) > If, on the other hand, we omit the constants and require the $options > argument then it discourages inexpert users. At the same time it > encourages experimentation and understanding of the costs, among those > who take an interest, which I think is just what we want. The rationale for providing defaults is to ensure the password_* functions remain easy to use. Assuming that at some point PASSWORD_ARGON2I (or any new algorithm) would become PASSWORD_DEFAULT, the end user's expectations would be that *password_hash($password, PASSWORD_DEFAULT)* just works, without needing to specify additional arguments. As the spec requires some minimum values to even work (and there's recommendations from the developers [1]), I think we should be providing defaults so that the algorithm works out of the box, though I agree they could be set to lower values. Note that the spec does specifically say that there is no "insecure" value for the memory and time cost attributes. If we wanted to drop it to the minimum recommend by the developers, the values would be: m_cost = 16 t_cost = 2 threads = 1 I'm open to other suggestions or alternatives though. Thanks, *Charles R. Portwood II* [1]: https://github.com/P-H-C/phc-winner-argon2/issues/144 --001a113adc3e8010080539542e56--