Re: [TLS] PRF Negotiation - Finished "gotcha"

Martin Thomson <martin.thomson@gmail.com> Fri, 18 April 2014 16:46 UTC

Return-Path: <martin.thomson@gmail.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 B94C81A044A for <tls@ietfa.amsl.com>; Fri, 18 Apr 2014 09:46:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham
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 pFrUdjtsyS7n for <tls@ietfa.amsl.com>; Fri, 18 Apr 2014 09:46:25 -0700 (PDT)
Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) by ietfa.amsl.com (Postfix) with ESMTP id AB40D1A0444 for <tls@ietf.org>; Fri, 18 Apr 2014 09:46:24 -0700 (PDT)
Received: by mail-we0-f175.google.com with SMTP id q58so1754946wes.34 for <tls@ietf.org>; Fri, 18 Apr 2014 09:46:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WBj7naeEvanUvT60hJ6Ie6TK7ZAl1Uxb8dShYRAWxRo=; b=w3nzFVy4o+dtfxaZGGteXTKb8N2GWDXh6uxthDQfbykqDZDNnW48d1Ywha+wt3oCQc N0lkXn3PYL0sTX56pY7qWxlF6an3gycaAY+1pbk9zUVF/Do29azvtHc5wpb1qaLD0wjZ sWb7pyybDFePduLY9VJHppMQcY2Xi30UQDIXJw10XajikPSNxn+vB7iOD+p3IknniG+0 rYytB+bxbMGPECXQ0rwvggwYLiUITE0Jy4Yp8bB+BnwMjeMsBBXDGGNap69t9X/jmht6 9o1llwKj/Ps54gYTNfKGD26Wr4CqfBC98wPmjJp/Yd5hA0r2q+S0Pg8ic8SuSEHaY7Uc 2/rQ==
MIME-Version: 1.0
X-Received: by 10.180.82.133 with SMTP id i5mr3071557wiy.50.1397839580292; Fri, 18 Apr 2014 09:46:20 -0700 (PDT)
Received: by 10.227.144.132 with HTTP; Fri, 18 Apr 2014 09:46:20 -0700 (PDT)
In-Reply-To: <53513F36.7050106@nthpermutation.com>
References: <53513F36.7050106@nthpermutation.com>
Date: Fri, 18 Apr 2014 09:46:20 -0700
Message-ID: <CABkgnnXugZw2U3Zv8H2H1J8we_N2b-p=qCdwsZyBDNqDZVYE2w@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Michael StJohns <msj@nthpermutation.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/kv5MKwOZFMF2-PV2yF-X4WMQIXY
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] PRF Negotiation - Finished "gotcha"
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: Fri, 18 Apr 2014 16:46:29 -0000

On 18 April 2014 08:05, Michael StJohns <msj@nthpermutation.com> wrote:
> As I was working through the "finished" message email I just sent, I
> realized something about PRF negotiation.   The client, when it sends a
> ClientHello, doesn't necessarily know which PRF it will be using (assuming
> there are multiple PRFs defined in the offered cipher suites) until it gets
> the ServerHello back.  I think that means that the client either needs to
> keep a copy of the ClientHello around (or the data to rebuild it), or needs
> to keep multiple HASH states - one for each PRF algorithm.
>
> It may be useful to add a paragraph on PRF negotiation implications that
> provides this guidance.

Indeed.

There is another way to avoid this problem: don't negotiate the hash
function used for the PRF.  SHA-256 might be good enough until we next
revise the protocol.

https://github.com/tlswg/tls13-spec/issues/26