Re: What to do about multipath in QUIC

Kazuho Oku <kazuhooku@gmail.com> Mon, 16 November 2020 23:33 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 5D0913A168C for <quic@ietfa.amsl.com>; Mon, 16 Nov 2020 15:33: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 zrs6W67XMvCK for <quic@ietfa.amsl.com>; Mon, 16 Nov 2020 15:33:57 -0800 (PST)
Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 19F8B3A1689 for <quic@ietf.org>; Mon, 16 Nov 2020 15:33:57 -0800 (PST)
Received: by mail-ej1-x62d.google.com with SMTP id za3so26865218ejb.5 for <quic@ietf.org>; Mon, 16 Nov 2020 15:33:57 -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=SHQwm4XL+KjWCmxqQ6olpiFcGbzeHW+7YCpCVWEb9Bg=; b=cGQkp1nlvbqTP0l3fPicATvSAgCsSIfdrp2BevCwFXRD1F37W0Q2EM7CMLQ/WIp3B+ gZtutrWt+fC48boixMOmPlXhOcIZNwgSEuOwseRnUluCssT8uB5ozoUMDYFci3BjIEeg ytidpfN4hJoizcuyb8J56TH6f5pVqpsE6GwypcK1N/suVTZCFU0bqg1QnD94mZi+fRfa ALGm+cS28b5qGVl5rtZIK5e9KPjdQLmLTtiL1eE9nmsNw4nNXkjDSXEH+H1OafjpWO4A FvC9pDM9juxWCMtotzdWQVJ+AG8Dzpt0GG1lAVQDl0Q2IpBghUid8M5mHQox7YBTxNae 78SA==
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=SHQwm4XL+KjWCmxqQ6olpiFcGbzeHW+7YCpCVWEb9Bg=; b=lxNnSwC1HkhdkdHCDf//m6BG+V2rvqUUrzWTGFVW894IBUYYLC6weBxCNdJlUGgrCj 5c0m8gQQxZUXr0bi91PqOspZAa9KrIBc7SNRfK78bM6PoDxtANLo4AJPt8kG7mxjN+yR hWUrkCq1JnFJz1fm926Gu4RrZPPw5F0FCWTfyXe4syRfkUNSqEyLSgNTiILsnOiHSm2X PO5ufdmA9mEMYkttyZNf/PhEsUvElVRq0YwohtIz7+XcD/c03rlYLvwlLePwfLiC+4q0 W9DhACOdCdpDsNMa+bAjznRVryDbSgegd6rj8srq4lqCOElhAc5Yx42wY5k74jjKG7Jv tNMg==
X-Gm-Message-State: AOAM532QoZYTYqxOWAx4XsbtfN90gARWk2pbmBgNQqnAwSKpylva3pH9 luZcV89g9TwLJVA31KL76gTuCqEo/SUNslDAlQL8znb/FXA=
X-Google-Smtp-Source: ABdhPJxVY1hbntxXTrTG8ooNQNVwOimzmLuv7qowiUvsXAjpjdBRaIQLVjqYu8x21TqTXtEcyI6o7JK6K9WUkhiauHg=
X-Received: by 2002:a17:906:4057:: with SMTP id y23mr15790050ejj.299.1605569635487; Mon, 16 Nov 2020 15:33: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> <CANatvzz_KSBws_upnx00P7JK=MbgyDRrR5n2VJcr1_=y=P6dfQ@mail.gmail.com> <062fe812-8afb-d946-8336-1f4dc5ebeaaf@uclouvain.be> <7540ef46-9948-c76c-3617-5755be3cdf37@huitema.net> <CANatvzymE+XRXUMBH2quGi=VEUNXDR_Eoer+o6p9+nkD-KFisQ@mail.gmail.com> <3bb7f359-ebe5-7a54-0224-bb1f5f1754af@huitema.net>
In-Reply-To: <3bb7f359-ebe5-7a54-0224-bb1f5f1754af@huitema.net>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Tue, 17 Nov 2020 08:33:43 +0900
Message-ID: <CANatvzxyj3nXP+GrnMkexWV-VN7Og4EGXysq1o0W2e2JGWzDrw@mail.gmail.com>
Subject: Re: What to do about multipath in QUIC
To: Christian Huitema <huitema@huitema.net>
Cc: IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c915c605b441cff1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/x2CqPFcG-eCK-vBfyIrM_Le7YZc>
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 23:33:59 -0000

2020年11月17日(火) 8:12 Christian Huitema <huitema@huitema.net>:

>
> On 11/16/2020 2:05 PM, Kazuho Oku wrote:
>
>
>
> 2020年11月17日(火) 3:11 Christian Huitema <huitema@huitema.net>:
>
>> Kazuho,
>>
>> You are proposing to use a transform, in which the AEAD "sequence" is
>> the conjunction of a sequence number space identifier and the number
>> within that space. I agree that doing that solves the uniqueness
>> requirement, but I have two concerns.
>>
>> First, your original proposal allocates just 2 bits for the sequence
>> number space identifier. You observe that the sequence number is encoded
>> as a varint, which can only encode 62 bits of value, and thus we can
>> reuse the two high order bits to encode a number space identifier. But
>> what happens if the connection uses more than 4 number spaces?
>>
>
> The "nonce" of AEAD, which is used for encoding the "packet number" of
> QUIC, has more space than 64 bits. I know that some of the TLS stacks only
> expose an AEAD API that lets applications specify 64-bit packet number, but
> they are (I am) just lazy.
>
> Quoting from RFC 5116,
> > Each AEAD algorithm MUST accept any nonce with a length between N_MIN
> and N_MAX octets, inclusive, where the values of N_MIN and N_MAX are
> specific to that algorithm.  The values of N_MAX and N_MIN MAY be equal.
> Each algorithm SHOULD accept a nonce with a length of twelve (12) octets.
>
> AES-GCM and chacha20-poly1305 have N_MIN and N_MAX of 12.
>
> Therefore, we have 34-bit space (12 * 8 - 62 = 34) to encode the path
> identifier.
>
> I suppose that 32 bits path-id would be enough, yes.
>
>
>
>> Second, we have a synchronization issue. At what point do nodes start
>> using the "path-specific" number space? If we want to be robust, don't
>> we need to encode a number space identifier in the packet header?
>>
>
> In QUIC, each CID has a sequence number, and the use of CIDs with a
> non-zero sequence number happens after the handshake is confirmed, at which
> point negotiation of the protocol features would have completed.
>
> Therefore, multipath-aware endpoints can determine the path identifier
> (i.e. sequence number) from the CID it sends / receives, and encode that as
> part of the nonce that they use to encrypt / decrypt packets.
>
> Are you going to conflate CID sequence number and PN Number Space
> identifier? That would have interesting effects on scenarios in which the
> CID changes for other reasons than creating a new path. There would also be
> an interesting relation between "retiring a CID" and "managing
> acknowledgements". It would also make the creation of new CID significantly
> more heavy weight than it is today -- the peer that creates a new CID would
> have to allocate a selective ACK dashboard for packets received through
> that CID.
>
That's a good point. I think there isn't a strong reason to tie CID
sequence number to packet numbers, if we are going to have "path
identifiers" as a separate concept. Anyways, that identifier can be
embedded in the nonce.

> Then there is the issue of peers who want to use zero length CID. I
> suppose that if the peer has zero length CID, all packets sent to that peer
> will be in the same number space. That may well be just fine if that peer
> is not sending a lot of data, e.g., for clients that mostly send short
> requests and acks.
>
IIUC, endpoints using zero-length CID cannot issue new connection IDs, and
therefore cannot sustain through intentional migration [1].

> Then there is the issue of key rotation. In this "path sequence" scheme,
> we have only one key, so I assume that it will rotate simultaneously for
> all CID.
>
Agreed.

> -- Christian Huitema
>

[1]
https://quicwg.org/base-drafts/draft-ietf-quic-transport.html#section-5.1.1-8

-- 
Kazuho Oku