Re: [TLS] Comments on draft-ietf-tls-tls13-18

Eric Rescorla <ekr@rtfm.com> Mon, 31 October 2016 21:28 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 1CD54129B12 for <tls@ietfa.amsl.com>; Mon, 31 Oct 2016 14:28:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=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 ou0zsXqxlAV9 for <tls@ietfa.amsl.com>; Mon, 31 Oct 2016 14:28:56 -0700 (PDT)
Received: from mail-yb0-x229.google.com (mail-yb0-x229.google.com [IPv6:2607:f8b0:4002:c09::229]) (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 7C4CD129B3B for <tls@ietf.org>; Mon, 31 Oct 2016 14:28:42 -0700 (PDT)
Received: by mail-yb0-x229.google.com with SMTP id d128so67372267ybh.2 for <tls@ietf.org>; Mon, 31 Oct 2016 14:28:42 -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=wWlkJdcaessA94k/aX49d2xGpB4auDEm76pES4FJqf4=; b=M+JWvet4EV2hyOkAVghYeu4hEIzmc1ojRJatUO8gnJdTGHwMIJQx2qcC/69rrKpnu/ LkNCWTbIApp/QXHxasaihYY80zs+p/vWHbiOhXG7gvOS6I1kp9p6T6v2dBxdPoSh65dB sSFwDsuoaQlTEZwmweV5V9suuu1DcYn8ThJNa0dUpiia4XF2YsXwFKSLoQAz+aUWidUW Lx4B1qRqlXt9LlFkZCTsg2bfl0cdrcEIGDN+wQ/8GuyUI1v/U/3XN4aXDpBYfAHJ2/6q pm5zBWF3eQTbnej/imdBqvdkpZP4pX/uVx7fyZVCDHC9dmGIYEzyGAirAemnQ0tXKIcS JFvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wWlkJdcaessA94k/aX49d2xGpB4auDEm76pES4FJqf4=; b=nBLtNFlKVCmN+5h44crrZNt+3gOIhYVYJPFTECLjhqmptbG4fpnX6I0M2UKSrvJEdM otSroGE37tv9c+U5FaEmgNzjLhLBeqos0rSLp5p43oOjKywRkjIiQCBkSDRsfo7jwe9o T65xLwQiOaua0otoVnAxWzGao7k0kGXXcxtCS532qDQEfpVH/eBEw/TstIP1sHWyS2P4 GxZC4OgmJaMx7J4hTLB+kOGG+JKcXk7Kt444zIDv/MOWZkK3N91JtODl07Jyu4VmcCqI YAkti7FUNn5petuw2V96geR+a1DbRaKa+rl031X35CDPPzvX0Y/NvWuh6sExUlyss0Wi bKtA==
X-Gm-Message-State: ABUngvdArgKYRUWnhx+5N3jFYT/XiYjODmLYNupp+7mMQb6W/pZVgvWFLyYKZu6WA6TcE6UTgViRPBe1cAyPDQ==
X-Received: by 10.37.204.73 with SMTP id l70mr27482405ybf.161.1477949321496; Mon, 31 Oct 2016 14:28:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.159.141 with HTTP; Mon, 31 Oct 2016 14:28:00 -0700 (PDT)
In-Reply-To: <CACsn0ckbKRRy0sQ+i8bNLSqh-mqAb0UMHY13CyzmonGj8cL-qQ@mail.gmail.com>
References: <CACsn0ckbKRRy0sQ+i8bNLSqh-mqAb0UMHY13CyzmonGj8cL-qQ@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 31 Oct 2016 14:28:00 -0700
Message-ID: <CABcZeBOGc0rfEFB8BYwtSw6-EJ5bFav5mLCz4a2T7XXUHN5sDA@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Content-Type: multipart/alternative; boundary="94eb2c07f3024dfd6105402fe437"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/2XbkUZhdxwFXhLVTdE2C-UZGaO0>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Comments on draft-ietf-tls-tls13-18
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 31 Oct 2016 21:28:59 -0000

Watson,

Thanks for your comments!

On Mon, Oct 31, 2016 at 11:41 AM, Watson Ladd <watsonbladd@gmail.com> wrote:

> Hello,
>
> Looking at the history of TLS implementation attacks we see that many
> result from the standard not strictly enough prescribing behavior,
> particularly of the state machine. This draft does not actually fix
> this problem, but continues to present example flows without
> explicitly requiring them to be the only possible flows.
>


For example, consider HelloRetryRequest. Do servers only send one of
> these per connection, or can it be resent multiple times? Obviously
> there is a DoS possibility here, but I do not see where this behavior
> is explicitly defined. I think we should require that the server only
> ever sends one HelloRetryRequest, and then terminates the connection
> if the ClientHello is unacceptable.



The server is forbidden to send multiple HRRs and the client is required
to enforce it. See:

  https://tlswg.github.io/tls13-spec/#hello-retry-request

I agree that we don't require the server to behave this way. I can fix the
draft to say this.


At no point is it stated that only
> the example flows should be supported. I would prefer more clarity
> about what messages are to be expected when, especially with alerts.
>

Actually the text does say something here:
https://tlswg.github.io/tls13-spec/#handshake-protocol

"Protocol messages MUST be sent in the order defined below (and shown in
the diagrams in Section 2
<https://tlswg.github.io/tls13-spec/#protocol-overview>). A peer which
receives a handshake message in an unexpected order MUST abort the
handshake with an “unexpected_message” alert. Unneeded handshake messages
are omitted, however."

However, this text was also in 5246, so I think there's a fair argument
that it's not strong enough. I'm not quite sure how to make it better.
Suggestions?


ECDSA cannot be used with x25519 or x448, but the draft seems to
> require support in TLS 1.2 for this as a consequence of its
> description of the fallback mode.


I don't *think* that that's true: can you point to the specific text that
you are concerned with?


ALPN, resumption, and 0-RTT remain problematic. For instance we see
> that 0-RTT data is sent with the same ALPN state when the PSK was
> derived, but this could be different from the ALPN transmitted and
> negotiated during the handshake, which is explicitly allowed later in
> the document. I do not understand what is supposed to happen in this
> scenario.
>

Here's the relevant text:
https://tlswg.github.io/tls13-spec/#early-data-indication

"If any of these checks fail [ALPN is in the list above] the server MUST
NOT respond with the extension and must discard all the remaining first
flight data (thus falling back to 1-RTT). If the client attempts a 0-RTT
handshake but the server rejects it, it will generally not have the 0-RTT
record protection keys and must instead trial decrypt each record with the
1-RTT handshake keys until it finds one that decrypts properly, and then
pick up the handshake from that point."

Is there anything else you'd like to see here?

Appendix B removes the text about upper-layer protocol interactions
> with 0-RTT I provided, merely discussing the API. I think this is a
> mistake: how 0-RTT should be used safely depends on the upper-layer
> protocol, and can be complex. API guidance is not enough.
>

This ended up in the main text:
https://tlswg.github.io/tls13-spec/#zero-rtt-data

"Protocols MUST NOT use 0-RTT data without a profile that defines its use.
That profile needs to identify which messages or interactions are safe to
use with 0-RTT. In addition, to avoid accidental misuse, implementations
SHOULD NOT enable 0-RTT unless specifically requested. Special functions
for 0-RTT data are RECOMMENDED to ensure that an application is always
aware that it is sending or receiving data that might be replayed."

Is this missing pieces you think we need?


There is still a note about needing a channel binding mechanism in the
> text. I think this should be resolved soon so it can be analyzed,
> probably built on top of the exporter mechanism. Either that, or we
> consciously punt and remove the note and replace with something else.
>

The idea here is that we need a separate draft that just says "use
exporters with
label X". I think we remove the note and see if we can get someone to write
that draft.


As for process, I support the idea of having a last call on November
> 20th, and then completing the security analysis by January 20th (or
> whatever date was decided). This will prevent a flurry of changes
> potentially breaking things.
>

That's the idea.

-Ekr


> Sincerely,
> Watson Ladd
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>