RE: Proposal: Run QUIC over DTLS

Mike Bishop <> Tue, 06 March 2018 17:32 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 96D4A120725 for <>; Tue, 6 Mar 2018 09:32:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: 0.079
X-Spam-Status: No, score=0.079 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id sJGiNUtBJF3e for <>; Tue, 6 Mar 2018 09:32:37 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 49D361270AC for <>; Tue, 6 Mar 2018 09:32:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qrPgqbqCP9jadRNXDH2ExRpa0MgTU1E4wDuz1t5HXLU=; b=FH8ICVkrdn2Y9yetJG0bshzOApxbCgxKjIaGnatnlS3t2+6+6uqd4fsy1Cpj3MlVQbJiJztQxT4tu3lYfKYwfToNGxGRvKGkRJAlFVWlWgZL8juvNda4QGONi/6P+/mwHMP3PK+wo+3aZnLlgzLxExGPwAw3toQTZOxEyLL7x80=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Tue, 6 Mar 2018 17:32:34 +0000
Received: from ([fe80::b057:7190:752f:8cb9]) by ([fe80::b057:7190:752f:8cb9%13]) with mapi id 15.20.0548.016; Tue, 6 Mar 2018 17:32:34 +0000
From: Mike Bishop <>
To: Eric Rescorla <>, "Lubashev, Igor" <>
CC: "" <>, "" <>, "" <>
Subject: RE: Proposal: Run QUIC over DTLS
Thread-Topic: Proposal: Run QUIC over DTLS
Date: Tue, 6 Mar 2018 17:32:33 +0000
Message-ID: <>
References: <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
authentication-results: spf=none (sender IP is );
x-originating-ip: [2601:600:8080:5a28:fcaa:df4:6e68:6a73]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; SN1PR08MB1774; 6:2JJ6ADzRNmpTAcV69RdyJvkUdhQT7FACedxhsERo5oTw6qWYJlXhFcWlV0btzoRKssVCSnXZVlNde0wdYxSDus5tlYz6/ud6D5cGTvmxI6sTIokrSHsOBoT+Jgg6mh/oZkxEZADWUk2uSmiRYjfRhPpNyiFOtYhfuJnDdJeHdB3ogcNP92H+Fb0znF7DhZCFuHbipod48N5jrJqtZNAG9LuTlHawLoIQKOpLMGnGidKw2mb6kHmYnGYp0PWwO5r4hTNEnCUedHUDKg0yBnw2ymaNg7GeT9KYxHUqrZbBcJCqQIOLmwPzsice7kl7St7pYzmznzmTykG/MKfnS6tkyPFdQvsttnylfkJO7Hz/5aFIzY99pfX7dwhkqfsl16jL; 5:CTm83Fvfe7+yjUBUwns4g5skmuZtuFF0JohbdHi60Ly3QO1MPc4rt4AbIVY+MdbbVWewOEsbWnRjD6ZdUqpxZuPL4zm61+BGRD7b3uaruPvaYAmnoQT541v5Y7H2nVj3zhQJETdOZi/zFItW2taKEFtR45XOUaczC0hHPEQgdaQ=; 24:2uzQiCRDoun7224RCGiwDNtpD8vE/aj0utcX/Z7Ebmq2KzXSDiOu41E6atdojR5JPKX6XpZNa/VqeDZAzbTKIZZ8noSKFIeJ1ch+DZdrvIA=; 7:i9xUFwxjVu6k+lM+12B2GP3QcSL1GLla6+eNb8BO/Z0ft4adUrUbpsDNaRqOxVWmfWJtRtoCs5BtZxcOL1ZNSJr8DM+ZolLJpZ4xtuICUgAFKO0IlLbgUlzJ1sd7didGSMEMECm7bCYZ5j3gPRvv7/KAKDf0rAhKcNHXuqzAnu9uxmVW+N/PkH0FUVBCeshBDRPjxtPDx5KNcBLvOZnqVGPaJ3TPm++E1VKWUZ8A4Vv+cqMEicTndtkLqSh5R9iL
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: faef72d9-d174-4f54-e384-08d583883f2a
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4604075)(3008032)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:SN1PR08MB1774;
x-ms-traffictypediagnostic: SN1PR08MB1774:
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(28532068793085)(60795455431006)(158342451672863)(10436049006162)(166708455590820)(85827821059158)(67672495146484)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(3231220)(944501244)(52105095)(10201501046)(93006095)(93001095)(6041288)(2016111802025)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(6072148)(6043046)(201708071742011); SRVR:SN1PR08MB1774; BCL:0; PCL:0; RULEID:; SRVR:SN1PR08MB1774;
x-forefront-prvs: 06036BD506
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(366004)(39830400003)(346002)(396003)(376002)(377424004)(199004)(189003)(13464003)(51874003)(51444003)(99286004)(93886005)(81156014)(5250100002)(33656002)(19609705001)(2906002)(345774005)(316002)(54906003)(229853002)(186003)(39060400002)(74316002)(53946003)(4326008)(55016002)(478600001)(81166006)(9686003)(6436002)(2900100001)(106356001)(236005)(46003)(110136005)(8676002)(2950100002)(54896002)(6246003)(7736002)(53936002)(561944003)(6306002)(76176011)(3660700001)(5660300001)(3280700002)(7696005)(53386004)(97736004)(25786009)(966005)(86362001)(68736007)(74482002)(59450400001)(105586002)(14454004)(102836004)(6506007)(6116002)(790700001)(53546011)(8936002)(575784001)(606006); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR08MB1774;; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; LANG:en;
received-spf: None ( does not designate permitted sender hosts)
x-microsoft-antispam-message-info: EsV3KQuLxHpf+dVtU9zlbmTxJzz/KR0Q9ogss+X47i+9D2f/ItJ5PpAQBbTI+5Pe4y3ra+BgilOWAYvFhceSzuLhEv5/l96xmb++yB3ul4yYq6ntpcXHuPhIaeH/J+nyPbyHNjwtrb91sE0MC9MqaYn+HmAlBqIicxjq7WzRwJkpwbgczgw0J8fet796zetSzp6E3oWs2mmXsZ7NCz4nRXSSMSH8Hc5knmH0SoHopSZqou3RGKC6a070vGGXIyygJ9I1fqxy61X3QLWNQJZHzYEv6Bz2yWnElB0gDAERxGbADzF0CqdE+padZk/pidt/e3sA/DIehj9hRBEnS1WLxA==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_SN1PR08MB1854297E8E944ECE7EA89B56DAD90SN1PR08MB1854namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: faef72d9-d174-4f54-e384-08d583883f2a
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2018 17:32:33.9796 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR08MB1774
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: Tue, 06 Mar 2018 17:32:42 -0000

My concern with this specific idea, as with the broader DTLS draft, is that you’re making some very fundamental assumptions about things we’ve tried hard to keep flexible.  That is, you’re ossifying the protocol.  While our plans to rev versions more quickly means that v1 doesn’t have to be perfect, we’re going to be living with the invariants a long time, so they should be as general as possible.  TLS isn’t part of the invariants, and what you’re proposing makes TLS an invariant.

On the contrary, we decided relatively early on that the version negotiated implied the crypto handshake to be used, which would be TLS for v1.  If QUIC runs on top of DTLS, or negotiates versions via TLS extension, that’s no longer true.  If (D)TLS is a required component to do version negotiation, you’re kind of backed into a corner.  I know that TLS itself is designed for crypto agility, and perhaps you’re correct that we’ll never need a handshake protocol that isn’t TLS, but I don’t want to make that assumption.

With the existing QUIC version negotiation and packet protection model, these concerns are well-separated and I think that’s a valuable feature.

From: QUIC [] On Behalf Of Eric Rescorla
Sent: Tuesday, March 6, 2018 7:13 AM
To: Lubashev, Igor <>
Subject: Re: Proposal: Run QUIC over DTLS

FWIW it is possible to move the style of version negotiation from my draft directly into the current draft if we so wanted. It's just that it's necessary if QUIC is at the bottom of the stack and so is a nice extra win.

Specifically, we would have the version in the long header In Initial refer not to the QUIC version we want to negotiate but rather to the version whose obfuscation method we are using (probably the client's minimum). The CH would then have an extension which contained the QUIC versions we support (as in TLS.supported_versions) and then the SH would contain both selected versions. We could have the remaining obfuscated long header packets could use *either* obfuscation version. The encrypted long header packets would of course use the negotiated versions.

A few notes:

- The CH always comes in one packet so that you don't have to worry about it being immediately available to the server
- The SH may be broken up but as noted above, the obfuscation version isn't part of the negotiation.

As with my draft, this would give you 1-RTT negotiation if the client obfuscated with a version the server knew and 2-RTT if the client obfuscated with a version the server didn't know, as opposed to always having 2-RTT

If people think they like this idea, I'd be happy to write it up a separate PR.


On Tue, Mar 6, 2018 at 4:54 AM, Lubashev, Igor <<>> wrote:
If it requires an extra rtt to do version negotiation, it is likely that extensions will be created by other means. If we improve version negotiation to look more like one in Ekr's draft (no extra rtt), standard extensions are more likely to come in via new versions.

- Igor

-----Original Message-----
From: Kazuho Oku [<>]
Received: Tuesday, 06 Mar 2018, 4:29AM
To: Subodh Iyengar [<>]
CC: Eric Rescorla [<>]; IETF QUIC WG [<>]
Subject: Re: Proposal: Run QUIC over DTLS

2018-03-06 15:39 GMT+09:00 Subodh Iyengar <<>>:

While using DTLS is not unworkable, the WG has put a lot of work put into the current header and packet format which shows that controlling the header format has several advantages for the transport to accomplish its goals. That being said, I think the spirit of ekr's proposal has several salient ideas which we could incorporate into the existing QUIC drafts  irrespective of deciding to adopt this draft.

One of the salient ideas is a more clear layering structure. I believe it is possible to implement even QUIC as currently specified with a layered API, even if the current drafts make no assumptions about layering of the protocol.

Even though our implementation, mvfst, is not layered, I can imagine an implementation creating a layering structure to be like

[ QUIC transport layer]

[ QUIC encryption and "record" layer ]

[ UDP ]

The roles of these layers are well defined (note that I have not implemented this yet).

The transport layer


It maintains the transport state and gets signals from the encryption layer on what type of data is appropriate to write, i.e. no data, 0rtt data, or 1rtt data.

Record layer

The record layer would decide to encrypt the bytes with the appropriate keys.

The record layer would also send packets for handshake data. Since the transport and the record layer would share the same packet number space it would be appropriate to give ownership of packet number counting to the record layer. Before the transport layer constructs a packet it would ask the record layer to assign it a packet number to use for its state accounting.

Receiving a packet

The handshake layer decrypts the packet and hands the transport layer a packet number and the decrypted frame data. If the handshake layer has any handshake packets outstanding it would go into a mode where it would read all acks from all packets to make a decision on whether its handshake data needs to be retransmitted. The handshake layer would only be responsible for transmission of stream 0 data.

This allows acks for non handshake data to be used to re-transmit handshake data even though they are in different "layers". If the transport layer assumes that any gaps of data were transmitted by the handshake layer, it would also allow acks for handshake packets to be used for loss recovery of data packets as well by the transport layer.

I could see the current draft adopt a more layered editorial structure, or it might be simpler to have a separate draft that describes the layering design of QUIC. I would be happy to work with ekr on this if this needs a separate draft. The spec could incorporate some features to address the issues ekr brought up. 3 changes that might bring us closer are:

  *   We could move crypto out of stream 0 and giving it it's own frame type. This separates the "channel" of communication of crypto data from "streams" which the transport has to maintain state for. In several implementations, including ours, crypto streams are treated special for everything anyway. The only resemblance to a stream is in the state needed.
  *   Multiple QUIC packets in 1 UDP packet. There is already an open issue for this.
  *   Getting rid of regular packet gaps so that multiple layers can use gaps to decide which layer handled the data. I believe we are on a path to doing this anyway.

I'm not sure how to resolve the issue on version negotiation though.

Honestly speaking, I do not understand why people are interested in doing QUIC v2 soon.

If we want to extend QUIC v1, we can add new extensions to TLS to negotiate additional features.

Regarding preventing ossification, I think that can be (and should be) achieved through greasing and obfuscation.

If my assumptions listed here are correct, requiring additional round-trip is a non-issue. Assuming that a non-compatible change will come only once a decade, we can just do happy eyeballs with QUIC version N and version N+1.


IFrom: QUIC <<>> on behalf of Kazuho Oku <<>>
Sent: Monday, March 5, 2018 8:32:28 PM
To: Eric Rescorla
Subject: Re: Proposal: Run QUIC over DTLS

2018-03-06 8:05 GMT+09:00 Eric Rescorla <<>>:
> Hi folks,
> Sorry to be the one randomizing things again, but the asymmetric
> conn-id thing went well, so here goes....
> TL;DR.
> I'd like to discuss refactoring things to run QUIC over DTLS.

EKR, Thank you for writing this. This is a very interesting proposal!

I can see the point that the QUIC specification will become more
straightforward if we adopt the DTLS-based approach, while, as an
implementor of TLS 1.3 and QUIC, I do not think that the total cost of
maintaining crypto and transport would change a lot.

One thing that I like about the proposed approach in particular is the
negotiation. As your draft points out, current approach has the
overhead of requiring additional round-trip when the server's
preferred version differs from that of the client.

It makes sense to negotiate the QUIC version using the negotiation
scheme available in (D)TLS.

That said, I feel uneasy about building QUIC **on top of** DTLS.

My understanding is that the intent of the working group is to build a
transport. We have spent maybe about a half of our time discussing
things that need to be implemented below the crypto (e.g., connection
ID, stateless reset, path migration, etc.), while the other half being
above the crypto (e.g., streams and multiplexing).

I think that that reflects the nature of what transport is, and that
the two need to be discussed together. In other words, I am afraid
that moving half of the design to TLSWG while retaining the other half
in QUICWG is likely to lead to the need for much more discussion
(would we holding interims for two workgroups?) as well as making the
decision process more complex.

In my view, that increases the risk of QUIC standardization process
being either delayed or ultimately failing.

Therefore, I am sorry to say that I am negative to the proposal. I
would feel safer if the proposal is adjusted to retain the sandboxing
approach (i.e. define the layers below and above the crypto layers in
QUIC WG while switching to DTLS).

However, I also believe that the issues of the current approach that
have been pointed out by the proposal can be adjusted without
switching to DTLS, and I would prefer doing so unless we unanimously
agree to switch to DTLS.

PS. If we decide to adopt the proposal, I am happy to implement DTLS
in picotls. It would not take a lot of time to do so.

> 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,
> including:
>   * 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:
draft-rescorla-quic-over-dtls-00 - QUIC over DTLS <><>
QUIC over DTLS (Internet-Draft, 2018)

> And a partial implementation of it in Minq at:
> Mint:<>

mint - A Minimal TLS 1.3 Implementation in Go<>

> Minq:
> 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,
> -Ekr

Kazuho Oku<>

-- <>
Kazuho Oku<>