Re: [Cfrg] Curve selection revisited

Yoav Nir <ynir.ietf@gmail.com> Fri, 25 July 2014 14:18 UTC

Return-Path: <ynir.ietf@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 159921B28B6 for <cfrg@ietfa.amsl.com>; Fri, 25 Jul 2014 07:18:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 UiZo7Q3ksVZk for <cfrg@ietfa.amsl.com>; Fri, 25 Jul 2014 07:18:14 -0700 (PDT)
Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 589441B2881 for <cfrg@irtf.org>; Fri, 25 Jul 2014 07:18:14 -0700 (PDT)
Received: by mail-wi0-f177.google.com with SMTP id ho1so1079210wib.10 for <cfrg@irtf.org>; Fri, 25 Jul 2014 07:18:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=O4aMIyX4HzWszUiiToavekJaB7nY6Tap25rpMJnxie0=; b=VADED0aABi+GWzfnWrhEBBJLdYwlAy51AmoTw+YTWsTzplhkltI3R/BzkydZ4S0z1/ mJ6emRbLH84OR6Q7yr61iC3sYH0tkbTjH2o97CDusU5FTwRNgPFiziqR2jKtQVqWEzua jtCd9qkUKEIpBn2AI0rMgQb+LO8sU8NYhtoAX8RK1jEfIqjcsuJ0GtBnr1DCfJpcFwCU c5exc0xQeL+ApjG/tIgev0VRmzWGmLN0QkkqhM6PSMzgrEx9Rf+4m/+38ONBLMdrk+M0 i7eb1zu0bNwXGqzZznkdU6+X7Sy5Zn5bsGHVpLoTCEPS7WIXXpz48Ho6+hlleboK9OGA dsRg==
X-Received: by 10.180.188.203 with SMTP id gc11mr5384176wic.59.1406297892721; Fri, 25 Jul 2014 07:18:12 -0700 (PDT)
Received: from wireless-v6.meeting.ietf.org ([2001:67c:370:160:1599:5121:83be:2dc8]) by mx.google.com with ESMTPSA id xn12sm6457933wib.13.2014.07.25.07.18.11 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 07:18:12 -0700 (PDT)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
From: Yoav Nir <ynir.ietf@gmail.com>
In-Reply-To: <CA+Vbu7xroa68=HOZtbf=oz7kK2EeUv_z1okpnjxHPR0ZtHD5cA@mail.gmail.com>
Date: Fri, 25 Jul 2014 10:18:09 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <A60DFCAF-94BD-4E99-A0DB-4076A1911545@gmail.com>
References: <CA+Vbu7xroa68=HOZtbf=oz7kK2EeUv_z1okpnjxHPR0ZtHD5cA@mail.gmail.com>
To: Benjamin Black <b@b3k.us>
X-Mailer: Apple Mail (2.1878.6)
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/soutHtd3IXUJp1qYki5uKQ7OvqE
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] Curve selection revisited
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Jul 2014 14:18:18 -0000

On Jul 25, 2014, at 1:10 AM, Benjamin Black <b@b3k.us> wrote:

> Inspired by some comments from other and in hopes of returning to a more productive debate rather than the pointed back and forth, of which I am absolutely guilty, I'm suggesting a few constraints. These are not priority ordered and none of them deal with the math, instead focusing on process and practice.
> 
> 1) As we are discussing this in the context of TLS, the performance of various kx options must be evaluated for ECDHE as typically deployed. ECDH is neither common nor recommended in the TLS BCP draft. In addition, I hope there will be discussion of benchmarking methodology, with the understanding the ultimate choice is for the CFRG chairs.

The ultimate choice is with the group, with the chairs refereeing. We are also interested in digital signatures, not only key agreement. I agree that we need a benchmark methodology, but before that, we need to agree on selection criteria. There’s no point in testing if the results don’t point you towards a choice. The obvious criterion is speed of operation (for generate, derive, sign, and verify) on one or more platforms (probably need more than one). Another criterion could be memory requirements for the operation (matters for small platforms, but also limits scalability of large servers). Yet another criterion that isn’t measured in a benchmark is complexity, although I don’t think the candidate curves differ on this.

> 2) Performance must be measured using "production-quality" implementations. By this I mean implementations which employ the sort of techniques/optimizations appropriate for large scale deployment. This is specifically intended to exclude discussion of how simple or fast an implementation _could_ be, in favor of what they actually are in practice. However, the goal is to select curves which strike the best balance between various requirements, not simply the fastest.

I think “production-quality” should be simply the kind of code that a vendor or open source project might “ship”. This is not necessarily the fastest. For example, if Microsoft ships this curve in Windows (or Google in Chrome for Windows), they are going to need the code to run on any platform that Windows runs on, from Atom to the latest i7. If the latest i7 has some instructions that make the implementation faster, they are faced with the choice of including multiple implementations, tailored to different chips, or coding for the lowest common denominator. In practice, they will only include multiple implementations if the performance difference is noticeable (no idea what their threshold would be, but for me it would need to be at least 50% before I recommended including multiple implementations). 

So optimizing code for the target processor does not necessarily yield “production quality” code. That said, I don’t really know how we could control for that.

> 3) The timeframe for a decision constrains the scope of this process. If a decision is desired within a few months, then it is difficult to include options beyond new curves. If a decision can take a year, new algorithms could be considered. Given the importance, impact, and contentiousness of new algorithms, I believe it would be difficult to complete a thorough, careful algorithm and curve selection process in a short amount of time.

There’s also the question of (lack of) resources. NIST or the NSA can assign six cryptographers to spend the next year examining curves and algorithms. We are all volunteers, so if we get someone with the cryptographic chops to take several hours from his or her busy schedule to examine and comment on a proposal, or if we get someone with the programming chops to spend a few days implementing and benchmarking, we should consider ourselves lucky.

> 4) The precise set of security levels needed should be specified in advance (whether by TLS or CFRG) and curve recommendations delivered together for all levels. A stated goal is to use these curves in new drafts, and it minimizes work to specify all security levels for a proposal in the same draft. This is strictly a practical matter recognizing the chairs and area directors have limited bandwidth and implementors can get everything done in a single go.

Agree.

> 5) Selections must efficiently support TLS 1.2. Adoption of new curves, and potentially new algorithms, can't be gated on completion and widespread deployment of TLS 1.3.

Agree. It shouldn’t be gated on TLS at all. The same curves will probably be adopted by whoever else uses ECDHE and elliptic curve signatures. So whatever choice is made here will affect IKE, SSH, certificate authorities. There is nothing special about TLS.

> 6) Drop-in replacement for the NIST curves is _not_ a requirement in this process.

Totally agree.

> 7) I don't think the chairs are signing up for a full-on, NIST-style selection competition and we should aim to keep things are lightweight as possible while still achieving the required level of rigor. I hope they will address this point soon.

Agree.

Yoav