Re: [Cfrg] I-D Action: draft-irtf-cfrg-hash-to-curve-08.txt

Christopher Wood <caw@heapingbits.net> Mon, 15 June 2020 19:14 UTC

Return-Path: <caw@heapingbits.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 0D35D3A0A4D for <cfrg@ietfa.amsl.com>; Mon, 15 Jun 2020 12:14:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=heapingbits.net header.b=gHc57Xqw; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=TBhDEfSv
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 sGJJwe2nskY2 for <cfrg@ietfa.amsl.com>; Mon, 15 Jun 2020 12:14:24 -0700 (PDT)
Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 919813A085B for <cfrg@irtf.org>; Mon, 15 Jun 2020 12:14:24 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 946636BD; Mon, 15 Jun 2020 15:14:23 -0400 (EDT)
Received: from imap4 ([10.202.2.54]) by compute1.internal (MEProxy); Mon, 15 Jun 2020 15:14:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heapingbits.net; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm1; bh=CeRQ1ouOlH75ZgC5BthG07KrO2Dj yVmcmHZEmMSh+vU=; b=gHc57Xqwnk1YJAoq6TAPS2+DKuDuRE4KrfDOGhV9ay6O Smh2lKh84KloxerhWX8G+1riBFQl4DDPX6c4GJKQWlQg/RsFe94n/GkT+GExsQMu 3gx7tEwgloRiaT5Swmqnpi8fVB4KpgyuDD/nhfPQL2qYj+xIsd1fbLx+HA5Qe9eo HO1PRxp6M5+SubeSbXgFxtIm1llV0U+/S3nxTaq9RoVlQiWeFkcAMxz2VszKVVC3 abKZIkK0ophJxweJPPVbvV8qc4OKiKqOTCxsi2S1YCDb79e8v68oQVUg1sWl1D/t fuG8NpdnVUdDjBuqdrjWxedOoIpwcF6NMuZQR1B2NQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=CeRQ1o uOlH75ZgC5BthG07KrO2DjyVmcmHZEmMSh+vU=; b=TBhDEfSv8rJaEis3johW9t m90Nv6qEXivIgQ/NFp1iQ0Gx6wvLW7ld4nunUOlEy5fYDVaU4K41f9H4bHQ8riai dBtAjMsCaxnxAOryG3FQ31VRJk65lNi9W7pBGUks9N1hA34resWXpsW5QnHjGvS4 +W3+dt20SvhW7+Vsnrlw3Uz7hpjx5TdXRRevr9m3MTrteGL5JfcJJ9sdGf82pW7t dyWGb6M/As6HkrVoIPxCusbpPZlpD8sZGYTzD7lmqTqQ4Tu2Xzlc2NdrjBeIJ2U+ p2Y7QI851wZBDW9iSqeyUrNunFUpjxdEEBYJ3aahWnvWD/tP6zarUlxJgW+Wgt7w ==
X-ME-Sender: <xms:j8jnXrZ69Z8lUoB7OVkima6839LCWbciaxInjYKaSQ2S9fhsctrcNA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeikedgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfvehh rhhishhtohhphhgvrhcuhghoohgufdcuoegtrgifsehhvggrphhinhhgsghithhsrdhnvg htqeenucggtffrrghtthgvrhhnpeevkeegtdfgtdejhfetieefjefhtdfgudefudefleej uedvjedthfevgfevgfevtdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptggrfieshhgvrghp ihhnghgsihhtshdrnhgvth
X-ME-Proxy: <xmx:j8jnXqbfguPHUcZ_La7AmoW5XndSYDPvXIxgAen1x65uBi-uOHlSZQ> <xmx:j8jnXt-1EIzL_5uRGIyZ2P7RJ_BrY0KoeFiF0X9AIBqE5vsuZfGpxA> <xmx:j8jnXho2-_YIrCUDqgsOEiVdCiovkgsdPkqTEa0No5zH1-Dqz5WP2w> <xmx:j8jnXj1GemjbjLDEKleWNwndN52_B7GuYV5-WgBjkBVjpVd1LZYKQw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id E5B353C00A2; Mon, 15 Jun 2020 15:14:22 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-dev0-529-g3ee424a-fm-20200611.001-g3ee424a1
Mime-Version: 1.0
Message-Id: <73e650cd-d0f6-4986-a646-af35e63d6ed6@www.fastmail.com>
In-Reply-To: <CAMCcN7Qe-Z5+mLiv4iNUzwWzpQ4S3O4QGVO+G7+9QqLGm1iirw@mail.gmail.com>
References: <159105346858.24004.14161783051029023247@ietfa.amsl.com> <ac8f59fe-a82b-4cef-9b05-dd617625df64@www.fastmail.com> <CAMCcN7Qe-Z5+mLiv4iNUzwWzpQ4S3O4QGVO+G7+9QqLGm1iirw@mail.gmail.com>
Date: Mon, 15 Jun 2020 12:14:01 -0700
From: Christopher Wood <caw@heapingbits.net>
To: Marek Jankowski <mjankowski309@gmail.com>
Cc: CFRG <cfrg@irtf.org>
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/E6wrRUKb78uSisIflpG1cgYjPvQ>
Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-hash-to-curve-08.txt
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: Mon, 15 Jun 2020 19:14:26 -0000

Hi Marek,

Thanks for the feedback! Please see inline below.

On Thu, Jun 11, 2020, at 6:08 AM, Marek Jankowski wrote:
> Hi Chris,
> I think this is a great draft - it explains very well hashing to 
> curves, which is vital for many new applications that I hope to see 
> coming, mainly those using pairings.
> The section about domain separation is very important and I'm glad to 
> see it explained explicitly and thoroughly.
> Here are a few suggestions, most of them minor:
> a. I think Table 1 (Sec. 2.1) could be better formatted, using less 
> line breaks. Please consider redistributing the widths of the columns.

I'll see if we can clean this up:

   https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/issues/279

> b. The second paragraph in 2.2.1 can be simplified: it suffices to say 
> it needs not be bijective/surjective/injective. Also I'm not entirely 
> sure it's best practice to use the term 'invertible' for just 
> _efficiently_ reversible functions.

This seems to be the term used in literature. Would you prefer it say, "efficiently reversible" instead of "invertible"?

> c. I think a better formulation in the first paragraph in 2.2.5 is 
> something like "...assuming the attacker accesses RO only through the 
> protocol, viz. the RO is not used elsewhere."
> d. The word 'encode' (Sec. 3) implies that its output can be decoded. 
> Perhaps there's a better word for noninvertible maps.

I'm less certain about this one, as encode is a fundamental concept in the document. I think the text in 2.2.2. makes it clear that some encodings may be invertible, so I'm not sure this is an issue. (I recognize that view may not be universal. :-))

What word would you recommend instead?

> e. Domain separation (Sec. 3.1): I believe that if needed for backwards 
> compatibility, it is not a disaster if we omit the version number from 
> the Tag. Maybe it is worth a "NOT RECOMMENDED".

That's a good point worth considering:

   https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/issues/280

> f. It says that expand_message MUST NOT use rejection sampling (5.3.4). 
> To the best of my understanding, rejection sampling is to be avoided 
> for the sole purpose of mitigating side channel attacks; this is 
> defined (Sec. 4) as a SHOULD, so I believe this SHOULD should (no pun 
> intended :-) propagate there.

Great catch. This is an inconsistency:

   https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/issues/281

> g. Do we really want to approve as many curves as in [Table 2, Sec. 8]? 
> We are standardizing something new here, so we can allow ourselves to 
> stick to just the best curves. In my opinion Curve25519 is in every way 
> superior to the NIST curve of the same strength, so the latter can be 
> omitted.

We want this document to be maximally useful to implementers who may have a need for NIST curves. Omitting them seems like it would defeat the purpose of the document. So, I'm strongly inclined to keep them. 

> Again, I am very supportive of the draft and will be happy to further 
> help in the process.

And we appreciate your help and input -- thanks again!

Best,
Chris