Re: [Cfrg] RGLC on draft-irtf-cfrg-randomness-improvements-05

"Martin Thomson" <mt@lowentropy.net> Tue, 09 July 2019 06:46 UTC

Return-Path: <mt@lowentropy.net>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 871B21201E7 for <cfrg@ietfa.amsl.com>; Mon, 8 Jul 2019 23:46:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=k5iA9cX4; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=hmlC7u/b
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E86HaAn8YDzs for <cfrg@ietfa.amsl.com>; Mon, 8 Jul 2019 23:46:27 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7010D120105 for <cfrg@irtf.org>; Mon, 8 Jul 2019 23:46:27 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 902A321947; Tue, 9 Jul 2019 02:46:26 -0400 (EDT)
Received: from imap2 ([10.202.2.52]) by compute1.internal (MEProxy); Tue, 09 Jul 2019 02:46:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type:content-transfer-encoding; s=fm2; bh=F9 xnZFXbJoYmVzJiy4h4h1I+tXKG5KjP5PdLY7jbEEw=; b=k5iA9cX4JzvD4/5VrH qr85nDvdPiZAcBlyyo/lXBvQdlc64P2OBiSOAQ9eICf+dREWFGAB5RJvcNV8Lt3t S9bK50cQ1MhDKFVogxahA/etok+/FEMqjCPWerDovSsFXIrkUBMVXZVmWzqbQrn9 OoAwQ7Vr5Sn3elbDeSfiWd+L6CjVcP3xoVHYafd8zSfd2boiyINWNwLwA11ptfyn GO8kfe6xne468lPHg1oI8iNsg7RsMNs30rKlTLznXJ61hA1o98awNfbeTY+s69P+ WMOw0FtNabklhS5YZ0DSjb97vUJOxNE+WnELhomX1WkylZuAyYmJR/zrAEkra8nu MPTQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=F9xnZFXbJoYmVzJiy4h4h1I+tXKG5KjP5PdLY7jbE Ew=; b=hmlC7u/bd+VQ2fgRMmUNY3dYJhvDZS55M0jcM7u42hp7VXDBs1/Vz2vTJ hDXobK5ZAlF1kmnFrSHp1dUTW6+KsRjv+pKDTWAEI24RRbalm/hdaRGr10HljGDG 3oqbSkjvVjPGZER5HS819UNjBOxR4Vd/sP1cInvNTQLLpPjks6Giqfz0QxUjpQTf 2JNHBY4lsvGSYI5XfgYor4tSu7Mx4vZTTcR2yDyeN2cexXlwdlqu6E99wmGQzeOj Io0QtXn1t7CnR2NBIgrgdMKsTb2Rx6hMYD5BSNJhyEYCqsMbLtmEqi7f3QS7Tjto o51ltSFZIQ1miFC5i0SwlZJr1/3Pw==
X-ME-Sender: <xms:QjgkXfhkgA13_NyP74cInr8GGNhPQSnXcVaKut2gdSHRbrdSAchI1Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgedugdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfofgr rhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhhofigvnhhtrhhophihrdhnvghtqeenuc frrghrrghmpehmrghilhhfrhhomhepmhhtsehlohifvghnthhrohhphidrnhgvthenucev lhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:QjgkXSBtlRebBvZ2AXXqgtQPQygUC-Asa7qYxuVUV-P-EMuN_Y717A> <xmx:QjgkXcssc9h56SSbH_CtxPqv45ub_Dg3M_Q5_JNUrzEoElF6_BSmrQ> <xmx:QjgkXXa9RiBEJPAX9SEzlKhnZT22sJUmnEuIeOZGa29Z7rXMVLkxSw> <xmx:QjgkXc_3lPX-Tu3QH_nlHqj595tGDk5HGxIsl_BHcLqNlqYaG3BtCg>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 02B7AE0584; Tue, 9 Jul 2019 02:46:25 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.6-731-g19d3b16-fmstable-20190627v1
Mime-Version: 1.0
Message-Id: <5518f189-b680-4e24-99f6-7cd6ae1ad116@www.fastmail.com>
In-Reply-To: <CAMr0u6mV0Zs29tpTZ-KEGi713xDNLiQehVdA53HgOpx4Dbyruw@mail.gmail.com>
References: <3644133e-93c2-e5bf-b39b-04e4423becc5@isode.com> <4fd28f76-0bde-4c91-8ddc-2b3fab0b298e@www.fastmail.com> <CAMr0u6mV0Zs29tpTZ-KEGi713xDNLiQehVdA53HgOpx4Dbyruw@mail.gmail.com>
Date: Tue, 09 Jul 2019 16:46:25 +1000
From: Martin Thomson <mt@lowentropy.net>
To: "Stanislav V. Smyshlyaev" <smyshsv@gmail.com>, "Salz, Rich" <rsalz@akamai.com>
Cc: CFRG <cfrg@irtf.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/eH9QhJiYq_ljJPpxsz-PiHG3zcg>
Subject: Re: [Cfrg] RGLC on draft-irtf-cfrg-randomness-improvements-05
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Jul 2019 06:46:30 -0000

On Tue, Jul 9, 2019, at 15:34, Stanislav V. Smyshlyaev wrote:
> «It must be a secure PRF (for salt as a key) and preserve uniformness 
> of IKM (for details see [SecAnalysis])». 
> It should be sufficient to avoid any confusion and point to the right 
> place as well. 

Would it be better to say "Extract() MUST be a secure PRF for both the salt and IKM inputs and produce a uniform output." ?

A secure PRF for just salt implies that the PRF property doesn't apply to IKM.  But to a degree we are treating both inputs equally here.  If G(L) is non-uniform, we expect to use entropy from Sig(...) to cover any deficit, and vice-versa.

And when you say preserve uniformness, HKDF-Extract won't preserve any non-uniformity of its inputs.  Taking non-uniform input and producing uniform output is one of its main features.  So I don't quite understand the second part of your text as formulated.

That leads me to my next question, which I apologize for missing first time around.  Why do you need to hash the signature?  Is this because you want to make Extract generic rather than rely on HKDF-Extract?

Draft-05:
          G'(n) = Expand(Extract(H(Sig(sk, tag1)), G(L)), tag2, n)
Simplified:
          G'(n) = Expand(Extract(Sig(sk, tag1), G(L)), tag2, n)

It seems - at least for HKDF-Extract or any function that observes the PRF relationship with respect to both inputs - that these are functionally equivalent.  The only difference being that you don't have to define H and people using this technique don't have to run another iteration of the hash function.  Even better, for HKDF-Extract, these are concretely the same unless Sig(...) is <= a single block of the hash function (which is possible, but not guaranteed).

> We'll add this statement after the I-D submission is  open again.

I'd wait until LC ends and batch any changes :)

A new nit: you should probably include the usual RFC 2119/8174 boilerplate.  You use MUST and such.