Re: [quicwg/base-drafts] Rewrite text about Version Negotiation (#1039)
Martin Thomson <notifications@github.com> Tue, 13 February 2018 06:11 UTC
Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A2A4E12E058 for <quic-issues@ietfa.amsl.com>; Mon, 12 Feb 2018 22:11:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 XbNr5Edp_VHv for <quic-issues@ietfa.amsl.com>; Mon, 12 Feb 2018 22:11:13 -0800 (PST)
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2-ext4.iad.github.net [192.30.252.195]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C742F1205F0 for <quic-issues@ietf.org>; Mon, 12 Feb 2018 22:11:12 -0800 (PST)
Date: Mon, 12 Feb 2018 22:11:12 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1518502272; bh=Li9SqfZRFBf0MDtaELMljMKL9ydooi8fqltOMy6sf3g=; h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=KrZStqB29mXDmILyae+HBTyYQSHylLkIUMp8/rL9fR8ocdYQ07I1b/5HkEbPPDFfa 8vAqLgkz8m+U//3DeWcyuYfTCi0Vr1W06sMVsktx6+pAArnKNgb+0ivknAIhlhDrsT PsBS+IXEZTLqXHdzw0jyvAn59RhG3HaEsbRumB3k=
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abd7bb9bbd44f54d6efb8db77e53b0d4c68f20c06092cf00000001169a437f92a169ce1115d834@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1039/review/96032307@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1039@github.com>
References: <quicwg/base-drafts/pull/1039@github.com>
Subject: Re: [quicwg/base-drafts] Rewrite text about Version Negotiation (#1039)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5a8281806c2c_74382ad02d158ed4550476"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: martinthomson
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/dgeEvy5ZdKBeRwLA47ktVjMpSW4>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Feb 2018 06:11:15 -0000
martinthomson commented on this pull request. > -used - and they MUST be padded to at least 1200 octets. - -The server receives this packet and determines whether it potentially creates a -new connection (see {{packet-handling}}). If the packet might generate a new -connection, the server then checks whether it understands the version that the -client has selected. - -If the packet contains a version that is acceptable to the server, the server -proceeds with the handshake ({{handshake}}). This commits the server to the -version that the client selected. +with an existing connection, or - for servers - potentially create a new +connection. + +First, hosts try to associate the packet with an existing connection. If the +packet has a connection ID corresponding to an existing connection, QUIC +processes that packet accordingly. Note that a NEW_CONNECTION_ID frame I think that this fits nicely with @marten-seemann's comment about handling Initial packets specially. My pseudocode didn't do this, but this motivates moving the version and Initial packet checks right up front. > +connection IDs if they do not meet both of these criteria. + + +### Client-Specific Behaviors {#client-specific-behaviors} + +If a client receives a packet with an unknown connection ID, and it matches +the tuple of a connection with no received packets, it is a reply to an +Initial packet with a server-generated connection ID and will be processed +accordingly. Clients SHOULD discard any packets with new connection IDs that +do not meet these criteria. + +Note that a successfully associated packet may be a Version Negotiation +packet, which is handled in accordance with {{handle-vn}}. + +Due to packet reordering or loss, clients might receive packets associated +with a connection for which it does not yet have the keys to decrypt it. Computation isn't the problem, it's receipt of the server handshake. Maybe "packets that are protected with 1-RTT keys prior to receiving handshake messages. Packet protection cannot be removed from these packets until the cryptographic handshake produces the necessary keys." > +accordingly. Clients SHOULD discard any packets with new connection IDs that +do not meet these criteria. + +Note that a successfully associated packet may be a Version Negotiation +packet, which is handled in accordance with {{handle-vn}}. + +Due to packet reordering or loss, clients might receive packets associated +with a connection for which it does not yet have the keys to decrypt it. +Clients MAY drop these packets, or MAY buffer them in anticipation of +later packets that allow it to compute the key. + + +### Server-Specific Behaviors {#server-specific-behaviors} + +If a server receives a packet with an unknown connection ID, an unsupported +version, and is long enough to be an Initial packet for some version "and length sufficient for the packet to be an Initial packet in any version supported by the server" maybe > +Due to packet reordering or loss, clients might receive packets associated +with a connection for which it does not yet have the keys to decrypt it. +Clients MAY drop these packets, or MAY buffer them in anticipation of +later packets that allow it to compute the key. + + +### Server-Specific Behaviors {#server-specific-behaviors} + +If a server receives a packet with an unknown connection ID, an unsupported +version, and is long enough to be an Initial packet for some version +supported by the server, it SHOULD send a Version Negotiation packet as +described in {{send-vn}}. + +Servers MUST drop other packets that contain unsupported versions. + +If the packet is a supported version, and an Initial Packet fully Yes, Initial packet. > +If a server receives a packet with an unknown connection ID, an unsupported +version, and is long enough to be an Initial packet for some version +supported by the server, it SHOULD send a Version Negotiation packet as +described in {{send-vn}}. + +Servers MUST drop other packets that contain unsupported versions. + +If the packet is a supported version, and an Initial Packet fully +conforming with the specification, the server MUST proceed with the +handshake ({{handshake}}). This commits the server to the version that the +client selected. + +If the packet is a supported version, and a Handshake or 0RTT packet, the +server MAY buffer a limited number of these packets in anticipation of +a late-arriving Initial Packet. In the event the server later generates +a RETRY packet, this buffer should be purged. Servers MUST NOT send packets The buffer purge is probably a bad idea. If you consider how you might implement this, the 0-RTT buffer is likely to be global across the entire server. You can't know when you receive them which connection to associate them with, so it has to be a little bit global. Choosing to send Retry on one connection shouldn't cause other 0-RTT packets to be purged. Also, choosing not to accept 0-RTT is another reason you might purge them. It might be better not to get into details here. I would probably instead maintain a deque of 0-RTT packets and let new 0-RTT packets push older ones out. No point ever purging other than when you are scrubbing through looking for unclaimed packets. Initiating a purge is CPU cycles you don't need to spend. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/quicwg/base-drafts/pull/1039#discussion_r167767760
- [quicwg/base-drafts] Rewrite text about Version N… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… ianswett
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… ianswett
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… Mike Bishop
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Nick Banks
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… MikkelFJ
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Marten Seemann
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Mike Bishop
- Re: [quicwg/base-drafts] Rewrite text about Versi… Mike Bishop
- Re: [quicwg/base-drafts] Rewrite text about Versi… Mike Bishop
- Re: [quicwg/base-drafts] Rewrite text about Versi… Mike Bishop
- Re: [quicwg/base-drafts] Rewrite text about Versi… Kazuho Oku
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… martinduke
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson
- Re: [quicwg/base-drafts] Rewrite text about Versi… Martin Thomson