Re: [TLS] DTLS 1.3

Eric Rescorla <ekr@rtfm.com> Mon, 04 July 2016 20:56 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 358FC12D124 for <tls@ietfa.amsl.com>; Mon, 4 Jul 2016 13:56:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.093
X-Spam-Level:
X-Spam-Status: No, score=-1.093 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_LOW=-0.7, SUBJ_ALL_CAPS=1.506] autolearn=no 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 t5xftGvLsOhq for <tls@ietfa.amsl.com>; Mon, 4 Jul 2016 13:56:42 -0700 (PDT)
Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002:c05::233]) (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 EFE0312D126 for <tls@ietf.org>; Mon, 4 Jul 2016 13:56:41 -0700 (PDT)
Received: by mail-yw0-x233.google.com with SMTP id i12so47042164ywa.1 for <tls@ietf.org>; Mon, 04 Jul 2016 13:56:41 -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=3r5b5e8/RmXxQRKziPwJNpAvbNYgpfzy65aLPgCcEwI=; b=DH+04QjWuin4uhZqE93kc6eG5UlbhVV2e6GwH1UiOU/KAt0wj0PkgrceTxY7OXHdQq dvZVvFYgKNM+82PYpvqpp2CfJnsNnht5lDvvmznVdcv70Z49pXhCMb6JKI4Iw7N9K0Hj VGsqKsg8jztVVhmJ0LPiL+jS7nK8wOPM/k9KD0WLL+zS82dmif91DglkEJet5OSwcbLg kFO+od+zNfLt9ywUzw5SVmohv94mAFWHNF6UPzdALWahhHyl05ePaU8ePpEvj2boQrAg HXIEVzrM9hMcYDpWSNmqRlk1Ee8d+vUZ2+0UzpUuB1OA5qu1CbS8qQaOOKWqDc0TBHmH InWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3r5b5e8/RmXxQRKziPwJNpAvbNYgpfzy65aLPgCcEwI=; b=VsmZktZo/9+JDP/UcQDP1R2E8VWm3l0gMjvKCHzf9CVDJT48BltAElbrNzROqfJJx1 Bd/+91d9r+VUFTZN78uDV1b8i6arP1mqQQPCCAHJSRWcQ/6Mb+eLfRwSzVtqJmhEx+Hd VZoUiL+Op92H9JlnEUZuU3hpcvDMnRx2oymJrA/i9Rx6/12iXxfN1VqvfLcuEQyNucko LICogGi1oeeGuawtwQzsdRfJREk3l1xhxd1JOoeUeiUTAzVBtKGioL1P4GZfS95nIBFM JHgjBvTRXzdpJpUr4MjxXKUykT0KO4NDe0jJJQFM8SM0XMOiwx+UpQ5uM8sDpLFHUubM qpjg==
X-Gm-Message-State: ALyK8tJ7dmZwabxHHXXWAe4NhuLvybNjVAXyGGM/xcsrsIyTMIa3hednaKtAv/LFO96VqzTIhcAwi6yIRibZxg==
X-Received: by 10.37.70.2 with SMTP id t2mr5948230yba.82.1467665801262; Mon, 04 Jul 2016 13:56:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.132.211 with HTTP; Mon, 4 Jul 2016 13:56:01 -0700 (PDT)
In-Reply-To: <20160704204603.GA4837@LK-Perkele-V2.elisa-laajakaista.fi>
References: <577A38A2.2090209@gmx.net> <20160704140312.GC4287@LK-Perkele-V2.elisa-laajakaista.fi> <577ABCE2.9050409@gmx.net> <20160704204603.GA4837@LK-Perkele-V2.elisa-laajakaista.fi>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 04 Jul 2016 13:56:01 -0700
Message-ID: <CABcZeBMYQ=SWfEwFVjpmO3Pzh78VTrdqXKF26TDnSA-nR-k=rQ@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Content-Type: multipart/alternative; boundary="001a113c53ecbbe8af0536d59294"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/jYoL2mkGpti5rCQqeFPwI-hcb-8>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] DTLS 1.3
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Jul 2016 20:56:44 -0000

On Mon, Jul 4, 2016 at 1:46 PM, Ilari Liusvaara <ilariliusvaara@welho.com>
wrote:

> On Mon, Jul 04, 2016 at 09:45:38PM +0200, Hannes Tschofenig wrote:
> > Hi Ilari,
> >
> > thanks for your super quick response.
> >
> > On 07/04/2016 04:03 PM, Ilari Liusvaara wrote:
> > > On Mon, Jul 04, 2016 at 12:21:22PM +0200, Hannes Tschofenig wrote:
> > >> Hi all,
> > >>
> > >> I have made an attempt to integrate DTLS 1.3 into the TLS 1.3 document
> > >> and you can find the result at
> https://github.com/tlswg/tls13-spec/pull/512
> > >>
> > >> I have worked on a prototype implementation of DTLS 1.3 and if someone
> > >> else has something working by the time of the Hackathon in Berlin
> please
> > >> let me know.
> > >
> > > Taking a look:
> > >
> > > - The version field is described as identical to TLS 1.3 version field.
> > >   What value is there actually? FCFE (wasn't that how "DTLS 1.0" was
> > >   encoded on wire)?
> >
> > For the record layer TLS 1.3 says that the version field is deprecated
> > and ignored. I guess the same approach applies to DTLS 1.3. So, it
> > probably doesn't matter what is really is. In DTLS 1.2 the version value
> > was 254.253.
>
> Oh, it was that. Then I presume DTLS 1.0 was 254,255 (yup, checked the
> RFC).
>
> > For the client_version and server_version in the handshake I thought it
> > would be fine to just re-use the TLS 1.3 version number.
>
> I think that is not a good idea, and one should follow the pattern (which
> would give 254,252 for ClientHello/ServerHello).
>
> But for record version, reusing previous versions (either 254,255 or
> 254,253) should be fine.
>
> > > - KeyUpdate does not work in DTLS. Might just use epochs for similar
> > >   purpose, and reserve first few epochs for special purposes.
> >
> > Could you explain in more detail why you think a key update does not
> > work with DTLS?
>
> That message is not idempotent (nor has it timely ACK).
>
> > > - The full handshake protocol is only run once. After that, there's
> > >   only rekeying, new tickets and dynamic reauth.
> >
> > How TLS 1.3/DTLS 1.3 is used in specific environments remains to be seen.
>
> Well, certainly the main handshake only runs once per connection.
>
> > > - There's special case with cookies: DTLS 1.3 ClientHello getting
> > >   rejected with HelloVerifyRequest. I think the correct reaction
> > >   is for client to send a DTLS 1.3 ClientHello without 0-RTT data,
> > >   containing the cookie sent now in legacy cookie field (NOT the
> > >   extension).
> > > - According to TLS 1.3 rules, handshakes rejected using
> > >   HelloRetryRequest use the Cookie extension for cookie
> > >   transmitback, not the legacy cookie field (the cookie might not
> > >   even fit into that field!)
> >
> > Regarding the issue of where to send the cookie in the ClientHello there
> > are two options. The first option is to use the cookie extension, and
> > the second option is to use the DTLS 1.2 style where the cookie is
> > placed in the ClientHello directly (without using an extension).
> >
> > My (weak) preference is to use the cookie extension also in the
> > ClientHello. My main reason was the length mismatch between the DTLS 1.2
> > cookie extension (which is now in the legacy_cookie filed) and the
> > cookie extension. The cookie extension has a max length of 2^16-1 bytes
> > and the legacy_cookie extension only 2^8-1 bytes long. If the design of
> > the ClientHello uses the legacy_cookie extension then the server has to
> > take care that the cookie size does not exceed the 2^8-1 bytes.
>
> I think the obvious way is:
>
> - Cookies from HelloVerifyRequest go to legacy cookie field.
> - Cookies from HelloRetryRequest go to extension cookie field.
>
> If you don't do the first, you can't downnegotiate successfully. And
> if you don't do the second, you would have to have special case with
> cookie sizes (since HRR can transmit >255 byte cookie, which would be
> too big for legacy cookie).
>

IMO we should just forbid HVR for DTLS 1.3. I.e., you should just send
HRR.


> > - The handshake retransmit scheme doesn't seem to work that
> > >   well with post-handshake auth, and even less well with
> > >   session tickets.
> > Why do you think so? Of course, unreliable transports creates
> > inconvenience; is it that what you are referring to?
>
> DTLS assumes handshake messages are reliable, and that reliability is
> implemented via handshake messages ACKing one another.
>
> - Session tickets have no ACK at all.
>

DTLS 1.3 should add an ACK, IMO.



> - CertificateRequest can have very slow ACK.
> - KeyUpdate has no real ACK (and isn't idempotent either).
>

Yes, I think we should remove KeyUpdate for DTLS 1.3 and just use epoch
instead.

-Ekr



>
> -Ilari
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>