Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp527654pxu; Thu, 7 Jan 2021 10:57:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJws4+BGU/6zenY9x5wZEy4gftxhMvvNGf51aDxRKGIAOMJBynI0sSxtEO0urVc2dwYda5mX X-Received: by 2002:a17:906:d10f:: with SMTP id b15mr158480ejz.268.1610045853474; Thu, 07 Jan 2021 10:57:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610045853; cv=none; d=google.com; s=arc-20160816; b=LAMoWJbkORVfNzbC5CHTeoLNgmlBz3cWGWI/iJjgfZwiYVluf+WQMQL9+xaj+rCVpy NnlYzxglUssfGzz++7E9+gS2Ws8gJaIYDBc/nMHc6+Sv2QZxjNuQPTqQrski6H50I6tf q+rRprbcs4b5ljdIrra1x90WZR0BblGzSCH20Zv+NAUs3GjZEtUuOOQQhXakg/AF4cY1 pHTySXdwDe3qB6saMF9H8oJzfELPpQT//Wz9O52AXqnTKn2t1VQ4HPP5GWMGPJc5Ijs3 RDyftIMp94fkJ7cCbwhsV9qXG+/Kmpu5KqPJFqYOk2hZCngd99d7VC2Mpw+M13Cp3qS9 72YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eqFtO9IWL+JP+u724ZVdBiAbcPHIRf+mcyLwNxBQzUA=; b=LvkJcEgdH7d1xwbrl9R5lqPhL8drdxsEbDTdcJM4D5fPH88g02ksxl3G9+Y4p13oJ7 7W2R7PVZOKV7UX/zK5lEa/Irks+8IyeDlJsw0JXm9bgUHKNqA3Ai/JlDUj/Ipnp2vJ1i gZqKnGaWw+wbgg12GNkVv0CJwJK1N/LrTSouMRKamjsG2ufUtOaegS1rhN5DeL9b4iH6 K5uRSB87M+PwRqMIUzo6x+ljk6ygM425amQhmI//e1ZDgrT9V0yEfV79E9/4tUfVvGRL 3gNuUmkW80nDVc2RBHXaeItbgGCWp3jOBuaztYA0mal6n7u1zLpXpytvMpG1+JCOfWvz HEZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AUOnbVER; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si2643143eds.453.2021.01.07.10.57.09; Thu, 07 Jan 2021 10:57:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AUOnbVER; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729190AbhAGSy1 (ORCPT + 99 others); Thu, 7 Jan 2021 13:54:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:39942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727215AbhAGSy0 (ORCPT ); Thu, 7 Jan 2021 13:54:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 027AA23428; Thu, 7 Jan 2021 18:53:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610045626; bh=4NuZzLXjOFpgEN2Yzoo6R/ZAluYF2iO7Vq7NOU6blWM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AUOnbVERVw0fnIdBRyEeLh8o05/CE+wzls6yEWLvcTdqThOngaSEo37qcbAJaMcTa su+PgsAQV5/fazGrQyMDqzt1U1KnSkHfqEIQxeYbyp4gnH/uQ6Y6SVM9iyD51N4Zc6 DlsGN9u2CyHubPSP9MkVivLLCLyv9p81jbZjFhal17I/4OBr1Bf0KOqwrg+8/EGwb3 mY8ES8PayNfYnVgiVnS6SykEesxv1coOSofvpmNoc1rlkVdgXnmorGc8w9lsqqyFcL Y9MrpmXl8bW3SuM+l9AJXWAsyTcJoLI81R9/ATu2WZF4IISLFp11FC276aqiBwzNF8 ZX6q9ad1c4gCQ== Date: Thu, 7 Jan 2021 10:53:42 -0800 From: Eric Biggers To: Stephan Mueller Cc: herbert@gondor.apana.org.au, mathew.j.martineau@linux.intel.com, dhowells@redhat.com, linux-crypto@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org Subject: Re: [PATCH 3/5] crypto: add RFC5869 HKDF Message-ID: References: <4616980.31r3eYUQgx@positron.chronox.de> <12679948.uLZWGnKmhe@positron.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 08:53:15AM +0100, Stephan Mueller wrote: > > > > > RFC5869 > > > allows two optional parameters to be provided to the extract operation: > > > the salt and additional information. Both are to be provided with the > > > seed parameter where the salt is the first entry of the seed parameter > > > and all subsequent entries are handled as additional information. If > > > the caller intends to invoke the HKDF without salt, it has to provide a > > > NULL/0 entry as first entry in seed. > > > > Where does "additional information" for extract come from?? RFC 5869 has: > > > > ????????HKDF-Extract(salt, IKM) -> PRK > > > > ????????Inputs: > > ????????????? salt???? optional salt value (a non-secret random value); > > ?????????????????????? if not provided, it is set to a string of HashLen > > zeros. > > ????????????? IKM????? input keying material > > > > There's no "additional information". > > I used the terminology from SP800-108. I will update the description > accordingly. For HKDF, it would be better to stick to the terminology used in RFC 5869 (https://tools.ietf.org/html/rfc5869), as generally that's what people are most familiar with for HKDF. It also matches the HKDF paper (https://eprint.iacr.org/2010/264.pdf) more closely. - Eric