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

"Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com> Sun, 13 November 2016 04:20 UTC

Return-Path: <sfluhrer@cisco.com>
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 D2B4F1296C5 for <cfrg@ietfa.amsl.com>; Sat, 12 Nov 2016 20:20:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -16.018
X-Spam-Level:
X-Spam-Status: No, score=-16.018 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.497, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 YQ0CqknJkhnw for <cfrg@ietfa.amsl.com>; Sat, 12 Nov 2016 20:20:30 -0800 (PST)
Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1FBB81296BC for <cfrg@irtf.org>; Sat, 12 Nov 2016 20:20:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1767; q=dns/txt; s=iport; t=1479010830; x=1480220430; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=w6dqatTMrZjkVZ3A8jPfqSCogBAeuFD4M7UG8CK8XCI=; b=j5VBJYLFYfj4NQVB16AlAPh+cKdbi3UoXFZu3AN28/Lb/aIMCpSLtmvF 1Moh6DIuIK+5WSch9mh/fSJxG1o5pxQKE+zgjneF+K6Lanhy0veeGOmeq y+l4X1EZvERx+tqf2s2yD8RdfWuXCPbO3T57Vnc39Le2ug+zQn1Pq1yRd E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0B8AQBS6SdY/5NdJa1cGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBgzEBAQEBAR9YgQAHjTeXCZRgggcdC4V7AoIMPxQBAgEBAQEBAQFiKIR?= =?us-ascii?q?hAQEBAwEBAQE3NBcEAgEIEQQBAR8JBycLFAkIAgQBEgiIUQgOsTuLQwEBAQEBA?= =?us-ascii?q?QEBAQEBAQEBAQEBAQEBARcFhjyEWoJkgUCGBQWaQQGQVZAnjUSECQEeN4EDHIU?= =?us-ascii?q?acoVMAiQHgQOBDAEBAQ?=
X-IronPort-AV: E=Sophos;i="5.31,482,1473120000"; d="scan'208";a="346902568"
Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2016 04:20:29 +0000
Received: from XCH-RTP-009.cisco.com (xch-rtp-009.cisco.com [64.101.220.149]) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id uAD4KS8r013684 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 13 Nov 2016 04:20:29 GMT
Received: from xch-rtp-006.cisco.com (64.101.220.146) by XCH-RTP-009.cisco.com (64.101.220.149) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 12 Nov 2016 23:20:28 -0500
Received: from xch-rtp-006.cisco.com ([64.101.220.146]) by XCH-RTP-006.cisco.com ([64.101.220.146]) with mapi id 15.00.1210.000; Sat, 12 Nov 2016 23:20:28 -0500
From: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>
To: Russ Housley <housley@vigilsec.com>, IRTF CFRG <cfrg@irtf.org>
Thread-Topic: [Cfrg] Message Digest Algorithm Choice for CMS with Ed448
Thread-Index: AQHSPWHKA6cnXKXrtUySJ3Ht94M3IqDWTmcA
Date: Sun, 13 Nov 2016 04:20:28 +0000
Message-ID: <683700509df04d2eb8874fd292462946@XCH-RTP-006.cisco.com>
References: <7DDD1353-96FC-4E70-8427-AA9C6F499232@vigilsec.com>
In-Reply-To: <7DDD1353-96FC-4E70-8427-AA9C6F499232@vigilsec.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.98.2.54]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/qJJhkbeppim2CXsm5_kPVmt1ZJQ>
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: Sun, 13 Nov 2016 04:20:39 -0000

> -----Original Message-----
> From: Cfrg [mailto:cfrg-bounces@irtf.org] On Behalf Of Russ Housley
> Sent: Saturday, November 12, 2016 10:55 PM
> To: IRTF CFRG
> Subject: [Cfrg] Message Digest Algorithm Choice for CMS with Ed448
> 
> 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.
> 
>    2.  Create a message-digest attribute that include the
>        result from 1.
> 
>    3.  Gather all of the attributes that will be signed, which
>        includes the attribute from 2.
> 
>    4.  Digitally sign the set of attributes.
> 
> For Ed448 (EdDSA with Curve448), step 4 uses SHAKE256.
> 
> SHAKE256 uses SHA3-512 internally.

Not precisely, a blackbox SHA3-512 implementation would be of little use to create a SHAKE256 implementation.  What is true that both are based on the Keccak permutation, and so parts of a nonblackbox SHA3-512 implementation could be reused in a SHAKE256 implementation.
> 
> What message digest algorithm should be used in step 1?
> 
> It seems that SHA3-512 would be a good choice to avoid having to implement
> more that one message digest algorithm to generate the signature or
> validate it.

How about SHAKE256, with the output limited to 256 bits?  SHAKE256 in that mode ought to have the same security properties as SHA3-256 (as they are the same except for different end-message padding).

> 
> Russ
> 
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg