Re: [Cfrg] Elliptic Curves - poll on specific curve around 256bit work factor (ends on February 23rd)

Michael Hamburg <mike@shiftleft.org> Mon, 23 February 2015 22:26 UTC

Return-Path: <mike@shiftleft.org>
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 141B41A0199 for <cfrg@ietfa.amsl.com>; Mon, 23 Feb 2015 14:26:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 3.455
X-Spam-Level: ***
X-Spam-Status: No, score=3.455 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FH_HOST_EQ_D_D_D_D=0.765, FH_HOST_EQ_D_D_D_DB=0.888, HELO_MISMATCH_ORG=0.611, HOST_MISMATCH_NET=0.311, HTML_MESSAGE=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no
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 SPtQSSkKn9qx for <cfrg@ietfa.amsl.com>; Mon, 23 Feb 2015 14:26:55 -0800 (PST)
Received: from aspartame.shiftleft.org (199-116-74-168-v301.PUBLIC.monkeybrains.net [199.116.74.168]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5A25F1A0143 for <cfrg@irtf.org>; Mon, 23 Feb 2015 14:26:55 -0800 (PST)
Received: from [10.184.148.249] (unknown [209.36.6.242]) by aspartame.shiftleft.org (Postfix) with ESMTPSA id 8E2483AA12; Mon, 23 Feb 2015 14:25:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shiftleft.org; s=sldo; t=1424730307; bh=sYH+WhqvT0D432LHm1v5trkQJ1oHSC0YvfHDKFUriAQ=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=G9fy/1pFvEBZmuff4+MIdjKkrLHx/OKhi4J5qj2kssJKSfMyZWXcQXY5a7BVGL8dj xLH5TvJ1Tca0uF8V9n0r96nIOOjqr00edogETrJ75MUpvwLHMwMCgApK7mM4GfzAIC ymuswPpQoEBzXgXjGIjoYTF5aRZGnlp+6HDmGpjw=
Content-Type: multipart/alternative; boundary="Apple-Mail=_E1D05519-D95D-44BB-B770-FCF2021FFBE0"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
From: Michael Hamburg <mike@shiftleft.org>
In-Reply-To: <CAMm+LwgWP8Hcbu1vSVUVH+80kJZ2OGKHU3qdrpZrp8NiJNX4rw@mail.gmail.com>
Date: Mon, 23 Feb 2015 14:26:51 -0800
Message-Id: <C6A08365-5C07-4874-97C6-DC99664C0E43@shiftleft.org>
References: <54E46EA4.9010002@isode.com> <87bnkl7x0f.fsf@latte.josefsson.org> <CAMm+LwgWP8Hcbu1vSVUVH+80kJZ2OGKHU3qdrpZrp8NiJNX4rw@mail.gmail.com>
To: Phillip Hallam-Baker <phill@hallambaker.com>
X-Mailer: Apple Mail (2.2070.6)
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/V-vqAt0MU0aVzNSwpd0eGO75Yr0>
Cc: Simon Josefsson <simon@josefsson.org>, "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] Elliptic Curves - poll on specific curve around 256bit work factor (ends on February 23rd)
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: Mon, 23 Feb 2015 22:26:57 -0000

Hi Phillip.

> On Feb 23, 2015, at 11:33 AM, Phillip Hallam-Baker <phill@hallambaker.com> wrote:
> 
> Yes, I know there will be error bars on the numbers because the code will run at different speeds on different platforms. But lets face it, modern platforms don't actually vary a whole lot.

This assertion may be true for Sandy Bridge vs Haswell, or even for other 64-bit platforms like Bulldozer, MIPS64, AArch64 etc.  I believe it’s worth noting that there is a large difference between 64-bit, 32-bit with no bignum acceleration, 32-bit with UMAAL but no vector unit, 32-bit with a NEON vector unit, etc.

For this difference, we mostly have conjecture.  As far as I’m aware, Ed448-Goldilocks is the only one of the proposed stronger curves which has been implemented and benchmarked on both ARM32 and AMD64, so we can’t measure how much the architecture influences rankings of curve speed.  This curve was also designed explicitly with 32-bit performance in mind, and it performs very well on NEON.

> A 10% difference in speed might be enough to make an objective choice between Edwards and Montgomery but only experts know the difference between those.
> 
> 
> In short, I want to see the end of this particuar thread:
> 
> http://www.ietf.org/mail-archive/web/cfrg/current/msg05349.html <http://www.ietf.org/mail-archive/web/cfrg/current/msg05349.html>
> 
> At the time the code for E512-569 was actually 15% faster than for E521-1


I believe that the most recent discussion of the performance of strong curves is in this thread:

https://www.ietf.org/mail-archive/web/cfrg/current/msg05733.html <https://www.ietf.org/mail-archive/web/cfrg/current/msg05733.html>

This is for field arithmetic on Haswell, and there are several caveats mentioned in that thread.  Some approximation of relative performance of the whole curve (across implementation tradeoffs, Montgomery vs Edwards, comb size etc) can be obtained by multiplying the M and S times by the number of bits in the field.  See

http://www.ietf.org/mail-archive/web/cfrg/current/msg06084.html <http://www.ietf.org/mail-archive/web/cfrg/current/msg06084.html>

So for EG a 60:40 M:S ratio, normalized to MS NUMS P384, the rough curve timing ratios would be:

384: 1.00
389: 0.93
448: 1.17
480: 1.25
512: 2.21
521: 1.68

Note that the inflection point in performance is likely to occur lower on 32-bit.  In particular, I expect that the 480:448 cycle cost ratio is likely to be in the neighborhood of 1.5:1 on ARM32+NEON instead of 1.07:1.

> If Microsoft care enough about this that they are willing to put in more cycles optimizing open source code for their favored outcome than supporters of E521-1, then I say let them have it.

I don’t think that effort should be the main factor in standards.  But if you think so, would you also support the converse?

Cheers,
— Mike