RE: Packet number encryption

Mike Bishop <mbishop@evequefou.be> Thu, 08 February 2018 23:13 UTC

Return-Path: <mbishop@evequefou.be>
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 92DFC12D872 for <quic@ietfa.amsl.com>; Thu, 8 Feb 2018 15:13:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level:
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=evequefou.onmicrosoft.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 DiXC4O1pgfaN for <quic@ietfa.amsl.com>; Thu, 8 Feb 2018 15:13:41 -0800 (PST)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0111.outbound.protection.outlook.com [104.47.32.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 04D4B126CF6 for <quic@ietf.org>; Thu, 8 Feb 2018 15:13:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evequefou.onmicrosoft.com; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AcTxUtCZu2eUnTaSp3NxVPfvAJukehm98I+0oVu4YvE=; b=S8GvYQNqqrfX6lkuEUW+JuQTMt4vgwH7BQSirCvyUT917ZaUduEfa0OX4/Xg/xfM9JZgSzc7sIFRnKuQojIWodBBw8DCp9Qkh+9sq39jxyTme68b/XYQ/Wh1KRLMAz5ChqOV6XiyN1a7/izqcr0eVoWBLqw8plVZj+DLjZuP7QU=
Received: from MWHPR08MB2432.namprd08.prod.outlook.com (10.169.203.136) by MWHPR08MB2816.namprd08.prod.outlook.com (10.173.239.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Thu, 8 Feb 2018 23:13:37 +0000
Received: from MWHPR08MB2432.namprd08.prod.outlook.com ([fe80::5410:deca:3ee5:983f]) by MWHPR08MB2432.namprd08.prod.outlook.com ([fe80::5410:deca:3ee5:983f%16]) with mapi id 15.20.0485.009; Thu, 8 Feb 2018 23:13:37 +0000
From: Mike Bishop <mbishop@evequefou.be>
To: Praveen Balasubramanian <pravb@microsoft.com>, Marten Seemann <martenseemann@gmail.com>, huitema <huitema@huitema.net>
CC: "quic@ietf.org" <quic@ietf.org>
Subject: RE: Packet number encryption
Thread-Topic: Packet number encryption
Thread-Index: AQHTmW33YzpoOLX0UU2dbBSG8l3vaKOMgUQAgABeoYCAAAgUAIAAd3KAgAA8YgCAACPEAIAAAiYAgAOBloCAALfdgIAACBkAgAEGGACAANx9AIAAn5KAgAB7w4CAADUigIAADBeAgADXOQCAAGavgIAAEEgAgACizACAADhiAIAAHkiAgAADUYCAACabIIAAVcAAgAAUZQCAAA5oAIAAEIEAgABFkgCAAAUSgIAABUkAgAABmYCAAAaRgIAAC4qAgACi8QCAAemoIA==
Date: Thu, 08 Feb 2018 23:13:37 +0000
Message-ID: <MWHPR08MB24327A7BB5AE1AE70FE5CDB1DAF30@MWHPR08MB2432.namprd08.prod.outlook.com>
References: <CABkgnnVyo3MmWtVULiV=FJTnR528qfY8-OmKGWAs0bCvri-a_g@mail.gmail.com> <2102BDC2-62C0-4A76-8ADE-8167437E2D07@trammell.ch> <CAN1APde6o6=aCXuWajPFSU=jXv-ERdVHk=uyjM71uQ_uU-oMTg@mail.gmail.com> <8e833029-68b5-2787-3897-a0f7818a259f@tik.ee.ethz.ch> <1de39727-eeec-0e7a-1e8b-5ed50433c5bd@cs.tcd.ie> <MWHPR08MB2432D0216BC8FE1B0D9E3690DAFD0@MWHPR08MB2432.namprd08.prod.outlook.com> <CAGD1bZauKbucs_5n7RQbK8H2HiyfiqpGVEcKreGA6umhMBSFgg@mail.gmail.com> <CABcZeBPNrc-9vANSH02r++p53s6gN4pVB8DMd80nUxOhKTp3dA@mail.gmail.com> <CAKcm_gMvHSBhpUvsQCCkV2_o+d_wchF3R3L6H8mp6nKNaaRmSw@mail.gmail.com> <CY4PR21MB0133CCAA6807469BA983D00BB6FC0@CY4PR21MB0133.namprd21.prod.outlook.com> <CABkgnnW4xr_YzpsvCxaJJgcQdBTuX=Yv735_sdd4VoMfji8mbA@mail.gmail.com> <CY4PR21MB0133C759D4A08A4988B641B2B6FC0@CY4PR21MB0133.namprd21.prod.outlook.com> <bdf88936-8edc-d56e-ee59-c9d597058edd@huitema.net> <CY4PR21MB01337C8A700E58B49D90B712B6FC0@CY4PR21MB0133.namprd21.prod.outlook.com> <119b3276-5799-1cc3-8982-7479171bbf27@huitema.net> <CAOYVs2pi8-NVuS+crNMfjsP-n5upK3=5tPeQ8OSGpOvL6RTrjA@mail.gmail.com> <CY4PR21MB0133A1117B2733BBCF049C5FB6FC0@CY4PR21MB0133.namprd21.prod.outlook.com>
In-Reply-To: <CY4PR21MB0133A1117B2733BBCF049C5FB6FC0@CY4PR21MB0133.namprd21.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mbishop@evequefou.be;
x-originating-ip: [38.134.241.6]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; MWHPR08MB2816; 7:t0N/dytmX4v/hn1vjQHvHxmpJcpJNdLKLufvEGa4XvSf74nC2l73mPqb8WgI7/ML+mTYeYTyQy66sCPPrnNMLH7ODBnbURvCLqdkk81Y5g0WtCgKniFJm4CDYvwl4Z8xc2Sv6ZxM2XHGG+A5NY0AzwePHdqv4naZ6XcWkfLPS3RupL8p5EcfYIMGR1oLXfpicXzvW7yXr/46ayU8UzNazjAMBekVml7EPNGV9yPT11MZE3fsUf9J6F9slMjTr/k1
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 16af3823-605a-4863-721d-08d56f499585
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4604075)(3008032)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603307)(7153060)(7193020); SRVR:MWHPR08MB2816;
x-ms-traffictypediagnostic: MWHPR08MB2816:
x-microsoft-antispam-prvs: <MWHPR08MB28165F8885AAAE621826A104DAF30@MWHPR08MB2816.namprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231101)(2400082)(944501161)(3002001)(10201501046)(6041288)(20161123564045)(20161123558120)(2016111802025)(20161123560045)(20161123562045)(6072148)(6043046)(201708071742011); SRVR:MWHPR08MB2816; BCL:0; PCL:0; RULEID:; SRVR:MWHPR08MB2816;
x-forefront-prvs: 0577AD41D6
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(39380400002)(366004)(39830400003)(376002)(199004)(189003)(377424004)(316002)(3660700001)(8676002)(5660300001)(106356001)(39060400002)(55016002)(4326008)(25786009)(81156014)(76176011)(9686003)(74316002)(54896002)(3280700002)(3846002)(6306002)(5250100002)(6436002)(81166006)(8936002)(93886005)(229853002)(3480700004)(53936002)(1511001)(186003)(6246003)(45080400002)(2900100001)(99286004)(14454004)(26005)(105586002)(86362001)(7736002)(74482002)(236005)(7696005)(8666007)(110136005)(59450400001)(2950100002)(6506007)(33656002)(561944003)(68736007)(97736004)(790700001)(6116002)(19609705001)(102836004)(7116003)(2906002)(53546011)(478600001)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR08MB2816; H:MWHPR08MB2432.namprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; LANG:en;
received-spf: None (protection.outlook.com: evequefou.be does not designate permitted sender hosts)
x-microsoft-antispam-message-info: 2je0eKfoNykmZAfRJEU+uh38cjbnkTalfNJZTChFvTrN3e8yiQ+mY9pmBde8K9CNj0hRs3N0U3DdXYiy211Kog==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_MWHPR08MB24327A7BB5AE1AE70FE5CDB1DAF30MWHPR08MB2432namp_"
MIME-Version: 1.0
X-OriginatorOrg: evequefou.be
X-MS-Exchange-CrossTenant-Network-Message-Id: 16af3823-605a-4863-721d-08d56f499585
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2018 23:13:37.1045 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR08MB2816
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/4mqs87__ppnOS5BHUSomdBwYVII>
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, 08 Feb 2018 23:13:45 -0000

#2 won’t work.  The packet number is an input to the AEAD nonce, so you have to get to the packet number before you can decrypt the payload.  It can’t be based on anything internal to the encrypted packet.

In Martin’s proposal, it’s using a combination of the encrypted payload (which requires nothing to access) and some stored state on each endpoint, which requires only the Connection ID to look up.  You want the thing you XOR by to be constantly changing, or it becomes easier to look at sequences of obfuscated packet numbers and start drawing inferences about what the XOR value is.  If overhead is the primary concern, I think there are a couple approaches that might allow you to precompute values and amortize the cost of doing the encryption step.  (At the cost of keeping the table of precomputed values, of course.)

I still think Jana’s pushing in the right direction here:  Let’s agree on goals, and then see if we can craft a design that meets those goals.  I hear you saying that low overhead is a goal, which I think we can all agree on.  I also think I hear you saying that 1-1.5% overhead is too high, but it sounds like there’s less agreement on that.  You also raise an interesting point that some clients will care less about linkability because they will never intentionally migrate.

From: QUIC [mailto:quic-bounces@ietf.org] On Behalf Of Praveen Balasubramanian
Sent: Wednesday, February 7, 2018 9:44 AM
To: Marten Seemann <martenseemann@gmail.com>; huitema <huitema@huitema.net>
Cc: quic@ietf.org
Subject: RE: Packet number encryption


Couple of things to add:

1. Connection migration is an optional portion of the transport and not mandatory. It does not seem to be incrementally deployable with today's unmodified load balancers. Many devices may also be single homed and not have multiple active network interfaces. I also think the app and system settings will have to opt-in to it (to prevent aggressive usage of metered cellular data). If this is the case, cross-path linkability will be of limited concern for many QUIC connections. There is also the fact that perfect unlinkability seems to be hard against a motivated adversary.

2. If middlebox ossification is a big concern, we mainly need obfuscation and not encryption. Another option for example would be an XOR transform with some variable field in the encrypted portion of the packet (as an example sequence number of the first stream frame if it is present or some random pad bytes when its not present). I hope we can be creative here to reduce computation cost.


From: Marten Seemann [mailto:martenseemann@gmail.com]
Sent: Wednesday, February 7, 2018 12:01 AM
To: huitema <huitema@huitema.net<mailto:huitema@huitema.net>>
Cc: Praveen Balasubramanian <pravb@microsoft.com<mailto:pravb@microsoft.com>>; quic@ietf.org<mailto:quic@ietf.org>
Subject: Re: Packet number encryption


On Wed, Feb 7, 2018 at 3:20 PM Christian Huitema <huitema@huitema.net<mailto:huitema@huitema.net>> wrote:



On 2/6/2018 8:55 PM, Praveen Balasubramanian wrote:

First, the proposal does not obscure the position of the packet number field in the header. The field contains a number that increments with every packet, and is thus easy to identify. This means that middle-boxes will get accustomed to seeing that field and tracking its increments.

Hence, this simple obfuscation provides no protection against ossification of the packet number field.



Well it seems like it is a requirement (see bullet 3 in Jana's list) to allow middleboxes to see sequencing information. By picking the initial random value middleboxes cannot assume any particular value. If packet number location and size is not part of invariants then it cannot be ossified, middleboxes will need to be resilient.

This is why I would rather see the exposed bits copied at a fixed location, while the PN itself cannot be located. That way, the exposed bits can ossify, but the actual PN does not.

We still need to be very careful here. If we decide to expose bits, we must make sure that a middlebox can only extract coarse-grained information, if we want to prevent middleboxes from buffering and delaying packets in order to fix / reduce reordering.
At this point however, I'm not convinced that exposing any reordering information to the network should be a requirement at all. There's a real risk of misuse of this information, and of ossification of whatever bits we expose.