Re: [Cfrg] draft-irtf-cfrg-eddsa - Implementation failure for 448

Jim Schaad <ietf@augustcellars.com> Wed, 20 July 2016 15:08 UTC

Return-Path: <ietf@augustcellars.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 918F112D82B; Wed, 20 Jul 2016 08:08:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.188
X-Spam-Level:
X-Spam-Status: No, score=-3.188 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-1.287, SPF_PASS=-0.001] autolearn=ham autolearn_force=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 YPQ5gqkIdiDP; Wed, 20 Jul 2016 08:08:21 -0700 (PDT)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA95912D845; Wed, 20 Jul 2016 08:08:20 -0700 (PDT)
Received: from hebrews (31.133.168.227) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 20 Jul 2016 08:14:14 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Watson Ladd' <watsonbladd@gmail.com>
References: <00de01d1e280$e31c0290$a95407b0$@augustcellars.com> <20160720124904.GA22541@LK-Perkele-V2.elisa-laajakaista.fi> <006401d1e294$63418310$29c48930$@augustcellars.com> <CACsn0c=BZamd8h6hczY32pvgKodsEmhT+F0N=4RbCgY1YnT3qw@mail.gmail.com>
In-Reply-To: <CACsn0c=BZamd8h6hczY32pvgKodsEmhT+F0N=4RbCgY1YnT3qw@mail.gmail.com>
Date: Wed, 20 Jul 2016 17:07:55 +0200
Message-ID: <007901d1e298$803be3d0$80b3ab70$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIZM6Q/Yk/6QE8kkJYqleGKscVrmwIO+G73Aecrr/4Bx4Y58Z9k3EAA
Content-Language: en-us
X-Originating-IP: [31.133.168.227]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/KeNyKOUDDxkL7lOJSqoZeOGzf0k>
Resent-From: alias-bounces@ietf.org
Resent-To: <>
Cc: draft-irtf-cfrg-eddsa@ietf.org, cfrg@ietf.org
Subject: Re: [Cfrg] draft-irtf-cfrg-eddsa - Implementation failure for 448
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jul 2016 15:08:25 -0000

Maybe because this is an a=-1 curve?  (Guess on my part).

Jim


> -----Original Message-----
> From: Watson Ladd [mailto:watsonbladd@gmail.com]
> Sent: Wednesday, July 20, 2016 4:49 PM
> To: Jim Schaad <ietf@augustcellars.com>
> Cc: Ilari Liusvaara <ilariliusvaara@welho.com>; cfrg@ietf.org; draft-irtf-cfrg-
> eddsa@ietf.org
> Subject: Re: [Cfrg] draft-irtf-cfrg-eddsa - Implementation failure for 448
> 
> Why aren't we using the formulas from EFD?
> https://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
> 
> We know these are right due to a Magma script checking them.
> 
> On Wed, Jul 20, 2016 at 7:38 AM, Jim Schaad <ietf@augustcellars.com> wrote:
> > OK - Another one for you.
> >
> > H = (X1+X2)*(Y1+Y2)
> > X3 = A*G*(H-C-D)
> >
> > Vs code
> >
> >         tmp.x=zcp*F*((self.x+self.y)*(y.x+y.y)-xcp-ycp)
> >
> > note that in once case the two X are being added and in the other x and y are
> being added.
> >
> > Jim
> >
> >
> >> -----Original Message-----
> >> From: ilariliusvaara@welho.com [mailto:ilariliusvaara@welho.com]
> >> Sent: Wednesday, July 20, 2016 2:49 PM
> >> To: Jim Schaad <ietf@augustcellars.com>
> >> Cc: draft-irtf-cfrg-eddsa@ietf.org; cfrg@ietf.org
> >> Subject: Re: draft-irtf-cfrg-eddsa - Implementation failure for 448
> >>
> >> On Wed, Jul 20, 2016 at 02:18:52PM +0200, Jim Schaad wrote:
> >> > There is a difference between the document and the code for point
> >> > addition of 448.  Which is the correct one?
> >> >
> >> > Text in section 5.2.4
> >> >
> >> >     X3 = A*G*(H-C-D)
> >> >     Y3 = A*G*(D-C)
> >> >
> >> > Python Code
> >> >         tmp.x=zcp*F*((self.x+self.y)*(y.x+y.y)-xcp-ycp)
> >> >         tmp.y,tmp.z=zcp*G*(ycp-xcp),F*G
> >> >
> >> > Note that the first uses A*G the section uses A*F in computing the
> >> > new x value.
> >>
> >> Good catch: It should be A*F (as in code). Fixed in Editor's Copy.
> >>
> >>
> >> -Ilari
> >
> > _______________________________________________
> > Cfrg mailing list
> > Cfrg@irtf.org
> > https://www.irtf.org/mailman/listinfo/cfrg
> 
> 
> 
> --
> "Man is born free, but everywhere he is in chains".
> --Rousseau.