Subject: [quicwg/base-drafts] Rename and consolidate packet types (#847)

From: Martin Thomson <[email-masked]>
Date: Mon, 09 Oct 2017 18:43:46 -0700

The two cleartext types are no longer needed to distinguish between client and
server.  Server packets are protected with a different key to that used for
client packets, so a server will be unable to process a packet from another
server as though it were a client packet (not that this was possible anyway
given that we have a different type for the initial packet).

Consequently, I have renamed packets to use shorter names and to better fit
their roles:

* Client Initial -> Initial
* Server Stateless Retry -> Retry (also avoids confusion with Stateless Reset)
* Server Cleartext -> Handshake
* Client Cleartext -> Handshake

I've rephrased the text in the TLS spec to match.

The only functional change here is to consolidate Server and Client Cleartext
into a single codepoint.  I did renumber the 0-RTT and 1-RTT protected packets
as a result.

Closes #846.
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/847

-- Commit Summary --

  * Rename and consolidate packet types

-- File Changes --

    M draft-ietf-quic-tls.md (90)
    M draft-ietf-quic-transport.md (188)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/847.patch
https://github.com/quicwg/base-drafts/pull/847.diff

-- 
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/847

---

From: Mike Bishop <[email-masked]>
Date: Tue, 10 Oct 2017 17:07:24 -0700

MikeBishop approved this pull request.

Minor nits.  I'm fine with this change.

-In order to prevent tampering by version-unaware middleboxes, Cleartext
-packets are protected with a connection and version specific key, as
-described in {{QUIC-TLS}}. This protection does not provide confidentiality
-or integrity against on-path attackers, but provides some level of
-protection against off-path attackers.
+In order to prevent tampering by version-unaware middleboxes, handshake packets
+are protected with a connection and version specific key, as described in

"connection- and version-specific"

>  for stream 0 containing a cryptographic handshake message, with enough PADDING
 frames that the packet is at least 1200 octets (see {{packetization}}).  The
 stream in this packet always starts at an offset of 0 (see {{stateless-retry}})
 and the complete cryptographic handshake message MUST fit in a single packet
 (see {{handshake}}).
 
-The client uses the Client Initial Packet type for any packet that contains an
-initial cryptographic handshake message.  This includes all cases where a new
-packet containing the initial cryptographic message needs to be created, this
-includes the packets sent after receiving a Version Negotiation
-({{packet-version}}) or Server Stateless Retry packet
-({{packet-server-stateless}}).
+The client uses the Initial Packet type for any packet that contains an initial

Some capitalization inconsistency between "Initial Packet" and "Initial packet".  Might be worth a quick pass to decide which system you intend to use.

> @@ -805,8 +787,8 @@ an unsupported version.
 
 # Frames and Frame Types {#frames}
 
-The payload of cleartext packets and the plaintext after decryption of protected
-payloads consists of a sequence of frames, as shown in {{packet-frames}}.
+The payload of Initial, Handshake and all protected packets consists of a

Since Initial and Handshake packets are also semi-protected, we might be able to get the specific list out entirely.  The payload of all packet types, after removing packet protection, consists of..."

-- 
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/847#pullrequestreview-68460969

---

From: ianswett <[email-masked]>
Date: Tue, 10 Oct 2017 17:42:28 -0700

ianswett commented on this pull request.

> @@ -610,11 +612,11 @@ As TLS reports the availability of keying material, the packet protection keys
 and initialization vectors (IVs) are updated (see {{key-expansion}}).  The
 selection of AEAD function is also updated to match the AEAD negotiated by TLS.
 
-For packets other than any unprotected handshake packets (see {{cleartext-hs}}),
-once a change of keys has been made, packets with higher packet numbers MUST be
-sent with the new keying material.  The KEY_PHASE bit on these packets is
-inverted each time new keys are installed to signal the use of the new keys to
-the recipient (see {{key-phases}} for details).
+For packets other than any handshake packets (see {{hs-protection}}), once a
+change of keys has been made, packets with higher packet numbers MUST be sent
+with the new keying material.  The KEY_PHASE bit on these packets is inverted

Why would one want to send more handshake packets without 1RTT keys once 1RTT keys have been established?

-- 
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/847#pullrequestreview-68466459

---

From: Martin Thomson <[email-masked]>
Date: Tue, 10 Oct 2017 19:49:53 -0700

martinthomson commented on this pull request.

Not sure what you mean.  This says that if you change keys, then you need to use the new keys and not the old ones.

-- 
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/847#discussion_r143901173

---

From: Martin Thomson <[email-masked]>
Date: Tue, 10 Oct 2017 19:59:39 -0700

@martinthomson pushed 1 commit.

670ede0  Rewrap

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/847/files/070a4b016f56bb4d0cf0b15a8b10baf3afb2a27b..670ede097e8360532c1f1edb3eba7b39870b3e55

---

From: ianswett <[email-masked]>
Date: Wed, 11 Oct 2017 13:08:23 +0000 (UTC)

Nevermind, I'd been up since 3AM and ran out of brain.

-- 
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/847#discussion_r144004658

---

From: ianswett <[email-masked]>
Date: Wed, 11 Oct 2017 13:08:38 +0000 (UTC)

ianswett approved this pull request.

-- 
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/847#pullrequestreview-68598334

---

From: ianswett <[email-masked]>
Date: Thu, 19 Oct 2017 14:17:53 +0000 (UTC)

I think this also closes #822 

Is there any reason not to merge this, since I thought we already had?

-- 
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/847#issuecomment-337922315

---

From: Martin Thomson <[email-masked]>
Date: Thu, 19 Oct 2017 15:57:40 -0700

No reason in particular, I just wanted to give it more "soak" time.

-- 
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/847#issuecomment-338060687

---

From: Martin Thomson <[email-masked]>
Date: Thu, 19 Oct 2017 23:01:24 +0000 (UTC)

979c46a  Merge branch 'master' into single-cleartext

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/847/files/670ede097e8360532c1f1edb3eba7b39870b3e55..979c46ae2a0e908916fe0d5b2ca82f9720e90498

---

From: Martin Thomson <[email-masked]>
Date: Thu, 19 Oct 2017 16:05:22 -0700

6898686  Reflow, fix links, Closes #822

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/847/files/979c46ae2a0e908916fe0d5b2ca82f9720e90498..6898686e483267d139d3e44d949a2a86e89249e3

---

From: janaiyengar <[email-masked]>
Date: Tue, 31 Oct 2017 22:43:50 +0000 (UTC)

janaiyengar approved this pull request.

-- 
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/847#pullrequestreview-73345951

---

From: janaiyengar <[email-masked]>
Date: Tue, 31 Oct 2017 22:44:00 +0000 (UTC)

Merged #847.

-- 
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/847#event-1319861895