Re: Packet number encryption

"Brian Trammell (IETF)" <ietf@trammell.ch> Wed, 31 January 2018 10:14 UTC

Return-Path: <ietf@trammell.ch>
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 1CF061316D0 for <quic@ietfa.amsl.com>; Wed, 31 Jan 2018 02:14:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 hQjjZoMGtM3d for <quic@ietfa.amsl.com>; Wed, 31 Jan 2018 02:14:32 -0800 (PST)
Received: from gozo.iway.ch (gozo.iway.ch [212.25.24.36]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EB89F12D7F7 for <quic@ietf.org>; Wed, 31 Jan 2018 02:14:21 -0800 (PST)
Received: from gozo.iway.ch (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id B77A3340EBF; Wed, 31 Jan 2018 11:14:20 +0100 (CET)
Received: from localhost (localhost [127.0.0.1]) by localhost (ACF/6597.10323); Wed, 31 Jan 2018 11:14:20 +0100 (CET)
Received: from switchplus-mail.ch (switchplus-mail.ch [212.25.8.236]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gozo.iway.ch (Postfix) with ESMTPS; Wed, 31 Jan 2018 11:14:20 +0100 (CET)
Received: from [81.134.152.4] (account ietf@trammell.ch HELO [172.18.9.171]) by switchplus-mail.ch (CommuniGate Pro SMTP 6.1.18) with ESMTPSA id 43874202; Wed, 31 Jan 2018 11:14:20 +0100
From: "Brian Trammell (IETF)" <ietf@trammell.ch>
Message-Id: <BCB3985A-74B6-4D50-9397-FF808FE5A087@trammell.ch>
Content-Type: multipart/signed; boundary="Apple-Mail=_44D44E57-F4E8-4FF7-8BAF-1C33D772CD18"; protocol="application/pgp-signature"; micalg="pgp-sha512"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: Packet number encryption
Date: Wed, 31 Jan 2018 10:14:22 +0000
In-Reply-To: <9096e5ec-581e-875a-b1dd-bff0b05206fd@huitema.net>
Cc: Eric Rescorla <ekr@rtfm.com>, QUIC WG <quic@ietf.org>, Martin Thomson <martin.thomson@gmail.com>
To: Christian Huitema <huitema@huitema.net>
References: <CABkgnnVyo3MmWtVULiV=FJTnR528qfY8-OmKGWAs0bCvri-a_g@mail.gmail.com> <1F7FB3B8-A94C-4354-9944-FB09FB8DB68B@trammell.ch> <CABcZeBMbwdwyC9TxxHBLYaZKfNB-FG2wCGjqUZ_mNR-A1R47FA@mail.gmail.com> <9096e5ec-581e-875a-b1dd-bff0b05206fd@huitema.net>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/PDD8e0ZzsNlVoHg-Eyl7uZNd9Lc>
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: Wed, 31 Jan 2018 10:14:35 -0000

> On 30 Jan 2018, at 21:00, Christian Huitema <huitema@huitema.net> wrote:
> 
> 
> 
> On 1/30/2018 10:31 AM, Eric Rescorla wrote:
>> 
>> 
>> On Tue, Jan 30, 2018 at 6:53 AM, Brian Trammell <ietf@trammell.ch> wrote:
>> hi Martin,
>> ...
>> I'm not sure this isn't completely crazy.
> 
> I think this beats the alternatives, either complex-but-fragile obfuscation schemes, or separate per-path encryption contexts. Also, I like that this is somewhat future-proof -- it allows building future multipath extension at an almost minimal cost.

I'll note that this presupposes a class of designs for MPQUIC. There's another entire class where a higher-layer end-to-end multistream association maps down to a set of completely separate QUIC connections. I don't know that we're at a point where we can say that we should prefer one over the other (and indeed, we shouldn't try to be before QUIC version 2).

>> ...
>> Beyond this, though, we need to have a coherent idea of what we're trying to prevent. From discussions to date, I think these are the two cases we care about:
>> 
>> (1) An unprivileged on-path device that sees a packet from a flow that is migrated on purpose by an endpoint (i.e., due to connection migration or multipath) should not be able to associate that packet to the prior flow.
> 
> Yes.

Okay. This seems like a reasonable goal.

>> (2) An unprivileged on-path device that sees a packet from a flow that is unintentionally migrated (i.e., one of its globally routable addresses changes without the associated endpoint's knowledge) should not be able to associate that packet to the prior flow.
> 
> No. That one can only be solved through a voluntary action from the sender. If the client is in the middle of sending a stream, correlation is trivial whatever we do.

Yep.

> There are however two plausible improvements:
> 
> a) Explicit migration after signalling by the NAT box. We would need some new protocol to do that, maybe ICMP based. It could work in the "mobile router" case.

You could bind this to something like a future, more dynamic PvD. Or you could have done it inline with PLUS, had that been a thing we'd decided to do. In either case deployment before the end of next decade seems optimistic.

> b) Opportunistic migration out of quiescence. NAT rebinding typically happen after a period of silence. Clients that just start sending after a long silence may decide to "simulate a migration", to break the correlation.

Seems like it'd be simpler just to always try to 0RTT resume after being quiet for more than 30s, though that would require the application mapping to be resumption-aware.

> Both of these improvements will benefit from packet number encryption.
> 
>> ...
>> As Christian noted, using the short header type field to provide a sort of subsequence number or other packet-number independent explicit signal would mitigate the damage packet number encryption would to do loss and reordering observability, but not completely address them.
> 
> Yes. We have to be serious about network manageability. There has to be a sweet spot between expose everything so network management sees it and encrypt everything so middle boxes do not breach privacy or ossify the protocol. I think tricks like the spin bit and/or a small-modulo sequence number may be close to that sweet spot.
> 
> Part of me would want to see these spin bit and small modulo sequence number down in the IP header. That would look like a very nice use of the IPv6 flow-ID.

As I understand it, the currently (spottily) deployed uses of the flow-ID, which ECMP based on it, would prevent that. I've only seen anecdata here though.

> Wouldn't it be nice if network management was based on the network header? But failing that, maybe we need to start something in QUIC.

That ship sailed a long while ago (cf. RFC 7872). We have indeed specified relatively higher-overhead DO headers for diagnostics (RFC 8250), though given Internet deployment issues with extension headers and DO, it's really only intended for usage in local networks.

There's are reasons practice has migrated to passive observation of TCP for this sort of thing, and building a protocol to address TCP ossification won't fix them.

Cheers,

Brian