Re: [TLS] I-D Action: draft-ietf-tls-negotiated-ff-dhe-02.txt

Henrick Hellström <henrick@streamsec.se> Sat, 25 October 2014 16:46 UTC

Return-Path: <henrick@streamsec.se>
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 4163E1A1A9B for <tls@ietfa.amsl.com>; Sat, 25 Oct 2014 09:46:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.328
X-Spam-Level:
X-Spam-Status: No, score=-0.328 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_SE=0.35, MIME_8BIT_HEADER=0.3, RAZOR2_CHECK=0.922] 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 9NzSysGtR7Sj for <tls@ietfa.amsl.com>; Sat, 25 Oct 2014 09:46:32 -0700 (PDT)
Received: from vsp7.ballou.se (vsp7.ballou.se [91.189.40.103]) by ietfa.amsl.com (Postfix) with SMTP id 9FB7D1A1A02 for <tls@ietf.org>; Sat, 25 Oct 2014 09:46:30 -0700 (PDT)
Received: from nmail1.ballou.se (unknown [10.0.0.116]) by vsp7.ballou.se (Halon Mail Gateway) with ESMTP for <tls@ietf.org>; Sat, 25 Oct 2014 18:46:26 +0200 (CEST)
Received: from [192.168.0.195] (c-21cfe555.06-134-73746f39.cust.bredbandsbolaget.se [85.229.207.33]) (Authenticated sender: henrick@streamsec.se) by nmail1.ballou.se (Postfix) with ESMTPSA id B212E1DE4C for <tls@ietf.org>; Sat, 25 Oct 2014 18:46:26 +0200 (CEST)
Message-ID: <544BD3BF.9030702@streamsec.se>
Date: Sat, 25 Oct 2014 18:45:51 +0200
From: Henrick Hellström <henrick@streamsec.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: tls@ietf.org
References: <20141011044948.27553.93984.idtracker@ietfa.amsl.com> <5438B82B.6090600@fifthhorseman.net>
In-Reply-To: <5438B82B.6090600@fifthhorseman.net>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/muHUc720zXoc_YiiJiLjKp5uQnA
Subject: Re: [TLS] I-D Action: draft-ietf-tls-negotiated-ff-dhe-02.txt
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: henrick@streamsec.se
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: Sat, 25 Oct 2014 16:46:34 -0000

On 2014-10-11 06:55, Daniel Kahn Gillmor wrote:
> I'd appreciate any comments or suggestions, and particularly review
> related to the IANA considerations would be great.

It seems to me the the recommended Client Behavior and Server Behavior 
has to be simplified and strengthened, in order for the standard to meet 
the security objectives.

All relevant attacks here https://secure-resumption.com/ seem to involve 
a MITM server that chooses bad ServerDHParams for the server key 
exchange message.

   * Clearly, a MITM server might simply act as if it doesn't support 
the "elliptic_curves" extension. The server does not include a reply to 
the "elliptic_curves" extension in server_hello, so the client will not 
receive any indication of lack of support, until it receives 
server_key_exchange. At this point, the client might decide to terminate 
the handshake if the ServerDHParams aren't acceptable. Checking an 
arbitrary group by means of a binary compare, is only marginally harder 
than checking a named group.
   * Conversely, a MITM that connects to a legitimate server, will be 
perfectly able to carry out the secure resumption attacks, even if the 
MITM and the legitimate server negotiate using a fixed FFDHE group. (It 
is only the ServerDHParams used in the handshake between the legitimate 
client and the MITM that have to be doctored.)
   * Also, there doesn't seem to be any obvious harm in requiring that a 
compatible server always picks a ServerDHParams group with an estimated 
security equal to the minimum of the server certificate public key and 
the bulk encryption cipher, regardless of the presence or absence of an 
"elliptic_curves" extension in client_hello. If this group is encoded as 
an arbitrary group in ServerDHParams, there is no divergence from 
current standards at the protocol level.

Hence, in order to introduce as little complexity as possible into the 
client behavior and server behavior, as well as actually strengthening 
security by implementing this mechanism, I suggest something along these 
lines:

Client Behavior

Conforming clients MIGHT require that a FFDHE group with appropriate 
security bounds is presented by a specific server. If the use of such 
groups are required by the client, the client SHOULD NOT offer cipher 
suites that might force a compatible server to pick a group the client 
does not implement.

A client that requires the use of FFDHE groups MUST perform a binary 
compare of the ServerDHParams against the FFDHE group with the 
corresponding modulus size, and MUST end the handshake with an 
insufficient_security alert if the parameters do not match.

In order to avoid ambiguities if FFDHE groups are added, replaced or 
deprecated in future revisions of this standard, a compatible client 
SHOULD send an "elliptic_curves" extension in client_hello, to indicate 
support of specific groups.

Server Behavior

When a DHE cipher suite is negotiated, a compatible server SHOULD always 
pick a FFDHE group for ServerDHParams, with a security bound greater 
than the minimum of the server certificate public key and the bulk 
encryption cipher of the negotiated cipher suite. The server SHOULD NOT 
negotiate a DHE cipher suite, unless it implements at least one FFDHE 
group with at least the corresponding security bound.

If an "elliptic_curve" extension is included in client_hello, the server 
MUST NOT negotiate a DHE cipher suite that would require the server to 
pick a FFDHE group not included in the "elliptic_curve" extension sent 
by the client. NOTE: Since FFDHE groups might be replaced or added in 
future revisions of this standard, this check MUST be performed 
regardless if the "elliptic_curve" extension does not include any 
identifiers the server recognizes as FFDHE identifiers.