Re: [TLS] [SUSPECTED URL!]Re: Requiring that (EC)DHE public values be fresh

Eric Rescorla <ekr@rtfm.com> Mon, 02 January 2017 19:00 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 C982D12943D for <tls@ietfa.amsl.com>; Mon, 2 Jan 2017 11:00:28 -0800 (PST)
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 f1kOwHSFO9sR for <tls@ietfa.amsl.com>; Mon, 2 Jan 2017 11:00:27 -0800 (PST)
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 ED3FA126BF7 for <tls@ietf.org>; Mon, 2 Jan 2017 11:00:26 -0800 (PST)
Received: by mail-yw0-x22a.google.com with SMTP id t125so272907565ywc.1 for <tls@ietf.org>; Mon, 02 Jan 2017 11:00:26 -0800 (PST)
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=/LlmKPFfbJ09E0BaLmnC5t+rqCERsEBFoyyKabwFvPQ=; b=oY8ZFUBRTl2FV/c+TiCA04RMLQSkSV1yRlX8vCrfrqCUxDs9nOVW2kqfKFAvTUl3ui 7gzTA2POXpYDMF95m580o3M74ih4tGpzQqY0Wp4vI6y/g+WTLzUCBoKBoZIyPIdSv4el UNlHHTvtZ0NrTe/IgVF0s68aK+t9uNQSDcClafukNtQf5+FgiEdro66BeuGBk6/0ljVh FfjlWv5OGwReZak01mvXXEdNBd2m+dBSsnOdPEkQgXjV/WeANj81f2Hml+mTvGLkf3dG N0myyvlcthoPdkip8qWGQyvgW+MTrBM8hWookKxnk8GNFLtkXVKd+eLbh7oAyqGEWcCn QnNw==
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=/LlmKPFfbJ09E0BaLmnC5t+rqCERsEBFoyyKabwFvPQ=; b=IeUEiGmh2tu/CrjujUwKCn3Okph1ThKQFQZpTnSBsPGumqDObhCrkXSTKZYtGnWh0n PvNHCaZM7OAvUtOOl2FJUXL9lPMq62pRxMXfzK/tLjZzGzFHOi+gjIKG9JxVmc6B3124 s/TS9bGmFs7TFiD3HJZNa2ey65meO7rz6mD6iuXNLprVv9TXDUzeASBpRTAs7Oplm6H1 nr8Wo8S6/KkJruMs5uf57hiuBfspkHxzY3+6WHb/tfuOsnSGfumFxcIAtuK2Mm9JlJcT 3g+pAFTt8cQiMbWVp+1J5HpIZiaZJp+E4o1bQjgtwXhKRYkOCbbGXXPFb4Q0jQBikixh r1Bw==
X-Gm-Message-State: AIkVDXIcoDxwXexQZW7PzCmbIup14XfF4B3HQ4COtp645Pn6tIXUUIQsXSPnSmgtfmSaaLQdEmWgrDq37gaFOw==
X-Received: by 10.13.195.5 with SMTP id f5mr58774753ywd.354.1483383626174; Mon, 02 Jan 2017 11:00:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.129.164.210 with HTTP; Mon, 2 Jan 2017 10:59:45 -0800 (PST)
In-Reply-To: <5542029D-293A-44F5-9A11-62F5C47A4BA5@gmail.com>
References: <CAMfhd9Urd1DWF9yhMdhvx1AcKyB4-E7Qy+tzqz_-1RpXR+Wp1w@mail.gmail.com> <CAFewVt44xm3rgm=n8PpEcqbTvC-Ei2EvoJciL=+m2UnQ-fUm2A@mail.gmail.com> <CAMfhd9Xq4RA6XBqLZtsbWSnMk4SnvZLC9V3_gCH-FzyVBMg4xg@mail.gmail.com> <CADi0yUPSkBhyuX7utW1tsVkkbDc6YgBLie41qWPwbo+X6CpuZA@mail.gmail.com> <1483330131409.25713@cs.auckland.ac.nz> <5542029D-293A-44F5-9A11-62F5C47A4BA5@gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 02 Jan 2017 10:59:45 -0800
Message-ID: <CABcZeBOa7rNSX-bZgQ4HS02XX0c_bMMfTMPfpmtxyq7DrnpmuA@mail.gmail.com>
To: Yoav Nir <ynir.ietf@gmail.com>
Content-Type: multipart/alternative; boundary="001a114d5fd61ab4e60545212a7a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/bdOiYhGwzUv_YJHj29V0dEGFGog>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Subject: Re: [TLS] [SUSPECTED URL!]Re: Requiring that (EC)DHE public values be fresh
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, 02 Jan 2017 19:00:29 -0000

On Mon, Jan 2, 2017 at 8:58 AM, Yoav Nir <ynir.ietf@gmail.com> wrote:

> On 31 Dec 2016, at 20:36, Adam Langley <agl@imperialviolet.org> wrote:
>
> Consider the motivations here:
>
> 1) We know that some implementations have gotten this wrong with TLS
> 1.2 and cached values for far too long. Presumably if they were to be
> naively extended to TLS 1.3 this issue would carry over.
>
> 2) We probably disagree with this banking industry desire to be able
> to backdoor their TLS connections, but we're not the police and fixing
> DH values is probably how they would do it. If it's going to be A
> Thing then it's much more likely that things will get misconfigured
> and it'll be enabled in places where it shouldn't be. If we have no
> detection mechanism then what we'll probably end up with is a Blackhat
> talk in a few years time about how x% of banks botched forward
> security at their frontends.
>
> Say that a value of an hour makes sense for some device and we feel
> that an hour's forward-security window is reasonable for security. The
> issue is that it significantly diminishes our detection ability
> because clients need to remember more than an hour's worth of values
> and I don't know if we can dedicate that amount of storage to this.
>
> Since I think the utility of this falls off as a reciprocal, I'll try
> making a concrete suggestion for a time limit: 10 seconds.
>
>
> I like this number, because that’s the number I chose when I implemented
> ECDH caching in Check Point’s TLS library. It makes key generation rare
> enough that it makes no difference for server load in any normal hardware,
> and frequent enough that if you destroy the keys after they are last used
> then attackers have a very narrow window of opportunity to get your keys.
> Especially if they need to get a warrant. IoT may be abnormal hardware in
> that regard.
>
> Still, if we want to accommodate the banking industry (or whatever part of
> it we’ve talked to in Seoul), then they need to be able to tell based on a
> timestamp which private key was used for that handshake. With 60 seconds
> key changes are rare enough that there are at most two possibilities which
> I think is manageable. With 10 seconds clock skew can ruin your system.
> But I realize I’m bike shedding here.
>

Yoav,

Why do you need a precise clock here? If you're going to retrospectively
decrypt, you
are going to need a list of all the private keys, so why can't you just
index that by the
public key in the handshake?

-Ekr

On 2 Jan 2017, at 6:09, Peter Gutmann <pgut001@cs.auckland.ac.nz> wrote:
>
> Hugo Krawczyk <hugo@ee.technion.ac.il> writes:
>
> there may be applications with legitimate reasons not to use FS.
>
>
> It's not so much reasons not to use FS (well, there are some specialised
> cases
> where people want to do that as well), it's reasons to reuse (EC)DH values.
> This isn't something that was ever mentioned in the spec, it's what
> developers
> have implemented themselves in order to deal with high-load conditions.
> This
> also means that no matter what the spec might say in the future, if you've
> got
> a developer facing a situation where they need 480% of available CPU to
> service requests then they're going to do things like cache (EC)DH,
> regardless
> of what the spec says.  So making it a MUST NOT will end up as what
> someone on
> PKIX once described as "workgroup posturing".  Better to include an
> advisory
> note on using it,
>
>
> Well, it just so happens…
> https://github.com/tlswg/tls13-spec/pull/768/files
>
> Yoav
>
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>