Subject: [quicwg/base-drafts] How long is Initial (#2167)

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 14:37:19 -0800

the TLS draft says:

```
QUIC requires that the first Initial packet from a client contain an entire
cryptographic handshake message, which for TLS is the ClientHello.  Though a
packet larger than 1200 bytes might be supported by the path, a client improves
the likelihood that a packet is accepted if it ensures that the first
ClientHello message is small enough to stay within this limit.
```

This clearly implies that you can have an Initial > 1200 bytes.

However, transport S 7.1 says

```
   Clients MUST pad UDP datagrams that contain only Initial packets to
   1200 bytes.  Once a client has received an acknowledgment for a
   Handshake packet it MAY send smaller datagrams.  Sending padded
   datagrams ensures that the server is not overly constrained by the
   amplification restriction.
```

But you can't pad to 1200 bytes if you are over 1200 bytes. so which one is it?

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

---

From: MikkelFJ <[email-masked]>
Date: Thu, 13 Dec 2018 14:55:39 -0800

Clients MUST pad UDP datagrams that contain only Initial packets to
`ensure the size is at least`   1200 bytes.

It is a bit vague if this includes AEAD tag or not. I assume it includes tag since this is the definition of QUIC packet size.

-- 
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/2167#issuecomment-447151255

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 16:56:29 -0800

Well the text doesn't say "at least". It says "to". so are we talking about negative padding?

-- 
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/2167#issuecomment-447175631

---

From: MikkelFJ <[email-masked]>
Date: Thu, 13 Dec 2018 17:05:33 -0800

I was my suggestion to clarify the text. Not negative padding, merely 0 padding if necessary. I think that is quite normal.

-- 
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/2167#issuecomment-447177251

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 17:43:55 -0800

What it is is that the ClientHello needs to fit into a 1200 byte packet.  That's a requirement on the cryptographic handshake.

It is also the case that a packet of less than 1200 bytes needs to be padded.

So we add "at least" and we're done, I think.

-- 
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/2167#issuecomment-447184147

---

From: ekr <[email-masked]>
Date: Fri, 14 Dec 2018 01:47:03 +0000 (UTC)

> What it is is that the ClientHello needs to fit into a 1200 byte packet. That's a requirement on the cryptographic handshake.

I'm still confused, because here you're saying it has to fit in 1200 bytes, but the text above says it has to fit into a *packet* which implies that you could go to (say) 1600 bytes and have IP fragmentation. So which is it?

-- 
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/2167#issuecomment-447184740

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 17:50:12 -0800

packet = QUIC packet unless specifically qualified.

This doesn't say anything about IP fragmentation.

-- 
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/2167#issuecomment-447185292

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 17:51:34 -0800

I agree. So my point is that this text says it's legal to have your Initial packet by 2048 bytes long, because that fits in a QUIC packet. But your message above says that that's not OK.

-- 
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/2167#issuecomment-447185494

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 18:00:02 -0800

An Initial packet can be 2048 bytes long.  The 1200 byte cap is on the cryptographic handshake protocol and the FIRST Initial packet.  (Yikes, this is starting to confuse me.)

-- 
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/2167#issuecomment-447186863

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 18:01:40 -0800

Hmm... I looked and tried to find that restriction on either of these and couldn't find it. Maybe I'm just missing it though?

-- 
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/2167#issuecomment-447187128

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 18:09:26 -0800

You will observe that the first text you quote says "first" and the second does not.  Is that too subtle?

-- 
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/2167#issuecomment-447188510

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 18:13:03 -0800

Maybe I just need to read this more closely, but here's how I read this text.

1. The first Initial MUST fit within a single QUIC packet.
2. Subsequent Initials may span multiple QUIC packets.
3. The first initial MUST be of a certain minimum size (1200)
4. We advise you to make the first initial no more than 1200.

However, I don't see where in the text we say that the first initial may not be arbitrary sized (within the limits of IP packets). Do you agree with this, or am I missing something.

-- 
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/2167#issuecomment-447189131

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 18:18:29 -0800

Yes, we don't explicitly say that the first Initial has to be a single packet (or even a single IP packet, which is probably best).

-- 
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/2167#issuecomment-447190017

---

From: MikkelFJ <[email-masked]>
Date: Fri, 14 Dec 2018 03:19:20 -0800

> The first initial MUST be of a certain minimum size (1200)

I don't think that is the case. I believe the first UDP packet payload including coalesced packets must be at least 1200. It is one of the arguments for having coalesced packets, but not the primary one. But this is from memory of discussions, not concrete text.

-- 
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/2167#issuecomment-447295867

---

From: Martin Thomson <[email-masked]>
Date: Sun, 16 Dec 2018 18:02:17 -0800

Closed #2167 via #2181.

-- 
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/2167#event-2029174768