Re: [quicwg/base-drafts] Renumber packet types and invert Connection ID Flag (#956)

Marten Seemann <notifications@github.com> Wed, 22 November 2017 23:39 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.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 D04B112EB5F for <quic-issues@ietfa.amsl.com>; Wed, 22 Nov 2017 15:39:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.019
X-Spam-Level:
X-Spam-Status: No, score=-2.019 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_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 Dps5VROcy0fr for <quic-issues@ietfa.amsl.com>; Wed, 22 Nov 2017 15:39:53 -0800 (PST)
Received: from o9.sgmail.github.com (o9.sgmail.github.com [167.89.101.2]) (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 227A61200F1 for <quic-issues@ietf.org>; Wed, 22 Nov 2017 15:39:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=jq0HbUdoKlNWs0Fee8gsivJIa8c=; b=hJDhEj56IVcYW1J4 nVkWomvi203immz/86KS66JSZPD93UFYNnnWMVPZySph5N9ZtRCHADO9erlUy45s q75eU2Grxp61Dg5N5m21b5YH0f5arRjGSPO+OWKz+3hSOzpdH1I2r/KRtIa1hNfC mr6ZCPtmhNlCjWxAU5oBzlaRStw=
Received: by filter0100p1las1.sendgrid.net with SMTP id filter0100p1las1-23245-5A160AC5-15 2017-11-22 23:39:49.753653314 +0000 UTC
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16]) by ismtpd0015p1iad2.sendgrid.net (SG) with ESMTP id mDE7uPzHTkKIx2219Ifw_w for <quic-issues@ietf.org>; Wed, 22 Nov 2017 23:39:49.600 +0000 (UTC)
Date: Wed, 22 Nov 2017 23:39:49 +0000
From: Marten Seemann <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab788e32055e6386836df6d95ace9df3e694b9788092cf00000001162dccc592a169ce1075d33e@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/956/c346501729@github.com>
In-Reply-To: <quicwg/base-drafts/pull/956@github.com>
References: <quicwg/base-drafts/pull/956@github.com>
Subject: Re: [quicwg/base-drafts] Renumber packet types and invert Connection ID Flag (#956)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5a160ac570fac_69203fc6490baf2892498"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: marten-seemann
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
tracking:
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak3Iqo0JHlotXL7emw1rOVhPMI81ZmraWCnapQ ITG/hE3btfFfhacqK7vuSLQa9V1+Vh8vwV9P4crXWQeCO8GLbiJGKcnrizbKS76SZBGF48AKEDZVYt Q+LTOZNcuQ71o6Rqxaj7hCL5i0fYaDJSFR0fL6C0FGCAbUyqlfbm7Nx5PNk4jZnI3DJ3nTo7Bl70d4 M=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/ORrdIfkPLj4I3w_Pk24WiNm_7HU>
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: Wed, 22 Nov 2017 23:39:55 -0000

I recently implemented the [header parsing logic for quic-go](https://github.com/lucas-clemente/quic-go/blob/master/internal/wire/header.go#L34-L72), such that it can handle both gQUIC and IETF QUIC. You might find my summary of the different formats for the type byte useful: https://docs.google.com/document/d/162BtfR84c6xTvAG6AaPK0dXSQXKahMrtJOXxNnpcwDw/edit?usp=sharing.

The current packet header format has the nice property that it is possible to decide if the packet is a gQUIC or an IETF QUIC packet by just looking at the type byte. This is possible due to the following properties:

### for packets sent by the server

For packets sent by the server the client already knows the QUIC version needed for parsing the packet, as soon as version negotiation is completed. Therefore, the only requirement here is that the type byte used for the Version Negotiation Packet in IETF QUIC is not used in gQUIC, and the type byte used for the gQUIC VNP is not used in IETF QUIC.
This property is guaranteed by the first bit of the type byte alone already (0x80 is unset in gQUIC, and set for an IETF QUIC VNP).

### for packets sent by the client

All gQUIC packets have bits 0x80 and 0x40 unset, and currently IETF QUIC packets either have 0x80 set (for long headers) or 0x40 set (for short headers, if connection ID omission is not allowed, which I assume is what server implementations will do).
This property would be changed by this PR (because the connection ID bit is inverted), so a server wouldn't be able to distinguish between gQUIC and short header packets.

-- 
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/956#issuecomment-346501729