Re: [quicwg/base-drafts] Stream0 dt output for merge (#1450)
Martin Thomson <notifications@github.com> Mon, 25 June 2018 00:48 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 E7FF5130E7A for <quic-issues@ietfa.amsl.com>; Sun, 24 Jun 2018 17:48:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.01
X-Spam-Level:
X-Spam-Status: No, score=-8.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, RCVD_IN_DNSWL_HI=-5, 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 4Qjzop9PPLei for <quic-issues@ietfa.amsl.com>; Sun, 24 Jun 2018 17:48:06 -0700 (PDT)
Received: from out-7.smtp.github.com (out-7.smtp.github.com [192.30.252.198]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8EA8D130E10 for <quic-issues@ietf.org>; Sun, 24 Jun 2018 17:48:06 -0700 (PDT)
Date: Sun, 24 Jun 2018 17:48:05 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1529887685; bh=GmHBHayxyEGOfsKmHJGgCmw3aRdNXY4T2rd61qI3IFg=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=jNpEwv/33icx0zfBytXKPeoY0D9HOgLom/oda5Xjoj+zXMaF+a+9Mixtp941obbyy 2Qzb/wXYXT/XLXHKFd870kZpNOvuv+vVzEaViccnu/BMz3wohwSxR1JetXXrEyBzfG xdTXnUXHU4a9H9OH128f/QVqDS774sdIe/6teoA8=
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abe1501ae52e9f9e40f112e5f1602140b20899e30592cf000000011747fdc592a169ce13d67a11@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1450/review/131038370@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1450@github.com>
References: <quicwg/base-drafts/pull/1450@github.com>
Subject: Re: [quicwg/base-drafts] Stream0 dt output for merge (#1450)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5b303bc58d59a_14c62ae49be98f54381598"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: martinthomson
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/bAs2hdLEjTdgeTorIl1KALhqm2Q>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.26
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, 25 Jun 2018 00:48:09 -0000
martinthomson approved this pull request. 24h warning. There are a number of things that this text leaves open, and in some cases things are broken (see esp. Retry), but we can't afford to leave this open any longer. If you have new issues; this isn't the place to discuss them. It's OK to open a new issue with the assumption that this PR will be merged, because it will be. (I'll take some of the open comments here and make issues. It looks like we already have issues for the Retry problems.) > -When the alarm fires, the sender MUST retransmit all unacknowledged handshake -data, by calling RetransmitAllUnackedHandshakeData(). On each consecutive -firing of the handshake alarm, the sender SHOULD double the handshake timeout -and set an alarm for this period. +When CRYPTO_HS frames are outstanding, the TLP and RTO timers are not active +unless the CRYPTO_HS frames were sent at 1RTT encryption. Is this encryption level or packet number space? Also, the first SHOULD in the previous paragraph needs at least one caveat for this case. > @@ -422,6 +441,14 @@ sending any ACK frames in response. In this case they can determine whether an immediate or delayed acknowledgement should be generated after processing incoming packets. +### Crypto Handshake Data + +In order to quickly complete the handshake and avoid spurious +retransmissions due to handshake alarm timeouts, handshake packets +SHOULD use a very short ack delay, such as 1ms. ACK frames MAY be The MAY is weird. ACK can always be sent immediately. > +Unlike TLS over TCP, QUIC applications which want to send data do not +send it through TLS "application_data" records. Rather, they send it +as QUIC STREAM frames which are then carried in QUIC packets. + + +# Carrying TLS Messages {#carrying-tls} + +QUIC carries TLS handshake data in CRYPTO_HS frames, each of which +consists of a contiguous block of handshake data identified by an +offset and length. Those frames are packaged into QUIC packets +and encrypted under the current TLS encryption level. +As with TLS over TCP, once TLS handshake data has +been delivered to QUIC, it is QUIC's responsibility to deliver it +reliably. Each chunk of data is associated with the then-current TLS +sending keys, and if QUIC needs to retransmit that data, it MUST use We use "encryption level" rather than sending keys, but I don't think that either works very well for this; TLS has a strict notion of what should be used to protect every octet, but there are multiple of these contexts in flight at the same time. Needs work. > + +- CRYPTO_HS frames MAY appear in packets of any encryption level. +- CONNECTION_CLOSE and CRYPTO_CLOSE MAY appear in packets of any + encryption level other than 0-RTT. +- PADDING and PING frames MAY appear in packets of any encryption level. +- ACK frames MAY appear in packets of any encryption level, but + MUST only acknowledge packets which appeared in that encryption + level. +- STREAM frames MUST ONLY appear in the 0-RTT and 1-RTT levels. +- All other frame types MUST only appear at the 1-RTT levels. + +Because packets may be reordered on the wire, QUIC uses the packet +type to indicate which level a given packet was encrypted +under, as shown in {{packet-types-levels}}. When multiple packets of +different encryption levels need to be sent, endpoints SHOULD use +coalesced packets to send them in the same UDP datagram. I agree with Christian here. Nothing says that sending together is necessary, no matter how good it might be for performance. > -A QUIC server starts the process by providing TLS with stream 0 octets. - -Each time that an endpoint receives data on stream 0, it delivers the octets to -TLS if it is able. Each time that TLS is provided with new data, new handshake -octets are requested from TLS. TLS might not provide any octets if the -handshake messages it has received are incomplete or it has no data to send. - -At the server, when TLS provides handshake octets, it also needs to indicate -whether the octets contain a HelloRetryRequest. A HelloRetryRequest MUST always -be sent in a Retry packet, so the QUIC server needs to know whether the octets -are a HelloRetryRequest. +A QUIC server starts the process by providing TLS with the client's +handshake octets. + +At any given time, an endpoint will have a current sending encryption +level and receiving encryption level. Each encryption level is I see. The problem here is that I was thinking QUIC, and this really applies to TLS. TLS assumes ordering, but QUIC doesn't. That's something that needs to be improved here, but I don't think that we need to do that here. > @@ -2849,43 +3014,19 @@ received packets in preference to packets received in the past. ### ACK Frames and Packet Protection -ACK frames that acknowledge protected packets MUST be carried in a packet that -has an equivalent or greater level of packet protection. - -Packets that are protected with 1-RTT keys MUST be acknowledged in packets that -are also protected with 1-RTT keys. - -A packet that is not protected and claims to acknowledge a packet number that -was sent with packet protection is not valid. An unprotected packet that -carries acknowledgments for protected packets MUST be discarded in its entirety. +ACK frames MUST only be carried in a packet that has the same packet My point is that you can't cross-ACK because you aren't capable of acknowledging something in a different packet number space. -- 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/1450#pullrequestreview-131038370
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Kazuho Oku
- Re: [quicwg/base-drafts] Stream0 dt output for me… Christian Huitema
- Re: [quicwg/base-drafts] Stream0 dt output for me… ianswett
- Re: [quicwg/base-drafts] Stream0 dt output for me… ianswett
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… Mike Bishop
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… Rui Paulo
- Re: [quicwg/base-drafts] Stream0 dt output for me… ianswett
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… ianswett
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Mike Bishop
- Re: [quicwg/base-drafts] Stream0 dt output for me… Mike Bishop
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… ianswett
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… Martin Thomson
- Re: [quicwg/base-drafts] Stream0 dt output for me… Kazuho Oku
- Re: [quicwg/base-drafts] Stream0 dt output for me… Kazuho Oku
- Re: [quicwg/base-drafts] Stream0 dt output for me… Mike Bishop
- Re: [quicwg/base-drafts] Stream0 dt output for me… Mike Bishop
- Re: [quicwg/base-drafts] Stream0 dt output for me… Nick Banks
- Re: [quicwg/base-drafts] Stream0 dt output for me… Nick Banks
- Re: [quicwg/base-drafts] Stream0 dt output for me… ekr
- Re: [quicwg/base-drafts] Stream0 dt output for me… Christopher Wood
- [quicwg/base-drafts] Stream0 dt output for merge … ekr