Subject: Re: [quicwg/base-drafts] Describe inputs to TLS more clearly (#4011)

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 17:25:25 -0700

@martinthomson pushed 1 commit.

6d6a93fe5dfa40380e138f72dc1436ce4e093608  Merge branch 'master' into async-cert-validation

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4011/files/98905a16f9ed3b024d71cbf41dbb2724d0c21fb6..6d6a93fe5dfa40380e138f72dc1436ce4e093608

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 17:25:46 -0700

@kazuho, @janaiyengar, I've rebased this based on the changes in #3874.  Would you mind checking my work?

-- 
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/4011#issuecomment-685204115

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 17:41:34 -0700

4652e7d4da00341b5c8757643024b2f1501e2d44  Certificate validation external to the stack

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4011/files/6d6a93fe5dfa40380e138f72dc1436ce4e093608..4652e7d4da00341b5c8757643024b2f1501e2d44

---

From: Kazuho Oku <[email-masked]>
Date: Tue, 01 Sep 2020 17:47:57 -0700

@kazuho commented on this pull request.

@martinthomson Thank you for the ping. I think the text is okay, I just wonder if there's room for improvement.

> @@ -499,12 +499,24 @@ handshake, new data is requested from TLS after providing received data.
 ### Encryption Level Changes
 
 As keys at a given encryption level become available to TLS, TLS indicates to
-QUIC that reading or writing keys at that encryption level are available.  While
-generating these keys, an endpoint SHOULD buffer received packets marked as
-protected by the keys being generated, and process them once those keys become
-available.  If the keys are generated asynchronously, an endpoint MAY continue
-responding to the received packets that were processable while waiting for TLS
-to provide these keys.
+QUIC that reading or writing keys at that encryption level are available.
+
+The events that cause new keys to be available are not asynchronous; they
+always occur immediately after TLS is provided with inputs. Inputs are either
+new handshake bytes or new instructions. The two instructions that this
+document relies upon are the initial signal to start the handshake and - if the
+TLS implementation depends on certificate validation being performed externally
+- an indication that the certificate chain of a peer has been accepted or
+rejected.

As stated above, I have a mixed feeling about this paragraph. Defining the inputs to TLS stack is clean, but it is complex. Generally speaking, I think it is a good idea to treat TLS as a black box whenever possible.

To make a suggestion, how about changing this paragraph to something like: _Some TLS stacks might provide new keys as QUIC provides TLS the new handshake bytes. Others might provide those keys at a later point, for example due to certificate validation done in an asynchronous manner._

-- 
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/4011#pullrequestreview-480223524

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 17:56:00 -0700

@martinthomson commented on this pull request.

Let me see what that looks like.  I agree that this external validation thing is weird and probably needs work.

-- 
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/4011#discussion_r481515656

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 18:01:31 -0700

ec056cc4f80aca8be5d19b351c2767eb595abe74  Framing this as async processing works pretty well

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4011/files/4652e7d4da00341b5c8757643024b2f1501e2d44..ec056cc4f80aca8be5d19b351c2767eb595abe74

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 18:01:52 -0700

Thanks for persisting @kazuho, I think that worked out better.

-- 
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/4011#discussion_r481517972

---

From: Kazu Yamamoto <[email-masked]>
Date: Tue, 01 Sep 2020 18:59:36 -0700

The label should be `-tls` instead of `-recovery`.

-- 
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/4011#issuecomment-685236637

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 19:00:22 -0700

Thanks @kazu-yamamoto, fixed.

-- 
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/4011#issuecomment-685236924

---

From: Kazuho Oku <[email-masked]>
Date: Tue, 01 Sep 2020 19:10:46 -0700

@kazuho approved this pull request.

Thanks looks great!

-- 
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/4011#pullrequestreview-480346158

---

From: Marten Seemann <[email-masked]>
Date: Tue, 01 Sep 2020 19:42:56 -0700

@marten-seemann approved this pull request.

-responding to the received packets that were processable while waiting for TLS
-to provide these keys.
+QUIC that reading or writing keys at that encryption level are available.
+
+The events that cause new keys to be available are not asynchronous; they
+always occur after TLS is provided with inputs. TLS only provides new keys
+after being initialized (by a client) or after being provided with new
+handshake data.
+
+However, a TLS implementation could perform some of its processing
+asynchronously. In particular, the process of validating a certificate can take
+some time. While waiting for TLS processing to complete, an endpoint SHOULD
+buffer received packets if they might be processed using keys that aren't yet
+available. These packets can be processed once keys are provided by TLS. An
+endpoint MAY continue to respond to packets that can be processed during this

```suggestion
endpoint SHOULD continue to respond to packets that can be processed during this
```

-- 
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/4011#pullrequestreview-480394130

---

From: Martin Thomson <[email-masked]>
Date: Tue, 01 Sep 2020 20:34:54 -0700

I didn't want this to be a normative change, but I agree that this is better.  I'll leave this here and see if others disagree.

More to the point, I want to know whether this changes the *intent* of the previous change.   I think that this better matches intent, but other opinions are welcome.

-- 
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/4011#discussion_r481611387

---

From: Mike Bishop <[email-masked]>
Date: Thu, 03 Sep 2020 08:27:38 -0700

@MikeBishop approved this pull request.

> @@ -499,12 +499,23 @@ handshake, new data is requested from TLS after providing received data.

Given that you describe in the following paragraph that the keys might well results from asynchronous processing, I'm not convinced that "not asynchronous" is the proper claim to make here.  I think this claim is really trying to say that key generation isn't spontaneous, and you don't have to have a callback mechanism for TLS to just decide to give you keys out of the blue.  However (following paragraph), the time from input to completion-with-keys can take a while and shouldn't be blocking.

Perhaps something like "The availability of new keys is always a result of inputs provided to TLS."?

-- 
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/4011#pullrequestreview-481953908

---

From: Jana Iyengar <[email-masked]>
Date: Fri, 04 Sep 2020 13:46:48 -0700

@janaiyengar commented on this pull request.

This text comes from #3874. @ianswett did [raise this exact point there](https://github.com/quicwg/base-drafts/pull/3874/commits/f851c8c09372918c9b735053084707f24f066547#r468890923), and I argued that it wasn't necessary to make this a SHOULD.

As I look at the text again, I think I was wrong in pushing back then. The intent was to have the receiver buffer and respond, so I think it actually making this a SHOULD expresses that intent better.

I think dropping "asynchronous" from this sentence is fine -- the next para holds up well in describing what asynchronous actually means.

-- 
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/4011#discussion_r483837120

---

From: Martin Thomson <[email-masked]>
Date: Sun, 06 Sep 2020 18:24:34 -0700

ff171e1236a987958d7d3f54b7d31dd9c3452150  Editorial comments

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

---

From: Jana Iyengar <[email-masked]>
Date: Tue, 08 Sep 2020 15:38:44 -0700

@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/4011#pullrequestreview-484537267

---

From: Martin Thomson <[email-masked]>
Date: Tue, 08 Sep 2020 22:39:26 +0000 (UTC)

Merged #4011 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/4011#event-3743071614