Re: [TLS] draft-ietf-tls-curve25519-01 and the X25519 significant bit.

Simon Josefsson <simon@josefsson.org> Tue, 12 January 2016 14:24 UTC

Return-Path: <simon@josefsson.org>
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 660B21B2A45 for <tls@ietfa.amsl.com>; Tue, 12 Jan 2016 06:24:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.551
X-Spam-Level:
X-Spam-Status: No, score=-1.551 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_SE=0.35, 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 AgUNiQPh2sLv for <tls@ietfa.amsl.com>; Tue, 12 Jan 2016 06:24:47 -0800 (PST)
Received: from duva.sjd.se (duva.sjd.se [IPv6:2001:9b0:1:1702::100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9F0EF1B2A43 for <tls@ietf.org>; Tue, 12 Jan 2016 06:24:46 -0800 (PST)
Received: from latte.josefsson.org ([155.4.17.2]) (authenticated bits=0) by duva.sjd.se (8.14.4/8.14.4/Debian-4) with ESMTP id u0CEOXDi012134 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 12 Jan 2016 15:24:34 +0100
From: Simon Josefsson <simon@josefsson.org>
To: Adam Langley <agl@imperialviolet.org>
References: <CAMfhd9XDfwmoze+BdFVedhCGDQRNbL63ZT=KZc-7dEr0UMk4dA@mail.gmail.com>
OpenPGP: id=54265E8C; url=http://josefsson.org/54265e8c.txt
X-Hashcash: 1:22:160112:agl@imperialviolet.org::XbCINwQyaAbJzGV4:4Ni8
X-Hashcash: 1:22:160112:tls@ietf.org::BwnzhvSD8zkgkvD5:CM7k
Date: Tue, 12 Jan 2016 15:24:32 +0100
In-Reply-To: <CAMfhd9XDfwmoze+BdFVedhCGDQRNbL63ZT=KZc-7dEr0UMk4dA@mail.gmail.com> (Adam Langley's message of "Tue, 22 Dec 2015 10:52:28 -0800")
Message-ID: <87si22j2ov.fsf@latte.josefsson.org>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature"
X-Virus-Scanned: clamav-milter 0.98.7 at duva.sjd.se
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/rym2Bxm2Uc9DpVfhNJQf7ozxmGw>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] draft-ietf-tls-curve25519-01 and the X25519 significant bit.
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: <https://mailarchive.ietf.org/arch/browse/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, 12 Jan 2016 14:24:49 -0000

Adam Langley <agl@imperialviolet.org> writes:

> Curve25519, as the name suggests, operates on 255-bit numbers. When
> encoded as bytes, there's obviously a 256th bit that needs to be
> specified.
>
> Curve25519 implementations didn't set the bit but did used to vary on
> how they parsed it. Some would take a 256-bit number and reduce it
> while others would ignore the bit completely.
>
> However, I believe that implementations have converged on ignoring it.
> That behaviour is specified in draft-irtf-cfrg-curves and tested via
> the test vectors.
>
> Currently https://tools.ietf.org/html/draft-ietf-tls-curve25519-01#section-2.3
> says that implementations SHOULD reject inputs with the high-bit set.
> I think that should be dropped. The X25519 function is specified in
> terms of bytes in draft-irtf-cfrg-curves and I think the TLS spec
> should just use that draft.

I agree.

/Simon