Re: Packet number encryption

Roberto Peon <fenix@fb.com> Thu, 01 February 2018 08:50 UTC

Return-Path: <prvs=5570da45d9=fenix@fb.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 191C61315F0 for <quic@ietfa.amsl.com>; Thu, 1 Feb 2018 00:50:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.719
X-Spam-Level:
X-Spam-Status: No, score=-2.719 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=-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=fb.com header.b=kWSFUWou; dkim=pass (1024-bit key) header.d=fb.onmicrosoft.com header.b=Uj1R/VFn
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 cvg0AOXrQMye for <quic@ietfa.amsl.com>; Thu, 1 Feb 2018 00:50:53 -0800 (PST)
Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 885E2131685 for <quic@ietf.org>; Thu, 1 Feb 2018 00:50:50 -0800 (PST)
Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w118nL3j016330; Thu, 1 Feb 2018 00:50:42 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=facebook; bh=diJOkN1rFX/DVdhIvfDMwciboFfL5VHggt37w5/AsdE=; b=kWSFUWouUKbimhB/FrAn55MWXXj7BjazVOlJHee+cN4Sr5gIF6Yu31z0QLV2luI7vHKe jDYGVUgJXeUGS+e3YLluuiYxHVjIr97/lgB5ZhEySgFqQNfBZyZYeWATaZUezzrBVXMV lW00vMJmfWYBBnP1KH8SspDY798nzjWTmTI=
Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2fuvnxs4g8-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 01 Feb 2018 00:50:42 -0800
Received: from NAM03-BY2-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.20) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 1 Feb 2018 00:50:40 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=diJOkN1rFX/DVdhIvfDMwciboFfL5VHggt37w5/AsdE=; b=Uj1R/VFn3+PB8bKoP/sxls6FTMPFgBYsetk690bD4dIO8gwQueBGneK1pAlRbeouxFXdbB30rXj0I/qnXmBO5NmewWJqLEJnbLbizGpc8gnbwU5eO/IqdCiVlCN6i4NCJ+kD6sptUPX6a6YG0ljMg15iSeCGs9t1X4MRduhElqA=
Received: from BY2PR15MB0775.namprd15.prod.outlook.com (10.164.171.11) by BY2PR15MB0197.namprd15.prod.outlook.com (10.163.64.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Thu, 1 Feb 2018 08:50:38 +0000
Received: from BY2PR15MB0775.namprd15.prod.outlook.com ([10.164.171.11]) by BY2PR15MB0775.namprd15.prod.outlook.com ([10.164.171.11]) with mapi id 15.20.0444.016; Thu, 1 Feb 2018 08:50:38 +0000
From: Roberto Peon <fenix@fb.com>
To: "Brian Trammell (IETF)" <ietf@trammell.ch>, Jana Iyengar <jri@google.com>
CC: Martin Thomson <martin.thomson@gmail.com>, Ted Hardie <ted.ietf@gmail.com>, Eric Rescorla <ekr@rtfm.com>, Mirja Kühlewind <mirja.kuehlewind@tik.ee.ethz.ch>, Christian Huitema <huitema@huitema.net>, QUIC WG <quic@ietf.org>
Subject: Re: Packet number encryption
Thread-Topic: Packet number encryption
Thread-Index: AQHTmzm7HjM5RmHWDkij9J5s6UBSSQ==
Date: Thu, 01 Feb 2018 08:50:38 +0000
Message-ID: <BY2PR15MB07756D4F528DE909A5B0057FCDFA0@BY2PR15MB0775.namprd15.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [98.234.190.115]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BY2PR15MB0197; 7:5cDDjw4UEthdIYpncGVPyYNhqMqRUv2aXysjbokNIxlBbstXWxEm9WCQMAxnlOjwI9JvYkVNLChROeCPilGOj5yk6Es/k2Lsx5xLRijuda7fJugmskmJzP1IB62vxqCZw1acJr/OcYkKO/Z0nvg5ErDfwmmxJcboNodMj0FzAK2McDxo/Y/TkLU7ikcYYDueITnM1CufDAwPjaliHSr7IaSD9ffjb+Krt1ueQ7PxwOuOeMCMQzoJq+CIE58VdByP; 20:L6J6DlYUIQWcJo2L+1jSxKWMoX/4eLmaMrcmlgknaj6NNY0YpKQjUykulWcdyN/JBQ1uWsujjP8HLbNwsSj/ecaJfa8iHnDR9xHyR2J9oDnT5pGbviNvu2P5Y67vnlnDdXZLMblzqAe/wmeCFHneuQxQAjZK5b53j9/+oXPDnyE=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 82d8ee60-bbcd-4026-7359-08d56950dde8
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:BY2PR15MB0197;
x-ms-traffictypediagnostic: BY2PR15MB0197:
x-microsoft-antispam-prvs: <BY2PR15MB019767C91905BCAB002B6E57CDFA0@BY2PR15MB0197.namprd15.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(278428928389397)(85827821059158)(67672495146484)(211936372134217)(153496737603132)(17755550239193);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(11241501184)(2400082)(944501161)(93006095)(93001095)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BY2PR15MB0197; BCL:0; PCL:0; RULEID:; SRVR:BY2PR15MB0197;
x-forefront-prvs: 0570F1F193
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(376002)(346002)(396003)(366004)(39860400002)(199004)(189003)(51444003)(77096007)(74316002)(2900100001)(53546011)(54896002)(2906002)(97736004)(7736002)(66066001)(59450400001)(2690700001)(102836004)(14454004)(86362001)(8676002)(3846002)(7696005)(6506007)(106356001)(4326008)(561944003)(25786009)(6116002)(99286004)(110136005)(39060400002)(81166006)(33656002)(6246003)(81156014)(316002)(105586002)(5660300001)(478600001)(7116003)(53936002)(3660700001)(3280700002)(8936002)(229853002)(55016002)(186003)(9686003)(3480700004)(26005)(54906003)(68736007)(6436002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR15MB0197; H:BY2PR15MB0775.namprd15.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: nKsYmjbQtFDvPi+jaQp8T2OOL+ui8RcrrSWLtUblEGRlf1eNfVoY8douW29oWXGEcxapy/SPUcksJNlgytAtNQ==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BY2PR15MB07756D4F528DE909A5B0057FCDFA0BY2PR15MB0775namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 82d8ee60-bbcd-4026-7359-08d56950dde8
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2018 08:50:38.2998 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR15MB0197
X-OriginatorOrg: fb.com
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-01_03:, , signatures=0
X-Proofpoint-Spam-Reason: safe
X-FB-Internal: Safe
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/LIwQZkWfp9RPYh1fHAXonK3V_ew>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 01 Feb 2018 08:50:57 -0000

Note that the size of the CID is also not known to the network assuming we are encrypting and doing variable, implicit length CID for short headers (which is what I understand to be the proposal) chosen by the server.

The l7 may encode the length within the CID, which one could imagine might be common, however the network would have a higher bar to determining it.

Unless we prevent it, assuming the server can cause the client to use multiple CIDs, the length of the CID could vary even within the packets on a single flow/5-tuple.

-=R

Sent via the Samsung Galaxy S7, an AT&T 4G LTE smartphone

-------- Original message --------
From: "Brian Trammell (IETF)" <ietf@trammell.ch>
Date: 2/1/18 12:08 AM (GMT-08:00)
To: Jana Iyengar <jri@google.com>
Cc: Martin Thomson <martin.thomson@gmail.com>, Roberto Peon <fenix@fb.com>, Ted Hardie <ted.ietf@gmail.com>, Eric Rescorla <ekr@rtfm.com>, Mirja Kühlewind <mirja.kuehlewind@tik.ee.ethz.ch>, Christian Huitema <huitema@huitema.net>, QUIC WG <quic@ietf.org>
Subject: Re: Packet number encryption

hi Jana, all,

> On 1 Feb 2018, at 03:46, Jana Iyengar <jri@google.com> wrote:
>
> I like this proposal for the ossification reason that Roberto described, but I also like it because it really simplifies things from an implementation perspective.

There seems to be a largely unquestioned assumption that packet number encryption has utility for ossification prevention. I am not convinced of this.

Our experience with TLS greasing shows that placing random values in fields that would otherwise largely be static over the lifetime of the protocol improves the ability to use those fields later. Packet number encryption is greasing only by analogy. "Field X has value Y" is a fundamentally different observation than "The values of field X over time are governed by function F", and I'm not sure that intuition in the simpler case applies directly to the more complicated one.

Specifically, for packet number encryption, the assumption appears to be that in-network devices will deploy during the operational lifetime of QUIC v1 that will make use of the observation that packet numbers monotonically increase, in a way that will impair the deployment of QUIC vN > 1 that does not have packet numbers that monotonically increase, or packet numbers that appear at a different location in the header. In other words, these devices will fail on this new version of QUIC in such a way that it will impair service to endpoints using QUIC vN.

Analogies to the TCP sequence number here are a bit flawed. The most important difference is that the open nature of TCP's wire image means that usage of the sequence number isn't limited to observation: on-path devices can change it, and forge or delay ACKs based on it. The only thing an on-path device can do with a QUIC packet with a packet number it doesn't like is to drop it. This function might have some utility as part of an in-network QUIC garbage filter, as part of an anti-DDoS system, but any such device would need to track the version number as well (indeed, tracking version negotiation and handshaking would be a useful primitive here in its own right), and would therefore have enough information to not break on new versions it knows about.

(Note we specifically don't care about the case where devices making use of this observation stop working in a way that the end-to-end properties of QUIC vN are preserved: the invariants as of a given version are the public wire-image interface to the protocol, anything else is at-your-own-risk, no-user-servicable-parts-inside).

I suspect that similar arguments can be had about all but the simplest proposed applications of greasing to functions more complex than "the value of field X is always Y or Z". The example of packet number tracking points to an anti-ossification approach that I have much more confidence in, though:

The vigorous and meaningful exercise of the version negotiation and version coexistence systems built into QUIC would force agility on on-path devices. The earlier we do this, the more effective it would be. I've already said this in other contexts, but I'll explicitly suggest it here: let's do QUIC 2, and soon (say, July 2019?), and use version negotiation *itself* as a method to "grease" the version negotiation mechanism along with the rest of the header.

> We currently have packet number gaps to be used with new CIDs, but these are the same packet numbers on the wire as within the transport. So, when used with connection migration or after quiescence, the sender and receiver of ACKs has to deal with potentially large gaps... this is encodable on the wire, sure, but these gaps are unnecessary within the transport.
>
> Encrypting packet numbers reduces complexity in that you get a packet number gap on the wire without having to explicitly model it inside the transport. The transport machinery starts packet numbers at 0, increments it by 1 irrespective of migration or quiescence, and the ACK frames similarly carry the plaintext packet number. Separating what's used within the transport and what's visible on the wire allows you to do things like use multiple CIDs within the same 5-tuple.

This is a more convincing argument for packet number encryption -- it does seem hard to get this elegance in the transport while having a non-trivially-linkable wire image without it.

> I see it as a clean separation of concerns, with consequent simplification in implementation and an additional degree of freedom.
>
> I'm not convinced of the value of packet number in measuring reordering degree, since this can be trivially done by looking at the IP ID field for packets on the same 5-tuple.

For IPv4 packets, on implementations where IPID is not randomized, yes. I don't have numbers on how prevalent these are; in any case, where it isn't randomized, that's arguably a bug that should be fixed. Should the guidance in the manageability draft, then, be "use IPv4 if you care about loss and reordering detection"? I am not optimistic about the chances of that getting past the IESG. ;)

Cheers,

Brian

> On Wed, Jan 31, 2018 at 6:00 PM, Martin Thomson <martin.thomson@gmail.com> wrote:
> With some light editing for quoting purposes...
>
> On Thu, Feb 1, 2018 at 12:02 PM, Roberto Peon <fenix@fb.com> wrote:
> >> Or do you mean CIDs 1-3 may be used on any of the 5-tuples A-C, for the same
> >> communicating peers  Alice'sPhone and Bob'sBankServer93?
> >
> > The latter assuming we allow the server to specify it.
>
> I find "assuming we allow the server to specify *it*" to be strangely cryptic.
>
> To be clear, my operating assumption is while that servers can provide
> multiple connection IDs, those connection IDs need to be usable on any
> 5-tuple.  Are you suggesting that a server might need to signal where
> a connection is usable?  (I can see how that might make sense, but it
> isn't possible with the protocol as specified.)  Or are you suggesting
> that there might need to be some signal that allows clients to
> distinguish between connection IDs that are for concurrent use? That
> is, as opposed to what you might assume to be sequential use based on
> the current specification.
>
> FWIW, it should be possible to remove the sequencing field from
> NEW_CONNECTION_ID after making this change.  The only reason left for
> sequential connection ID use is to give the server the ability to know
> when certain connection IDs no longer need to be available.  A server
> might then be able to clean up associated state and even reuse them.
>
> Of course, that likely only makes sense if the server is creating
> explicit mappings for each, which - as discussed at the interim -
> isn't super practical in many deployments.  Right now, I think that
> the assumption is an assumption only, and that relying on strictly
> linear use of connection IDs would be unwise.
>
>