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

John Mattsson <john.mattsson@ericsson.com> Thu, 04 February 2021 08:57 UTC

Return-Path: <john.mattsson@ericsson.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 4D47B3A0D3A; Thu, 4 Feb 2021 00:57:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.25
X-Spam-Level:
X-Spam-Status: No, score=-2.25 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H2=-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=ericsson.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 8t3tG1aCrNZP; Thu, 4 Feb 2021 00:57:53 -0800 (PST)
Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50062.outbound.protection.outlook.com [40.107.5.62]) (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 67D643A0D2F; Thu, 4 Feb 2021 00:57:53 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lAIUJBQ38tJuMjSuAztreGHtHxMlCVHuV+YegsT97j+c4aqTQJ6MecAFlpTwpNTfgaEGXi4kYTZ0A0A4AO8i2UDRu68NPsXd7G+ChBIAymJ5WYzeRGZwCen7nYuSfCGWzidJPEdWPOG+r13tZ+DRx1eHCBF8017nSgcxhnIAYAc7pDxe9nDtmqGiW0ODWvlnz9Do09ZklD+ltDvjfO8i/4nDL8e8r9rkWMvsLeHx1GdVcpnZlafLaTUqYhujRjhOBm3LjKyq89Kph1kjD3t875wqEyIoKVEYwr3LGx+1fkTK7IcfBPYnv6NGVs7CHFxg4trQk3eqG2FdlpKUJxm8JA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4BZUHYh8EsjYjoh5ghcpVVzpv5ySQVhikQhqr0NJnz8=; b=cAKtLDmzvC5QArqZKwie1dNNxAk7izPhmflyERPCcEqPFo1lO2jlvi21GW4feLCg9Qipdgm+Ys2sydeYw7PuWLY3tC+J/104437KgI1Yn/HxnZ4AnymAp88V0G5hSKlP3J2vJKBHyZ1enEif7wVD32+7qEPFsdQSgQAnWgT8jt31gkTxlGb5RxyS+ubFi+ri+HPC26dU7icKccb1puNvzFwDhHPSf9UyU3kCPaDiObWsYqhAjSRt/Ve37x7F8on2O13/o9q/ifMUQJb5t6BeecyFsfrvHMWB4KSPZc1xgdSkTv4DpLYbJeOz9oyr/9pyeZjJBDFYiZT6SstwM0sAuw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4BZUHYh8EsjYjoh5ghcpVVzpv5ySQVhikQhqr0NJnz8=; b=Jq0B3ocewvKFf07hJVvzhW+xE7GFcYNqaQBVmAlM+7VPeNCNfhhdXLwdaTNUjhSNC9vjncJz9HpH7yH2YVudccD1LLFdnPeXf691q6SvjiOnFgt7vzOcOUSGaLMFdESQBe0ra5PljOiPWwo6jAO10Uep7rjUGv+sHxB9ayCXH3U=
Received: from (2603:10a6:3:4b::8) by HE1PR0701MB2618.eurprd07.prod.outlook.com (2603:10a6:3:94::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.8; Thu, 4 Feb 2021 08:57:50 +0000
Received: from HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::c555:6e47:970c:1268]) by HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::c555:6e47:970c:1268%11]) with mapi id 15.20.3825.023; Thu, 4 Feb 2021 08:57:49 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: Eric Rescorla <ekr@rtfm.com>
CC: EMU WG <emu@ietf.org>, Benjamin Kaduk <kaduk@mit.edu>, "<tls@ietf.org>" <tls@ietf.org>
Thread-Topic: [TLS] [Emu] Fwd: Benjamin Kaduk's Discuss on draft-ietf-emu-eap-tls13-13: (with DISCUSS and COMMENT)
Thread-Index: AQHW+Kpv+u/tDmvf+kGrhUm432d36qpHxw6A
Date: Thu, 04 Feb 2021 08:57:49 +0000
Message-ID: <470E0468-E1D8-486E-A2CA-2F042EE8F2C2@ericsson.com>
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> <CABcZeBMAtmPfG0rctvO8UvnhPqY1etk=SxnonP_t6ysNxH7hVA@mail.gmail.com>
In-Reply-To: <CABcZeBMAtmPfG0rctvO8UvnhPqY1etk=SxnonP_t6ysNxH7hVA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.45.21011103
authentication-results: rtfm.com; dkim=none (message not signed) header.d=none;rtfm.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [81.225.97.222]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: db56094e-e05b-4c69-cb0b-08d8c8eaf2e7
x-ms-traffictypediagnostic: HE1PR0701MB2618:
x-microsoft-antispam-prvs: <HE1PR0701MB261803FDBBF7CCA9C557EA8C89B39@HE1PR0701MB2618.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: yj2PMWB0EZ1DugXVozGFkFIr+F0kZiqmgKxoq2RNkcYC+8Jo/k3UNATn05pDjkdxI5Bgx8W29n5ySNcaICjvcxRGhowt5hw2UuPKv2UHSAGqnesvspKJdf0mlqufPYylU61GrOQlsow/gr0eApMeufFTqyjpdNH88uFFqq4xTAvO6R/9/p7avDkROX3QqnXnK1a+NMZfoUMGvFOtGg5aIzQLX0741VXXibv0QIo9J6xa0oowH7uYX/1fvJ88IJOjc1n/2vo6ewcqAoS7l6Y/vZUxcpXeMqo0QvYJZrKRai8UervKE8bOaQjaoXOX4toAeCCWQTch+9FaiJHLnLSqYEKcQnPSfeWrcnIK5/L/lGLot/YHiYV6uGSy+GmSVlHlhXkiYy4Ses39F2fYLCVAaSNVui2wth3evf3B0QKocDOMQ2gDzh3Z5duuBCofDJuYTqEGIF8QTID6v0JRI/sF/ecPNBZMMS8c5K9iBqaNXbs6TnRqkxhz7QAHIyicIALpGdL44ijLuz4Px+o01mUaqTy5sxsCDOqFVPG53rK9P1X9FC1bZXBSKOmMV/2pxTyt31y+AkxmKRrfiUlLECIoC3gYyDfOlyfJ7YIXURc0xgzBuMXgr+ZzzjiPqJfwat7GZ1Q8DuFea0zqHn1FQjLpKjfzjnX/yFRS0lEp/cLQCPQ=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0701MB3050.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(396003)(136003)(366004)(346002)(6916009)(6512007)(8936002)(33656002)(83380400001)(2616005)(166002)(66446008)(64756008)(8676002)(478600001)(71200400001)(66946007)(6486002)(76116006)(66556008)(66476007)(53546011)(6506007)(26005)(4326008)(2906002)(316002)(5660300002)(21615005)(44832011)(86362001)(186003)(54906003)(966005)(36756003)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: /QA4mfcVmEUws7BX8af7ufhlcnAojE96BZMUSUWiPnBOH47wAvs+wLgCESS9LtbFSEtzw6njohKK6y4NQlWduBFpLKYANEWb9j9Sa8I/8Zzr60iyrapsRIlcHmoO0zRzn32SPTajCOwC+3OWP+vfCACvYe6hDqWz5uAlNRV+Nk7Xl/tQKSICHYBlHp3j92hMdWfrPdlwXovFk4rwrObbJ8HsqXD8eNfhthJAEUqzhBhCxn2e31uGZQybn95CB33gj+ZMbYl/aeKYJhQlOr7fKKA1SaKinLaYjmyIaEDwiFDy8FXIFk36zIn/+DTPW/rKdeBjKWroa/+pJtgLkKEqgL71KOo+avSXPifIBMxb4DhdV2Q/ryBp4FhPe5eKGsWdvTz3Nwa7D3nuyRF522v0zeKyTl0c12rEblXimVTd4I55YTEpK6hymcYr84BB2gOU2gp9eR5ppMpr7HmDWgxYsRvuiWBPmuq30rM8z/fAKLFDm+L6EL07EcrzjgWm1V+7cEaXrQsQ7A71xpoiivPutE2Z+r7Z81OyzJ7al2LIAtRQs4fR9Vu6qy+8gk/TDFYr7aANhaV14MnmLpv221qVMJzEUpC7hd0np1WfR4DS8pH215XjDPLmYFX53+DAQvVu9EwjNYqIR6wT39nIf61KMh74LqXoX0T7GwX2Rg3NMfTn06EBalj/hDsLwAdUuagTggHQLlaNtIh1FXaZuR/Ny7jQNWE334DoJSI0AvNd2qXqkvbWesEL8S6kWzD1Mi7gBuRm95tNy7IzRHH/yq3enVHjieFPsfgKbZ1MvuS0/dqfViVKSV95eaHb0bwW622/humH/sRI2BAqt8+KP7CdTG2J2JZw5BsITv6gdQ6AaxFaqJVpBM9YHXb96rj+6w3hS6NjcMb91VbTZNaVqpVvttb+7dghW61APEHYFyTr9RHfwlU8Yu6OcrNaKbeoP7zJnXtto0X1CjTHvb7Ka+vgbSei4M8mbUScSzItBF9l+eInMf2CVMXzdC2P5vAgXHP09tec1XcHtV8T28qDbli2Ou14RMHHjYw+/E4SIwlGH7mo8wJjECga/NwLEGIU70wGDkVeicb9R7T8Gl9w0JX4ew==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_470E0468E1D8486EA2CA2F042EE8F2C2ericssoncom_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR0701MB3050.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: db56094e-e05b-4c69-cb0b-08d8c8eaf2e7
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2021 08:57:49.5195 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: F+EUY8iYh946ApKUGhLE3Hd+mT3CW+4kUBvrBPuz9kUGtKTh19XOAIU/d4Csq8TOQJvvzlU1AuRtnDIR/TGnnbrtptObW/U5k2DccRufdDs=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2618
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/l-GWhQIWOccNHRDLYnfcWyqqTKM>
Subject: Re: [TLS] [Emu] Fwd: Benjamin Kaduk's Discuss on draft-ietf-emu-eap-tls13-13: (with DISCUSS and COMMENT)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 04 Feb 2021 08:57:56 -0000

Hi,

I think the idea of a new TLS extension to make TLS 1.3 and EAP-TLS interact better is a very promising idea. This would probably take some time to get specified and implemented so it is probably a future optimization/simplification rather that something EAP-TLS 1.3 should wait for.

An extension that "I do not send any post-handshake messages" would work and remove the need for a commitment message.

------------------------------------
NoPostHandShake Extension
------------------------------------

Clients MAY send this extension in ClientHello. It contains no data.

Servers MAY send this extension in EncryptedExtentions. It contains no data.

When the "NoPostHandShake" extension is negotiated, the server MUST NOT send any post handshake messages.

-------------------------------------

However, this would also stop the client from doing resumption which is also very important. EAP-TLS fragments TLS into a large number of round-trips, and database lookup to authorize clients is often slow, so resumption is essential to get good performance.

The current Post-Handshake NewSessionTicket is not well-suited for EAP-TLS as is introduces the demand for the commitment message as well as introducing an extra round-trip. The NewSessionTicket mechanism is both complex and inefficient for EAP-TLS. Could a new ticket extension be designed that fits EAP-TLS better? Looking quickly it seems like it would be possible. It looks like the current NewSessionTicket mechanism was designed with a requirements to only use symmetric crypto. This would not be important for EAP-TLS.

The below quickly written suggestion use the same PSK derivation as NewSessionTicket, but makes the ticket_nonce a sequence, and use asymmetric HPKE encryption for client privacy.

------------------------------------
ImplicitTicket Extension
------------------------------------

Clients MAY send this extension in ClientHello. It contains the following structure:

struct {
                uint16 ticket_count_request;
} ImplicitTicketRequest;

With the ImplicitTicketRequest, the client requests ticket_count_request implicit tickets.

A server MAY send this extension in EncryptedExtentions. It contains the following structure:

struct {
                uint16 ticket_count;
                opaque hpke_pk<1..2^16-1>;
                uint32 ticket_lifetime;
                opaque ticket<1..2^16-1>;
   Extension extensions<0..2^16-2>;
} ImplicitTicketResponse;

When the "ImplicitTicket" extension is negotiated, it provisions ticket_count number of tickets. The tickets all have the same lifetime and extensions.

When doing resumption based on an implicit ticket, the identity is constructed as follows:

  identity = ENC(hpke_pk, ticket || ticket_seq || ticket_age_add )

  The uint16 ticket_seq is a that sequence that increases for each ticket the client uses. Valid values are 0..ticket_count-1.

  ticket_age_add in the identity replaces the ticket_age_add normally sent in the in the NewSessionTicket message.

  ticket_nonce is set to ticket_seq and the PSK associated with the ticket is computed as defined in RFC 8446.

---------------------------------

Used together, two such extentions would effectively solve all the EAP - TLS 1.3 related issues as they were known a month ago. There has since been discussion if EAP-TLS 1.3 needs keys derived from the client second flight, but I think more analysis before determining if that is the case or not.

Cheers,
John


From: TLS <tls-bounces@ietf.org> on behalf of Eric Rescorla <ekr@rtfm.com>
Date: Monday, 1 February 2021 at 15:56
To: Alan DeKok <aland@deployingradius.com>
Cc: EMU WG <emu@ietf.org>, Benjamin Kaduk <kaduk@mit.edu>, "TLS@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] [Emu] Fwd: Benjamin Kaduk's Discuss on draft-ietf-emu-eap-tls13-13: (with DISCUSS and COMMENT)



On Fri, Jan 29, 2021 at 12:02 PM Alan DeKok <aland@deployingradius.com<mailto: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<https://protect2.fireeye.com/v1/url?k=16c4ad4c-495f9461-16c4edd7-8692dc8284cb-f1f3f2750d360a2a&q=1&e=36033566-ffb1-4757-9586-079c8d5e94a5&u=https%3A%2F%2Fwww.mail-archive.com%2Femu%40ietf.org%2Fmsg03092.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