Re: [Cfrg] A2 versus A^2 and BB verus AA

Samuel Neves <sneves@dei.uc.pt> Sat, 10 January 2015 20:39 UTC

Return-Path: <sneves@dei.uc.pt>
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 3165C1A8837 for <cfrg@ietfa.amsl.com>; Sat, 10 Jan 2015 12:39:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.312
X-Spam-Level:
X-Spam-Status: No, score=-2.312 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 3auY5vW3aggF for <cfrg@ietfa.amsl.com>; Sat, 10 Jan 2015 12:39:08 -0800 (PST)
Received: from smtp2.dei.uc.pt (smtp2.dei.uc.pt [193.137.203.234]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 45BFD1A8828 for <cfrg@irtf.org>; Sat, 10 Jan 2015 12:39:08 -0800 (PST)
Received: from [192.168.1.64] (bl6-191-211.dsl.telepac.pt [82.155.191.211]) (authenticated bits=0) by smtp2.dei.uc.pt (8.14.4/8.14.4) with ESMTP id t0AKcSmU014539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Jan 2015 20:38:34 GMT
Message-ID: <54B18DC4.3000906@dei.uc.pt>
Date: Sat, 10 Jan 2015 20:38:28 +0000
From: Samuel Neves <sneves@dei.uc.pt>
User-Agent:
MIME-Version: 1.0
To: Adam Langley <agl@imperialviolet.org>
References: <D0D6B088.5815C%paul@marvell.com> <CAMfhd9XTQB-QjMpkW9PQ1e7NaV5jc56KfRP12i6WLaiNGqUyRg@mail.gmail.com>
In-Reply-To: <CAMfhd9XTQB-QjMpkW9PQ1e7NaV5jc56KfRP12i6WLaiNGqUyRg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (smtp2.dei.uc.pt [193.137.203.234]); Sat, 10 Jan 2015 20:38:34 +0000 (WET)
X-FCTUC-DEI-SIC-MailScanner-Information: Please contact helpdesk@dei.uc.pt for more information
X-FCTUC-DEI-SIC-MailScanner-ID: t0AKcSmU014539
X-FCTUC-DEI-SIC-MailScanner: Found to be clean
X-FCTUC-DEI-SIC-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-60.25, required 3.252, autolearn=not spam, ALL_TRUSTED -10.00, BAYES_00 -0.25, L_SMTP_AUTH -50.00)
X-FCTUC-DEI-SIC-MailScanner-From: sneves@dei.uc.pt
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/wDvgV7YAhQf4wU7boDCjvGHQaT8>
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] A2 versus A^2 and BB verus AA
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: Sat, 10 Jan 2015 20:39:16 -0000

On 01/10/2015 07:29 PM, Adam Langley wrote:
> On Sat, Jan 10, 2015 at 11:15 AM, Paul Lambert <paul@marvell.com>; wrote:
>> In draft-agl-cfrgcurve-00 it appears that the ŒAA¹ term  is not consistent
>> with the josefsson text or the EFD that both use BB
> Whether it works out or not, it's good to match EFD. I've updated the
> draft in GitHub to match, thanks!

It is not a typo: the formulas present in the draft are taken from Appendix B of the Curve25519 paper, where as the
formulas in EFD are taken from the 1987 Montgomery paper.

These formulas also differ in the particular a24 constant used: Curve25519 uses (A - 2)/4 = 121665, whereas Montgomery
uses (A + 2)/4 = 121666. Your fix is missing this second adjustment, if it is to match Montgomery's formulas.

Best regards,
Samuel Neves