Re: [Cfrg] New names for draft-ladd-safecurves

Watson Ladd <watsonbladd@gmail.com> Tue, 21 January 2014 04:36 UTC

Return-Path: <watsonbladd@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 DDE0C1A002F for <cfrg@ietfa.amsl.com>; Mon, 20 Jan 2014 20:36:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 JxGHE3lHEddy for <cfrg@ietfa.amsl.com>; Mon, 20 Jan 2014 20:36:56 -0800 (PST)
Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) by ietfa.amsl.com (Postfix) with ESMTP id 0C9551A002A for <cfrg@irtf.org>; Mon, 20 Jan 2014 20:36:55 -0800 (PST)
Received: by mail-wi0-f177.google.com with SMTP id m19so1604051wiv.10 for <cfrg@irtf.org>; Mon, 20 Jan 2014 20:36:55 -0800 (PST)
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=/HjSjDgOhAMlgwyhzddcrB6PbTpRN5g6PRZ+zdtdamw=; b=tPH4vFiLqJxQS4sZuMs05js2VC4JrYb4hpVUlJ7p7CBzCOoHFgnqL7PlVLtc9bJNrZ mKx4qJDB5Rd06C/p6hcuCOHacnQVkhCmOu/NJDduP8MFTfAuLWmc1kDwYvMo2+dZKdBs SXjQ8SN2TIj5cWAWdXrsjLSJtxjYHHMwHaiTMMKiXAeXDEAYgqMdbF4/tlVTPpMaSA36 LhurjmbvRbL8bsnCQ9o14x6WurUBAS8ecULL++7PlKGES3cRp9mmuOr4nBJbfhzmE5Yk 3laaYHZg7BRwOuNQ640KGJ4ONZ7MlCcIao2uP1kK71Er72vR84yLu194i61S0rsi+xj3 49YA==
MIME-Version: 1.0
X-Received: by 10.194.92.68 with SMTP id ck4mr245694wjb.53.1390279015568; Mon, 20 Jan 2014 20:36:55 -0800 (PST)
Received: by 10.194.250.101 with HTTP; Mon, 20 Jan 2014 20:36:55 -0800 (PST)
In-Reply-To: <CABqy+sr1zc-T-F3D_VOoz2B9GNZPsAxi=HeMoe=DwG5EJq8AuA@mail.gmail.com>
References: <CACsn0ck02mnETBUfuyJjLV9K8Yuiki8_-RG0tVszL8BDhkK27w@mail.gmail.com> <6489F7D3-BF54-416F-94BE-64FD1CFCCB1E@callas.org> <CACsn0cn0938BHMs7uFJYeB_q2VcGQULcF8fzc7KR67A_+mqzLw@mail.gmail.com> <264676DC-14DA-432E-81AB-CD0D852307A4@shiftleft.org> <CABqy+sr1zc-T-F3D_VOoz2B9GNZPsAxi=HeMoe=DwG5EJq8AuA@mail.gmail.com>
Date: Mon, 20 Jan 2014 20:36:55 -0800
Message-ID: <CACsn0ckg3Pna2bd9RPZnDGWa=GSaLGykkdqPwg3bat0+p2ZGcA@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
To: Robert Ransom <rransom.8774@gmail.com>
Content-Type: text/plain; charset=UTF-8
Cc: "cfrg@irtf.org" <cfrg@irtf.org>, Jon Callas <jon@callas.org>
Subject: Re: [Cfrg] New names for draft-ladd-safecurves
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, 21 Jan 2014 04:36:58 -0000

On Mon, Jan 20, 2014 at 8:25 PM, Robert Ransom <rransom.8774@gmail.com> wrote:
> On 1/20/14, Mike Hamburg <mike@shiftleft.org> wrote:
>
>> I suppose in that case we should be using curves with a small A or (A-2)/4
>> in Montgomery form instead of small d in Edwards form, because you need to
>> multiply by A more often: Edwards representations are probably fastest with
>> Niels+Extended coordinates at that size so they almost never multiply by d.
>
> The Montgomery-form ladder is as efficient for small-integer
> Edwards-form d as it is for small-integer Montgomery-form parameter
> ((A-2)/4 or (A+2)/4).

Maybe it's because it's late, but I don't immediately see why
A=2(1+d)/(1-d) for a small integer d leads
to a fast multiplication in the Montgomery-form ladder. The best
solution I could come up with involves
multiplications by 3 small integers instead of 1. So maybe the
efficiency loss is small, but it still exists.

I also don't see why if you are going to toss in the y coordinate into
Montgomery form to disambiguate addition you
would use the Montgomery form as a wire format instead of Edwards
form. I'm aware you can recalculate the y coordinate
given the original one after a Montgomery ladder, but with radix-k
addition algorithms on Edwards this doesn't seem to be a win.

Maybe Montgomery form is just a red herring, but when I think about
the consequences of a missing square root check in an Edwards
form implementation for ECDH, I feel Montgomery form has a place here.

Sincerely,
Watson
>
>
> Robert Ransom



-- 
"Those who would give up Essential Liberty to purchase a little
Temporary Safety deserve neither  Liberty nor Safety."
-- Benjamin Franklin