Re: [TLS] draft-ietf-tls-rfc4492bis-15 and the X25519 significant bit.

David Benjamin <davidben@chromium.org> Wed, 15 March 2017 20:47 UTC

Return-Path: <davidben@google.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CED60131828 for <tls@ietfa.amsl.com>; Wed, 15 Mar 2017 13:47:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 GEmpi4NrFv6T for <tls@ietfa.amsl.com>; Wed, 15 Mar 2017 13:47:51 -0700 (PDT)
Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com [IPv6:2607:f8b0:400e:c05::22e]) (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 00ED61315A7 for <tls@ietf.org>; Wed, 15 Mar 2017 13:47:50 -0700 (PDT)
Received: by mail-pg0-x22e.google.com with SMTP id b129so14295461pgc.2 for <tls@ietf.org>; Wed, 15 Mar 2017 13:47:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MCFEWRsfiQvV+duQ6NUvxz4upJO0aWfv4HjIr/i6ioI=; b=B0yrYN2iXPyYEbdFQBr+XRcMkceRoN01cCvOsmyZNb+ZvG2bz7tD0oeWGA5bl08nUY tfOyPT8ToQAwBU16BNuTr8tMBitKI29OWk0YOlGRsSkJ2q/F2dKaeP5yARBMKJkpt969 IR1Ir6je9u88hbmOjI3wDqlmzHGLKwG6yVNyg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MCFEWRsfiQvV+duQ6NUvxz4upJO0aWfv4HjIr/i6ioI=; b=P6EqTN8v6kUOwF3PMNnJJwvI28YQZWytV6CC/8GtdhfUn7pN1rkz39ODDXise/KJ4D cVsfaep/hvR14J0QnG3Gb05s2J0yYnLvbHUawl7C0b4E14JvknDxa3YK59jDnigfHqhz xUqkFx9GZYACUPmRD+pYkE5YO0HPyAUV3Hnn9puDI8ndjWvOKDTjjtF3c2FAofpJsNDr vGQhz/GV5JEQOP4lG1vdSrrtFX2QAs9C2dOT+/R0bk8uaPh2swjBTbrDW/O0Y7ca1gSC nhXN1P5pqxFzPLvJDtcm3VvSaFO4EFwr/NktNL1fOu3/mxuZdBsElDK7RRqx75gHIowZ 1kVw==
X-Gm-Message-State: AFeK/H06k6wpTizu8r44wGCjiZrdVsQ4UaYc2uoVUdiu3iMtEHBAm1OBnXX/adUb6StwT12ySL1vJHA0sd8vwNw+
X-Received: by 10.84.210.167 with SMTP id a36mr7307269pli.40.1489610870497; Wed, 15 Mar 2017 13:47:50 -0700 (PDT)
MIME-Version: 1.0
References: <CAF8qwaBCf-GCx3Y_a+G_ODsWmdm8sgUsjPN+LyQ=7-n0iOO-6w@mail.gmail.com> <CABcZeBMg7Ln_4Wgj-vc3g4Xpxy=091gjHi8m8BEugWPvffWRPQ@mail.gmail.com>
In-Reply-To: <CABcZeBMg7Ln_4Wgj-vc3g4Xpxy=091gjHi8m8BEugWPvffWRPQ@mail.gmail.com>
From: David Benjamin <davidben@chromium.org>
Date: Wed, 15 Mar 2017 20:47:39 +0000
Message-ID: <CAF8qwaD+o2ovOUOgC5zjAU0019_Ejvo0aOk6v4LQH=kUtXQE6Q@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary=94eb2c1aaab8ca6dec054acb0e54
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/sR3gcwXgJ75j3831ZOCfm_-66V4>
Subject: Re: [TLS] draft-ietf-tls-rfc4492bis-15 and the X25519 significant bit.
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 15 Mar 2017 20:47:53 -0000

The change was slightly more involved than just striking the paragraph, so
I've put together a PR here. It makes that section much shorter:
https://github.com/tlswg/rfc4492bis/pull/38

On Wed, Mar 15, 2017 at 4:29 PM Eric Rescorla <ekr@rtfm.com> wrote:

> This seems like compelling logic. The fingerprinting concern doesn't seem
> that serious in any case.
>
> -Ekr
>
>
> On Wed, Mar 15, 2017 at 1:25 PM, David Benjamin <davidben@chromium.org>
> wrote:
>
> draft-ietf-tls-rfc4492bis-15, section 5.11, contains the following text:
>
>    Since there are some implementation of the X25519 function that
>    impose this restriction on their input and others that don't,
>    implementations of X25519 in TLS SHOULD reject public keys when the
>    high-order bit of the final byte is set (in other words, when the
>    value of the rightmost byte is greater than 0x7F) in order to prevent
>    implementation fingerprinting.  Note that this deviates from RFC 7748
>    which suggests that This value be masked.
>
> https://tools.ietf.org/html/draft-ietf-tls-rfc4492bis-15#section-5.11
>
> There was a thread about this way back, but it seems not to have come to a
> clear conclusion:
> https://www.ietf.org/mail-archive/web/tls/current/msg18821.html
>
> Since then, RFC 7748 has been published and X25519 in TLS has been shipped
> by several implementations. From my testing, none of BoringSSL, Cloudflare
> servers (tls-tris?), Go, NSS, or OpenSSL implement this check. They all
> mask off that bit, as RFC 7748 prescribes. (These were all the
> implementations I tested.)
>
> RFC 7748 provides a function on bytes, so, barring strong reasons not to,
> I think it is best for TLS to simply reference RFC 7748 as-is. The stated
> motivation is preventing implementation fingerprinting, yet all the
> implementations listed mask. This paragraph also does not align with the
> current TLS 1.3 draft.
>
> Thus, I would suggest the paragraph be removed from the document. It would
> then prescribe RFC 7748's behavior which is to mask off that bit. Do others
> agree?
>
> David
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>
>