Re: [Cfrg] revised requirements for new curves

Michael Hamburg <> Sun, 14 September 2014 22:59 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 795131A03E4 for <>; Sun, 14 Sep 2014 15:59:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: 2.956
X-Spam-Level: **
X-Spam-Status: No, score=2.956 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, 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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id CZeb-CDiHSri for <>; Sun, 14 Sep 2014 15:59:03 -0700 (PDT)
Received: from ( []) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id C9DC71A03D0 for <>; Sun, 14 Sep 2014 15:59:03 -0700 (PDT)
Received: from [] (unknown []) by (Postfix) with ESMTPSA id A59AC3AA12; Sun, 14 Sep 2014 15:55:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple;; s=sldo; t=1410735341; bh=ryVM8NT/P3Z+Yg5RStyugXJ6m3WQ1FbXAKOXkdiq+fY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=g8HgvihaRFPJUIz/CV4RRs6YyD4CovWXKEyxa9Fjuj4XWgK/mSvaUwbTDH2mColCq M3Fh2prPf5jlFJVXGUf+m9mIAfK/0k1EJXWw1dwQQNUMTbE/YmPzZ9bdT3a1Re0RSk 5gpkI/Li92pUZgYNnUJt0FnOegAqyKh7BLWqi4tE=
Content-Type: multipart/alternative; boundary="Apple-Mail=_D22F7E24-1D25-4F3F-A1F4-CF68187AF6D9"
Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1973.6\))
From: Michael Hamburg <>
In-Reply-To: <>
Date: Sun, 14 Sep 2014 15:59:01 -0700
Message-Id: <>
References: <> <>
To: Phillip Hallam-Baker <>
X-Mailer: Apple Mail (2.1973.6)
Cc: Adam Langley <>, "" <>
Subject: Re: [Cfrg] revised requirements for new curves
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 14 Sep 2014 22:59:05 -0000

> On Sep 14, 2014, at 7:22 AM, Phillip Hallam-Baker <> wrote:
> But if we plot the points on graphs of defender effort vs attacker
> work factor and look at the curves we can probably see quite easily
> what we are buying with the different approaches.

I hacked up some plots for ECDH (protected variable-base scalarmul) on Intel Sandy Bridge and Cortex A8, A9 platforms at <>

Lots of caveats follow!

It’s important to note that the curves aren’t all on equal footing here.  The measurements are from the NUMS paper, the Curve41417 paper, `openssl speed`, the Goldilocks bench utility (on SBR and Tegra 2); curve25519-donna (Curve25519 on Tegra2), SUPERCOP (Curve25519 on other platforms, Goldilocks on A8+NEON).  Of these, SUPERCOP and `openssl speed` almost certainly give less favorable numbers.

I haven’t fully implemented Ed480-Ridinghood.  The point in the graph is an estimate based on the field arithmetic being identical to Ed448-Goldilocks on 64-bit except for the shift amounts.  This is also why it doesn’t appear in the 32-bit numbers: it cannot use the same arithmetic on 32-bit platforms, but instead would take ~50% longer, which is why I didn’t propose it.

Curve25519, Curve41417, Goldilocks, and the MS “mont” curves are performing point (de)compression, but OpenSSL and the NUMS “ed” curves are not.  Point decompression would be about a 10% performance hit, but this hit may be mitigated (for stronger curves) or negated (for weaker ones) by the use of the Montgomery ladder.  Some of the software is also hashing the results and some are not.  (Goldilocks hashes; NUMS do not; I don’t know about the others.)  Goldilocks tests whether points are on the curve or twist while Curve25519 does not, but this test is cheap and adds little security.

The software benchmarked here has different amounts of optimization and is designed for different platforms.  Curve41417 has only been benchmarked on Cortex A8+NEON, and the NUMS curves have only been benchmarked on SBR.

The OpenSSL curves don’t include the latest optimizations, since they’re from 1.0.1 or 1.0.1f, compiled however the OS maintainers decided.

Curve25519-donna is not at all optimized for ARM, but I don’t have any other vectorless ARM numbers to go by, since I couldn’t get Curve25519 working in SUPERCOP on that platform.

I expect that the NUMS curves would perform passably well in scalar code on the Cortex-A9, because UMAAL can help with the carry handling.  But they would be at a disadvantage in NEON, where carry handling is much more expensive.  So I would expect the situation on Tegra 2 (with its fast scalar core but no NEON) to be comparable to that on Sandy Bridge, but on A8+NEON I would expect it to be considerably worse for the NUMS curves.

In the other direction, I expect that the numbers for Curve41417 would be similar on Sandy Bridge to how they are on NEON.  Field arithmetic is probably comparable to Ed448-Goldilocks, just as on NEON, so curve ops should be about 8% faster due to the 8% smaller curve.

I know that variable-base scalar multiplication is not the only benchmark which matters, but it’s consistently available across many curves.

I believe that all of the software contains comparable levels of side-channel protection.

— Mike