Re: [Cfrg] 25519 naming

Robert Ransom <rransom.8774@gmail.com> Tue, 02 September 2014 08:28 UTC

Return-Path: <rransom.8774@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 126131A00D6 for <cfrg@ietfa.amsl.com>; Tue, 2 Sep 2014 01:28:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.75
X-Spam-Level:
X-Spam-Status: No, score=-1.75 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, 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 RZS9BRYH1CeF for <cfrg@ietfa.amsl.com>; Tue, 2 Sep 2014 01:28:28 -0700 (PDT)
Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 38BB81A010A for <cfrg@irtf.org>; Tue, 2 Sep 2014 01:28:28 -0700 (PDT)
Received: by mail-qc0-f169.google.com with SMTP id l6so6438796qcy.0 for <cfrg@irtf.org>; Tue, 02 Sep 2014 01:28:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=n+F+1RGwUsY3Mw/jdX0mDW7ydOuqgSY0ua1EbFotee4=; b=rnUtYtbTI1Zjb+RMECdAbWyLPKmuHkUthu3na67dqk672soJQ6sw09/WOb9f/jIy6n gUF3cU7hwl8+ESauD7+GdzmPf+vJ1Z9j/qwv4vfD4cusMXZ9R8H/tr0N0zfnCxoCcM94 KUSS6TO9c7ogATumPSgDApJOkMuZetaLFP36tmKm6sE3ZLDohIFgZa/zdwj9DH9BhaKA uUmbnaOz+g9v7nQlHY3SHO1YjktH35Fm7Sfc1koZy8TKBTypRMhJ4wLIXT0I+8XXrBaX 2cdDcrR8abKixhOkzRCHtUIybhntiVmj+bkH2KO87IjCaSwyQQTQO3xm3YXamrYMEhDr gDOQ==
MIME-Version: 1.0
X-Received: by 10.140.108.68 with SMTP id i62mr49689079qgf.56.1409646506496; Tue, 02 Sep 2014 01:28:26 -0700 (PDT)
Received: by 10.140.51.233 with HTTP; Tue, 2 Sep 2014 01:28:26 -0700 (PDT)
In-Reply-To: <54057D6B.9090405@brainhub.org>
References: <20140825234305.7799.qmail@cr.yp.to> <54057D6B.9090405@brainhub.org>
Date: Tue, 02 Sep 2014 01:28:26 -0700
Message-ID: <CABqy+sraBmpngJu-qkDE0MbS4j8jhQ_qfTO8kaVCwMjq+-1kZg@mail.gmail.com>
From: Robert Ransom <rransom.8774@gmail.com>
To: Andrey Jivsov <crypto@brainhub.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/5uNg4AXO4O78fM61Qb6NsbXPEZ4
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] 25519 naming
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: Tue, 02 Sep 2014 08:28:29 -0000

On 9/2/14, Andrey Jivsov <crypto@brainhub.org> wrote:

> X25519 performs 9 F(p) multiplications and squares per each bit of a
> scalar, for the total of 2295 F(p) operations, not counting additions.
> Plus there are also 265 operation for an inversion.
>
> According to the above, conversion from -1-twisted Edwards coordinates to
> X25519 unfortunately involves a F(p) inversion.
>
>     265/2560 ~= 10%
>
> The problem with fixing canonical coordinates seems to be the 10% penalty in
> conversion from Edwards coordinates to Montgomery due to F(p) inversion.  I
> wonder if it is possible to not perform the inversion by starting with z!=1
> in the Montgomery formula?

That would cost an extra 1M per scalar bit.  1I to rescale the input
point is *always* faster.

> This would give us fixed-base optimization and dual key use that comes with
> Edwards formula and the speed of Montgomery for variable-base ECDH.

A Montgomery-form x coordinate (or its reciprocal) provides that.
That's why I've been arguing for a point format based on the
Montgomery-form x coordinate for so long, even though no one seems to
be listening.


Robert Ransom