Re: What to do about multipath in QUIC

Kazuho Oku <kazuhooku@gmail.com> Mon, 16 November 2020 07:53 UTC

Return-Path: <kazuhooku@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B40F13A151B for <quic@ietfa.amsl.com>; Sun, 15 Nov 2020 23:53:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 UM5a2XUxoTLu for <quic@ietfa.amsl.com>; Sun, 15 Nov 2020 23:53:57 -0800 (PST)
Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 22D8A3A1521 for <quic@ietf.org>; Sun, 15 Nov 2020 23:53:57 -0800 (PST)
Received: by mail-ej1-x632.google.com with SMTP id cw8so23029386ejb.8 for <quic@ietf.org>; Sun, 15 Nov 2020 23:53:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CD8csRDMhTO+ugNNKqxds0YUpXwnCbQNS3Bnv+UhB5c=; b=doFAR7/Xoi1CzV1lv2j1Mx8W6RP4mECCnA/vTgdjd0TBnMWlEsZaVWa7MYXm0lgeZE /GbKPUOHhdKVGuq8Lr9d+ObbXjZpAobh0OmUpVQgg3Cb6rjD6tYhgD1Sl9WY+WMhR0xs Tzz47dLPG9RlKG/R12uus7tJBaLHRUWovhzX7ui64BU1AH5WVv8enS9oqg7/+lrmlhBo sYhzxVAyPwQtDTeY2ujNRyy/xpCOqrFC6Crmfy5la9NsR5qBMau1/awmoHkgmo7V9ktX amdPIV56ueoHWqhAp6Gif65s4DNlm8Gztu4cSysd6GCmHifL35PYVVw0h8gUceKNFthT b+oA==
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=CD8csRDMhTO+ugNNKqxds0YUpXwnCbQNS3Bnv+UhB5c=; b=sx+OcMUFH2B/FhQMYkigbXBKDlCsyfguqHxohmadyMgz3ZkMfycu+VS8KUZCEKtmxB 4F2S3NKEoL9AK2dou4eljq8aki2QeFbwmcaMCMtxec5m4nJja3yEJKNXMcMERsvA5P7N zk9D/1I1DZ9D8OK894ZEDERSz7ezStEmLnGF4I9twtuSAz/8vYlCuMtpRmPBB+Eo1KQT xYP1UYdIqZhaLcpvEUGzSRbRB/b5SkOfxEhgEdDYU3FdvKki07EUf55I6RMKl7NBZamn dvhEZCoRa9vIPygscozdTgQLLeSq9lAgDqhu6TtLWnGmQYgEQyftZBvxqRuRX9n9mT+S ZK5Q==
X-Gm-Message-State: AOAM5318cG3W8ppqAwxiFq/O2n2tGIDO8msvWC//YWpVBnMM/J8MhZdn sV3Ly4duKPPp5lqYNK7NCThWhCqy8Cj1kU5u6xs=
X-Google-Smtp-Source: ABdhPJyWvGCUXvCQZr7lwIs6BC4Cr/avzthxHH4h3YoaW88HsL1KxiypP6zm5cpmXdy1uo3RFMlLWFCapBB/ald0qM8=
X-Received: by 2002:a17:906:a43:: with SMTP id x3mr13464801ejf.197.1605513235327; Sun, 15 Nov 2020 23:53:55 -0800 (PST)
MIME-Version: 1.0
References: <538215d1-3b9e-4784-920d-03be4c3a503a.miaoji.lym@alibaba-inc.com> <CAN1APddB4JDo281L0USsU7FSiQxRNi-LaB8ZS0a9kLAgeNJwrw@mail.gmail.com> <54510017-fa91-555f-0219-0859d6686b74@huitema.net> <CAMDWRAaSeC9Yd1DqzM9o5_CS5Kct0aNS_LUzty5YPO_5fBf4qw@mail.gmail.com> <CANatvzyEfkRqgCArC8sXaS1-1DckxjspBLqLyLNdHx-RDKjT_Q@mail.gmail.com> <CAHgerOGGyAkE=TbCSuTO=T6HK9EM_+m+ASwPRm=o33HBrx7p3Q@mail.gmail.com>
In-Reply-To: <CAHgerOGGyAkE=TbCSuTO=T6HK9EM_+m+ASwPRm=o33HBrx7p3Q@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Mon, 16 Nov 2020 16:53:43 +0900
Message-ID: <CANatvzz_KSBws_upnx00P7JK=MbgyDRrR5n2VJcr1_=y=P6dfQ@mail.gmail.com>
Subject: Re: What to do about multipath in QUIC
To: Yunfei Ma <yfmascgy@gmail.com>
Cc: Yanmei Liu <healing4d@gmail.com>, quic <quic@ietf.org>, "Liu, Hongqiang(洪强)" <hongqiang.liu@alibaba-inc.com>, Christian Huitema <huitema@huitema.net>, Yanmei Liu <miaoji.lym@alibaba-inc.com>, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, "Ma, Yunfei" <yunfei.ma@alibaba-inc.com>, "安勍(莳逸)" <anqing.aq@alibaba-inc.com>
Content-Type: multipart/alternative; boundary="00000000000012ef6e05b434aeb5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/qqtiz0Nu0WYNT_zjpulWvfzYh4k>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Nov 2020 07:54:00 -0000

2020年11月16日(月) 16:32 Yunfei Ma <yfmascgy@gmail.com>:

> Dear Kazuho,
>
> Thanks for providing this alternative solution. I think it's great, but
> please correct me if I am wrong. In the quic-tls-32 section 5.3., it reads:
>
> *"The exclusive OR of the padded packet number and the IV forms the AEAD nonce."*
>
>
> So my question is: if we want to embed the sequence number of the connection ID into the AEAD nonce, don't we need to incorporate this method into section 5.3.?
>
>
That's true. AEAD takes three inputs: secret, IV,  nonce.

In order to avoid reuse, we need to make either of the three a per-path
variable. My point is that changing the definition of nonce is the easiest,
because it is a value that is calculated for each encrypt / decrypt
operation, and because we have space to incorporate the path identifier
(being the sequence number included in the NEW_CONNECTION_ID frame).

That's going to be a small enough change that can be made in the multipath
extension.


> Thanks,
>
> Yunfei
>
>
> On Sun, Nov 15, 2020 at 9:19 PM Kazuho Oku <kazuhooku@gmail.com> wrote:
>
>>
>>
>> 2020年11月16日(月) 8:25 Yanmei Liu <healing4d@gmail.com>:
>>
>>> Hi Christian and Lucas,
>>>
>>> Thanks a lot for the advice :-)
>>>
>>> > The use of AEAD is only safe if the same packet number is not reused
>>> twice with the same key. If we use multiple packet number contexts, AEAD is
>>> only safe if these contexts use different encryption keys. This requires
>>> adding a key derivation procedure for the "sub connection", and also adding
>>> ways to identify the relevant key in the incoming packets. This gets
>>> complicated very quickly, especially if we want to keep the possibility of
>>> using zero-length connection identifiers on the client side.
>>> > I use a concept very similar to the sub-connection, but only as a way
>>> to manipulate paths, so the client can instruct the server when paths ought
>>> to be abandoned. Otherwise, I just keep track of which PN maps to which
>>> path.
>>>
>>> We have tried to use the same packet number space in all the paths (or
>>> sub-connections) before, and have found that it brought much complexity in
>>> implementation for loss recovery.
>>> In the meanwhile, the AEAD security problem mentioned above should be
>>> solved. Another way to solve this problem is using different keys in
>>> different paths, but it also brings much complexity in key derivation as
>>> you have mentioned.
>>>
>>> We have found a third solution in
>>> https://tools.ietf.org/id/draft-huitema-quic-mpath-req-01.txt : create
>>> nonces by mixing the IV with both the path specific connection ID and the
>>> packet sequence number.
>>> If we can mix Destination Connection ID in for each packet's AEAD nonce,
>>> then it will be safe to use the same key in all the paths with different
>>> packet number spaces.
>>>
>>
>> Or as an alternative, we can encode the sequence number of the connection
>> ID directly in the unused part of AEAD nonce (size of nonce is 96 bits in
>> AES-GCM, 128 bits in chacha20-poly1305, but we only use 62 bits). The
>> benefit of such an approach is that endpoints would not be required to have
>> additional state related to AEAD. Endpoints already have the mapping
>> between connection IDs and their sequence numbers, all they need to do is
>> pass that sequence number as part of the AEAD nonce.
>>
>> But since QUIC-TLS has been in the last-call period, would it be able to
>>> add this modification into QUIC-TLS?
>>>
>>
>> I do not think we have to, especially if we embed the sequence number of
>> the connection ID into the AEAD nonce.
>>
>>
>>>
>>>
>>> Thanks,
>>> Yanmei
>>>
>>>
>>>
>>>
>>> On Fri, 13 Nov 2020 at 01:04, Christian Huitema <huitema@huitema.net>
>>> wrote:
>>>
>>>>
>>>> On 11/12/2020 3:10 AM, Mikkel Fahnøe Jørgensen wrote:
>>>>
>>>>   1. We think QUICv1 has already laid down the foundation to build a general-purpose multi-path since migration can be viewed as a special type of multi-path. Therefore, we think one should reuse the design of migration in QUIC-v1 as much as possible, along with the features such as PATH_CHALLENGE/PATH_RESPONSE for path challenge and address validation, and NEW_CONNECTION_ID/RETIRE_CONNECTION_ID for CID renegotiation of new path(which is called Sub-connection in our draft). Reusing these features of QUIC-v1 with small extensions has enabled us to get general-purpose multi-path features with very little efforts in
>>>> Alibaba’s XQUIC(an implementation of QUIC-v1).
>>>>
>>>> Yes. That's a major investment in QUIC V1, and we should keep it.
>>>>
>>>>   2. We find that the simplest way to add a second path is to use a sub-connection. The concept of sub-connection is directly inherited from connection in QUIC-transport, defined as the logic session of each physical path. Similar to a connection, each sub-connection has its own packet number space for the purpose of loss detection and recovery.
>>>>
>>>>
>>>> I did not want to do that in my own draft for a couple of reasons. The
>>>> main one is the interaction with encryption.
>>>>
>>>> The use of AEAD is only safe if the same packet number is not reused
>>>> twice with the same key. If we use multiple packet number contexts, AEAD is
>>>> only safe if these contexts use different encryption keys. This requires
>>>> adding a key derivation procedure for the "sub connection", and also adding
>>>> ways to identify the relevant key in the incoming packets. This gets
>>>> complicated very quickly, especially if we want to keep the possibility of
>>>> using zero-length connection identifiers on the client side.
>>>>
>>>> I use a concept very similar to the sub-connection, but only as a way
>>>> to manipulate paths, so the client can instruct the server when paths ought
>>>> to be abandoned. Otherwise, I just keep track of which PN maps to which
>>>> path.
>>>>
>>>>
>>>>   3. To merge the gap between migration and the general-purpose multi-path, several new features need to be supported:
>>>>   - (1) how to manage the lifecycles of individual sub-connections.
>>>>
>>>>   - (2) how to distinguish packets coming from different sub-connections.
>>>>   - (3) how to co-operate with a multi-path scheduler.
>>>>
>>>> We would appreciate hearing any thoughts, comments and suggestions.
>>>>
>>>>
>>>> I think we need more work on the "multi-path scheduler". We have heard
>>>> of three application scenarios: maintaining the lowest RTT when sending
>>>> voice segments (Apple Siri), avoiding buffering delays when playing music
>>>> (Apple Music), and using two available links with equal preference (Ali
>>>> Baba "high speed train"). I wish that we could distillate that into a
>>>> couple of simple concepts.
>>>>
>>>> -- Christian Huitema
>>>>
>>>>
>>
>> --
>> Kazuho Oku
>>
>

-- 
Kazuho Oku