Re: [TLS] Connection ID Draft

yinxinxing <yinxinxing@huawei.com> Mon, 23 October 2017 07:53 UTC

Return-Path: <yinxinxing@huawei.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 DD41C13EDCC for <tls@ietfa.amsl.com>; Mon, 23 Oct 2017 00:53:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.22
X-Spam-Level:
X-Spam-Status: No, score=-4.22 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 v56mu7GxNG0n for <tls@ietfa.amsl.com>; Mon, 23 Oct 2017 00:53:41 -0700 (PDT)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9761213EDCB for <tls@ietf.org>; Mon, 23 Oct 2017 00:53:40 -0700 (PDT)
Received: from 172.18.7.190 (EHLO lhreml702-cah.china.huawei.com) ([172.18.7.190]) by lhrrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DRD71086; Mon, 23 Oct 2017 07:53:38 +0000 (GMT)
Received: from DGGEML406-HUB.china.huawei.com (10.3.17.50) by lhreml702-cah.china.huawei.com (10.201.108.43) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 23 Oct 2017 08:53:35 +0100
Received: from DGGEML511-MBS.china.huawei.com ([169.254.4.184]) by dggeml406-hub.china.huawei.com ([10.3.17.50]) with mapi id 14.03.0301.000; Mon, 23 Oct 2017 15:53:32 +0800
From: yinxinxing <yinxinxing@huawei.com>
To: Eric Rescorla <ekr@rtfm.com>
CC: "tls@ietf.org" <tls@ietf.org>
Thread-Topic: [TLS] Connection ID Draft
Thread-Index: AdNL0DDMc9iDHxhWQTW8k0u7S4PL/w==
Date: Mon, 23 Oct 2017 07:53:32 +0000
Message-ID: <DBDF9AE44733284D808F0E585E1919022D14F6FB@dggeml511-mbs.china.huawei.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.184.225.248]
Content-Type: multipart/alternative; boundary="_000_DBDF9AE44733284D808F0E585E1919022D14F6FBdggeml511mbschi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.59EDA003.0031, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.4.184, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: f4e239171d64f650785ae4a1845856df
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/pee4oMj6FFzcKoF-_bgTreFrWns>
Subject: Re: [TLS] Connection ID Draft
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: Mon, 23 Oct 2017 07:53:44 -0000

Hi Ekr,

For the post-handshake messages in the draft, I have some comments.


1.       When one peer sends NewconnectionID message to the other, it uses a newly defined handshake type. This new CID is attached in the payload of the record message. But there must be some information for the receiver to know which CID is going to be updated. I mean that when sending new CID through the NewConnectionID message, the record header should include the “old” CID, so that the receiver knows which one to replace.

2.       In the draft, is the new CID encrypted? I suggest that the new CID (for the first time sending) can be encrypted  to make sure that an attacker can not associate a new CID with an old CID. Let’s consider a case where an attacker wants to track an IOT device. If the newly generated CID is not encrypted when updating, the attacker can associate the new CID with the old one. Then, when the peer sends message with the new CID later, the attacker knows this packet is sent from the victim. If we encrypt the new CID when updating, this tracking problem can be avoided.

Another comment is about symmetrical CID.

1.       Consider a client sends a normal CID (CID length is not zero, named C-CID) to server, but the server doesn’t wants to use client’s CID and sends a CID generated by the server (named S-CID) to the client. At the same time, client needs to know server has ignored C-CID (which means the downlink application message from the server will not include C-CID), and client will use S-CID in its application message. Will the draft cover this scenario?

Yin Xinxing

发件人: Eric Rescorla [mailto:ekr@rtfm.com]
发送时间: 2017年10月13日 21:00
收件人: yinxinxing
抄送: tls@ietf.org
主题: Re: [TLS] Connection ID Draft



On Fri, Oct 13, 2017 at 1:11 AM, yinxinxing <yinxinxing@huawei.com<mailto:yinxinxing@huawei.com>> wrote:
Hi Ekr,

Thanks for your effort. The draft looks good. A few comments are listed below.


1.       Based on the draft, for either DTLS1.2 or 1.3, server can’t differentiate whether the packet from client is a “connection ID” packet or a standard DTLS 1.2/1.3 packet. (I saw Thomas Fossati and Nikos also introduced this problem)

Maybe we can add a new “ContentType” in the DTLS record format to help server identify the “connection ID” packet. In addition, you see the length of the record payload is limited by 2^14-1, this means the first two bits of “length” is zero. We could utilize this feature and set the first two bits or more bits of CID being one, e.g., 1111….(but the CID must be put between sequence number and length). When server finds 1111 after sequence number, it knows this is a “connection ID” packet. However, I don’t know whether it is proper to use such magic number. In my view, adding new contenttype may be a choice.

As I said to Nikos, for DTLS 1.2, you can use a specially-constructed CID that would not be a valid length field. This can actually just have the leading bit set. As we're revising the DTLS 1.3 record format, we would need to do something different for that.


2.        For DTLS 1.2, there is no NewConnectionID and RequestConnectionID message. DTLS 1.2 server and client also has the requirement to request for a new CID, and at present, many products still use DTLS1.2 and I believe it will continue to be used for a long time even if TLS/DTLS1.3 is published. My point is that we need a corresponding method for updating CID for DTLS1.2 too.
In general, the WG is working on TLS 1.3, not TLS 1.2, so I'm not really that excited about putting a lot of effort into enhancing TLS 1.2. The basic extension works fine for them, but if they want to change CIDs, then they should adopt DTLS 1.3.


I don’t quite understand the following sentences

“In DTLS 1.2, connection ids are exchanged at the beginning of the

   DTLS session only.  There is no dedicated "connection id update"

   message that allows new connection ids to be established mid-session,

   because DTLS 1.2 in general does not allow post-handshake messages

   that do not themselves begin other handshakes.”

The only post-handshake messages allowed in DTLS 1.2 are ClientHello and HelloRequest.


Besides, for CID in DTLS1.3, I think the corresponding responding messages of  NewConnectionID and RequestConnectionID are also needed to ensure that the peer has received CID.

No, you use the ACK for these (https://tools.ietf.org/html/draft-ietf-tls-dtls13-01#section-7). This is one reason why there is not a straightforward port to DTLS 1.2 for these messages.


4.       The generation of CID should be more concrete. For example, using random number or a counter?
I explicitly did not want to do that, because there are a lot of valid ways to generate CID. This is also what we did in QUIC.

-Ekr



Regards,
Yin Xinxing

发件人: TLS [mailto:tls-bounces@ietf.org<mailto:tls-bounces@ietf.org>] 代表 Eric Rescorla
发送时间: 2017年10月13日 7:14
收件人: tls@ietf.org<mailto:tls@ietf.org>
主题: [TLS] Connection ID Draft

Hi folks,

I have just posted a first cut at a connection ID draft.
https://tools.ietf.org/html/draft-rescorla-tls-dtls-connection-id-00

Comments welcome.

-Ekr