Re: [Cfrg] Elliptic Curves - curve form and coordinate systems (ends on March 12th)

Michael Hamburg <mike@shiftleft.org> Thu, 12 March 2015 20:26 UTC

Return-Path: <mike@shiftleft.org>
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 C1A1A1A8AD0 for <cfrg@ietfa.amsl.com>; Thu, 12 Mar 2015 13:26:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.555
X-Spam-Level: *
X-Spam-Status: No, score=1.555 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-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 J4LdJbb7RZ9E for <cfrg@ietfa.amsl.com>; Thu, 12 Mar 2015 13:26:49 -0700 (PDT)
Received: from aspartame.shiftleft.org (199-116-74-168-v301.PUBLIC.monkeybrains.net [199.116.74.168]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A69DD1A895D for <cfrg@irtf.org>; Thu, 12 Mar 2015 13:26:47 -0700 (PDT)
Received: from [10.184.148.249] (unknown [209.36.6.242]) by aspartame.shiftleft.org (Postfix) with ESMTPSA id 7CBC13AA41; Thu, 12 Mar 2015 13:23:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shiftleft.org; s=sldo; t=1426191830; bh=OJAukx3tGiukf+zt4GxdFpqZEQ2C17HieqpPZ5Qr7tE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=dtMqMFFB+CWeajJ/RmKyRXMnXe8IDdICA1okkykJkDPXhuKzzbll4r6r/9gHTjyS8 KeQ75SbNQG9B/W2zjzYag1qkOy+QeZDGZE5FcVORqAlMH/mdlE8vKTZ78C5xYzEGba LcaTuoHde4ayjmEFgifhh9lMJTE526X7Qddg9yxQ=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2087\))
From: Michael Hamburg <mike@shiftleft.org>
In-Reply-To: <5501F149.2070008@brainhub.org>
Date: Thu, 12 Mar 2015 13:26:41 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <76112F6C-8D5E-4958-888D-2076F8E3B547@shiftleft.org>
References: <54F8E735.2010202@isode.com> <5501E6A5.5040608@brainhub.org> <CAMfhd9VNM7q7PKfxDdZPOFAMBsyKfREUOotxtYycozvsS9UvxA@mail.gmail.com> <5501F149.2070008@brainhub.org>
To: Andrey Jivsov <crypto@brainhub.org>
X-Mailer: Apple Mail (2.2087)
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/sU4vv_eDdAQeLFV1CtPU8UIUxzE>
Cc: Adam Langley <agl@imperialviolet.org>, "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] Elliptic Curves - curve form and coordinate systems (ends on March 12th)
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, 12 Mar 2015 20:26:51 -0000

Hi Andrey,

Have you considered the extra complexity to compute which is the correct v at the end of the Montgomery ladder?  If you want a unified point format that every operation uses, you need a way to compute the sign of v.

I get 4 u0 v1 v2 = (1 - u1 u2 - u0 u2 + u0 u1) (1 - u1 u2 + u0 u2 - u0 u1) and symmetrically.  This doesn’t require a square root if you know the input’s v coordinate, but it does increase complexity.  At some point you might as well go full decaf, particularly if there’s no trivial patch to existing curve25519() functions.

Cheers,
— Mike

> On Mar 12, 2015, at 1:04 PM, Andrey Jivsov <crypto@brainhub.org> wrote:
> 
> I apologize (need more coffee). I meant to write v = SQRT(u^3 + 486662*u^2 + u). The SQRT can be calculated (for almost free) during X/Z calculation by the sender at the end of scalarmult, because the sender must do 1/Z, but there is no apparent way to avoid SQRT for the receiver (unless the received doesn't need v and only works on u). The sign is embedded in v (and v can be adjusted  p-v as needed for signatures; ECDH doesn't care).
> 
> On 03/12/2015 12:53 PM, Adam Langley wrote:
>> On Thu, Mar 12, 2015 at 12:19 PM, Andrey Jivsov <crypto@brainhub.org> wrote:
>>> I propose the Montgomery curve representation (u, v), which can be used for
>>> signatures on the same curve.
>>> 
>>> "u" is identical to the sec 9 of
>>> https://tools.ietf.org/html/draft-agl-cfrgcurve-00.
>>> "v" is calculated (at virtually no additional computational cost) as v = u^3
>>> + 486662*u^2 + u
>> I'm going to display my ignorance here, but if "v" can be calculated
>> from just u with very little cost, why send it at all? The receiver
>> could equally calculate it if useful, no?
>> 
>>> * The format is friendly for crypto algorithms that need to add points (as
>>> opposed to ECDH only)
>> Wouldn't they need to know an extra bit? Given a point on the
>> Montgomery curve, (u,v), the "v" value is v^2, right? Doesn't that
>> discard the sign of v?
>> 
>> 
>> Cheers
>> 
>> AGL
>> 
> 
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg