Re: [Cfrg] draft-black-rpgecc-00-.txt [was: Consensus and a way forward]

Adam Langley <agl@imperialviolet.org> Thu, 27 November 2014 07:22 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 CBA701A0073 for <cfrg@ietfa.amsl.com>; Wed, 26 Nov 2014 23:22:37 -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 tydy1pUdMeQa for <cfrg@ietfa.amsl.com>; Wed, 26 Nov 2014 23:22:36 -0800 (PST)
Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 090D71A8030 for <cfrg@irtf.org>; Wed, 26 Nov 2014 23:22:36 -0800 (PST)
Received: by mail-la0-f42.google.com with SMTP id s18so3756974lam.29 for <cfrg@irtf.org>; Wed, 26 Nov 2014 23:22:34 -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=Dqf0eYLxsWb0aYCb75FxsYJoJO9e6fRynt+XfZupeyU=; b=oKykTm/sVTkHY9ZBN4aKUFEeJBaO6uqtAKTiUD7HIYovKErtsLHJpA0uFcJUADuUz8 r7l5YL3khZ85vn7nsAvFLwim0uWMPAAVBatjqS5fAmGfuX3W3YZLpY7uJQWxyj4fHYO+ ELgx83VlBWAM+vTCn13+YHSp85lep4VgnnBCjrJT6obKfNePHKxR6T8VbicFrdX92o/t fie5Is1HMHRBZBS86ICBddkcIUGFvT97Uv9onpU3ixf8Oe/hqdQpmBY+EaVf+Kw8xSnw ScK8OkQmrtGAZdtVjel7r3g28rprRs/l5N/+MuCbv9sxVp0RoHKPNZU+ZfBjJJMUDfNW XE0w==
MIME-Version: 1.0
X-Received: by 10.112.63.133 with SMTP id g5mr37542342lbs.33.1417072954297; Wed, 26 Nov 2014 23:22:34 -0800 (PST)
Sender: alangley@gmail.com
Received: by 10.112.241.103 with HTTP; Wed, 26 Nov 2014 23:22:34 -0800 (PST)
In-Reply-To: <5476CB73.7090206@akr.io>
References: <CA+Vbu7xvvfRWyqyE9sqU7VbjzNQZp+DwRWjaV3Lw0hjLr8ye1A@mail.gmail.com> <5476CB73.7090206@akr.io>
Date: Wed, 26 Nov 2014 23:22:34 -0800
X-Google-Sender-Auth: kqpSGgIqcheoCa4f41GEgu3FKbE
Message-ID: <CAMfhd9XxkZsVPMcevWOgvvqbBK0JqLVCGBYfwWu0QFO5rsfbJQ@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
To: Alyssa Rowan <akr@akr.io>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/YO2H7ob_BtfqlQOsLujkNqCjh98
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] draft-black-rpgecc-00-.txt [was: Consensus and a way forward]
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: Thu, 27 Nov 2014 07:22:38 -0000

On Wed, Nov 26, 2014 at 10:57 PM, Alyssa Rowan <akr@akr.io> wrote:
> In order to evaluate the performance of simple and secure
> implementations of algorithms over these curves, of course we are also
> going to need safe, efficient implementations for those algorithms,
> ideally available under a liberal licence so stakeholders can actually
> use it (specifically I'm afraid Apache 2.0 won't do due to its licence
> incompatibilities), which also satisfy our patent concerns. Do you
> have such an implementation ready to publish that we can plug into
> SUPERCOP?

For the curve over GF(2^255-19), I certainly agree that
implementations are needed but I believe that there's strong evidence
that the performance would be equal to curve25519.

The Edwards curve in question is isogenous to Curve25519 with A=358990
and, while some uses may want to drop the new curves into existing
code, I hope that this RG can recommend that ECDH operations for the
most part transmit the Montgomery X value. Thus curve25519
implementations should just need to change the (A-2)/4 value.

For implementations of the Edwards curve, the smaller d value, if
anything, might allow a slight speedup over Edwards curve25519.
(Although those implementations would need changes to the scalar
reduction function and any precomputed tables.)

> I note that if you run your algorithm on 2^521-1 you get E-521. If you
> ran it on 2^255-19, why didn't you get the twisted Edwards form of
> Curve25519? Kindly elucidate your objections to the same.

As djb noted in the curve25519 paper[1], the A value for curve25519 is
not minimal. draft-black-rpgecc-00 finds a curve isogenous to the
minimal A. The minimal (and second minimal) value was originally
rejected because, when generating private keys, there's a possibility
of generating a multiple of the order. This can be taken care of with
(I think) a single memcmp, although I need to confirm that just one is
sufficient when I'm back home.

[1] http://cr.yp.to/ecdh/curve25519-20060209.pdf, section "Why this curve?".


Cheers

AGL