Subject: [TLS] Request for clarification: "in the same flight"

From: Thijs van Dijk <[email-masked]>
Date: Thu, 16 Apr 2015 18:07:27 +0200

Dear all,

I'm working on a hobby implementation of TLS1.3 as a way of vetting the
spec draft, and I ran into an issue with sending the ClientKeyShare.

The handshake spec (7.2) says it should be sent "in the same flight" as the
ClientHello message, without specifying the correct encapsulation method.
Maybe it's just me, but this phrase could be interpreted as either the
following:

TCP packet
 \- TLSPlaintext  (content_type 22)
     |- Handshake (msg_type 1)
     |   \- ClientHello
     \- Handshake (msg_type 5)
         \- ClientKeyShare

or:

TCP packet
 |  TLSPlaintext  (content_type 22)
 |   \- Handshake (msg_type 1)
 |       \- ClientHello
 \- TLSPlaintext  (content_type 22)
     \- Handshake (msg_type 5)
         \- ClientKeyShare

If I were to venture a guess, I'd say the two are equivalent, but it's also
conceivable that some implementations require any TLSPlaintext to contain
exactly one child struct. (Source: mine does; I'm trying to figure out if
that's a bug or not.)

I think that if we have a preference for either one, the spec should
reflect that. If not, it may be wise to explicitly declare both options to
be correct.

Thoughts?

-Thijs

(I have also opened a Github issue to this effect:
https://github.com/tlswg/tls13-spec/issues/164 )

---

From: Hubert Kario <[email-masked]>
Date: Fri, 17 Apr 2015 14:34:58 +0200

> exactly one child struct. (Source: mine does; I'm trying to figure out if

It is a bug, see RFC 5246, section 6.2.1, specifically:

   Client
   message boundaries are not preserved in the record layer (i.e.,
   multiple client messages of the same ContentType MAY be coalesced
   into a single TLSPlaintext record, or a single message MAY be
   fragmented across several records).
-- 
Regards,
Hubert Kario
Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic

---

From: Thijs van Dijk <[email-masked]>
Date: Fri, 17 Apr 2015 16:00:42 +0200

On 17 April 2015 at 14:34, Hubert Kario <[email-masked]> wrote:

> It is a bug, see RFC 5246, section 6.2.1
>

Ah, yes.  Thanks for pointing that out!

-Thijs