Re: Proposal: Run QUIC over DTLS

Eric Rescorla <ekr@rtfm.com> Wed, 14 March 2018 13:47 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8EA4312D775 for <quic@ietfa.amsl.com>; Wed, 14 Mar 2018 06:47:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pqlvsv9MjHSl for <quic@ietfa.amsl.com>; Wed, 14 Mar 2018 06:46:59 -0700 (PDT)
Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7F5FC12D0C3 for <quic@ietf.org>; Wed, 14 Mar 2018 06:46:59 -0700 (PDT)
Received: by mail-qt0-x231.google.com with SMTP id n12so3441667qtl.5 for <quic@ietf.org>; Wed, 14 Mar 2018 06:46:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zLAGK1qS8sPHlJ914/FCAW15COJ2EF33R/34IRTgqlM=; b=PMIar7LCPwyKObMwv4fcXkLRoutdCPgVsw6umzkCrSzovAZvtVHEhogVvqapR/tnAW UI/APFCemtbcJvu1w/KKfq1nGkRfdBiNF1AFGQvT3i7KZ3Sjmjq5ujZQKvIg9a+WtsF+ 2A1KNiCJcJVN+BeTyzamKnVRYXteAqgZcBsQquN2SJ+UfWBPDb4H7qMrBKgV8XqT6s2b LOH+NfaKyfjSXPJvrsPTBqSRg/SUc7F4hlFka+BuKY3lN2ywuKvndWzosbenYta4tA28 raLXyh4kzZynRBef0/y9/Re4HTC9Coa+3bSh9jLfwFORK1zQgBwiSZrH+Xx2veKtfRxH /Aew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zLAGK1qS8sPHlJ914/FCAW15COJ2EF33R/34IRTgqlM=; b=YJJJRdDSNptBjXpPYNVrBdbMpF+9PaNsVYwQlQmkCc7vB4UkSFbDoXib/d0R0uP1FF JJyAJUUUPfGWcWRAKs7nXqVzg+82GtegyOqY8IHV9Nw2EMUKlvuq+w1VpWbPrRTVedPz X8SE1aWXqLK5/qWZKehe920jjj7RmCjNJ2uColOATKSOQIVmLPjK/6SnBvddPbRFh+U8 mSKmey9bu0dj4kmOTx6K+N5cfqdSAat7L7yZoJVHqltQXtTDYGfS+7a7chniaybZFYkP DcRsXBuHyAhcvUx/sJyLN9Qa/5eE25LEGub2G5jdmTMbbMvvoayAhbNsAKqbjBOHfOUD nO1w==
X-Gm-Message-State: AElRT7H8U4siNTo9QbVIzaJmSkZ+QGjz5m3lpoW7JYYhBD3P0cHsdIPx ShGUZTCQOMk9ulzLtHKy6re5J8S1WX7rBpgpnZRHavQd
X-Google-Smtp-Source: AG47ELsJX/nqodKlvTUSAJKX9VsWjreu/ltHAw9VbE5quRpzg4rQc/WqxEHv1mjKe1Y6G9K+53WFK/u5R4jWYCaA5Uk=
X-Received: by 10.200.7.77 with SMTP id k13mr7119812qth.165.1521035218600; Wed, 14 Mar 2018 06:46:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.200.37.234 with HTTP; Wed, 14 Mar 2018 06:46:18 -0700 (PDT)
In-Reply-To: <D736161D-0686-4DE0-9E3C-A3551B46104E@mnot.net>
References: <CABcZeBO9g5vnPK2aGYEUOYOkT-898Gc0-d4T=kDvxuE2Yg6kMQ@mail.gmail.com> <1F5ABFEF-64F2-4A53-A35B-DF8A4A2A4446@mnot.net> <a319ed53-2ded-1f4b-641f-33779297e9d4@tik.ee.ethz.ch> <D736161D-0686-4DE0-9E3C-A3551B46104E@mnot.net>
From: Eric Rescorla <ekr@rtfm.com>
Date: Wed, 14 Mar 2018 06:46:18 -0700
Message-ID: <CABcZeBMEaokbyVgBZsi4T4EBi=jnHsyHT1aWazi5YHaKYBa23Q@mail.gmail.com>
Subject: Re: Proposal: Run QUIC over DTLS
To: Mark Nottingham <mnot@mnot.net>
Cc: =?UTF-8?Q?Mirja_K=C3=BChlewind?= <mirja.kuehlewind@tik.ee.ethz.ch>, Lars Eggert <lars@eggert.org>, IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="f403043a8c74e55faf05675f9bab"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/J2GDrw9c2Uzif9mxIZ6ekk2IiOA>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Mar 2018 13:47:03 -0000

On Wed, Mar 14, 2018 at 3:32 AM, Mark Nottingham <mnot@mnot.net>; wrote:

> At this point, I think we will still benefit from having some face-to-face
> time devoted to this these issues, even if many people feel we shouldn't
> take the DTLS proposal wholesale.
>
> Having said that, the recent re-statement of the issues as 1) stream 0 and
> 2) the layering question seems most appropriate. EKR, can you make sure
> your presentation focuses on them, with DTLS as one possible solution? I'll
> adjust the title in the agenda accordingly.
>

Willdo. This is consistent with how I was intending to present this.

Thanks,
-Ekr


>
> Cheers,
>
>
> > On 13 Mar 2018, at 6:30 pm, Mirja Kühlewind <
> mirja.kuehlewind@tik.ee.ethz.ch>; wrote:
> >
> > Hi Mark,
> >
> > coming back to this initial mail, I believe that it is clear that people
> are interested in the problem(s) that this proposal is addressing but not
> the actually solution as there is a strong feeling that it is too late for
> such a fundamental change in the process.
> >
> > I just looked at the draft agenda and it (still) say "QUIC over DTLS
> Proposal". Is there a plan to change this and level this up to a more
> higher level discussion on the problems or do people still want to use the
> time to discuss this concrete proposal?
> >
> > Mirja
> >
> >
> > On 06.03.2018 02:46, Mark Nottingham wrote:
> >> Thanks for the proposal, EKR. We'll track this as <
> https://github.com/quicwg/base-drafts/issues/1165>;.
> >> Since we're trying to nail down the invariants in London (or soon
> afterwards), I'd like to figure out the WG's feelings on this pretty
> quickly.
> >> I know folks need a chance to read and digest, but it would be
> extremely helpful if we could have some initial discussion on-list now.
> Please focus on the technical merit of the proposal, clarifying questions,
> and statements of support/lack thereof.
> >> Assuming it's still a topic of interest in two weeks, we'll schedule
> some time to discuss it in London. EKR, could you please submit a
> presentation (say, max 20 minutes, plus discussion time afterwards) ASAP?
> >> Cheers,
> >>> On 6 Mar 2018, at 10:05 am, Eric Rescorla <ekr@rtfm.com>; wrote:
> >>>
> >>> 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.
> >>>
> >>> DETAILS
> >>> 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:
> >>> https://datatracker.ietf.org/doc/draft-rescorla-quic-over-dtls/
> >>>
> >>> And a partial implementation of it in Minq at:
> >>>
> >>> Mint: https://github.com/ekr/mint/tree/dtls_for_quic
> >>> Minq: https://github.com/ekr/minq/tree/quic_over_dtls
> >>>
> >>>
> >>> 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
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >> --
> >> Mark Nottingham   https://www.mnot.net/
> > <mirja_kuehlewind.vcf>
>
> --
> Mark Nottingham   https://www.mnot.net/
>
>