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

Eric Rescorla <ekr@rtfm.com> Wed, 15 March 2017 20:29 UTC

Return-Path: <ekr@rtfm.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 A21A5131830 for <tls@ietfa.amsl.com>; Wed, 15 Mar 2017 13:29:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
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 Zcqb8gLlb4MF for <tls@ietfa.amsl.com>; Wed, 15 Mar 2017 13:29:53 -0700 (PDT)
Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (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 A471A1317F9 for <tls@ietf.org>; Wed, 15 Mar 2017 13:29:53 -0700 (PDT)
Received: by mail-yw0-x22b.google.com with SMTP id v198so18677728ywc.2 for <tls@ietf.org>; Wed, 15 Mar 2017 13:29:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Rf63PTh+8U0yM63Wd/QD8Da6svpY/w0lg924dMMgY50=; b=ktaId5XgQXPJvzg4LbY55Uh7IY20faVmaXMGf+08nR5eUrKW/MvR7vQ+/TUIK3tnNz aL1OX7owlaVZ5xrsn47z6fr7eXshKWOwU72yxz+PgPYNZu8GBJkveuqzho7XjS7y6C3P wiBShOdbPjlTf7R2Xf1khpZtMznDGFMW3Xq4govGXseJ8e34Fg/dLPGQKB28BHIS6qKd HqoqADL6myDPkiN+JX6kzFNwvDQUmXeyiWM/xkpxDiEBr4dy86rcnz4Ykh/ZQJK6bkrT U8iDwa2gfbHWKrWwRBtTKheEf2dJ1Op5TcfHWgY2oCvyUM9w8fth366gPOJ6h4locFJv qh9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Rf63PTh+8U0yM63Wd/QD8Da6svpY/w0lg924dMMgY50=; b=dgwt0BJmhg2l4QjzM7HBkQ7vpGZG4fNEozOtmMxXy3OJAQve/X7CE11JsxxhH9V910 byv+0f8eGGVB9tkq5V7wZXsHvwzFq9y9FtnW1KqPld4LjoJwvKSqZqgUHonJWr86wXOk dV3kxgShedM0s5MEu3XUcTTkVuIBd5eL6aicwa1wCmAt58EdbDNmosAmpc6TJyebve1c YS7zRGOqIEUgw6i+3U1oRn0Qx0uMcS3hB+Oq9PPaTnA1r7kng+R3xGY9qb5H2sZazRd/ CJRNDfIuaClnGzRFmcr0ZQHmR+yk/enmmFfMDQKY7Mr/i2xKnjbMP4QrhG8kdhWbRBSz 1qhA==
X-Gm-Message-State: AFeK/H3gO2h+Kpcy+UinvQxwreP7RGXsJYtdral95abRJW3VYkLpx7/zf7YMrxz0vEv06VH8kuPJW4DQJBLlZA==
X-Received: by 10.129.152.22 with SMTP id p22mr4414291ywg.276.1489609792757; Wed, 15 Mar 2017 13:29:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.154.210 with HTTP; Wed, 15 Mar 2017 13:29:12 -0700 (PDT)
In-Reply-To: <CAF8qwaBCf-GCx3Y_a+G_ODsWmdm8sgUsjPN+LyQ=7-n0iOO-6w@mail.gmail.com>
References: <CAF8qwaBCf-GCx3Y_a+G_ODsWmdm8sgUsjPN+LyQ=7-n0iOO-6w@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Wed, 15 Mar 2017 13:29:12 -0700
Message-ID: <CABcZeBMg7Ln_4Wgj-vc3g4Xpxy=091gjHi8m8BEugWPvffWRPQ@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary=94eb2c0b8fb48d69e5054acacec9
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/unBZSuFUt4iWKUu6svpkNEOyQVI>
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:29:56 -0000

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
>
>