Re: What to do about multipath in QUIC

Yunfei Ma <yfmascgy@gmail.com> Mon, 16 November 2020 07:32 UTC

Return-Path: <yfmascgy@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 516013A1512 for <quic@ietfa.amsl.com>; Sun, 15 Nov 2020 23:32:42 -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 bvd2XBzgO8JT for <quic@ietfa.amsl.com>; Sun, 15 Nov 2020 23:32:40 -0800 (PST)
Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) (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 DF6F73A150D for <quic@ietf.org>; Sun, 15 Nov 2020 23:32:39 -0800 (PST)
Received: by mail-vs1-xe30.google.com with SMTP id l22so8646552vsa.4 for <quic@ietf.org>; Sun, 15 Nov 2020 23:32:39 -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=FjpceIJ/SI0jkdsejuTnrs8q2nTLVptrIURpZWw+qu4=; b=IdIHIqTGNW70xRYHx5OuI6obpHlZQyQNXFLYj31AgwcShNBB+xY40pj07fwlNgmPQu +au+9BoaFGe17RxQOBz4Iod2+EiZsSB80ZQScMT3wYY7l7soz3bHJBjIwfmPlJb3v6wM ROBsqGzBTZYDwRCz1X+6NE+yWRe93sTY+coT2NxFd2q28Of+jxAd2CCswvNRdyhI4CG0 CVVfriRQP2Q34EmHCxBY8/UxyAtlciMOBj0aWPDu+R+pktbloxvc6oD56mqDgnJQ1EJI 92bZfiz7sJa8JR4vk1hjUK73aFwLBBydzIY4livvNw42Hzr+zmHZryZGFHSO2bu89BlL jZ0Q==
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=FjpceIJ/SI0jkdsejuTnrs8q2nTLVptrIURpZWw+qu4=; b=CiB/wGVubW5E8eGJ9esS/SR/T5L5AHzrwK20rNrjNKw8/Cwmnx7/rzHlCVnM++zPkV kqqoQhL4a2bG5rSt7SUGy2JNTRiBT1fkVoHelB9vomWbq1mXccxsJk1l13PinKNHYsny zxZAfLpoPEWIXbR9Fm6hYf71ptSvMKineQDfze4djc0Y6gezcctqWqeVWUJNQMdLtvAJ weq68eLSzKz5AmXTxT9UJKp0/XJqbvNo6ZM4LCFtc/MGL+Gydr7DTHQV319gDVFhQUlU 35UpKbMkp9gGZt1KIccpNcIfDvPbJkgvnA5exV8xPvj5viXDFB8UzW83L7TZOYAltU+7 vQww==
X-Gm-Message-State: AOAM5301CZe3h/istgp8JKhIgnE2LZs1hriiOZ9htqdi43h9+s8b38H2 6G4gPR8SLqMMtTThEXD5/elQHO0E5Pmr2cee/5w=
X-Google-Smtp-Source: ABdhPJxB/7s56+pJ3AS/QPUne1bxT1upeJBNPtYs/wGbYxxBiNY1odibYYzcP7og74McQrUCPJ+qvBLUuGx1dotgYTw=
X-Received: by 2002:a67:fc18:: with SMTP id o24mr7508247vsq.42.1605511958836; Sun, 15 Nov 2020 23:32:38 -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>
In-Reply-To: <CANatvzyEfkRqgCArC8sXaS1-1DckxjspBLqLyLNdHx-RDKjT_Q@mail.gmail.com>
From: Yunfei Ma <yfmascgy@gmail.com>
Date: Sun, 15 Nov 2020 23:32:02 -0800
Message-ID: <CAHgerOGGyAkE=TbCSuTO=T6HK9EM_+m+ASwPRm=o33HBrx7p3Q@mail.gmail.com>
Subject: Re: What to do about multipath in QUIC
To: Kazuho Oku <kazuhooku@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="000000000000fd3b3505b43461c5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/3Vxm_vefAt-Dj2PgW_hpCwarMQw>
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:32:42 -0000

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.?


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
>