Re: [quicwg/base-drafts] Remove the explicit packet number gap in favor of one computed (#496)

Martin Thomson <notifications@github.com> Wed, 03 May 2017 22:25 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 69327127077 for <quic-issues@ietfa.amsl.com>; Wed, 3 May 2017 15:25:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.801
X-Spam-Level:
X-Spam-Status: No, score=-4.801 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_H2=-2.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-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 4kbSIAMunYEB for <quic-issues@ietfa.amsl.com>; Wed, 3 May 2017 15:25:47 -0700 (PDT)
Received: from o3.sgmail.github.com (o3.sgmail.github.com [192.254.112.98]) (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 7CF0B12778E for <quic-issues@ietf.org>; Wed, 3 May 2017 15:24:11 -0700 (PDT)
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=Q1hAT5V7irWXbZf5HTRLaXJCxR4=; b=c/BEkZ8yIchZxb8Q m2XLiB5ViWr+bbu9JfJh93CBHXnHYT9UwY+u6o02GV7NvGhTLLXg6QUCOOBF5Oxm oUbxcdM56UZWjiYPuArlPbt1BpdTGsZ9H/WecH0wmlVQNshI8jxo0Nj01kchBjTn 3XBtctcERX6QgXVuMU5Ni851cf4=
Received: by filter0426p1mdw1.sendgrid.net with SMTP id filter0426p1mdw1-13284-590A588A-17 2017-05-03 22:24:10.181732663 +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 ismtpd0003p1iad1.sendgrid.net (SG) with ESMTP id sE3TW2EaSo26s2xo19ujGw for <quic-issues@ietf.org>; Wed, 03 May 2017 22:24:10.129 +0000 (UTC)
Date: Wed, 03 May 2017 15:24:09 -0700
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abd9ac1314022895bedb9ee56a9bb48525f6dae15c92cf0000000115221a8992a169ce0d7957f1@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/496/review/36152313@github.com>
In-Reply-To: <quicwg/base-drafts/pull/496@github.com>
References: <quicwg/base-drafts/pull/496@github.com>
Subject: Re: [quicwg/base-drafts] Remove the explicit packet number gap in favor of one computed (#496)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_590a5889f1fdb_7c0b3ff6551d1c2c1131b0"; 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
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak0apwBg5uf55KMVWWBANfa+rlg/3oV0Z3zFv7 BO5/R1w4rWsE41rs14DofZs1bbC4ysGu1PyBpDCBYE0vZsYGYIsR+AC6DYnJtc2M8xbvmXIE8VyWgF gkcZikekD9MNliZ6fUBf90uHA6iqQGa096DGv2AurSc16jMIec450qa1mtwASI5iDIw+Bsv9mIgp96 Y=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/kiogtU-dBagpGzVeawrqAp43G-Y>
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, 03 May 2017 22:25:49 -0000

martinthomson approved this pull request.

I like this, it removes bytes on the wire at the cost of a few hashes.  Let's change the encoding for the packet later.  I agree that packing 255 new connection IDs in a single frame probably makes more sense now that you don't have an explicit gap.  A length-prefixed list is always smaller for N>1, especially since you can share the sequence number.

However, if we are going to do #460 or #20, then we might also need some way to include an updated verifier for the public reset.  That's going to create less incentive to send enough new connection IDs and the simpler frame might be easier in that case.

Let's see what others think.

>  between two points of network attachment.
 
-The NEW_CONNECTION_ID message includes a connection ID that the client can use
-for packets on the current connection.  This message also includes packet number
-gap, which is the number of packet numbers that the client skips when using the
-new connection ID.  Without this, the packet number field in the header might be
-used to link activity across networks.  A server MUST provide a 32-bit value for
-the packet number gap field that is indistinguishable from random to a passive
-observer.
+A client which wishes to break linkability upon changing networks MUST
+use the NEW_CONNECTION_ID as well as incrementing the packet sequence

`MUST use the NEW_CONNECTION_ID` implies sending, it's the value from the message that the client uses.

I'm not sure about the MUST-requirement.  Isn't this a simple "can"?

> @@ -1296,6 +1291,22 @@ connection ID, it should expect packets on the new connection ID to start at 18.
 A packet with the new connection ID and a packet number of 17 is discarded as
 being in error.
 
+#### Packet Number Gap
+
+In order to avoid linkage, the packet number gap MUST be externally
+indistinguishable from random. The packet number gap for a connection
+ID with sequence number is computed by encoding the sequence number
+as a 32-bit integer in big-endian format, and then computing:

Since packet numbers are 64-bit, might as well make this the same type.  HKDF won't care.

-- 
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/496#pullrequestreview-36152313