Re: What to do about multipath in QUIC

Kazuho Oku <kazuhooku@gmail.com> Mon, 16 November 2020 05:19 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 2798F3A1345 for <quic@ietfa.amsl.com>; Sun, 15 Nov 2020 21:19:40 -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 LMB8g-xhxMxV for <quic@ietfa.amsl.com>; Sun, 15 Nov 2020 21:19:38 -0800 (PST)
Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 204773A1343 for <quic@ietf.org>; Sun, 15 Nov 2020 21:19:38 -0800 (PST)
Received: by mail-ed1-x52a.google.com with SMTP id d18so4503073edt.7 for <quic@ietf.org>; Sun, 15 Nov 2020 21:19:38 -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=ohkM1sxm7VkcUPKkqG6mST+Nl0WbnGNg6RHR+QWn45A=; b=nKCACN05LSHLajAY/dWPwBYKGuBJ/6/oG7Z31cE2ArwcGh+V6tr7LRueZHCuY6qmyu ZJPuKRXwkMwpQNySy5YK0uL8HcXozrwsIHbnckiDA5RthpmlCGgTykV5gs2HvTBE6ED/ WvpoMCkpUciOKWieIESK5LcW6Y1UzV7v3Nr3hoaC1rKlFOpaVTmjSRAZbami1szJrWjJ hJLVZ3Mi8/DbqmnhnAzvChW//tinPtvmxpOqC20jrhrTkGXS4BQ2e5Xado4VpE9lP239 SukNSl9u+vIWpzeGUX8mh5pp4tH3SPZAPbtGgbZa6AP+S+zazdUfVMIe58+et/q6pat9 5X/A==
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=ohkM1sxm7VkcUPKkqG6mST+Nl0WbnGNg6RHR+QWn45A=; b=hMM/0C9YX61wxkl1DnaXpPBc7enY4MvFmVhH+DCsNq6Hg1acsr344H/PgOmU/OvCou IlKXVuTFYAADgOjp7b0bxL9uRwVFppRQS8L9UNKl1Drj7ya1jskZfin9xZJtABb/4frw t+BYjWNlLnwOygzLtXcw1im/shr7BOGLBHnzEkLE4wgQXy16wY/AypAfqxoURBjutDfx qCnyoUboqn7rebcrDQAy+K6j7+5TCTpVuBeRv9ndNEoHB74jana4HCAt/701nnyc5peT QmmrWNnMBpWZFEijkO0sULJ7lRsTdWIjLBHuaXIHO1plDn8RxtfNhiONiyqwvKP8mFDO Z1oQ==
X-Gm-Message-State: AOAM531KvpbcMrhMTk4WNNYQCBS8FA+1N+gC5+cTLcs8aRUkpPSso/lQ 1xvzzNB7xr44H8bMIVKij73Mt442BxGxR1YNi3o=
X-Google-Smtp-Source: ABdhPJycMnna1HZGPIBQoIFa/V99VP9H/B8p1GS7i5ssk4mnTmfA/bRlcItzLkMBXGB7EKNGeGcbvneZcud1XwrH3X4=
X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr13920115edp.230.1605503976295; Sun, 15 Nov 2020 21:19:36 -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>
In-Reply-To: <CAMDWRAaSeC9Yd1DqzM9o5_CS5Kct0aNS_LUzty5YPO_5fBf4qw@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Mon, 16 Nov 2020 14:19:24 +0900
Message-ID: <CANatvzyEfkRqgCArC8sXaS1-1DckxjspBLqLyLNdHx-RDKjT_Q@mail.gmail.com>
Subject: Re: What to do about multipath in QUIC
To: Yanmei Liu <healing4d@gmail.com>
Cc: Christian Huitema <huitema@huitema.net>, "Ma, Yunfei" <yunfei.ma@alibaba-inc.com>, "Liu, Hongqiang(洪强)" <hongqiang.liu@alibaba-inc.com>, Yanmei Liu <miaoji.lym@alibaba-inc.com>, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, quic <quic@ietf.org>, "安勍(莳逸)" <anqing.aq@alibaba-inc.com>
Content-Type: multipart/alternative; boundary="0000000000003151b005b4328641"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/RFIgw1x2OA-0T7mWNpkr0I58Rxw>
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 05:19:40 -0000

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