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

"Martin Thomson" <> Tue, 09 July 2019 06:46 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 871B21201E7 for <>; Mon, 8 Jul 2019 23:46:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.701
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: (amavisd-new); dkim=pass (2048-bit key) header.b=k5iA9cX4; dkim=pass (2048-bit key) header.b=hmlC7u/b
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id E86HaAn8YDzs for <>; Mon, 8 Jul 2019 23:46:27 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 7010D120105 for <>; Mon, 8 Jul 2019 23:46:27 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal []) by mailout.nyi.internal (Postfix) with ESMTP id 902A321947; Tue, 9 Jul 2019 02:46:26 -0400 (EDT)
Received: from imap2 ([]) by compute1.internal (MEProxy); Tue, 09 Jul 2019 02:46:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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=; 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: Webmail Interface
User-Agent: Cyrus-JMAP/3.1.6-731-g19d3b16-fmstable-20190627v1
Mime-Version: 1.0
Message-Id: <>
In-Reply-To: <>
References: <> <> <>
Date: Tue, 09 Jul 2019 16:46:25 +1000
From: "Martin Thomson" <>
To: "Stanislav V. Smyshlyaev" <>, "Salz, Rich" <>
Cc: CFRG <>
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <>
Subject: Re: [Cfrg] RGLC on draft-irtf-cfrg-randomness-improvements-05
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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?

          G'(n) = Expand(Extract(H(Sig(sk, tag1)), G(L)), tag2, n)
          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.