Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42659 invoked from network); 4 Feb 2017 05:49:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2017 05:49:03 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:49114] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/7F-38491-D4B65985 for ; Sat, 04 Feb 2017 00:49:02 -0500 Received: (qmail 101628 invoked by uid 89); 4 Feb 2017 05:48:56 -0000 Received: from unknown (HELO mail-qk0-f181.google.com) (yohgaki@ohgaki.net@209.85.220.181) by 0 with ESMTPA; 4 Feb 2017 05:48:56 -0000 Received: by mail-qk0-f181.google.com with SMTP id u25so11176750qki.2 for ; Fri, 03 Feb 2017 21:48:55 -0800 (PST) X-Gm-Message-State: AMke39nwNrLv/VD6eb2Cd23ep+OtNmOx+bcVmu/S/cRtrL3u2srj8F8iSeuRA/q5pFYtIc5oIHIoYoAV3VNrcQ== X-Received: by 10.55.67.135 with SMTP id q129mr624048qka.98.1486187328913; Fri, 03 Feb 2017 21:48:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.19.232 with HTTP; Fri, 3 Feb 2017 21:48:08 -0800 (PST) In-Reply-To: References: Date: Sat, 4 Feb 2017 14:48:08 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Nikita Popov Cc: Andrey Andreev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1148a27acf48ad0547adf399 Subject: Re: [PHP-DEV] [Discussion] HKDF From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1148a27acf48ad0547adf399 Content-Type: text/plain; charset=UTF-8 On Sat, Feb 4, 2017 at 2:37 PM, Yasuo Ohgaki wrote: > On Sat, Feb 4, 2017 at 8:56 AM, Nikita Popov wrote: > >> You are free to prepare a patch, but your patch will not get merged. >> >> Your blatant disregard of any and all feedback you receive on your >> proposals is beginning to get on my nerves. This has played out again and >> again, most recently in the thread on mt_rand() seeding. Here again, you >> make a suggestion, you get two responses, both telling you that your >> suggestion is not acceptable, and what conclusion do you draw from this? >> Why, of course, let's land it anyway! >> >> If people stop replying to your mails, the reason is not that they have >> been convinced by your arguments. The reason is that they have realized the >> pointlessness of the debate. >> > > This is because there is no logical explanation why against to have salt. > Internet RFC clearly states the benefits. Moreover, it recommends salt > whenever > it is possible by emphasizing improved security by salt. Or am I > misunderstood the RFC? > > There isn't any valid reason to have "salt" parameter as the last optional > parameter so far. > Why it should be the last optional parameter? > BTW, I think the other 2 parameters should be optional. string hash_hkdf(string algo, string ikm [, int length = 0, string info = '', string salt = '']) However, salt must be 1st optional parameter at least. Considering most usage with PHP, it should be required and make it optional explicitly. In addition, I would like to have "info" as the first optional parameter. string hash_hkdf(string algo, string ikm, string salt [, string info = '', int length = 0]) - Set salt to NULL if salt cannot be used, reject null string as invalid. Better security by default is the way to go. IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1148a27acf48ad0547adf399--