Re: [quicwg/base-drafts] Encrypt key phase (#1339)

Kazuho Oku <notifications@github.com> Mon, 07 May 2018 14:00 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 D3EE61243F6 for <quic-issues@ietfa.amsl.com>; Mon, 7 May 2018 07:00:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.01
X-Spam-Level:
X-Spam-Status: No, score=-3.01 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, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] 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 kTcXpbuo8MK4 for <quic-issues@ietfa.amsl.com>; Mon, 7 May 2018 07:00:00 -0700 (PDT)
Received: from o5.sgmail.github.com (o5.sgmail.github.com [192.254.113.10]) (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 5AD2B124235 for <quic-issues@ietf.org>; Mon, 7 May 2018 07:00:00 -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=MK4fbNVAJVoDSaiTAsfKeQBWxJI=; b=DBvyd4Rpgi9T7tEB a+94WmXIGJBujytJolLlKPxB6i7PMZW55COKnmXQ6BD+J02CDvU2r5nXqN3d4IMy Z2UHaD+Eu96SU/bjnoVuHpjZNIe9NnNnolQRPQBELeIkoaP9ywZEqjBUVnRqGpH/ CdbsQZ1LE//MV7WbILRKfLP6U/0=
Received: by filter0235p1iad2.sendgrid.net with SMTP id filter0235p1iad2-25984-5AF05BD2-2D 2018-05-07 13:59:46.813058382 +0000 UTC
Received: from github-lowworker-d2dd71d.cp1-iad.github.net (unknown [192.30.252.33]) by ismtpd0003p1iad1.sendgrid.net (SG) with ESMTP id SUDl8t0qTviuGDXFwU4Ujg for <quic-issues@ietf.org>; Mon, 07 May 2018 13:59:46.665 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-d2dd71d.cp1-iad.github.net (Postfix) with ESMTP id A0D2F88140A for <quic-issues@ietf.org>; Mon, 7 May 2018 06:59:46 -0700 (PDT)
Date: Mon, 07 May 2018 13:59:46 +0000
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab2d4ef5fbde5cea0d38207fc112026b5c0b64723a92cf0000000117081dd292a169ce131d70d9@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1339/c387073720@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1339@github.com>
References: <quicwg/base-drafts/pull/1339@github.com>
Subject: Re: [quicwg/base-drafts] Encrypt key phase (#1339)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5af05bd29e86e_2b43fc8acfeaf883268db"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: kazuho
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
categories: subscribed
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak28Wi3gmUMpT3UHeGUG2Z2SP7j4eD2MSwjNtp HvDIL0rB/25pKQCW7bVnTB73/oDeaAet3iY6bJ9gO3iXlaFFncomSDqQ3aoFoTVjl99Upm0n1O5fcR ppcrWeV/svUvvnLXp+diIE3M7R/C8ncmf21CbeEecDOXHK0xf4/Yillzz+gu+J3YrznQuPqPqwlBQ6 8=
X-SG-ID: A4fhEY3diXC81rW45KdZlyZUeIsAZbh4s7lWAZfiJNE=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/8OxoYl3g8e4_axgZWGcuhOUa8HA>
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: Mon, 07 May 2018 14:00:03 -0000

Thank you for working on the PR.

> @kazuho suggested that we extend the encrypted portion into the type byte. That's a natural extension of this. One potential advantage of that is that we might get more bits for packet numbers.

Current form of this PR proposes of moving the key-phase bit and the PN lengths bits into the encrypted PN field. It means that the range that can be expressed with certain lengths of the encrypted PN field becomes 2 to 3 bits less than what we have in current draft.

OTOH, if we extend the encrypted portion to the type byte and continue to have the bits there, the range does not change.

So let's consider the numbers. The following is the maximum bandwidth that can be covered with certain lengths of the encrypted PN field for both approaches (see [section 4.8](https://quicwg.github.io/base-drafts/draft-ietf-quic-transport.html#rfc.section.4.8) for the relation between the maximum numbers of packets in-flight and the length of the PN field) under the following condition: RTT 100ms, MTU 1400 octets. Note that the calculation depends on BDP, so the bandwidth increases as latency decreases.

|location \ size of encrypted PN|1 octet|2 octets|4 octets|
|:---:|---:|---:|---:|
|bits in encrypted PN field|1.71Mbps|438Mbps|28.7Tbps|
|bits in type|427Kbps|54.7Mbps|3.58Tbps|

Looking at these numbers, I am inclined to having the bits in the type octet, assuming that we care about spending one or two less octet per packet when possible, because IMO we would have certain amount of connections between 427Kbps and 1.71Mbps, or between 54.7Mbps and 438Mbps. (Or if we do not care about spending one less octet, how about removing 1-octet PN from the specification?)

> There's also the possibility of making the long and short headers use the same encoding and to use the KEY_PHASE in the long header to indicate use of 0-RTT, which would eliminate the differences I had to introduce here. I'm sure that there are other options there as well.

I haven't thought of it, but that sounds like an interesting idea. I think it would be great if we could reduce the complexity by adjusting how the bits of the long header are used.

-- 
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/1339#issuecomment-387073720