Re: Do we need compatible version negotiation at all? (Re: Version negotiation: the bare minimum?)

David Schinazi <dschinazi.ietf@gmail.com> Wed, 21 April 2021 14:48 UTC

Return-Path: <dschinazi.ietf@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 085633A2A77 for <quic@ietfa.amsl.com>; Wed, 21 Apr 2021 07:48:55 -0700 (PDT)
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, RCVD_IN_DNSWL_NONE=-0.0001, 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 t3yQns6w7iqm for <quic@ietfa.amsl.com>; Wed, 21 Apr 2021 07:48:50 -0700 (PDT)
Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 32F493A2A98 for <quic@ietf.org>; Wed, 21 Apr 2021 07:48:50 -0700 (PDT)
Received: by mail-pg1-x533.google.com with SMTP id f29so30041772pgm.8 for <quic@ietf.org>; Wed, 21 Apr 2021 07:48:50 -0700 (PDT)
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=cMz0GvnGTqi0r68XR6TNCTFAnXpQfpgTfzWZD3mI2s4=; b=EyhsHXgL/HSS8EuI2HkSpB5glDoH6MAU/tOm8B07amNsA+1b58aTf+lDa09hZ8+/1I gBCrI2gW9NPtXSWYNzZyoQCtuGmHvhAb6E1kGZ8ClqVagmbCt7zQFz+uqsQku/Luq8Rp +I/svZbIYabselWJ+iaq/uHacCVyN8q9Xm8Qb8qvVm5gxpf5d57xuHk7GXcfS9CCPjvE O4asY7iiha8ilDtzThOJSLEzuDMSOGS2lzWnsYDqdg9/Hq1rHz2ldYge0nA5SuKopVrt A95ahSXeXFmMY1eVokBUrUqXcm5sONf7Eo4y8WodP4rUR+8ehf/ZNc8pgVE5v/7RSdrL bxDA==
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=cMz0GvnGTqi0r68XR6TNCTFAnXpQfpgTfzWZD3mI2s4=; b=XDbgaQgHkF9w6Zby/2Z9b1EUtc6l4D7KBjxS85Qp2bPfoIVO+YSgBm3oqGRyZ1Yeho ks/Zli0Cz9GSN7QPlQzV62rfvwufu1SV1Zgvn3Mh7ZGOuSL2UtXxySwTg6BCdE+wL1/V YGuNVMmJdFVWZD0j3o0oHsbhTIJnSgm9cxtW7/Rjdx8lEjBIk2YntqJ2sCo0vtR5+1F/ hjg7e8pvaTBCk+0+t/G+/MhdcoWCX/RdnO/Zaordy8bfVmGGlAhI7Pz+gg9feKVnaQNh gweNMOD8DBxGSh61KGidgb4xCPhNECD0iwnwjpdgOKx0FLb3nz1eqlN2crVuUXylnrVK n7HQ==
X-Gm-Message-State: AOAM533xTvG6JyyDpi044MBPUtWQhYi1kDCsWGKkgkHE+9jBtcOQpHdv tASoqvz/zelb20sQ0Gi48jbkXUSUhebpDuA/wZE=
X-Google-Smtp-Source: ABdhPJwzE2gZNfurkxA1ZsIxZNWVgMtXaoz1THvBCOuJ3dS8h7CCtRY8mx+zwMkxmOG4miXSrPg7WOyO6//kVLhk3fU=
X-Received: by 2002:a17:90b:390f:: with SMTP id ob15mr11490861pjb.100.1619016527975; Wed, 21 Apr 2021 07:48:47 -0700 (PDT)
MIME-Version: 1.0
References: <CACsn0cm-vWCZEeA+kh-BUF0M0ZhM_ev6R-9DYZgWQCA-byHofQ@mail.gmail.com> <CAPDSy+4QLJnE8njgsP33GQLnwtNH1v6ACbWTfOXhe00jXdwCbw@mail.gmail.com> <6322e767-433c-7181-08ae-897c6625f3f2@huitema.net> <CANatvzzgKtN+jW_yqhfzQwZBeiFLDY-+2DQ3BuWACX7LkeSxqA@mail.gmail.com>
In-Reply-To: <CANatvzzgKtN+jW_yqhfzQwZBeiFLDY-+2DQ3BuWACX7LkeSxqA@mail.gmail.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Wed, 21 Apr 2021 07:48:36 -0700
Message-ID: <CAPDSy+7DNyKJTs1BjKMszJU0PgBT5v8PO9g49a59oW3Vh0eusA@mail.gmail.com>
Subject: Re: Do we need compatible version negotiation at all? (Re: Version negotiation: the bare minimum?)
To: Kazuho Oku <kazuhooku@gmail.com>
Cc: Christian Huitema <huitema@huitema.net>, Watson Ladd <watsonbladd@gmail.com>, IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000009166505c07ca9a9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/iSQU67AbbquEEKZg4nVB-YTEr8g>
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: Wed, 21 Apr 2021 14:49:01 -0000

Hi Kazuho,

First, to confirm: your characterization of compatible VN matches my
understanding.

Then, on the topic of what we need, let's start with basics. Your point
that QUICv1 has extension points is true,
but we've designed QUIC as a versioned protocol to allow innovation outside
of the confines of QUICv1. We
could in theory say that the QUIC version field is ossified and no other
versions are allowed for perpetuity,
but I think that this would be a loss for our ecosystem. If we assume that
there is value in having other versions
of QUIC, then there is a need for version negotiation. This doesn't apply
to HTTP/3 or other application protocols
that negotiate their QUIC version out of band (e.g. via Alt-Svc), but we
built QUIC in such a way to specifically
enable non-HTTP application protocols. Now, given that we want version
negotiation, we'll need at least incompatible
version negotiation, as that is the one that supports all potential
versions. If we decide to build incompatible version
negotiation, we need to prevent downgrade attacks - attackers should not be
able to modify the version field on
long headers, and should not be able to inject or modify version
negotiation packets. To solve this, we need to
authenticate these versions in the TLS transcript, which means adding a new
transport parameter. At a minimum,
this transport parameter needs to include the versions being sent in long
headers, and needs some form of what
was sent in a version negotiation packet.

To summarize that wall of text, if we don't want to ossify on QUICv1, we
need a new transport parameter with
some version information.

Now, to answer your question about compatible version negotiation: it does
mean adding one more field in the
client-to-server transport parameter so the client can list its compatible
version. In terms of wire encoding, that's
the only change. The only complexity in compatible version negotiation is
in defining the concepts.

My personal opinion is that we should tackle this minor complexity in order
to make QUIC more robust. Having a
version negotiation mechanism that doesn't cost a round trip will help
encourage innovators to use new versions
of QUIC as opposed to shoehorning everything into extensions to QUICv1. My
intuition is that this feature will
impact the long term success of QUIC, and is therefore worth the minor
complexity.

David

On Tue, Apr 20, 2021 at 11:40 PM Kazuho Oku <kazuhooku@gmail.com> wrote:

> Please correct me if I'm wrong, but it seems to me that people are using
> "compatible version" as a term to describe packets carrying first-flight
> initial data (e.g., ClientHello) using QUIC version X to which servers
> might respond with something other than Version Negotiation packets _nor_
> QUIC version X packets.
>
> IIUC, the intention is to allow endpoints start the handshake using QUIC
> v1 but end up with using something other than QUIC v1, without incurring
> the cost of one extra round-trip due to Version Negotiation packet being
> sent by the server.
>
> Based on this understanding, I have one question. Do we need such a
> feature?
>
> QUIC v1 already has Transport Parameters that can be used for negotiating
> how 0-RTT and short header packets would be used. By using Transport
> Parameters, we can define extensions that add, modify, or remove any
> feature wrt how application data would be exchanged.
>
> The idea of having a mechanism for selecting a QUIC version between
> "compatible versions" sounds to me like just creating another way of
> negotiating features using TLS messages as the conveyor. Hence the question.
>
> 2021年3月16日(火) 13:12 Christian Huitema <huitema@huitema.net>:
>
>> I have been considering pretty much the same design as Watson. In the
>> slide deck that you presented, this would be the "compatible" option.
>> The client would select  version X in the QUIC header of the Initial
>> packet, and format one or several TP stating:
>>
>> 1) Version in the QUIC header: X
>>
>> 2) Supported compatible versions: Y, Z, T, and maybe Grease. These must
>> be "compatible" versions.
>>
>> The server will:
>>
>> 1) verify that the version in the QUIC header is indeed X. If it is not,
>> close the connection with an error.
>>
>> 2) pick one of X, Y, Z or T as the selected version, say Y.
>> (Questionable whether the version in the QUIC header should be set to X
>> or Y.)
>>
>> 3) Set the TP stating something like "you proposed X and I selected Y"
>>
>> 4) Very optionally, mention in a TP that "this server also supports
>> versions V, W." These might be "incompatible" versions.
>>
>> If none of X, Y, Z, T are supported, the server replies with a VN.
>>
>> On receiving the server TP, the client verifies that the server saw the
>> intended version X, and chose one of the supported version. The client
>> might remember additional version V and W for next time, but that's
>> extra complexity.
>>
>> -- Christian Huitema
>>
>> On 3/15/2021 5:18 PM, David Schinazi wrote:
>> > Hi Watson,
>> >
>> > Could you elaborate on your proposal? In particular:
>> > How does the client transmit its supported versions?
>> > What does "compatible" mean?
>> > What does "the server selects" mean?
>> > What does "the server proceeds" mean?
>> >
>> > Thanks,
>> > David
>> >
>> > On Wed, Mar 10, 2021 at 1:55 PM Watson Ladd <watsonbladd@gmail.com>
>> wrote:
>> >
>> >> Dear WG,
>> >>
>> >> I'd like to proffer the world's simplest version negotiation scheme,
>> >> based on comments heard during the meeting today from a number of
>> >> people.
>> >>
>> >> The following weak assumptions are made: the client has a set of
>> >> versions. The server has a partial ordering on versions: this means
>> >> that versions are not necessarily preferred over each other (consider
>> >> experiments where we will do what the client offers first), but the
>> >> relation is transitive. Then the server selection is a function of the
>> >> client offered version and supported set.
>> >>
>> >> The client transmits its supported versions and a proffered hello
>> >> version in the first packet. The server selects. If that selection is
>> >> incompatible they try again with the new selected version transmitted
>> >> in VN. If it is compatible, the server selects and proceeds.
>> >>
>> >> The constraint on the handshake is that the supported versions and
>> >> offered version and server selection are incorporated on the handshake
>> >> in such a way that a mismatch triggers failure, and no two different
>> >> versions can derive the same keys. If we assume that e.g. SHA256 is
>> >> unbroken this is easy to get.
>> >>
>> >> This only permits a downgrade to a version the server was willing to
>> >> prefer.
>> >>
>> >> Sincerely,
>> >> Watson Ladd
>> >>
>> >>
>>
>>
>
> --
> Kazuho Oku
>