Subject: Re: [quicwg/base-drafts] handshake and 0rtt data in a single packet (#630)

From: Kazuho Oku <[email-masked]>
Date: Thu, 28 Sep 2017 06:01:45 +0000 (UTC)

> As noted above, this creates a situation in which there are two different packet protection mechanisms applied to the same message (the AEAD and the cleartext integrity check). That seems unfortunate.

If that is an issue, we could define the range protected by FNV-1a to _not_ cover 0-RTT data, and the range protected by AAD to _not_ cover cleartext payload. Something like below. The ranges covered by FNV-1a and AAD are shown in the vertical bars in right. It also adds a "Cleartext Length" field.

```
+-+-+-+-+-+-+-+-+                                                    -    -
|1|   Type (7)  |                                                    |    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |    |
|                                                               |    |    |A
+                       Connection ID (64)                      +    |    |E
|                                                               |    |F   |A
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |N   |D
|                       Packet Number (32)                      |    |V   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |-   |A
|                         Version (32)                          |    |1   |A
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |a   |D
|    Cleartext Length (16)      |                                    |    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |    -
|           Cleartext Payload (Cleartext Length)              ...    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    -    
|                      Encrypted Payload (*)                  ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```

-- 
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/630#issuecomment-332736140