[Curdle] Comments on draft-housley-cms-eddsa-signatures

Russ Housley <housley@vigilsec.com> Mon, 02 May 2016 17:32 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: curdle@ietfa.amsl.com
Delivered-To: curdle@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B707412D122 for <curdle@ietfa.amsl.com>; Mon, 2 May 2016 10:32:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.9
X-Spam-Level:
X-Spam-Status: No, score=-101.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, USER_IN_WHITELIST=-100] 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 QIuR_yjI8Eyn for <curdle@ietfa.amsl.com>; Mon, 2 May 2016 10:32:35 -0700 (PDT)
Received: from mail.smetech.net (x-bolt-wan.smeinc.net [209.135.219.146]) by ietfa.amsl.com (Postfix) with ESMTP id E7CC212D10F for <curdle@ietf.org>; Mon, 2 May 2016 10:32:34 -0700 (PDT)
Received: from localhost (ronin.smetech.net [209.135.209.5]) by mail.smetech.net (Postfix) with ESMTP id 4D0E4F24041; Mon, 2 May 2016 13:32:34 -0400 (EDT)
X-Virus-Scanned: amavisd-new at smetech.net
Received: from mail.smetech.net ([209.135.209.4]) by localhost (ronin.smeinc.net [209.135.209.5]) (amavisd-new, port 10024) with ESMTP id Nc0bnuf3WiZV; Mon, 2 May 2016 13:16:20 -0400 (EDT)
Received: from [5.5.33.72] (vpn.snozzages.com [204.42.252.17]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.smetech.net (Postfix) with ESMTP id 064C8F2402E; Mon, 2 May 2016 13:32:32 -0400 (EDT)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
From: Russ Housley <housley@vigilsec.com>
In-Reply-To: <086701d1a0e4$965f2320$c31d6960$@augustcellars.com>
Date: Mon, 02 May 2016 13:32:26 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <9458BE75-3657-4726-949C-6C9D7511AF21@vigilsec.com>
References: <086701d1a0e4$965f2320$c31d6960$@augustcellars.com>
To: Jim Schaad <ietf@augustcellars.com>
X-Mailer: Apple Mail (2.1878.6)
Archived-At: <http://mailarchive.ietf.org/arch/msg/curdle/CPSDGF4J0L-gQVixWIehJA2KYsM>
Cc: curdle@ietf.org
Subject: [Curdle] Comments on draft-housley-cms-eddsa-signatures
X-BeenThere: curdle@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "List for discussion of potential new security area wg." <curdle.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/curdle>, <mailto:curdle-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/curdle/>
List-Post: <mailto:curdle@ietf.org>
List-Help: <mailto:curdle-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/curdle>, <mailto:curdle-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 May 2016 17:32:36 -0000

Jim Schaad sent me some comments on this document.  Since I have asked this
working group to adopt this draft, I have gotten Jim’s permission to respond to
the comments on list.

> 1.  I am not sure that I see a great deal of benefits for doing both the
> pre-hash version and pure version of EdDSA.   Specifically, the use of the
> pre-hash version really only seems to make sense if one does not use signed
> attributes.  However, I think that this is a case which would never occur
> for this signature algorithm.

Right.  Since signed attributes are the most common use with CMS, it is
probably better to just make use of PureEdDSA.

I suggest adding this text to Section 2 of the document:

   One of the parameters of the EdDSA algorithm is the "prehash"
   function.  This may be the identity function, resulting in an
   algorithm called PureEdDSA, or a collision-resistant hash function,
   resulting in an algorithm called HashEdDSA.  In most situations the
   CMS SignedData includes signed attributes, including the message
   digest of the content.  Since HashEdDSA offers no benefit when signed
   attributes are present, only PureEdDSA is used with the CMS.

And, then change Section 2.1 like this:

   When the id-EdDSAPublicKey onject identifier is used, the
   AlgorithmIdentifier parameters field MUST contain EdDSAParameters to
   specify a particular set of EdDSA parameters:

      EdDSAParameters ::= ENUMERATED {
        ed25519   (1),    -- PureEdDSA
        ed25519ph (2),    -- HashEdDSA; not used in the CMS
        ed448     (3),    -- PureEdDSA
        ed448ph   (4) }   -- HashEdDSA; not used in the CMS


> 2.  We need to get a definition of how to use SHAKE256 from someplace if we
> are going to say use the same hash algorithm throughout as that is what
> Ed448 uses.  It would be worthwhile to specify what hash algorithms should
> be used with each of the different signature algorithms given that it is not
> clear from the name of the algorithm identifier.

This document references draft-irtf-cfrg-eddsa-05, and that document
includes this reference for SHAKE256:

   [FIPS202]  National Institute of Standards and Technology, U.S.
              Department of Commerce, "SHA-3 Standard: Permutation-Based
              Hash and Extendable-Output Functions", FIPS 202, August
              2015.

I’m not sure what more you think is needed.


> 3.  In section 3 para 2: This sentence does not necessarily make sense for
> the pure version of EdDSA.  In some sense there is no hash function which is
> used on the signedAttribute value.  I don't know that it needs to be fixed,
> but it might be somewhat confusing.

You are talking about this paragraph:

   The same one-way hash function SHOULD be used for computing the
   message digest on both the eContent and the signedAttributes value if
   signedAttributes are present.

I think the principle is correct.  I’m not sure how to address your comment.


> 4.  In section 4, the problem with EdDSA is worse for the use of different
> algorithms than what you are stating.  It is possible to do some interesting
> forgeries if you cross between the pre-hash and not pre-hash versions with
> the Ed25519 curve since there is no context difference between them.  This
> has to be forbidden not just strongly suggested.

Does the removal of HashEdDSA resolve this one?

Russ