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

Adam Langley <agl@imperialviolet.org> Thu, 12 March 2015 20:17 UTC

Return-Path: <alangley@gmail.com>
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 268291A802D for <cfrg@ietfa.amsl.com>; Thu, 12 Mar 2015 13:17:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=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 x9guYNjzXGTj for <cfrg@ietfa.amsl.com>; Thu, 12 Mar 2015 13:17:16 -0700 (PDT)
Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (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 AF0DE1A0404 for <cfrg@irtf.org>; Thu, 12 Mar 2015 13:17:15 -0700 (PDT)
Received: by lbiw7 with SMTP id w7so18561584lbi.7 for <cfrg@irtf.org>; Thu, 12 Mar 2015 13:17:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=NoeHAx05oZ9xCL17NZUkQHzuLyJrKWfOb1ct3EY1u5g=; b=Y1yfhVdvO4sKkX8yNuyQy4wfPL6usBvKZNl8+33Hrldq4sfCoDY6lXm3mZK1xEvALx yFyR7xzxFDZnrStjmqvn2A+s6H3Ht3cX+VFJ6PbBnM4Nsqs2pC3uz8nThAHfiGch363w xuyljCHzU35cxJINDLmBH7Khl9rSFpa2ba7RKop9hEDlvK1rJWeCbxos3Kj174sZcQKA YWN9O6yVBY8xU1wOAe50jxp/XQoWuFQ5C7ZetkROvZwMj35Wh3C5SfqLHT1o3J2rDS5t CadU8GUaiGV3eHBnVqwluwbbmOiBBr/N7cfaUSS3x3knHrtjtjevrmGo1OWiWe/0/lZZ AoVg==
MIME-Version: 1.0
X-Received: by 10.112.154.163 with SMTP id vp3mr16174873lbb.93.1426191434237; Thu, 12 Mar 2015 13:17:14 -0700 (PDT)
Sender: alangley@gmail.com
Received: by 10.112.55.71 with HTTP; Thu, 12 Mar 2015 13:17:14 -0700 (PDT)
In-Reply-To: <5501F149.2070008@brainhub.org>
References: <54F8E735.2010202@isode.com> <5501E6A5.5040608@brainhub.org> <CAMfhd9VNM7q7PKfxDdZPOFAMBsyKfREUOotxtYycozvsS9UvxA@mail.gmail.com> <5501F149.2070008@brainhub.org>
Date: Thu, 12 Mar 2015 13:17:14 -0700
X-Google-Sender-Auth: ISUGFpyylm4RqFNFjQoin5I6AIs
Message-ID: <CAMfhd9WnQpPFhkco5F+j9yLPa_FRxk=_PtBU-CA6wCEjG1jPUQ@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
To: Andrey Jivsov <crypto@brainhub.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/n7KOOWcV7uK2B3npkVkMy9vgYtQ>
Cc: "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:17:17 -0000

On Thu, 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).

Ah, thanks. That makes a lot more sense.

The point format could certainly be (u,v) and that could unify the
format for signature and DH public keys. I think the impression in the
past has been that we are willing to pay a little CPU time to
eliminate some implementation pitfalls. Here the pitfall would be
omitting to check that (u,v) is a point on the curve—something that
sending compressed points avoids.

So we could say that the format is u + the sign bit of v. The sign bit
can even be packed into the MSB of u in the case of curve25519. So we
could get a unified DH and signature point format and safety with
that, although existing implementations would only be compatible when
receiving. So I think that would lead to a lot of deployments that
would always set the sign bit to zero because they're actually an
existing curve25519 implementation underneath.

When we've had compatible DH and signature formats (i.e. ECC X.509
signatures with X9.62 encoding) it's actually been a problem, not a
blessing. CAs have had to remove the keyAgreement bit from these
certificates so that they aren't accidentally used for fixed-DH in
TLS.


Cheers

AGL