Re: [Emu] Commitment Message in draft-ietf-emu-eap-tls13

Mohit Sethi M <mohit.m.sethi@ericsson.com> Mon, 15 June 2020 13:52 UTC

Return-Path: <mohit.m.sethi@ericsson.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 5083F3A0D95 for <emu@ietfa.amsl.com>; Mon, 15 Jun 2020 06:52:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.091
X-Spam-Level:
X-Spam-Status: No, score=-2.091 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, 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 uTAi_XnbP4Ga for <emu@ietfa.amsl.com>; Mon, 15 Jun 2020 06:51:58 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2046.outbound.protection.outlook.com [40.107.21.46]) (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 24CC23A0D93 for <emu@ietf.org>; Mon, 15 Jun 2020 06:51:58 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BUh8XL5trT1VZozJ3lwXKpOZVdlT8iJYUhQyXmGxYWkt4Sp193h/w/V56U/oo2xKQtHH1ksk2WZTffnABJcffnt8JGYYuP5TDHkXkRV0guTOrKpFr3S0N6c2dLhhfQbMsseQv5vGHCWDo5HYDHzkqXUHHV0V6eACbA8RE+8comhLEWSOCqbbBj13gPGVUtBwI93TgR2nrwJTvs8/7bcSwtDFybKYThfbvi3KhUbka0IOOXcdgdvSyi1ibCyiUGlCrySHioMcYxC/Mq9HQ8E0DAbCZT6bx+E7a9nEMyWYonmHBVmDW6pHNQlAl+0w1Y/BZZA52+q3IHeJQVS+wexU2Q==
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=b89mafzhtZqBkTHuJ5w2hOLYw5gMj3qNuXq+bN9Qb74=; b=gAggAaDtI+i8ie3cvfJW/o5MY0BviJ6xQ4SDHbP+YBMuWeIQzRbdVtCd8nzJbfJrALMu83qN8zDxRimxqZuZajtTVq5cxR9inuVRABBXO9HEZ/1LPzEy0QQNFc7ti9mb3KP+uQtYCmaXIgeIqTVvxFdykd3FwyGQf0Iewj3udPG9gGhOWaC2OHVTJU3Tp/z7XDonQYjB2W+fplvYs6Z0mma1oY/MxpiufD9dl7od+SRT5mbYFH1BjNK4NnORjdj/YmXjNIPSICex4XEURvbRVjH6XIXJkFYN+1yEfeZNuTdlvDLJzAZV51G/MoKqbDJEp48MnmhB6GFCGABPYDe8Mg==
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=b89mafzhtZqBkTHuJ5w2hOLYw5gMj3qNuXq+bN9Qb74=; b=iZZbU3O7qB3F1W96HownOnv5xypqBKBG9D7LjH0zl+PL8O0CbmpbLBIwXxIm0MaJRqT6ses8kvEugLvPb/dsXWq6OImS2Kabs7Pf3pKeOMHJafcLtr3R49JQ77WT3CrSeCDBTbLlOqE7KlplVCMwZ0KJzI5ExYpE9w/b0KItCzI=
Received: from HE1PR07MB3386.eurprd07.prod.outlook.com (2603:10a6:7:2d::25) by HE1PR0701MB2779.eurprd07.prod.outlook.com (2603:10a6:3:94::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.10; Mon, 15 Jun 2020 13:51:55 +0000
Received: from HE1PR07MB3386.eurprd07.prod.outlook.com ([fe80::2569:99db:f1db:4f8e]) by HE1PR07MB3386.eurprd07.prod.outlook.com ([fe80::2569:99db:f1db:4f8e%7]) with mapi id 15.20.3109.010; Mon, 15 Jun 2020 13:51:55 +0000
From: Mohit Sethi M <mohit.m.sethi@ericsson.com>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>, "emu@ietf.org" <emu@ietf.org>
Thread-Topic: [Emu] Commitment Message in draft-ietf-emu-eap-tls13
Thread-Index: AQHWQxwhidapLR1LHUae6YFWy2dwOg==
Date: Mon, 15 Jun 2020 13:51:55 +0000
Message-ID: <1e769dbd-b563-0ba6-c398-8066c6151310@ericsson.com>
References: <AM0PR08MB37162AE5F0175B95A237B31EFA810@AM0PR08MB3716.eurprd08.prod.outlook.com>
In-Reply-To: <AM0PR08MB37162AE5F0175B95A237B31EFA810@AM0PR08MB3716.eurprd08.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [2001:14bb:140:4147:9db5:d2f7:7e10:bb6b]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 6a8b812c-4ac2-4963-065c-08d8113343ed
x-ms-traffictypediagnostic: HE1PR0701MB2779:
x-microsoft-antispam-prvs: <HE1PR0701MB277999968C4CF1FCD6597BDCD09C0@HE1PR0701MB2779.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 04359FAD81
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: iNK2MCxPoHsPGhi7gEurWC528hNRbJSAu1ubF28J23nIQ3Q4OLWzUoStOqAbQ1l9CDSeKHcLmHcojB7Y4vGyczkgtmOPVJ7XkDTtYEVk8ErGg66ox0LqEtiNhU9rUzIRQCvZ0Jv4qyCwcqKVq6ajjVXakufxSLmrjDpxuqukAZRrqa4IKo4PBMJ5jdcYoKyD/tUtCrw65KovYlTHMo7lOTJVchTn67mMzsBFoozRfDHv1b+EAOAExadIjnfcXJN1aTQf/XZAwwXEUj9aYgQVAyenQvgvyILyHCkJE0rPxJNnxEK7/051jr6OqSk/LMEB7cJxankUg/9NMD3GwkbS2VAwtWZ1TfWEyhymiqb5ZnDfjxYffL9rU2rBrvDZ66dwNmm0q+9xmhFbkSS78i4Skq7cjLX7/5UM6wD3+7jVyRfAZcgWxfed+J36F32fFuxt+06U3SxTk4SGoOH9Kj56AQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR07MB3386.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(366004)(39860400002)(396003)(346002)(376002)(66946007)(2616005)(66476007)(66556008)(64756008)(66446008)(478600001)(2906002)(316002)(8936002)(6486002)(36756003)(53546011)(186003)(6506007)(76116006)(6512007)(31686004)(966005)(18074004)(31696002)(86362001)(71200400001)(166002)(8676002)(5660300002)(110136005)(83380400001)(15650500001)(43740500002); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: zs1VzAxEPZJMmP4OR2Sh5gteKUojeS1PyPkWwvai8DAf+bq247NMbCDNp+BRhg+/UK2I0IfzCULPVxna74rp7QSZLOvA+yPaU9xY97flt6PNe8zO37ONiWedEib4mDvCvK6piFxuTSULRV0szLPHjGNFXFm3F/q053o3GHZguERwQNujFmDfvPJA8BXMj1vsiuS3b3k8o0DMnUb/aF6P5gBduoFe6T/UQZH6LrIhqr7eXxMe1twZcMsjpqHVCEvUwHDrbGBCGl2YdAQiaMOmmr0W+f2iCaYVUqS1tZwTZsjDfxFI3vzzfy2R3yMhwUsD0J2/7tR8qM0mAOo6HVxAdg/sVvSVYd0y6tZGrwmfvzODrHKNzhC8z2AOLQEqjB9BcKVMpOm+CYLxXfiPa9jDDxXr3wzRqxypNNRM+yCT9Q180KyZRp82dia/g1HBrwLXCJVPQGCwsLzkdIH97zHkm/Zq7MMbYGJbJL2iAza34QIQ+BU4aljs2cAk/u724CFnoIcC/Y/QINNIxjjyITHxn+i5HkVzwM/qsiizKcG6LuQ47U+HPQQY3elQ8fdfBmnD
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_1e769dbdb5630ba6c3988066c6151310ericssoncom_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6a8b812c-4ac2-4963-065c-08d8113343ed
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2020 13:51:55.1747 (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: etmjPx9obJs9Ub5GW232WIByMSrj20dXXfTnTy8BBF3NT328xtdspVw9kv30JZN6ByQQY3y6VoDDexEi36hlSt3m/Fk2FHjt9RExqG9vzKc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2779
Archived-At: <https://mailarchive.ietf.org/arch/msg/emu/aDLdma-w3DZzndxGIXjd9Plrc50>
X-Mailman-Approved-At: Mon, 15 Jun 2020 06:53:44 -0700
Subject: Re: [Emu] Commitment Message in draft-ietf-emu-eap-tls13
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, 15 Jun 2020 13:52:01 -0000

Hi Hannes,

Unfortunately you are wrong here. The design decision was in fact taken to avoid changes to the underlying TLS implementation while also avoiding changes to RFC 3748. To summarize:

Jouni Malinen pointed out that mapping session resumption of TLS 1.3 to EAP-TLS is non-trivial. See his email here: https://mailarchive.ietf.org/arch/msg/emu/SBdblHmLQTbBwoZHK8Rih-g5ne8/. Essentially, TLS 1.3 allows a server to send a Post-Handshake message with a NewSessionTicket at any time. However, in EAP-TLS this is not possible. The TLS tunnel is torn down after authentication. John notes in his response to Jouni (https://mailarchive.ietf.org/arch/msg/emu/nNUw61cTvHgWj8F0sOVRoICUzlk/) "in TLS the connection is assumed to stay open for a long time after the client sends Finished, in EAP the connection is assumed to be closed shortly after."

An earlier cleaner way of sending NewSessionTicket required an extra round trip and left the peer uncertain about the next message (https://tools.ietf.org/html/draft-ietf-emu-eap-tls13-00#section-2.1.1). Jouni highlighted this uncertainty for a peer: " the peer has no idea whether the NewSessionTicket is delivered after ClientFinished. In other words, the next message in the sequence could be either continuation of EAP-TLS method or EAP-Success". You ask "why cannot the EAP-Success or EAP-Failure serve that purpose?". See RFC 3748 (https://tools.ietf.org/html/rfc3748) which says the following:

   Implementation Note: Because the Success and Failure packets are not
   acknowledged, they are not retransmitted by the authenticator, and
   may be potentially lost.  A peer MUST allow for this circumstance as
   described in this note.

and

 On the peer, after success result indications have been exchanged by
   both sides, a Failure packet MUST be silently discarded.  The peer
   MAY, in the event that an EAP Success is not received, conclude that
   the EAP Success packet was lost and that authentication concluded
   successfully.

Thus, EAP-Success cannot be used as a reliable notification mechanism. Till version 05 of the document, we used an empty application data record as a notification of the last handshake message. The text said:

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, Jouni in a later response (https://mailarchive.ietf.org/arch/msg/emu/WA8OREhTsF8JEPvaixGoCwmd1qY/) noted that such behavior is non-trivial to achieve with OpenSSL. He notes " OpenSSL is not willing to send such an empty TLSPlaintext structure. SSL_write() has following to say : 'You should not call SSL_write() with num=0, it will return an error. SSL_write_ex() can be called with num=0, but will not send application data to the peer.'"

Therefore, the text was later updated to:

 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 sending a Commitment Message.  The Commitment Message is
   a TLS record with application data 0x00 (i.e. a TLS record with
   TLSPlaintext.type = application_data, TLSPlaintext.length = 1, and
   TLSPlaintext.fragment = 0x00).  Note that the length of the plaintext
   is greater than the corresponding TLSPlaintext.length due to the
   inclusion of TLSInnerPlaintext.type and any padding supplied by the
   sender.  EAP server implementations MUST set TLSPlaintext.fragment to
   0x00, but EAP peer implementations MUST accept any application data
   as a Commitment Message from the EAP server to not send any more handshake messages.


There is still a challenge in scenarios where a server chooses not to issue any NewSessionTicket. In this email: https://mailarchive.ietf.org/arch/msg/emu/PgGjhmafbbSJCcQctDsFw7AvNmU/ Jouni notes this problem:

I did see some issues when OpenSSL 1.1.1 when disabling sending of
session tickets, though. The current draft indicates that the empty
Application Data payload would be send out in the same EAP packet with
the server's Finished message, i.e., before the server having
authenticated the peer. And this would be done without the peer having
used TLS early data (which is explicitly disallowed in the draft). That
combination did not work with my experiments since OpenSSL was rejecting
the SSL_write() operation after the server having written own Finished
message, but before having received the Finished message from the peer.
The OpenSSL documentation seemed to imply that SSL_write_early_data()
could be used by the server _if_ the client first sent early data.. At
least in my tests, OpenSSL rejected that call without early data from
the client.


This is why the current text also says the following:

 The Commitment Message may be sent in the same
   EAP-Request as the last handshake record or in a separate EAP-
   Request.  Sending the Commitment Message in a separate EAP-Request
   adds an additional round-trip, but may be necessary in TLS
   implementations that only implement a subset of TLS 1.3.  In the case
   where the server sends the Commitment Message in a separate EAP-
   Request, the conversation will appear as shown in Figure 9.  After
   sending the Commitment Message, the EAP server may only send an EAP-
   Success, an EAP-Failure, or an EAP-Request with a TLS Alert Message.


Thus, the current design decision has been guided by parallel implementation experience and it is the best solution we could come up with (given all the practical limitations).

--Mohit

On 6/12/20 11:36 AM, Hannes Tschofenig wrote:
Hi all,

This has probably been discussed extensively in the EMU group. I am sorry to bring it up again but I believe this is a bad design decision. I raised it in my short review just sent to the list but I believe it is worthwhile to point it out separately.

draft-ietf-emu-eap-tls13 introduces a new message to EAP-TLS, namely the Commitment Message. This requires extra code in an implementation because the normal behavior would be to run a TLS stack and then send encrypted data.
EAP-TLS does, however, not send application data*. This message changes this. Not only does it not send encrypted application data it requires an implementation to transmit a plaintext application data record after the application traffic secret has been created and before that application traffic secret is used to protect post handshake messages. This will make it difficult to re-use an off-the-shelf TLS 1.3 stack.


There is very little motivation about this message other than



“

   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 sending a Commitment Message.

“

I might miss something important here but why cannot the EAP-Success or EAP-Failure serve that purpose?

Here are two examples to explain what I mean:


  1.  Failed exchange



    EAP Peer                                              EAP Server



                                                         EAP-Request/

                                 <--------                  Identity

    EAP-Response/

    Identity (Privacy-Friendly)  -------->



                                                         EAP-Request/

                                                    EAP-Type=EAP-TLS

                                 <--------                (TLS Start)

    EAP-Response/

    EAP-Type=EAP-TLS

   (TLS ClientHello)             -------->

                                                         EAP-Request/

                                                    EAP-Type=EAP-TLS

                                                    (TLS ServerHello,

                                             TLS EncryptedExtensions,

                                              TLS CertificateRequest,

                                                     TLS Certificate,

                                               TLS CertificateVerify,

                                                        TLS Finished,

                                 <--------        Commitment Message)

    EAP-Response/

    EAP-Type=EAP-TLS

   (TLS Certificate,

    TLS CertificateVerify,

    TLS Finished)                -------->

                                                         EAP-Request/

                                                    EAP-Type=EAP-TLS

                                 <--------          (TLS Fatal Alert)

    EAP-Response/

    EAP-Type=EAP-TLS             -------->

                                 <--------               EAP-Failure



  1.  Successful Exchange with Post-Handshake NewSession Ticket


    EAP Peer                                              EAP Server



                                                         EAP-Request/

                                 <--------                  Identity

    EAP-Response/

    Identity (Privacy-Friendly)  -------->

                                                         EAP-Request/

                                                    EAP-Type=EAP-TLS

                                 <--------                (TLS Start)

    EAP-Response/

    EAP-Type=EAP-TLS

   (TLS ClientHello)             -------->

                                                         EAP-Request/

                                                    EAP-Type=EAP-TLS

                                                    (TLS ServerHello,

                                             TLS EncryptedExtensions,

                                              TLS CertificateRequest,

                                                     TLS Certificate,

                                               TLS CertificateVerify,

                                 <--------              TLS Finished)

    EAP-Response/

    EAP-Type=EAP-TLS

   (TLS Certificate,

    TLS CertificateVerify,

    TLS Finished)                -------->

                                                         EAP-Request/

                                                    EAP-Type=EAP-TLS

                                               (TLS NewSessionTicket,

                                 <--------        Commitment Message)

    EAP-Response/

    EAP-Type=EAP-TLS             -------->

                                 <--------               EAP-Success


Ciao
Hannes

(*): FWIW Post handshake messages are protected with the application traffic secrets.

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


_______________________________________________
Emu mailing list
Emu@ietf.org<mailto:Emu@ietf.org>
https://www.ietf.org/mailman/listinfo/emu