Re: [TLS] draft-ietf-tls-curve25519-01: Is public key validation necessary or helpful?

Brian Smith <brian@briansmith.org> Thu, 31 December 2015 00:03 UTC

Return-Path: <brian@briansmith.org>
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 BDD671A00B9 for <tls@ietfa.amsl.com>; Wed, 30 Dec 2015 16:03:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001] 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 Ys6c5H2aouuz for <tls@ietfa.amsl.com>; Wed, 30 Dec 2015 16:03:51 -0800 (PST)
Received: from mail-ob0-x22b.google.com (mail-ob0-x22b.google.com [IPv6:2607:f8b0:4003:c01::22b]) (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 5A5191A00B8 for <tls@ietf.org>; Wed, 30 Dec 2015 16:03:51 -0800 (PST)
Received: by mail-ob0-x22b.google.com with SMTP id wp13so53072597obc.1 for <tls@ietf.org>; Wed, 30 Dec 2015 16:03:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=briansmith-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2jPB//NcWUf80/kfzUSIvfVkihUDDnM4RCUeSvWpCbA=; b=gw5YNw2ta8BmOvpsLxb0Ft7gBpsNs0l4pzUhIZEDdKlqPY5FTaZ/O86oP57qUJCYTd lvxMaABZsixuk3QpRstqo7aYPhfdpuwR2ShijpscfImzHp7OK0lQRRZgVLkgEG4lyWSK dTYumimKBMK8iPNwsLVX0Xa7XdHcgeepdu4cOF+T6GCq6Q0k6TzgO3kLjbJZYBrGV2AH 4JNrTNqNqc+F6KnYF8Zu3jlYXlWN7GT7z4j3a71Qpa/r21lxRpsB71FhpULkLp/2ZHwh Q16/DUSojMCevSVUMXnU7mjlzBMAq/2BpPhg5KmFLZCE6zVRsOwbBbDAJVwbG2GfsZ6J eD7A==
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:date :message-id:subject:from:to:cc:content-type; bh=2jPB//NcWUf80/kfzUSIvfVkihUDDnM4RCUeSvWpCbA=; b=WKdDrTciFGfJ8lhNBHsNfoaFUcDWKPTnKHlTZsQpgEe2H+6s+dOayZExsp5A07+upA iHq3P3xS/c5EcH4ixOcKWNBTYNDSJzQKtF6Pf3JZ3E4Bj6yD2YSu+7/Xt6mRrfnqXDf1 w1mSIhKlSjt+MWHWR3rUDKU/O+q0LMpY51limqJv1y+AWB2S7vNqK7XuaYfzlKriwlcZ KRWTKDxfOnPFLCfbmmjpaLKwa+Z6juVAxVwkXgra66Ret9Del+HdZTR/rUWdjuvzrOl9 mHDpWPoYSsBSzmC03udCNezQVNuLKedtvVCw1omAmnAF2dlFrv2O8xbMgIu1vbQrC3Mk +/6A==
X-Gm-Message-State: ALoCoQkKXpV9ZZ3CiHXoAoIMfmzgV0Ip9bD9wQwlX9BAMzvsZezQpawf3InfmTOOdTPvBXtuxm/fGwdNJDHZCZrxvuMWfOd5Vw==
MIME-Version: 1.0
X-Received: by 10.182.130.234 with SMTP id oh10mr44716753obb.58.1451520230821; Wed, 30 Dec 2015 16:03:50 -0800 (PST)
Received: by 10.76.62.8 with HTTP; Wed, 30 Dec 2015 16:03:50 -0800 (PST)
In-Reply-To: <20151230105207.GB6140@roeckx.be>
References: <CAFewVt4Midtq7X6px4=A4hGkspQuJdzZQ907U=SJox0SdgfAJg@mail.gmail.com> <CACsn0cng1o-5hm=zuL6puOGJ8A2bjB=fFsaFsBCmmVofNSuumg@mail.gmail.com> <CABkgnnXQS3Ek6jDjx0aSQmaf+=EjfGWa8MG1AO4QwhJbK50VQg@mail.gmail.com> <CAFewVt4NSGDP_At8XsX4OsxSUaj_2kRyFP_keDQhfnR0=mBhrg@mail.gmail.com> <CABkgnnUq0_28U6VqE=ZPpwutOBUkTGwhxqHQOEvQve5JYfSVRA@mail.gmail.com> <CAFewVt6fyqbOZfQkWY=9SM20WcrP0UhfH+3wvXjiYoTjPm2pgA@mail.gmail.com> <CAFewVt5U9awAg4FbdWtXiCATd-kWttdsAwe3eWwcD5SXsKvyWQ@mail.gmail.com> <6F6EDAA8-15F2-4949-B927-4D0BD0E8FFE3@inria.fr> <20151230105207.GB6140@roeckx.be>
Date: Wed, 30 Dec 2015 14:03:50 -1000
Message-ID: <CAFewVt4+eysHvxnP=q-Gn-0DgQWLkoTs5OSc8v_t6qRtsk7TWg@mail.gmail.com>
From: Brian Smith <brian@briansmith.org>
To: Kurt Roeckx <kurt@roeckx.be>
Content-Type: multipart/alternative; boundary="089e013a0112be3101052826637b"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/e0lXRwttdMzeqkRtiHzrsI6Rgqw>
Cc: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>, "<tls@ietf.org>" <tls@ietf.org>
Subject: Re: [TLS] draft-ietf-tls-curve25519-01: Is public key validation necessary or helpful?
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: <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: Thu, 31 Dec 2015 00:03:52 -0000

Kurt Roeckx <kurt@roeckx.be> wrote:

> On Tue, Dec 29, 2015 at 10:10:47PM +0200, Karthikeyan Bhargavan wrote:
> > As mentioned before, validating Curve25519 public values is necessary in
> TLS 1.2 without session hash.
> > Otherwise, as we pointed out in [1], the triple handshake attack returns.
>
> Would it make sense to have session hash as a requirement in TLS
> 1.2 when you want to use Curve25519?
>

I think it is a good idea to implement the session hash extension, in
general. However, I think it is a bad idea to prescribe it as the solution
for this particular problem because:

1. draft-irtf-cfrg-curves-11, in sections 6.1 and section 6.2 already
require the check for a non-zero result, and that check is sufficient.

2. It is easy to make an automated test that verifies that an X25519/X448
implementation implements the non-zero check. Adding an automated test for
conditional enabling of them based on the presence of the session hash
extension is much harder.

3. It is much less error-prone to implement the non-zero result check than
to make the availability of X25519/X448 depend on whether or not the
session hash extension is implemented. Experience, e.g. [1], has shown that
such conditional enabling is error-prone.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=919677

Cheers,
Brian
-- 
https://briansmith.org/