Re: [TLS] Should exporter keys be updated with post-handshake authentication and/or KeyUpdate?

Eric Rescorla <ekr@rtfm.com> Tue, 12 July 2016 15:54 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 9208012D08D for <tls@ietfa.amsl.com>; Tue, 12 Jul 2016 08:54:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 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] 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 QcW-azaBG4Te for <tls@ietfa.amsl.com>; Tue, 12 Jul 2016 08:54:02 -0700 (PDT)
Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 C0FDC12B006 for <tls@ietf.org>; Tue, 12 Jul 2016 08:54:02 -0700 (PDT)
Received: by mail-yw0-x22a.google.com with SMTP id j17so17860361ywg.0 for <tls@ietf.org>; Tue, 12 Jul 2016 08:54:02 -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=QbbAx9UdcTtR1d1PxlrxJhtnSpzTIrME8RZ8QWK5PYs=; b=l+58LIBopSBmZKmtTk/kRcv15p6+4IhcClW0zxQzm6frnImkXvA3IEBATTYlB02Ayz tqvS9GGlHpNQjCn28Ehgy5J9j9XZ8XdYOWzd/UDmO1TP5uACuwd8NS7HnYaIc6+ASQFd 0LZHWAps6FCC1YayWtO+coCH0tCUMX2tdl2Uofk5Wvwpdsd4Da9QjN/p9/NXO/rdz3dO uq7yURT+Jo/ECaX87GLyNJg5airmcSxBiYZUvGQt+T94OSww2Ws0bKxnbvLV6M7MabH5 h/MzsiLuNLw0C4kxZlUtaQ5MdFWbeOZoPwSaeDbHYSTIzU2YIdVbQ9tt/+l/XjrQsuYG K/bQ==
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=QbbAx9UdcTtR1d1PxlrxJhtnSpzTIrME8RZ8QWK5PYs=; b=kPo36v4Xx1GHyGkUZsjRAvPiY2W1h9dVKm1Wd/12xFVZgO9lDmPEbhMkkbjOkdXfbm qHuekma4GxwC8LJNaODTSerQPH1Rmnsm1J+j3RF9ZkiRWZoANiY7RvzUuqUJZ1SkUkP/ xetJMm/dP/R8XVRz02wRoWs9Oa4inrt+jQj+L7K8EGA9/XxmfRiB+sT5cPXSSDcaAzmI skD7xcI0pUnB0Tm7nh0rC/TVNmw77+DCFMapWe0VSYMWVk9mjGS08zDMgSHlzNLagpln 0pFgn3ToMrDt/C6yIHJag73UPsKLEMz/ufrEhIUH6EX1YIwlAnlansC/Qg1wfm+zXBE2 VAWw==
X-Gm-Message-State: ALyK8tLtHmuzHzUd3Ja1aOFo8QSh2BBoaANVQyrQ1WU1kYQwGSMh+MdVLh0iNCqHl7g03sMfitWDiEAVaEHC0Q==
X-Received: by 10.13.199.68 with SMTP id j65mr2247765ywd.289.1468338841980; Tue, 12 Jul 2016 08:54:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.152.13 with HTTP; Tue, 12 Jul 2016 08:53:22 -0700 (PDT)
In-Reply-To: <CAH9QtQEZh-SXt1uUz6XU7QKD1AqNAaRqH0OYFivaCmcABBSeZg@mail.gmail.com>
References: <C6FAB38B-FF5A-43D3-A0DB-554FAF23ED92@gmail.com> <CY1PR03MB21554CF98C27A89230DDD5F18C3F0@CY1PR03MB2155.namprd03.prod.outlook.com> <3F568B47-BE31-4EBB-AA95-C3045911956B@gmail.com> <CAH9QtQEZh-SXt1uUz6XU7QKD1AqNAaRqH0OYFivaCmcABBSeZg@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 12 Jul 2016 08:53:22 -0700
Message-ID: <CABcZeBOdpnSLiUuqsxNpYz2GNCR6oXxSLjiccCF4nd=mrVLxJg@mail.gmail.com>
To: Bill Cox <waywardgeek@google.com>
Content-Type: multipart/alternative; boundary="001a114dfc4a1648970537724753"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/peZqQ5G-WQr5Iv6NHrMBl-hHk6c>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Should exporter keys be updated with post-handshake authentication and/or KeyUpdate?
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: Tue, 12 Jul 2016 15:54:04 -0000

On Tue, Jul 12, 2016 at 8:34 AM, Bill Cox <waywardgeek@google.com> wrote:

> IIRC, in TLS 1.2 the same keys are used after resumption, and EKM values
> do not change.
>

In TLS 1.2, the EKM == MS but the exporter includes the randoms:

           PRF(SecurityParameters.master_secret, label,
               SecurityParameters.client_random +
               SecurityParameters.server_random +
               context_value_length + context_value
               )[length]

This means that if you resume, you should get different exported values.

-Ekr



I think most applications currently using EKM will break if the EKM values
> change after a PSK resume.
>
> However, forcing TLS 1.3 to remember a 256-bit EKM seed will bloat tickets
> by 32 bytes, and complicate the state machine.  I think this could
> partially be addressed by enhancing the custom extension APIs found in
> popular TLS libraries to enable custom extensions to specify state that
> needs to be remembered on a resume.  That, in combination with requiring
> extensions to be sent and processed in order of extension number, could
> enable a lot of this complexity to be taken out of the main TLS code, and
> only connections that actually need such extensions would see the increase
> in ticket size.
>
> Could something like this could work well for channel binding?
>
> Bill
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>