Re: [TLS] 答复: Connection ID Draft

Eric Rescorla <ekr@rtfm.com> Sat, 14 October 2017 02:47 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 B6E3A132939 for <tls@ietfa.amsl.com>; Fri, 13 Oct 2017 19:47:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=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 7XC0t4LUH00Z for <tls@ietfa.amsl.com>; Fri, 13 Oct 2017 19:47:26 -0700 (PDT)
Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com [IPv6:2607:f8b0:400d:c0d::234]) (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 5FD121321F5 for <tls@ietf.org>; Fri, 13 Oct 2017 19:47:26 -0700 (PDT)
Received: by mail-qt0-x234.google.com with SMTP id o52so22855647qtc.9 for <tls@ietf.org>; Fri, 13 Oct 2017 19:47:26 -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=+Czf8rVcM0Mmxwp0XmNPLSYMpHyQPQT6MuSCwISjVfA=; b=DXKJcIdB1v/nuCj0a/7u7rZLTLx5mrKkYG/2TTrKHzQVS2yCAoiJMDHdBvEtiUktgq CSToLFI04Af9BjyJjSt1/dDzwMFZ8lLiJE89IIFNrOsuBdb2hp8c0MLNBa2HAF6NOPto QGxBcNbRJhXSyeX+YC0lEKuVW1gPxF0SAGj2/gMQeArQXLoUDnAmqo1TIOkI4pK84zaY E3F4o8JRxSgrxc4YYQvS+9ruxze4w6zgxRPY+9SE1JADvBbCCTiQvJZZEBzupWtgI8R4 7p6pjtW7aGbG8T6yKR/ONfPSfCoY7zH0pzMClMDTUxGztI+kNFRhr91YgZ5Zbo3IXQzq ZbvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+Czf8rVcM0Mmxwp0XmNPLSYMpHyQPQT6MuSCwISjVfA=; b=Z1U/6jmMAaWKBA/pFJVDkcfeOtDYB7Dnz68lamT8PtAC67xaivlkMC3Xi3mEih9n4k v6UfgB84xMJCI0B5E/8MSIgY2PbdrnbvltDphoQk+bHnGZstRHA5VERoAutnZKVePXfZ ftO2xySsclcp4sRKn7mnkADvucwdW0Ji9y9cSUYsEHZgPGWvVnboHiAXL5I7k8yOqJhp ML39R0GXWskZIij4JwFDDsOhjD//Ad2tzxXZJyZNb9FEpI5T6dx6olM7yeJK0FCUmAoP D/oFj5zeur/9r41pYU8tgvyU9vEC1W7y/z+13R0qvxJWBRl/uAotX+7gtDWCaitqiIvD lalA==
X-Gm-Message-State: AMCzsaX5M5JlbCV+yPfIF1US4H5RUM/LsGS/J3noNxfNksTM78OwdaO5 QfOJ1INT3fil5cAUAg+j96uizbiYnyeDpH6TSmx6UzpT
X-Google-Smtp-Source: AOwi7QA+Veds5/4BYXYqEDZcLkPusTz+W7kzQIKmWkufIdKD6TgNsttE79BmW/i66KO/2JQAa1Ik2DXvTJNIKE592EM=
X-Received: by 10.37.87.198 with SMTP id l189mr2182497ybb.71.1507949245517; Fri, 13 Oct 2017 19:47:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.75.194 with HTTP; Fri, 13 Oct 2017 19:46:44 -0700 (PDT)
In-Reply-To: <DBDF9AE44733284D808F0E585E1919022C7ABC6F@dggemi508-mbs.china.huawei.com>
References: <DBDF9AE44733284D808F0E585E1919022C7A77E2@dggemi508-mbx.china.huawei.com> <CABcZeBP_XXtKLH_1uJTxsak7pUbjcr8SsffdDvG6jp++M1oXoQ@mail.gmail.com> <DBDF9AE44733284D808F0E585E1919022C7ABC6F@dggemi508-mbs.china.huawei.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 13 Oct 2017 19:46:44 -0700
Message-ID: <CABcZeBOEU7c4_C0OqPkuSKp=xOiD58D6+25vTOkPmNX0VxiHYw@mail.gmail.com>
To: yinxinxing <yinxinxing@huawei.com>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a113ffca41e68e3055b78cb79"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Z4oR96j-ONzNs8Tqxp6YCWDH2UU>
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: Sat, 14 Oct 2017 02:47:29 -0000

On Fri, Oct 13, 2017 at 7:41 PM, yinxinxing <yinxinxing@huawei.com> wrote:

> Thanks Ekr.
>
>
>
> For “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.”, the key
> point of describing the generation of CID is to avoid linkability between
> new CID and old ones, although there are lots of valid ways.
>

I don't really get what you're proposing here. As I said, there are a lot
of ways to generate connection IDs and it's not helpful to prescribe one.
We might be able to require that it not be possible to distinguish whether
two conn IDs are from the same connection with probability > \epsilon, but
even that is notrivial if (for instance) they have a generation ID. So I'd
prefer to describe the issue in the security considerations and leave the
details up to implementations.

-Ekr


>
> Regards,
>
> 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> 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] *代表 *Eric Rescorla
> *发送时间:* 2017年10月13日 7:14
> *收件人:* 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
>
>
>
>
>
>
>
>
>