Re: Explicit measurability in the QUIC wire image (was Re: Packet number encryption)

Kazuho Oku <kazuhooku@gmail.com> Wed, 07 February 2018 12:52 UTC

Return-Path: <kazuhooku@gmail.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 1720B126C83 for <quic@ietfa.amsl.com>; Wed, 7 Feb 2018 04:52:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1
X-Spam-Level:
X-Spam-Status: No, score=-1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 elsgJ30-k1UQ for <quic@ietfa.amsl.com>; Wed, 7 Feb 2018 04:52:15 -0800 (PST)
Received: from mail-pl0-x235.google.com (mail-pl0-x235.google.com [IPv6:2607:f8b0:400e:c01::235]) (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 678401241FC for <quic@ietf.org>; Wed, 7 Feb 2018 04:52:15 -0800 (PST)
Received: by mail-pl0-x235.google.com with SMTP id f8so374786plk.11 for <quic@ietf.org>; Wed, 07 Feb 2018 04:52:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=86gUVxKHV/fcwqjnZeuef+SQAHQkQq9d5+Jt+Mv7VEY=; b=pIUBmmPrYjYZG6LlmR3wgCjI8lwHdevaWNuZtQBvYp66scKU+ST0uOsTLIwFZ1xR7Y ElIZ1S7yOwgfNNkTcaZzX81zamaPQH0rR5vbWcJS2Ns3QqUK11889IWdvdUHtuVpxF7M eN5SggGKoL9XKxqaB6fF4ydREhwAdMkXZ9oQFrXlb8ikcoVALUj44TEqNOfeEYNV+bEB lLLq7teyd5PPZrr4ci8JGhRMQGDFHf3DAsqJrLcZy3ixBkQ5ejkLE2JKi5lgq6svxfU1 1QpL9qhmJhdxCtx8d89M60PJSOp3CkixmV6ZkyKG66gD7nqzy84M2VPBeNXuuDSSclCW Nfng==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=86gUVxKHV/fcwqjnZeuef+SQAHQkQq9d5+Jt+Mv7VEY=; b=oQor4YiJF8Kh7Yj81hZI2bTdcfapw+RAM06cFmbbSa5htWHBRBTvLwQ3PKkOmWa+0S Nq49J7J64fkcfFvH15GVfYMAvA7lrGYzLdSgQCh/uGraBD6icBQBniQ4TJnOge8XC1Qx 9DTGR1vzE38iFAYncEWUA6LCWl+CZaSyXyCdK55ShevXiONfbsFfMOe474K7j5WlE7iR bqEreStZRAj5xHwEeZ98mlB3AGVoZL4YkP8NtzNQ3jB2ivdSYSzQfTq9y/JVZuk3yg9+ 1GznKhSlBBxbvfbCPVpCtbWJCVLG18Kqkqe6g1/6P09GsHeYsUTplRbfSEamloUKvQrZ FI/A==
X-Gm-Message-State: APf1xPAtT5VIApX18jT2FTwF3I7+tImxqV38VeTyl5LLgAx6JekyoKjd sFaIO1lArhAL5dcItsbUk3YehnvMoHzL+TagulOYKVFL
X-Google-Smtp-Source: AH8x224XuZVdL/e7/F70UECW77/MEiX0xU8mI26RhWNuCDin0iv84GQ3xNkOj2p6E/6k7sPct3VSB30mLYc3Ce8s5z4=
X-Received: by 2002:a17:902:579d:: with SMTP id l29-v6mr5817694pli.27.1518007934859; Wed, 07 Feb 2018 04:52:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.236.156.11 with HTTP; Wed, 7 Feb 2018 04:52:14 -0800 (PST)
In-Reply-To: <CAN1APdfC6Tt15Bz3ns2y8E_pB1N+cJB4Bjc-x8cB=r+HJTdKnw@mail.gmail.com>
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> <CABkgnnWRQSAufwPss+qf=xAzCwRYeNNH8XLPm3yFaHxOb+ba4g@mail.gmail.com> <BF80500A-6277-45DC-8525-9C3FE138B76D@tik.ee.ethz.ch> <5A7191E0.6010003@erg.abdn.ac.uk> <5214AD93-8376-4B25-922F-AF5551CC2E95@netapp.com> <F990E064-E6F8-41A3-B791-F776C9955E15@nokia.com> <CAGD1bZab0GaZFsHwC+nw3AxxC4VusxMJ6oDanzk3dSDdWKAXdw@mail.gmail.com> <2C515BE8694C6F4B9B6A578BCAC32E2F83BA1443@MBX021-W3-CA-2.exch021.domain.local> <BY2PR15MB07757473DB9788558B902EB5CDF80@BY2PR15MB0775.namprd15.prod.outlook.com> <6E58094ECC8D8344914996DAD28F1CCD861B7F@DGGEMM506-MBX.china.huawei.com> <e529144067624fcba636fc8c24ee3ff4@usma1ex-dag1mb5.msg.corp.akamai.com> <BY2PR15MB07754D83A1721F2BD742359BCDFE0@BY2PR15MB0775.namprd15.prod.outlook.com> <2CD9DC43-D69B-43F0-8474-DFE798850A52@akamai.com> <CAGD1bZaUuNxqpDkn62B0wWcFD8=mCUWrAwWGG-rAOxH7Mf1=cQ@mail.gmail.com> <CY4PR21MB01334E30C7AF6AE75F58EEFDB6FE0@CY4PR21MB0133.namprd21.prod.outlook.com> <CAGD1bZaxrqzdkk0wxRaULwOTgg6wnrSrXNBK31s4uxdozaACBA@mail.gmail.com> <CAGD1bZbOAaSBcQw4nVtGuwRunaAW8MYHq9yPxNN6DdKHzt5HtQ@mail.gmail.com> <CANatvzx+uDHMV5XS=OuVYBqe_RYX=EmVWAmjuONS8BpNYCPweA@mail.gmail.com> <5233815B-00F3-4961-ABB8-505906258B89@trammell.ch> <CAN1APdcuKSLYw4Odyc4g=+4_+ojsNekeqmM9eYqxykkfxRx3Cg@mail.gmail.com> <CANatvzz3rmGPRgu1Z5+bAHhgjiN3L5OVTDhb4fmpPX+M8o4z3w@mail.gmail.com> <DB6PR10MB17661B9957DF90733FA28EC5ACFD0@DB6PR10MB1766.EURPRD10.PROD.OUTLOOK.COM> <DB6PR10MB176682C63A91007574BBEAECACFC0@DB6PR10MB1766.EURPRD10.PROD.OUTLOOK.COM> <CAN1APddkFxLFREQQe+0Kqqi+zJeU20ALjzN4R0Muf9FD1BzZUg@mail.gmail.com> <CABkgnnXkEsQkmdgX6c4_9w6YhTaPYrtdhUEJ8imi7NSChyC32g@mail.gmail.com> <CAN1APdfC6Tt15Bz3ns2y8E_pB1N+cJB4Bjc-x8cB=r+HJTdKnw@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Wed, 07 Feb 2018 21:52:14 +0900
Message-ID: <CANatvzyvka=H7rGK849XroHABArvBmSDts9wEArq2=o+_873Ug@mail.gmail.com>
Subject: Re: Explicit measurability in the QUIC wire image (was Re: Packet number encryption)
To: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
Cc: Martin Thomson <martin.thomson@gmail.com>, QUIC WG <quic@ietf.org>, "Brian Trammell (IETF)" <ietf@trammell.ch>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/6z_B9Y8L9QBvu45JEF6mEkTB_00>
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, 07 Feb 2018 12:52:17 -0000

2018-02-07 19:23 GMT+09:00 Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>:
>
> On 7 February 2018 at 11.10.21, Martin Thomson (martin.thomson@gmail.com)
> wrote:
>
> I looked into these when I first considered packet number encryption.
>
> Hi Martin, I think you might be misreading the intention behind this
> sequence.
>
> The idea is to generate 1 bit for every packet sent on a specific path, in
> the order the packet was sent, not to encode packet numbers directly.

What Mikkel says.

Or put it another way, below is a short summary of the approaches
being proposed:

* encode couple of least significant bits of the per-path sequence
number ("a small-modulo sequence number") [1]
* encode one bit in the middle of the per-path sequence number [2]

When observing that one bit of [2] spanning across multiple packets
belonging to a particular path, it looks like a square wave. There
came out variations of the approach.

* use sin wave instead of square wave [3]
* use bitsteram of PI instead of square wave [4][5]
* use bitstream of xorshift+ instead of square wave [6]

I would argue that the approaches discussed in [2] to [6] are superior
to [1] due to the fact that they use less bits, expose less
information, while possibly given us reasonable observation of loss
and reorder rate.

[1] https://www.ietf.org/mail-archive/web/quic/current/msg03030.html
[2] https://www.ietf.org/mail-archive/web/quic/current/msg03146.html
[3] https://www.ietf.org/mail-archive/web/quic/current/msg03146.html
[4] https://www.ietf.org/mail-archive/web/quic/current/msg03156.html
[5] https://www.ietf.org/mail-archive/web/quic/current/msg03171.html
[6] https://www.ietf.org/mail-archive/web/quic/current/msg03186.html

> The
> encoding of packet numbers is a separate thing whether encrypted or
> otherwise.
>
> When an observer collects these bits into words from several packets, it is
> possible to compare the gathered string with the expected sequence.
>
> The random access is only needed for analytical purposes to know about
> packet loss in the network, not to operate the QUIC transport as such. If
> the sequence is fixed and repeats with reasonable cycle length, it can be
> done efficiently in hardware.
>
> It is true that if you sample, say 32 bits, the mapping is not bijective so
> if you match the sequence, it is ambiguous. But since you already know what
> to expect next and you can choose the sample length as long as you want, say
> 128 bits, you do get very good information about where loss and reordering
> happened. If the sequence was not random, you would not have this property.
>
> As to reverse engineering, packets are already sent in order, so learning
> what the original order was, is hardly a significant compromise, except if
> you have multiple connections on the same tuple without transmitting an
> observable connection ID.
>
>



-- 
Kazuho Oku