Proposal: Run QUIC over DTLS

Eric Rescorla <> Mon, 05 March 2018 23:06 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 22EF512EAFC for <>; Mon, 5 Mar 2018 15:06:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id VTBH2IdzUH1r for <>; Mon, 5 Mar 2018 15:06:37 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id CA7B112EB40 for <>; Mon, 5 Mar 2018 15:06:31 -0800 (PST)
Received: by with SMTP id g60so22426533qtd.11 for <>; Mon, 05 Mar 2018 15:06:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=fJzF/d/HnC0QkFZk0EknYKaJfQJM/IwlFu3q7xiKSVM=; b=hqVVcpIlC/WctJ5e0ilclc6N8JWWBbKH6RiAtbLVEOg1uc9WGnnRkwUPx4nlUQ6LJO QfGxh4piaoacNI7a3tqXTXiy8wjqAxKxv/YF0f3Nct0L/h4XyjixowauKO73Wd5Twtpa zCcwi/C+PyHk8vPWONb6DC8zP9bO6mhqj/UqEAc9L8PjIHYTkZzKPVDjsm916k+xKeCs F1Y2b36ede6xIlaSoSsuwBFQNhp8CMQm7ex0bjY7EXVSrqkW23Vje0PiCECcOmtWZTym I6mlJ9UTPvVU9srzjlHRJXmPSu2rbbGT0GV0qENevkKVT9V0Bd8wzaXXB4rVQRIXdARQ CDXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fJzF/d/HnC0QkFZk0EknYKaJfQJM/IwlFu3q7xiKSVM=; b=U7Rh9RdqI6Wy5wMnkGJ0NFArYtDyAnKiUEdttKlExKfSXpyhc4khN5rmiO4zwDtoRM pXjdjRjDirTysS6peHRTfzkkYZoEmokMfQBVwSXmU5mbdxNc+XW/AyvmCBXNRKcO2/xZ ZLfiQt7DmLSambDIa2FmnTTpR44ZM1XDLzHcYoZBINH7pJL5LKpVxuk18EZIsJrrik+T Y/FhcSmdMJUy8HdtbNG+/KI3cyCRe+/5AjZbqPnhKQDqflkRC2QrosNt+zSNYIMhqTPY IIjOpOCCvFegkiu+cDF3ZfZOMN9nl7ojHmdBVg42Pep5DwHa86z4uEgi5iRxe1RyWQN5 RX2Q==
X-Gm-Message-State: AElRT7GQKpGjZpqgiBdFhpgEQcjGDxxyLd8egPKGiSIJkSE7dWeRjQBx yu1a0I4UDnv3q4g9XhMq4tRyKPI4ebCNVi0UKPFeVrf4geU=
X-Google-Smtp-Source: AG47ELsgYtpt8GJgcOsPqOTFbHcNaHjLz/vHaM2KR6kx7bfRdPq8F/wWY6GYKbcUJMVypjzB6nmXtk5mYdWE6U7PMrI=
X-Received: by with SMTP id 7mr25037750qtb.287.1520291190619; Mon, 05 Mar 2018 15:06:30 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Mon, 5 Mar 2018 15:05:50 -0800 (PST)
From: Eric Rescorla <>
Date: Mon, 05 Mar 2018 15:05:50 -0800
Message-ID: <>
Subject: Proposal: Run QUIC over DTLS
Content-Type: multipart/alternative; boundary="94eb2c114ed05f53b80566b2601c"
Archived-At: <>
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 05 Mar 2018 23:06:44 -0000

Hi folks,

Sorry to be the one randomizing things again, but the asymmetric
conn-id thing went well, so here goes....

I'd like to discuss refactoring things to run QUIC over DTLS.

When we originally designed the interaction between TLS and QUIC,
there seemed like a lot of advantages to embedding the crypto
handshake on stream 0, in particular the ability to share a common
reliability and congestion mechanism. However, as we've gotten further
along in design and implementation, it's also become clear that it's
archictecturally kind of crufty and this creates a bunch of problems,

  * Stream 0 is unencrypted at the beginning of the connection, but
    encrypted after the handshake completes, and you still need
    to service it.

  * Retransmission of stream 0 frames from lost packets needs special
    handling to avoid accidentally encrypting them.

  * Stream 0 is not subject to flow control; it can exceed limits and
    goes into negative credit after the handshake completes.

  * There are complicated rules about which packets can ACK other
    packets, as both cleartext and ciphertext ACKs are possible.

  * Very tight coupling between the crypto stack and the transport
    stack, especially in terms of knowing where you are in the
    crypto state machine.

I've been looking at an alternative design in which we instead adopt a
more natural layering of putting QUIC on top of DTLS. The basic
intuition is that you do a DTLS handshake and just put QUIC frames
directly in DTLS records (rather than QUIC packets). This
significantly reduces the degree of entanglement between the two
components and removes the corner cases above, as well as just
generally being a more conventional architecture. Of course, no design
is perfect, but on balance, I think this is a cleaner structure.

I have a draft for this at:

And a partial implementation of it in Minq at:


I can't speak for anyone else's implementation, but at least in my
case, the result was considerable simplification.

It's natural at this point to say that this is coming late in the
process after we have a lot invested in the current design, as well as
to worry that it will delay the process. That's not my intention, and
as I say in the draft, many of the issues we have struggled over
(headers especially) can be directly ported into this architecture (or
perhaps just reused with QUIC-over-DTLS while letting ordinary DTLS do
its thing) and this change would allow us to sidestep issued we are
still fighting with, so on balance I believe we can keep the schedule
impact contained.

We are designing a protocol that will be used long into the future, so
having the right architecture is especially important. Our goal has
always been to guide this effort by implementation experience and we
are learning about the deficiencies of the Stream 0 design as we go
down our current path. If the primary concern to this proposal is
schedule we should have an explicit discussion about those relative
priorities in the context of the pros and cons of the proposal.

The hackathon would be a good opportunity to have a face to face chat
about this in addition to on-list discussion.

Thanks in advance for taking a look,