Re: [Emu] [TLS] Fwd: Benjamin Kaduk's Discuss on draft-ietf-emu-eap-tls13-13: (with DISCUSS and COMMENT)

Eric Rescorla <ekr@rtfm.com> Mon, 01 February 2021 14:56 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: emu@ietfa.amsl.com
Delivered-To: emu@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C7C133A11ED for <emu@ietfa.amsl.com>; Mon, 1 Feb 2021 06:56:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 w_5rybgyaIMr for <emu@ietfa.amsl.com>; Mon, 1 Feb 2021 06:56:00 -0800 (PST)
Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 7B1843A11EE for <emu@ietf.org>; Mon, 1 Feb 2021 06:56:00 -0800 (PST)
Received: by mail-lj1-x231.google.com with SMTP id l12so19946292ljc.3 for <emu@ietf.org>; Mon, 01 Feb 2021 06:56:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aH39CH8Dlc3y84vIEunvLo20/D7fOpn64Lknoo1fwu4=; b=f1oSVb7UDch53lgMKr+mOHQe92wx984K2OoFKklnrBb211Kip6gwn4EeMB+sjfQ7/l McEV4kiPoPte/S+hpu4M+b9pVThNou1ghcvpyqsDKCeCoOBjAg6TDnW0aGFxyzoQqNHN F2BkArFi4Lp5jZXGbGJmf3BWSWO/Z3YVDkfOOCB7RSpnZ2w27ao1Wa5k52UuPP6+o3Rj 5rH/BGKP8eTd3pHB2TV0LZ4rI93eBgTK2dxv/Io4+BdsFrVgplbzxkihnr3nvW+v5RPU MBSjbewah/uq63zhTAiXWyvrPpx7ByIzpOq671kAsJUNdfUDR30jedP75kMQt5w4Us9X Kx4w==
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=aH39CH8Dlc3y84vIEunvLo20/D7fOpn64Lknoo1fwu4=; b=NxZ41lA05lAk9Cbhnt5nbz066/1QxG1bam8lkk5OX5paP4CkxRI5nXwa7ojjuw01Ln h6cm/xeANH9jc2O11K1RaQS/M0pRQ9/k9JENIigzjnQaj2ApKaaQMcWTwsyALhd4O55Z QlzAytEog2OWQY4fADRcFdt64w4G30egAnc3ScKNcMPwvQ59ga3LOtJK8rdzHP1uU7jV Id4puRKgfUl00Xp/ofqE30wDJnbhHao95A0X2NTvDnKf8KpxT67zZoq0yiMwo54y90pr Rd1+wgagauBZF2r7OeDpL58wICM5HLq631hcA+YD0r05U2WTB3vD7MMXAb5sE76egSn2 weLw==
X-Gm-Message-State: AOAM530/7BQg+0Hl25NIBn9N+O5sjyfbFFoXMkEAgeLrCf6tBhxgyDzO 6iNX5m9/7pauJsW5CnjDtg/11PGfASUjFCThZAMO/g==
X-Google-Smtp-Source: ABdhPJxvR/hrVY2yrVUdige7eAfTC9Nl/hCtNUdpSc9v1kKMptN/WnUFjINzubeWkiR1Oyo5XZ/e4DFJFEvw9oyLQ7o=
X-Received: by 2002:a2e:9b83:: with SMTP id z3mr10464682lji.82.1612191354198; Mon, 01 Feb 2021 06:55:54 -0800 (PST)
MIME-Version: 1.0
References: <e669002f-caff-1e6e-e28b-d09157eb0c07@ericsson.com> <6241F0B6-C722-449E-AC3A-183DE330E7B5@deployingradius.com> <9ddd1593-3131-f5cc-d0db-74bf3db697bf@ericsson.com> <3CB58153-8CCA-4B1E-B530-BA67A6035310@deployingradius.com> <CAOgPGoA3U+XpZMY7J+KGovNx6MtAdEzRaGW33xVJdQNWSi4LVg@mail.gmail.com> <770e6a49-52fc-4e8b-91af-48f85e581fbb@www.fastmail.com> <CAOgPGoBGOMXH-kMhQSujWxnACdmBL845u0ouE0fUYc4rWtUrZg@mail.gmail.com> <ca4c526e-79a0-4fa7-abda-2b626795f068@www.fastmail.com> <3409F71E-4CE4-46BB-8079-BFBE9BE83C9A@deployingradius.com> <66157321-55DC-4831-8EF2-D75934D9024C@deployingradius.com> <20210129183220.GI21@kduck.mit.edu> <1A830492-3404-4BCC-844B-D7D950458BD9@deployingradius.com>
In-Reply-To: <1A830492-3404-4BCC-844B-D7D950458BD9@deployingradius.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 01 Feb 2021 06:55:17 -0800
Message-ID: <CABcZeBMAtmPfG0rctvO8UvnhPqY1etk=SxnonP_t6ysNxH7hVA@mail.gmail.com>
To: Alan DeKok <aland@deployingradius.com>
Cc: Benjamin Kaduk <kaduk@mit.edu>, "<tls@ietf.org>" <tls@ietf.org>, Martin Thomson <mt@lowentropy.net>, EMU WG <emu@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000fa2e9505ba478ce7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/emu/jKyBVkpiC9i9V6TG5j4CHw_Y16w>
Subject: Re: [Emu] [TLS] Fwd: Benjamin Kaduk's Discuss on draft-ietf-emu-eap-tls13-13: (with DISCUSS and COMMENT)
X-BeenThere: emu@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "EAP Methods Update \(EMU\)" <emu.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/emu>, <mailto:emu-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/emu/>
List-Post: <mailto:emu@ietf.org>
List-Help: <mailto:emu-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/emu>, <mailto:emu-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Feb 2021 14:56:04 -0000

On Fri, Jan 29, 2021 at 12:02 PM Alan DeKok <aland@deployingradius.com>
wrote:

>   This is a new message to summarize history, requirements, etc. for
> EAP-TLS and TLS 1.3.  The focus here is the requirements for EAP-TLS, and
> how the 0x00 commitment message versus CloseNotify meets those.  I'll
> ignore the exporter changes here, as those are less controversial.
>
>   The original proposal in the EAP-TLS draft was to send a zero-length
> application data message in order to signal that no more post-handshake
> messages were needed.  From the -05 version:
>
>    When an EAP server has sent its last handshake message (Finished or a
>    Post-Handshake), it commits to not sending any more handshake
>    messages by appending an empty application data record (i.e. a TLS
>    record with TLSPlaintext.type = application_data and
>    TLSPlaintext.length = 0) to the last handshake record.  After sending
>    an empty application data record, the EAP server may only send an
>    EAP-Success, an EAP-Failure, or an EAP-Request with a TLS Alert
>    Message.
>
>   However, the OpenSSL APIs (among others) do not allow for sending zero
> octets of application data.  The proposal was then changed to send a 0x00
> octet.
>
>  There was discussion that CloseNotify could achieve the same goals.  But
> CloseNotify requires an additional round trip.  There are strong opinions
> that additional round trips are bad.
>
>   In addition, CloseNotify prevents the TLS layer from sending a TLS Fatal
> Alert:  https://www.mail-archive.com/emu@ietf.org/msg03092.html


I agree that extra round trips are bad, I'd like to take a step back
here and think about what this message is trying to do. Here's
the relevant text:

   TLS 1.3 [RFC8446] introduces Post-Handshake messages.  These Post-
   Handshake messages use the handshake content type and can be sent
   after the main handshake.  One such Post-Handshake message is
   NewSessionTicket.  The NewSessionTicket can be used for resumption.
   After sending TLS Finished, the EAP-TLS server may send any number of
   Post-Handshake messages in separate EAP-Requests.

The relevant question is when the server knows what post-handshake
messages it will send. There are two points at which the server might
wish to send post-handshake messages:

1. After the server's first flight.
2. After the client's second flight.

Let's take the second case first. If the server is sending (or
potentially sending) post-handshake messages after the client's second
flight (e.g., after reading its certificate), then it can easily send
a close_notify after sending all of them. This will appear in the same
flight as the commitment message would have (because you can't send it
before the post-handshake messages) and avoid the need for an extra
round trip.

The first case, where the commitment message is sent in 0.5-RTT,
is the interesting one. However, the server has no more information
after sending SFIN than it does sending EE, so I believe that the
easiest way to deal with this is with a TLS extension that says
"I do not send any post-handshake messages". This would still
leave the server free to send any relevant alerts in response to
the client's second flight.

-Ekr