Subject: [quicwg/base-drafts] Ignore packet loss when the keys are not available (#2327)

From: ianswett <[email-masked]>
Date: Wed, 09 Jan 2019 21:30:43 +0000 (UTC)

Ignore the loss of Handshake, 0-RTT, and 1-RTT packets if the peer doesn't have the keys to process them.

Also unifies the text on discarding keys and no longer implies that 0-RTT has it's own packet number space.

Fixes #1967  Replaces #2028
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Update draft-ietf-quic-recovery.md
  * Update draft-ietf-quic-recovery.md

-- File Changes --

    M draft-ietf-quic-recovery.md (45)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/2327.patch
https://github.com/quicwg/base-drafts/pull/2327.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/2327

---

From: ianswett <[email-masked]>
Date: Wed, 09 Jan 2019 13:32:09 -0800

@ianswett pushed 1 commit.

9f5ed67a743a76c4bb7d1b10168eb5cef21c145f  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/32bfd56a2037d9fefa5f54197c6ac63b9dba1ab3..9f5ed67a743a76c4bb7d1b10168eb5cef21c145f

---

From: ianswett <[email-masked]>
Date: Wed, 09 Jan 2019 16:12:34 -0800

590d153623ebb20d8154109fc2749ab30cf203e2  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/9f5ed67a743a76c4bb7d1b10168eb5cef21c145f..590d153623ebb20d8154109fc2749ab30cf203e2

---

From: Martin Thomson <[email-masked]>
Date: Wed, 09 Jan 2019 16:41:09 -0800

martinthomson approved this pull request.

Some suggestions, but this is good.  Thanks.

> @@ -427,15 +427,33 @@ packet is received.  The client MAY use this value to seed the RTT estimator for
 a subsequent connection attempt to the server.

-#### Discarding Initial State {#discard-initial}
+#### Discarding Keys and Packet State {#discarding-packets}
+
+When keys are discarded, recovery state for all in-flight packets sent with

I think that we want to use "packet protection keys" on the first mention here.

```suggestion
When packet protection keys are discarded (see Section 4.9 of {{QUIC-TLS}}), recovery state for all in-flight packets sent with
```

+During the handshake, the keys to remove packet protection may not yet be

```suggestion
During the handshake, some packet protection keys might not be
```

+During the handshake, the keys to remove packet protection may not yet be
+available when the packet arrives. In particular, Handshake and 0-RTT packets

```suggestion
available when a packet arrives. In particular, Handshake and 0-RTT packets
```

+During the handshake, the keys to remove packet protection may not yet be
+available when the packet arrives. In particular, Handshake and 0-RTT packets
+will not be processable until the Initial flight arrives and 1-RTT packets

```suggestion
can't be processed until the Initial flight arrives and 1-RTT packets
```

+During the handshake, the keys to remove packet protection may not yet be
+available when the packet arrives. In particular, Handshake and 0-RTT packets
+will not be processable until the Initial flight arrives and 1-RTT packets
+will not be processable until the handshake completes.  Implementations MAY

```suggestion
can't be processed until the handshake completes.  Endpoints MAY
```

-- 
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/2327#pullrequestreview-191007537

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:04:44 -0800

7eb91575d5556fa88c966d2b64e03d5a6433a873  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/590d153623ebb20d8154109fc2749ab30cf203e2..7eb91575d5556fa88c966d2b64e03d5a6433a873

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:05:06 -0800

77ca0d19f5438f80b8748d27167a3fb0d630b032  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/7eb91575d5556fa88c966d2b64e03d5a6433a873..77ca0d19f5438f80b8748d27167a3fb0d630b032

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:05:19 -0800

4d80b5acdb5cb8ce78d6223e7762cc2543f97a2d  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/77ca0d19f5438f80b8748d27167a3fb0d630b032..4d80b5acdb5cb8ce78d6223e7762cc2543f97a2d

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:05:29 -0800

e3f4a31037e23a7063c5db84979457526fdb7bb7  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/4d80b5acdb5cb8ce78d6223e7762cc2543f97a2d..e3f4a31037e23a7063c5db84979457526fdb7bb7

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:05:48 -0800

5d4b686eb47a67974523c0a9d0d387f8886fd261  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/e3f4a31037e23a7063c5db84979457526fdb7bb7..5d4b686eb47a67974523c0a9d0d387f8886fd261

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:06:52 -0800

6e5254ef1166bee9323395d24a6405dd220fd715  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/5d4b686eb47a67974523c0a9d0d387f8886fd261..6e5254ef1166bee9323395d24a6405dd220fd715

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 04:33:49 -0800

eaa09fb0fcd2d3b1fe9b42b141a114c9309b0c88  Add a normative reference

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/6e5254ef1166bee9323395d24a6405dd220fd715..eaa09fb0fcd2d3b1fe9b42b141a114c9309b0c88

---

From: ianswett <[email-masked]>
Date: Thu, 10 Jan 2019 07:44:16 -0800

16569969f029354b64295a475f670f40ff1ccc07  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/eaa09fb0fcd2d3b1fe9b42b141a114c9309b0c88..16569969f029354b64295a475f670f40ff1ccc07

---

From: janaiyengar <[email-masked]>
Date: Tue, 15 Jan 2019 17:32:47 -0800

janaiyengar commented on this pull request.

A few comments, editorial.

+When 0-RTT is rejected, recovery state for all in-flight 0-RTT packets is
+discarded.
+
+If a server accepts 0-RTT, but does not buffer 0-RTT packets that arrive
+before Initial packets, early 0-RTT packets will be declared lost, but that
+is expected to be infrequent.
+
+#### Ignoring Loss of Undecryptable Packets

This doesn't belong here. You want this in the CC section.

> @@ -427,15 +445,34 @@ packet is received.  The client MAY use this value to seed the RTT estimator for

-#### Discarding Initial State {#discard-initial}
+#### Discarding Keys and Packet State {#discarding-packets}
+
+When packet protection keys are discarded (see Section 4.9 of {{QUIC-TLS}}),
+recovery state for all in-flight packets sent with those keys is discarded.

I think a slight restructure might help make this text clearer. I've also rephrased some.

"When packet protection keys are discarded (see Section 4.9 of {{QUIC-TLS}}),
all packets that were sent with those keys can no longer be acknowledged because
their acknowledgements cannot be processed anymore. The sender considers them
no longer in flight.  That is, the sender SHOULD discard all recovery state associated
with those packets and MUST remove them from the count of bytes in flight.

As described in Section 17.5.1 of {{QUIC-TRANSPORT}}, endpoints stop sending and
receiving Initial packets once they start exchanging Handshake packets.  At this
point, recovery state for all in-flight Initial packets is discarded.

When 0-RTT is rejected, recovery state for all in-flight 0-RTT packets is
discarded.

If a server accepts 0-RTT, but does not buffer 0-RTT packets that arrive
before Initial packets, early 0-RTT packets will be declared lost, but that
is expected to be infrequent.

It is expected that keys are discarded after packets encrypted with them would be
acknowledged or declared lost, with the exception of Initial secrets, which might
destroyed earlier."

> @@ -427,15 +445,34 @@ packet is received.  The client MAY use this value to seed the RTT estimator for

-#### Discarding Initial State {#discard-initial}
+#### Discarding Keys and Packet State {#discarding-packets}
+
+When packet protection keys are discarded (see Section 4.9 of {{QUIC-TLS}}),
+recovery state for all in-flight packets sent with those keys is discarded.
+The packets are removed from the count of bytes in flight and no
+acknowledgements or loss events will occur for those packets.  Note that it
+is expected that keys are discarded after those packets would be declared lost,
+but Initial secrets are destroyed earlier.

I don't understand this last sentence. Can you rephrase?

+When 0-RTT is rejected, recovery state for all in-flight 0-RTT packets is
+discarded.
+
+If a server accepts 0-RTT, but does not buffer 0-RTT packets that arrive
+before Initial packets, early 0-RTT packets will be declared lost, but that
+is expected to be infrequent.
+
+#### Ignoring Loss of Undecryptable Packets
+
+During the handshake, some packet protection keys might not be
+available when a packet arrives. In particular, Handshake and 0-RTT packets
+can't be processed until the Initial flight arrives and 1-RTT packets

```suggestion
cannot be processed until the Initial packets arrive, and 1-RTT packets
```

+When 0-RTT is rejected, recovery state for all in-flight 0-RTT packets is
+discarded.
+
+If a server accepts 0-RTT, but does not buffer 0-RTT packets that arrive
+before Initial packets, early 0-RTT packets will be declared lost, but that
+is expected to be infrequent.
+
+#### Ignoring Loss of Undecryptable Packets
+
+During the handshake, some packet protection keys might not be
+available when a packet arrives. In particular, Handshake and 0-RTT packets
+can't be processed until the Initial flight arrives and 1-RTT packets
+can't be processed until the handshake completes.  Endpoints MAY

```suggestion
cannot be processed until the handshake completes.  Endpoints MAY
```

+When 0-RTT is rejected, recovery state for all in-flight 0-RTT packets is
+discarded.
+
+If a server accepts 0-RTT, but does not buffer 0-RTT packets that arrive
+before Initial packets, early 0-RTT packets will be declared lost, but that
+is expected to be infrequent.
+
+#### Ignoring Loss of Undecryptable Packets
+
+During the handshake, some packet protection keys might not be
+available when a packet arrives. In particular, Handshake and 0-RTT packets
+can't be processed until the Initial flight arrives and 1-RTT packets
+can't be processed until the handshake completes.  Endpoints MAY
+ignore the loss of Handshake, 0-RTT, and 1-RTT packets that arrive before the

```suggestion
ignore the loss of Handshake, 0-RTT, and 1-RTT packets that might arrive before the
```

-- 
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/2327#pullrequestreview-192936478

---

From: Kazuho Oku <[email-masked]>
Date: Wed, 16 Jan 2019 11:57:32 +0000 (UTC)

kazuho commented on this pull request.

IIUC this refers to the provision in https://quicwg.org/base-drafts/draft-ietf-quic-tls.html#rfc.section.4.10. Maybe it's worth adding a reference.

-- 
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/2327#discussion_r248253477

---

From: ianswett <[email-masked]>
Date: Wed, 16 Jan 2019 17:20:58 +0000 (UTC)

9471affabce0a9794b4a3f7844d0308951653c07  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/16569969f029354b64295a475f670f40ff1ccc07..9471affabce0a9794b4a3f7844d0308951653c07

---

From: ianswett <[email-masked]>
Date: Wed, 16 Jan 2019 09:21:53 -0800

820e03c643fb2e9362f74cde8dad0947dfe1d9dc  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/9471affabce0a9794b4a3f7844d0308951653c07..820e03c643fb2e9362f74cde8dad0947dfe1d9dc

---

From: ianswett <[email-masked]>
Date: Wed, 16 Jan 2019 09:22:45 -0800

4edcbcdf9065347029e6be69cebf92a99d3fc218  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/820e03c643fb2e9362f74cde8dad0947dfe1d9dc..4edcbcdf9065347029e6be69cebf92a99d3fc218

---

From: ianswett <[email-masked]>
Date: Wed, 16 Jan 2019 09:24:23 -0800

ea8baae8ee5edd96daa90f317b38ec2267f86d0e  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/4edcbcdf9065347029e6be69cebf92a99d3fc218..ea8baae8ee5edd96daa90f317b38ec2267f86d0e

---

From: ianswett <[email-masked]>
Date: Wed, 16 Jan 2019 09:28:39 -0800

0d231b6c4ff69db74d5156cf422ae5d6198bf22d  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/ea8baae8ee5edd96daa90f317b38ec2267f86d0e..0d231b6c4ff69db74d5156cf422ae5d6198bf22d

---

From: Martin Thomson <[email-masked]>
Date: Wed, 16 Jan 2019 13:34:47 -0800

martinthomson commented on this pull request.

> @@ -945,6 +973,14 @@ The recovery period limits congestion window reduction to once per round trip.
 During recovery, the congestion window remains unchanged irrespective of new
 losses or increases in the ECN-CE counter.

I think that you want H2 here, definitely not H4.

```suggestion
## Ignoring Loss of Undecryptable Packets
```

-- 
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/2327#pullrequestreview-193363460

---

From: ianswett <[email-masked]>
Date: Wed, 16 Jan 2019 21:51:30 +0000 (UTC)

b5386cd183f557d550a73203e0ac0ba6f744e1e8  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/0d231b6c4ff69db74d5156cf422ae5d6198bf22d..b5386cd183f557d550a73203e0ac0ba6f744e1e8

---

From: Jana Iyemgar <[email-masked]>
Date: Tue, 22 Jan 2019 16:28:26 -0800

@janaiyengar pushed 1 commit.

d0483879f73a6588e6a3e475d124b706bdbfb0f0  restructure

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/b5386cd183f557d550a73203e0ac0ba6f744e1e8..d0483879f73a6588e6a3e475d124b706bdbfb0f0

---

From: Jana Iyemgar <[email-masked]>
Date: Tue, 22 Jan 2019 16:29:15 -0800

aa114252af626c73ce217078a86d6760042ea95f  s/_/-

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/d0483879f73a6588e6a3e475d124b706bdbfb0f0..aa114252af626c73ce217078a86d6760042ea95f

---

From: Martin Thomson <[email-masked]>
Date: Tue, 22 Jan 2019 16:32:29 -0800

> +  QUIC-TLS:
+    title: "Using TLS to Secure QUIC"
+    date: {DATE}
+    seriesinfo:
+      Internet-Draft: draft-ietf-quic-tls-latest
+    author:
+      -
+        ins: M. Thomson
+        name: Martin Thomson
+        org: Mozilla
+        role: editor
+      -
+        ins: S. Turner
+        name: Sean Turner
+        org: sn3rd
+        email: [email-masked]

```suggestion
```

-- 
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/2327#pullrequestreview-195298683

---

From: Jana Iyemgar <[email-masked]>
Date: Tue, 22 Jan 2019 16:33:09 -0800

850066528aa92de5c5b6a791ec52be74e2125867  remove email

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/2327/files/aa114252af626c73ce217078a86d6760042ea95f..850066528aa92de5c5b6a791ec52be74e2125867

---

From: Jana Iyemgar <[email-masked]>
Date: Tue, 22 Jan 2019 16:37:18 -0800

merging this one as well to get this in -18.

-- 
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/2327#issuecomment-456620614

---

From: Jana Iyemgar <[email-masked]>
Date: Tue, 22 Jan 2019 16:37:23 -0800

Merged #2327 into master.

-- 
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/2327#event-2090349816