Re: [TLS] Curve25519 in TLS and Additional Curves in TLS

Robert Ransom <rransom.8774@gmail.com> Tue, 28 January 2014 14:34 UTC

Return-Path: <rransom.8774@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2439D1A0424 for <tls@ietfa.amsl.com>; Tue, 28 Jan 2014 06:34:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.75
X-Spam-Level:
X-Spam-Status: No, score=-1.75 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, 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 89eBqbKru54U for <tls@ietfa.amsl.com>; Tue, 28 Jan 2014 06:34:12 -0800 (PST)
Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [IPv6:2607:f8b0:400d:c01::233]) by ietfa.amsl.com (Postfix) with ESMTP id 784321A041B for <tls@ietf.org>; Tue, 28 Jan 2014 06:34:12 -0800 (PST)
Received: by mail-qc0-f179.google.com with SMTP id e16so618428qcx.24 for <tls@ietf.org>; Tue, 28 Jan 2014 06:34:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PtfQmWGr9Sap41T79VUCourp9B7Q7TBcCSpbTuD87Eo=; b=TKG/svxFn/x029/Tbndo9+HlwdVYyuFQFKGryJIznV0R/A/3VLMD+lCYg1/6dpZl4h zyBullln6JQLqnppIRxFmyi9yIzX5RfO4PrDUd+1Fann7Hr692Xwc+s3PZbxVHiSOKyV waK+jKd126jj0PdyRSleO9dmpTwCxOlysIiViNscJzJJdop/vVf6z9OIuZ0PBjkzoFEg kBVuo1yaOaVXqFZInX/sI7id6Pl3siADoXKHfjSxPsP97Z4vaqBjsh0/gZPNIsgCvxRa HW4oitAhiUtJtW3ZzLRkzS5bn0+FOXBua7x6R0iwNbydnSfevFoADg9BZjILp/32ZJmn UtdQ==
MIME-Version: 1.0
X-Received: by 10.140.89.52 with SMTP id u49mr2574911qgd.93.1390919649738; Tue, 28 Jan 2014 06:34:09 -0800 (PST)
Received: by 10.140.86.42 with HTTP; Tue, 28 Jan 2014 06:34:09 -0800 (PST)
In-Reply-To: <1390815001.3812.10.camel@dhcp-2-127.brq.redhat.com>
References: <87ob3456s1.fsf@latte.josefsson.org> <CABqy+spt7BYqjsqLAkZssGp3aY9M+iLqV+pmyr7ZN-TXmJJpVg@mail.gmail.com> <1390466373.20176.8.camel@dhcp-2-127.brq.redhat.com> <CABqy+sp3Ru+dMLXe=6gaXudSxn8UWhYjvHLAD6Y+QVaU685ZYw@mail.gmail.com> <52E2B937.5080502@polarssl.org> <2A0EFB9C05D0164E98F19BB0AF3708C711EB9F2DB6@USMBX1.msg.corp.akamai.com> <282749297.5013598.1390639819914.JavaMail.root@redhat.com> <CABqy+srv0oNkOSYEf3u7_wtV2+asSNcXwnS87daHC5uNJYssvg@mail.gmail.com> <1390815001.3812.10.camel@dhcp-2-127.brq.redhat.com>
Date: Tue, 28 Jan 2014 06:34:09 -0800
Message-ID: <CABqy+sop_OPk1y1aLkRtrPs3RToYOc9b_xCoCMBg9SwntN0qqA@mail.gmail.com>
From: Robert Ransom <rransom.8774@gmail.com>
To: Nikos Mavrogiannopoulos <nmav@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Cc: Manuel Pégourié-Gonnard <mpg@polarssl.org>, tls@ietf.org
Subject: Re: [TLS] Curve25519 in TLS and Additional Curves in TLS
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Jan 2014 14:34:14 -0000

On 1/27/14, Nikos Mavrogiannopoulos <nmav@redhat.com> wrote:
> On Sat, 2014-01-25 at 01:18 -0800, Robert Ransom wrote:
>
>> > You seem to imply that following conventions established during the
>> > years is
>> > unecessary. That could be true, but your only point of backing that up
>> > is
>> > that a library that implements this curve uses the little endian
>> > format.
>> Several libraries implement Curve25519 scalar multiplication in
>> constant time, with varying degrees of portability and efficiency.
>> All of them operate on public and secret keys in little-endian format.
>
> I still cannot see your argument here. Is there a requirement for this
> curve to be implemented or do these libraries use little-endian format
> because it suits them better (e.g., they target little endian systems)?
> This is an honest question as I don't know the answer.

Curve25519 has a standard format for public and secret keys:
little-endian.  Several independent implementations, each of which has
its own advantages and disadvantages, conform to that standard.
Because each of them implements the existing standard key formats for
Curve25519, they interoperate with each other.

Complying with the existing, little-endian, standard for Curve25519
key formats would have the major technical advantage that TLS
implementations can use existing, off-the-shelf Curve25519
implementations without the unnecessary additional complexity of
reversing the bytes of Curve25519 inputs and outputs.

I have not seen a compelling *technical* reason for TLS to disobey the
currently existing, currently implemented Curve25519 standard by
reversing the bytes.


>> > Why force any other
>> > library that will implement this curve handle its points in a special
>> > way?
>> Does this mean that you intend to implement Curve25519 using a generic
>> bignum library?  How will your implementation (attempt to) avoid
>> leaking information about key material to a side-channel attacker?
>
> Do you mean about power analysis (e.g., constant power consumption or
> time)? Why would that matter for the protocol in question?

Timing attacks can be (and have been) performed successfully on the
public-key portions of TLS implementations across a network.  They do
not require measurements of a server's power supply, as you seem to be
implying.

Data cache attacks are also relevant for all TLS implementations run
on hardware shared among parties who do not trust each other (e.g.
virtual private servers).

> As I
> understand the document specifies additional curves for ephemeral
> key exchange (ECDHE), so side channels are not a threat.

Side channels are a threat to every protocol implemented in software,
unless the implementation guarantees that secret information is not
made available to any hardware component which may leak it.


>> It is about standardizing a curve which has a well-established
>> convention of storing and transmitting keys in little-endian format.
>
> I believe that software does the transmitting rather than the curve
> itself, so that I think that my point of not standardizing software but
> a curve is still valid.

The existing Curve25519 software represents the rough consensus and
running code of several parties.  There are at least two independent
implementations (Dr. Bernstein's original and Adam Langley's
curve25519-donna).  As far as IETF is concerned, the existing
little-endian key formats for Curve25519 *are* a standard.


If you have a *technical* argument that justifies disregarding the
existing standard for Curve25519 key formats, please state it.


Robert Ransom