[quicwg/base-drafts] Single Stream of Bytes for CRYPTO Frames (#1592)

Nick Banks <notifications@github.com> Fri, 20 July 2018 17:31 UTC

Return-Path: <noreply@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 590C3130F74 for <quic-issues@ietfa.amsl.com>; Fri, 20 Jul 2018 10:31:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.009
X-Spam-Level:
X-Spam-Status: No, score=-8.009 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, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, URIBL_BLOCKED=0.001] 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 GehSAGxVVq-I for <quic-issues@ietfa.amsl.com>; Fri, 20 Jul 2018 10:31:26 -0700 (PDT)
Received: from out-6.smtp.github.com (out-6.smtp.github.com [192.30.252.197]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D343613106F for <quic-issues@ietf.org>; Fri, 20 Jul 2018 10:31:25 -0700 (PDT)
Date: Fri, 20 Jul 2018 10:31:25 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1532107885; bh=CfOxiAWRXGF5mEfEGBNvX+Gpe9WbeaqZheiCg5I4Csw=; h=Date:From:Reply-To:To:Cc:Subject:List-ID:List-Archive:List-Post: List-Unsubscribe:From; b=FLZVmWHcAy9UrHDxTQuPrToT9FhOWSoskSKKgejY+6AtmKexC5pv33Wrjahgs+Sep gXDHAMfNwb9Qk5aJalS58jXHhBkBPMebqC45jRzCtAKllQUo/aMSQG52Xz+KnFwkRd xyhlSgoug9va00CrEGKfc4ZSwP8sJQEE3vwFvXsk=
From: Nick Banks <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abc0d7a8c5e54b7b3e9fe95c8312c6536563debb1092cf000000011769de6d92a169ce1474a4c7@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/1592@github.com>
Subject: [quicwg/base-drafts] Single Stream of Bytes for CRYPTO Frames (#1592)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5b521c6d25a7b_a443f7eb06be61c17158e"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: nibanks
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/3P_YwpuoXekf_PTrkjlzGcWBd6U>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.27
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: Fri, 20 Jul 2018 17:31:29 -0000

Currently, the spec states:

> There is a separate flow of cryptographic handshake data in each encryption level, each of which starts at an offset of 0. This implies that each encryption level is treated as a separate CRYPTO stream of data.

This means you must track set of bytes in each encryption level (Initial, 0-RTT, Handshake and 1-RTT) as a separate stream and manage them accordingly; separate outstanding sent byte ranges, recovery ranges, acked ranges.

Additionally, it makes it a little unclear where one 'stream' stops and another 'starts'. For instance, in the 0-RTT case, the client (is supposed to) sends EOED with 0-RTT key, immediately followed by (ideally in the same UDP datagram, but not required) FIN with the Handshake key. If the 0-RTT EOED is lost, but the FIN isn't it could look like the client just skipped EOED. Instead, if they were all in the same stream, with FIN's offset starting where EOED left off, it would be easier to track this.

For these reasons, I propose each CRYPTO stream in each encryption level's offset starts where the previous level stopped.

-- 
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/issues/1592