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

Yoav Nir <ynir.ietf@gmail.com> Mon, 02 January 2017 16:58 UTC

Return-Path: <ynir.ietf@gmail.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 A28181296C8 for <tls@ietfa.amsl.com>; Mon, 2 Jan 2017 08:58:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 SZZgjOEIQvhW for <tls@ietfa.amsl.com>; Mon, 2 Jan 2017 08:58:44 -0800 (PST)
Received: from mail-wj0-x229.google.com (mail-wj0-x229.google.com [IPv6:2a00:1450:400c:c01::229]) (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 CE71F12944B for <tls@ietf.org>; Mon, 2 Jan 2017 08:58:43 -0800 (PST)
Received: by mail-wj0-x229.google.com with SMTP id sd9so243306569wjb.1 for <tls@ietf.org>; Mon, 02 Jan 2017 08:58:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=potxK2iGQg5ktnSTDMDLLiPGBgtRydzxSbjKTNcICVA=; b=o3l05ZM4kck3sRu6eFXlRRswqohcVIq8tUQ//CqANjSKILl/5Ln4Vyh0aQ903kFj/L V8abOQBVZ3YaLEgIDFO9gCnbyz3LU79qMQ9yuaxvoVih/rE4FIDK1+CQArD6olVlediR YU2hCX+uhMldHtZ/47KzcQklRxB++vrzUdiVZIkQGQqqHelrIksMTswW93RpJQaMurpj VIyAhj5m+a06lEiyt7ll2wUOtAX4s8FT6z9hsGy1JJAKyxip8U2LbkdxwBexsik5hrgb WfhKct6KtK0soF7PJex/wD40P7QF6v2EbYuaTPmLqks4Rr/SqhFJfi3UUuFS65+qMDk2 NJaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=potxK2iGQg5ktnSTDMDLLiPGBgtRydzxSbjKTNcICVA=; b=BYCvGOhtr5iSc457hHer1Dk9azacmhvXw3qdxBfxaHyt+pPmN8s6ks25EJLrO1UBK3 y1kKtRcfESbIcXubLlgBdl3ajzAvbQH0uAUuC1c8D3D6yfNIlPOKI8usM1RPqCdd19Lx hIpG0TT8DTSOmxKjRABLS/JHSnWr4JE6oT/SYM+4TfBocl2CPCQJ46w3hkT3V4lc1xhn hAe7iZKJYl9FuvTARDQSr6iyuo4s41F8jrZ1VuZAm1OPQGOqobWkPRVYh5uZ6yMdiznN IYBwhRH7VTBsgK6Dmb9hBq4ELa+9ljK9kLwAUUnYo7FSQ0avoie8ZMit2BzBkMoq011t cUug==
X-Gm-Message-State: AIkVDXIFDHgvkJUDudtZtOtE4khYqeSVXG+K3d3msgVdTXlBsRJ8refd+0Q9HSWrc9V7hQ==
X-Received: by 10.194.0.70 with SMTP id 6mr39455237wjc.215.1483376321869; Mon, 02 Jan 2017 08:58:41 -0800 (PST)
Received: from [192.168.137.200] ([109.253.138.8]) by smtp.gmail.com with ESMTPSA id b3sm88778836wjy.40.2017.01.02.08.58.39 for <tls@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jan 2017 08:58:41 -0800 (PST)
From: Yoav Nir <ynir.ietf@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_42424D8A-69CA-41CB-A07E-64B0CEA65A6D"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Date: Mon, 02 Jan 2017 18:58:36 +0200
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>
To: "<tls@ietf.org>" <tls@ietf.org>
In-Reply-To: <1483330131409.25713@cs.auckland.ac.nz>
Message-Id: <5542029D-293A-44F5-9A11-62F5C47A4BA5@gmail.com>
X-Mailer: Apple Mail (2.3259)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/-H40YAe71CMCTwkDHuvTbyIrur4>
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 16:58:45 -0000

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.

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 <https://github.com/tlswg/tls13-spec/pull/768/files>

Yoav