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

Watson Ladd <watsonbladd@gmail.com> Wed, 20 July 2016 14:49 UTC

Return-Path: <watsonbladd@gmail.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 019CC12D7F7; Wed, 20 Jul 2016 07:49:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 VBD7NxvVA078; Wed, 20 Jul 2016 07:49:01 -0700 (PDT)
Received: from mail-vk0-x232.google.com (mail-vk0-x232.google.com [IPv6:2607:f8b0:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D325612D779; Wed, 20 Jul 2016 07:49:00 -0700 (PDT)
Received: by mail-vk0-x232.google.com with SMTP id n129so26834244vke.3; Wed, 20 Jul 2016 07:49:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ArqvkTV9jKG9LIPR++R1tLnMZIvqo0PejWnnaSaNxOY=; b=Rmoiq3qJ45CyXkZ6iSJoiv5G3gmqBMGTOwMxliYIKbv6ZGWQGMItGan85K9KPAIIzV 4f7P+fG5HyQQGwnu/it1FPQUL79yupku6kPZYeWw7CDo5UCiY4OocQrBERbC7LQGYDHK ufER3sBIgWnYOr19BbcfI1ORqdErvckZ1VGwfv8b7KUeVtKFxcj+U2+vv2WAXJ1pq6pU 7HilUfqpCe2UD9aQbINjKoHkD0z+jrJlng/LHYzQYvmfX4HNOlx/r9/Dax6A73ScMHAV N4U3aPUOLzi4blL8RWs2FeAXyMAQ/0TJ/qvtZ0QvQ/PSBnjd2/odfNLmRwORMdu5adqr 4OBQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ArqvkTV9jKG9LIPR++R1tLnMZIvqo0PejWnnaSaNxOY=; b=Qv1hM6xDfNjHYe4QSIGZGEOQKR4aYpmpvjxahQCq/UyOWYL1QnDb0zDaQgHEUnHeHP Rzxdh4PWEqUfBGhPQ7VYpS7KgVBkUsm7b7hbQh34J44JXSNWflaz2VCjUv8PcCt/PxZ6 YrCY5CQfbkClllJHpa5+8O+yi+nFUIXSVoLRs8hLeMHmV5ISHL4qURTZfgUeJejmGJc5 RbiUVybJ7ZM8tDenYuTq5vXNKY4GBam0zwanVq8Jx+jA/EDpIxUwJuqBfQ2oAz0OHQcs PnbvmS3SJwiBiKl4Bhxs3ZTMNkmc9vI8I3REWZIiWYRDMROMCEHH95w8uQ3cv32NbP/z ZrwQ==
X-Gm-Message-State: ALyK8tI46CGY9WqrHsK5iDTnclG6uLS1vEMfNZGu4mL0DqkVb9zjtlETuiTiW6SkRsGl8rsXK3hq3WgYGAFufA==
X-Received: by 10.159.39.193 with SMTP id b59mr23772578uab.109.1469026139950; Wed, 20 Jul 2016 07:48:59 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.159.39.194 with HTTP; Wed, 20 Jul 2016 07:48:59 -0700 (PDT)
In-Reply-To: <006401d1e294$63418310$29c48930$@augustcellars.com>
References: <00de01d1e280$e31c0290$a95407b0$@augustcellars.com> <20160720124904.GA22541@LK-Perkele-V2.elisa-laajakaista.fi> <006401d1e294$63418310$29c48930$@augustcellars.com>
From: Watson Ladd <watsonbladd@gmail.com>
Date: Wed, 20 Jul 2016 07:48:59 -0700
Message-ID: <CACsn0c=BZamd8h6hczY32pvgKodsEmhT+F0N=4RbCgY1YnT3qw@mail.gmail.com>
To: Jim Schaad <ietf@augustcellars.com>
Content-Type: text/plain; charset=UTF-8
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/6frNy_5J_j3lVD1mfpKUollOZMM>
Resent-From: <alias-bounces@ietf.org>
Resent-To: @ietf.org
Cc: draft-irtf-cfrg-eddsa@ietf.org, "cfrg@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 14:49:05 -0000

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.