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

Jim Schaad <ietf@augustcellars.com> Wed, 20 July 2016 14:38 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 1638612D828; Wed, 20 Jul 2016 07:38:59 -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 v1TFlCK4R5-K; Wed, 20 Jul 2016 07:38:56 -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 C217B12D827; Wed, 20 Jul 2016 07:38:55 -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 07:44:47 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: <ilariliusvaara@welho.com>
References: <00de01d1e280$e31c0290$a95407b0$@augustcellars.com> <20160720124904.GA22541@LK-Perkele-V2.elisa-laajakaista.fi>
In-Reply-To: <20160720124904.GA22541@LK-Perkele-V2.elisa-laajakaista.fi>
Date: Wed, 20 Jul 2016 16:38:28 +0200
Message-ID: <006401d1e294$63418310$29c48930$@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+G73n4JJRMA=
Content-Language: en-us
X-Originating-IP: [31.133.168.227]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/MisZ97dCntkXimeSuLIEJy4dx5c>
Resent-From: <alias-bounces@ietf.org>
Resent-To: @ietf.org
Cc: cfrg@ietf.org, draft-irtf-cfrg-eddsa@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 14:38:59 -0000

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