Re: [Cfrg] Message Digest Algorithm Choice for CMS with Ed448

Taylor R Campbell <campbell+cfrg@mumble.net> Mon, 14 November 2016 18:47 UTC

Return-Path: <campbell@mumble.net>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0B7AA12997E for <cfrg@ietfa.amsl.com>; Mon, 14 Nov 2016 10:47:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.397
X-Spam-Level:
X-Spam-Status: No, score=-3.397 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-1.497] autolearn=ham autolearn_force=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 2fSztj7nZXDO for <cfrg@ietfa.amsl.com>; Mon, 14 Nov 2016 10:47:21 -0800 (PST)
Received: from jupiter.mumble.net (jupiter.mumble.net [74.50.56.165]) by ietfa.amsl.com (Postfix) with ESMTP id 2685A12997B for <cfrg@irtf.org>; Mon, 14 Nov 2016 10:47:21 -0800 (PST)
Received: by jupiter.mumble.net (Postfix, from userid 1014) id B803D60380; Mon, 14 Nov 2016 18:47:09 +0000 (UTC)
From: Taylor R Campbell <campbell+cfrg@mumble.net>
To: Derek Atkins <derek@ihtfp.com>
In-reply-to: <sjmlgwmrpo7.fsf@securerf.ihtfp.org> (derek@ihtfp.com)
Date: Mon, 14 Nov 2016 18:47:20 +0000
Sender: Taylor R Campbell <campbell@mumble.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20161114184709.B803D60380@jupiter.mumble.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/PnP9bBF7W9DaVkTG5X77JD_OK3M>
Cc: IRTF CFRG <cfrg@irtf.org>, Russ Housley <housley@vigilsec.com>, "Scott Fluhrer \(sfluhrer\)" <sfluhrer@cisco.com>
Subject: Re: [Cfrg] Message Digest Algorithm Choice for CMS with Ed448
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Nov 2016 18:47:23 -0000

   Date: Mon, 14 Nov 2016 11:28:56 -0500
   From: Derek Atkins <derek@ihtfp.com>

   It depends which security service of signatures you're asking about.
   For non-repudiation, yes, collision resistance is important.  However
   preimage resistance is important for integrity/forging security.

No!

A signature scheme defined in terms of H(m), such as RSASSA-PSS,
relies on the collision resistance of H to prevent forgery.  Preimage
resistance is *not* sufficient.  Failure of MD5 to be collision-
resistant is what enabled HTTPS certificate forgery in the wild ten
years ago.

(Attack: Find m =/= m' such that H(m) = H(m') and m is a certificate
for for harmlessexample.com while m' is a certificate for google.com.
Submit a CSR to a CA that you predict will issue m signed.  Now you
have a signed certificate for google.com.)

A more sensible signature scheme defined in terms of H(r, m) for some
unpredictable per-message value r, such as EdDSA, relies only on the
*target* collision resistance of H to prevent forgery.  This is a
stronger requirement than preimage resistance, but all the standard
hash functions, even MD5, are still conjectured to be target-
collision-resistant.

However, the question at hand is about a scheme defined in terms of
H(m) -- in particular, what H should we use for computing the message
digest in step 1 of Russ Housley's original message, message-id
<7DDD1353-96FC-4E70-8427-AA9C6F499232@vigilsec.com> at
<https://www.ietf.org/mail-archive/web/cfrg/current/msg08786.html>?

   Date: Sat, 12 Nov 2016 22:55:21 -0500
   From: Russ Housley <housley@vigilsec.com>

   The CURDLE WG is working on a document that specifies the
   conventions for using EdDSA with CMS [RFC5652].  See
   draft-ietf-curdle-cms-eddsa-signatures.

   The most common case involves these steps:

      1.  Compute a message digest on the content.
      [...]

Can we persuade the CURDLE WG to use an H(r, m) scheme instead, such
as EdDSA without the prehash, and thereby dispel requirements of
collision resistance?