Re: [TLS] Comments on PR #95

Eric Rescorla <ekr@rtfm.com> Wed, 31 December 2014 17:09 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 872AD1AC3F6 for <tls@ietfa.amsl.com>; Wed, 31 Dec 2014 09:09:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.377
X-Spam-Level:
X-Spam-Status: No, score=-1.377 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_46=0.6, RCVD_IN_DNSWL_LOW=-0.7] autolearn=no
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 7DRDcT90TfgI for <tls@ietfa.amsl.com>; Wed, 31 Dec 2014 09:09:33 -0800 (PST)
Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 16BAC1AC3F5 for <tls@ietf.org>; Wed, 31 Dec 2014 09:09:26 -0800 (PST)
Received: by mail-wi0-f176.google.com with SMTP id ex7so25781035wid.15 for <tls@ietf.org>; Wed, 31 Dec 2014 09:09:24 -0800 (PST)
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:content-type; bh=PU5kWYQSHxo9F05Xp0q1FK9iXpSEHIv5/eKRohJ79vA=; b=ML1eDvCYzux7hlH6cOQs9Qxn/3mGNMlBjT9k3UwTIKB9ScjLY4Z/KZblDLyZ93r2SH 7YBH9DKrwnVGDcT7Z37bS7fluqjkZNipOVmmuhlVecPe3Il84w8/rE57SZIUaQlu9AuE +xLbcGZewu0vLLA4ApC5alj2K8LChQloYvzZuIfTgXlRguTmQKpK9SeHHEz7vkS7UPaM fQJhsD2KUGNuBIjrmERrn3K1ABiWgtVv0BBo1WfSYDap0M4HrdP7be0hhQPdtyyqhD5A fJmoTcR35kMx17wXjaoSSO3nW6lhLms2CeqSjzoh6RLnNFjGrg/lDT3S4tIP3GdDigUX wa6A==
X-Gm-Message-State: ALoCoQmUHHrf7OT9XpaNBBtvqr2mz86XW7Wwz+LNVfC+VhuiASRnR1AgxsEaYRY/2/La4nWYK/rv
X-Received: by 10.194.60.243 with SMTP id k19mr29030446wjr.88.1420045764800; Wed, 31 Dec 2014 09:09:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.27.130.34 with HTTP; Wed, 31 Dec 2014 09:08:44 -0800 (PST)
In-Reply-To: <CACsn0ckgyLNs=4w_eOxWQEXiatrZZf_g+uUer_8aDgvBPbTUaQ@mail.gmail.com>
References: <CACsn0cndXFXgnvE36JsaaNafRpcWvGh0B_P1iZieAZbAeNzwvQ@mail.gmail.com> <CABcZeBMvyDf+DLW7aD7YjtZcgEXZaYh-gXjep_BOv3vSFK5tmQ@mail.gmail.com> <CACsn0ckgyLNs=4w_eOxWQEXiatrZZf_g+uUer_8aDgvBPbTUaQ@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Wed, 31 Dec 2014 09:08:44 -0800
Message-ID: <CABcZeBPNDHJVew8tKg4iCgecME+0BqZm-_1S-Oe7ep3GW7PTKA@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Content-Type: multipart/alternative; boundary="047d7b8736cc604bb1050b862bb4"
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/OqWrXqUeZ9V5u_AE-D35gpoW1rM
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Comments on PR #95
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Wed, 31 Dec 2014 17:09:34 -0000

[Trimming aggressively]

On Wed, Dec 31, 2014 at 8:54 AM, Watson Ladd <watsonbladd@gmail.com> wrote:

> On Tue, Dec 30, 2014 at 3:19 PM, Eric Rescorla <ekr@rtfm.com> wrote:
> > Thanks again for the detailed comments.
> >
> >
> >
> <snip>
> >>
> >> Line 1119: Open issue #5. I've got to think about this one. Likely as
> >> not this will be a very complicated change, that makes TLS 1.3 a lot
> >> harder to implement.
> >
> >
> > Can you elaborate more on why you think that?
>
> Right now the key calculation is the same as TLS 1.2. Changing this to
> separate the generated nonce would be annoying. Probably the easiest
> solution is to not generate the nonce from the master secret, and so
> have all PRF outputs be used only as keys. But this has knock-on
> effects.


I don't think this is going to be too bad, but I guess we'll find out when
we go to do it :)



> >> Line 2995: A TODO DTLS, probably related to the possibility of the
> >> Update message being lost. I don't remember how DTLS deals with this
> >> in the handshake, but there data is not being sent with the new keys
> >> before the other side acknowledges receipt. Will think about it.
> >
> >
> > The general way you deal with this in the handshake is that the last
> > flight is used as an acknowledgement of the previous flight. The sender
> > of the previous flight has to retransmit until they receive the last
> flight
> > and the sender of the last flight has to keep their state around long
> > enough to be able to handle the retransmit or up to 2MSL.
> >
> > This general pattern should work here, but we need to work out the
> > details for DTLS, hence the TODO.
>
> I don't think this is right. After A sends an update, they change the
> encryption keys for data from A to B. Now if the update arrives late,
> we get a bad MAC when the data A sent arrives at B.
>

You'll have to update the DTLS epoch value so that you can distinguish
which set of keys it uses. In DTLS 1.2, the epoch was used for
rehandshake, but we don't need that here, so it's a natural fit.


> >> There does not seem to be a way to request a certificate in the update
> >> protocol.
> >
> >
> > This is deliberate.
>
> So how do servers tell clients what sorts of certificates they want?
> Are we kicking this to higher layers? This prevents drop in
> replacement as I seem to remember HTTP+client cert doesn't work like
> that.


The situation here is a bit messy.

In TLS 1.3 presently, the server sends a CertificateRequest which contains
the same information as it did in TLS 1.2. So we have a number of options
here:

1. Leave client auth as-is.
2. Have client auth in update but allowed only once with CertificateRequest
used
to indicate which certificate you expect.
3. Do client auth in update but with only application level signaling.
4. Some combination of these.

I don't think there's consensus on the best approach because it's partly
about interaction with upper layer semantics.

Best,
-Ekr