Re: [Cfrg] Curve manipulation, revisited

Adam Langley <agl@imperialviolet.org> Mon, 29 December 2014 13:31 UTC

Return-Path: <alangley@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 8301B1A1AA0 for <cfrg@ietfa.amsl.com>; Mon, 29 Dec 2014 05:31:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=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 5tXRqWGCoyR0 for <cfrg@ietfa.amsl.com>; Mon, 29 Dec 2014 05:31:16 -0800 (PST)
Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A19041A1AA2 for <cfrg@irtf.org>; Mon, 29 Dec 2014 05:31:15 -0800 (PST)
Received: by mail-lb0-f180.google.com with SMTP id l4so10764403lbv.25 for <cfrg@irtf.org>; Mon, 29 Dec 2014 05:31:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=u+Bd4bDEujggBfspOEUCc/HsnbbbwK5Y7BW76Ftn5a0=; b=s1Ech3A6l5JF3qwaYmQMFQxXTHWMDLughBkOnvu/iRQzbJTnmwe9CcLJ0QpG2YYbv9 hfFP+oozXdh1tVQnaR0gMUmvgjBjcfjv3wzT7LTyjGYnxBbFWsaQxWEpYJOBb/+JuQJ/ sRAcFwkRiXWoSA6uOWZ87PIpNtfGsAqFBxPAetL0aiTlYrgV5SGxtW8Ye7YS0/J/DaXj aW7FSDiAhk66Uu6bfYcv3g5dOtjU5hkbyMI7wCiA9uVjv6+rdrcGXCkcQUNWGCrEfJLX 9fdj0Qv+gTRLecm1mmksahj3w9vNjQ5T3QixXSYQ+CY3/pnljsM2glhDrwcMIAEZuXxS +JQA==
MIME-Version: 1.0
X-Received: by 10.153.5.1 with SMTP id ci1mr50449304lad.67.1419859873990; Mon, 29 Dec 2014 05:31:13 -0800 (PST)
Sender: alangley@gmail.com
Received: by 10.112.114.225 with HTTP; Mon, 29 Dec 2014 05:31:13 -0800 (PST)
In-Reply-To: <CA+Vbu7zqFcu8d1053mZ_eEm0q=np6T3snSQ4rfY0k1-4hBVDsA@mail.gmail.com>
References: <CAMfhd9W684XMmXn3ueDmwrsQ_ZdiFG+VqYLxkvs7qDwiJdpk6w@mail.gmail.com> <1725646678.805875.1419539885135.JavaMail.yahoo@jws100115.mail.ne1.yahoo.com> <CAMfhd9Ua5fFZk46Xx1AN2VgyJ=Yng6fnO8aN-_ZfzXQn0Xbxhg@mail.gmail.com> <CA+Vbu7zqFcu8d1053mZ_eEm0q=np6T3snSQ4rfY0k1-4hBVDsA@mail.gmail.com>
Date: Mon, 29 Dec 2014 13:31:13 +0000
X-Google-Sender-Auth: KpVj4JUFQJKadvD77mpn8-W5Ha0
Message-ID: <CAMfhd9XEqMwFzJ4sK4aHGbke6REZb26uaEEv9gbM5v_goDzwUA@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
To: Benjamin Black <b@b3k.us>
Content-Type: text/plain; charset=UTF-8
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/9kJIhPl0R00X808pnfe8Ydkk3y8
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] Curve manipulation, 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: Mon, 29 Dec 2014 13:31:17 -0000

On Mon, Dec 29, 2014 at 7:57 AM, Benjamin Black <b@b3k.us>; wrote:
> It seems performance is the real priority here and you will happily discard
> things you insist are necessary for security when they conflict with
> performance. At the 128-bit security level the ladder can be faster. At the
> 200-bit+ security levels the ladder is slower. Should we blame the
> implementor who elects not to use a single-coordinate ladder? Should we
> wonder why you would choose not to eliminate these security failures?

Montgomery ladders allow for very simple, robust implementations of
scalar-mult. Sometimes an implementation might want to trade off cache
pressure for speed, but certainly not all will. If we accept that
supporting Montgomery ladders is a requirement, then we can easily
meet that by sending the Montgomery-x value in ECDH protocols because
windowed methods can easily output this. Thus these are not in
conflict.

(An implementation that wants to use a windowed method with a
Montgomery-X *input* will need to perform a square-root first, but
that's the same cost as a design where compressed Edwards points are
sent. Note: smarter people than I might be able to eliminate the
square-root but I don't see it)

> This section of your paper raises another interesting point. It seems a
> slight performance drop in exchange for consuming less SRAM can be a
> desirable property to you. In Adam's Faster Curve25519 post
> (https://www.imperialviolet.org/2013/05/10/fastercurve25519.html), he
> achieves significant performance improvements at a cost of 24KB of cache for
> tables.

Keep in mind that this was mostly the result of me needing to explain
windowed methods to someone. The practical benefit to ECDH systems is
minimal since the base-point multiplication can be amortised. (Fast
signatures, however, obviously can benefit, but there's no danger of
an invalid-curve attack when multiplying by the base point.)

> I'm not sure what point you are trying to make here. The people who haven't
> submitted curves should remain silent? That is antithetical to the IETF
> process.

I think Tanja is commenting on the fact that the IETF process is alien
to most cryptographers. Cryptographers often run competitions (e.g.
the AES and SHA-3 competitions) where teams submit candidates and a
winner is decided. That's very different to the more "collaborative"
method common at the IETF.


Cheers

AGL