Re: [secdir] [lamps] Secdir last call review of draft-ietf-lamps-cms-shakes-11

"Panos Kampanakis (pkampana)" <pkampana@cisco.com> Fri, 05 July 2019 18:12 UTC

Return-Path: <pkampana@cisco.com>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7E96D1200F5; Fri, 5 Jul 2019 11:12:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 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, 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 header.b=KBpL/oMt; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=INckBotm
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 BdPRHVk7LfIW; Fri, 5 Jul 2019 11:12:06 -0700 (PDT)
Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 852491200F4; Fri, 5 Jul 2019 11:12:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=15240; q=dns/txt; s=iport; t=1562350325; x=1563559925; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=xu1T6Bs3NiXssIQMzXGlt0JbmE+XkcxIkevuSrPtzeI=; b=KBpL/oMtFAhyqC2nrURC5rmavvWA8CbEcfoQBXpn7uoSJlXtTIb8ynd3 BOWCPLHizn90RZ1lHKJNb0aArU8Oc1JhNG/Y8jwLuwGg1oFMatEmSrSm0 h+hmupB8gHQSxwYuHwyE8fCjZfHtao+1A3CsSW2CkwFNB7HKhjG6AAQVC I=;
IronPort-PHdr: 9a23:rIdcFRzBOf/MLmHXCy+N+z0EezQntrPoPwUc9psgjfdUf7+++4j5YhWN/u1j2VnOW4iTq+lJjebbqejBYSQB+t7A1RJKa5lQT1kAgMQSkRYnBZudCkT+NPfsZgQxHd9JUxlu+HToeUU=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BtAACxkR9d/4oNJK1mGwEBAQEDAQEBBwMBAQGBVgMBAQELAYFDUANqVSAECygKhBKDRwOOSoJbl0aCUgNUCQEBAQwBARgNCAIBAYRAAheCFyM3Bg4BAwEBBAEBAgEFbYo3DIVKAQEBBAEBEBERDAEBLAsBCwQCAQgRBAEBAwImAgICJQsVCAgCBAENBQgagwGBagMdAQIMmmwCgTiIYHGBMoE5gUABAQWFFhiCEgMGgQwoAYteF4FAP4ERRoJMPoJhAQECgWGDCDKCJot1gnWbXwkCgheGVoRriF2XeI0whz+MMFqCcgIEAgQFAg4BAQWBZiIqgS5wFTuCbBOCLgkCAReDToUUhT9ygSmMTQGBIAEB
X-IronPort-AV: E=Sophos;i="5.63,455,1557187200"; d="scan'208";a="587636697"
Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 05 Jul 2019 18:12:03 +0000
Received: from XCH-RCD-006.cisco.com (xch-rcd-006.cisco.com [173.37.102.16]) by alln-core-5.cisco.com (8.15.2/8.15.2) with ESMTPS id x65IC3E4023485 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 5 Jul 2019 18:12:03 GMT
Received: from xhs-rtp-001.cisco.com (64.101.210.228) by XCH-RCD-006.cisco.com (173.37.102.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Jul 2019 13:12:02 -0500
Received: from xhs-rcd-001.cisco.com (173.37.227.246) by xhs-rtp-001.cisco.com (64.101.210.228) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Jul 2019 14:12:00 -0400
Received: from NAM01-BY2-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-001.cisco.com (173.37.227.246) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 5 Jul 2019 13:12:00 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xu1T6Bs3NiXssIQMzXGlt0JbmE+XkcxIkevuSrPtzeI=; b=INckBotmlvpX946LOKTCRiYEfkJaStMWm2x3YKTkSjyMywd6IHjnM8ejw+2c13jHUQb5ETXysYnoWHPdzEEgwiG18PT8xyagun2RCufF27N+aSJ8ec8fS7/XhMcMcpev2Bbl3TSoCKm1tdTNoQmPB5E4g7g61pdm8UVn6g5OP64=
Received: from BN7PR11MB2547.namprd11.prod.outlook.com (52.135.244.29) by BN7PR11MB2563.namprd11.prod.outlook.com (52.135.244.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Fri, 5 Jul 2019 17:56:04 +0000
Received: from BN7PR11MB2547.namprd11.prod.outlook.com ([fe80::b1dc:fd0d:e540:67aa]) by BN7PR11MB2547.namprd11.prod.outlook.com ([fe80::b1dc:fd0d:e540:67aa%7]) with mapi id 15.20.2032.019; Fri, 5 Jul 2019 17:56:04 +0000
From: "Panos Kampanakis (pkampana)" <pkampana@cisco.com>
To: Daniel Migault <daniel.migault@ericsson.com>, "secdir@ietf.org" <secdir@ietf.org>
CC: "spasm@ietf.org" <spasm@ietf.org>
Thread-Topic: [lamps] Secdir last call review of draft-ietf-lamps-cms-shakes-11
Thread-Index: AQHVMGz8Y3AT7G/6YEuDZe4hzJWqDaa8Oexg
Date: Fri, 05 Jul 2019 17:56:04 +0000
Message-ID: <BN7PR11MB25476AD4066DEF8523D76BC9C9F50@BN7PR11MB2547.namprd11.prod.outlook.com>
References: <156202717120.5730.12825083272193517507@ietfa.amsl.com>
In-Reply-To: <156202717120.5730.12825083272193517507@ietfa.amsl.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=pkampana@cisco.com;
x-originating-ip: [173.38.117.93]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: cae62517-0ecc-48eb-7281-08d701720cbd
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BN7PR11MB2563;
x-ms-traffictypediagnostic: BN7PR11MB2563:
x-ms-exchange-purlcount: 3
x-microsoft-antispam-prvs: <BN7PR11MB2563516FA4EA8F4E4F8A16E7C9F50@BN7PR11MB2563.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 008960E8EC
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(366004)(396003)(39860400002)(346002)(136003)(199004)(189003)(13464003)(76116006)(186003)(66476007)(478600001)(26005)(73956011)(66556008)(76176011)(53546011)(66446008)(110136005)(102836004)(6506007)(64756008)(316002)(68736007)(486006)(2906002)(81166006)(8936002)(11346002)(966005)(446003)(74316002)(8676002)(52536014)(30864003)(33656002)(71200400001)(5660300002)(81156014)(229853002)(7736002)(99286004)(305945005)(7696005)(476003)(71190400001)(66946007)(55016002)(66066001)(66574012)(14444005)(25786009)(256004)(6306002)(53936002)(9686003)(6436002)(86362001)(3846002)(4326008)(6116002)(14454004)(6246003)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR11MB2563; H:BN7PR11MB2547.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: aDEzSTCbU4UWL8TCzBR25eUFB2QfwGulQTRPX3nEmAwllkQJs+GOaX44bJCg16YdzQHk7tiOIG2vkfrIT3nyb3WJhMhFKyFaLHI1fNHfNsMBfHF22ab7Ju9XL0DHEj9Yk+2V+5y3aJ3RWhdDQO0D68wf3NL2eCOdCHsj++v/SdsBxeZqFIFYcvsxgd8v7v1tLTcryffnl3oZcd4jNjro9Unm+mSqRv03zuY9WkSWg/+f/zsmPxMQVpV+hmhs1pU+n84FgMIznCPW2d4urU1Nt5QBA/TdsOlU2apApd+42OqtRmBzVdwmj6Y9QpGAW3hsh/Xr/NBPKPx/q9YUcETkFQxLmJ968VE0nwPGRSrnbboT3cNB1QF0W+roAR+xX2JRyOFOWQg9tsv3qNUcHzy+TCsnmt3tQ/jLdvtk/sqZ3W0=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: cae62517-0ecc-48eb-7281-08d701720cbd
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2019 17:56:04.6896 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: pkampana@cisco.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2563
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.16, xch-rcd-006.cisco.com
X-Outbound-Node: alln-core-5.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/N82wkFJnvkeVW-Zo0z0vs_-NW-g>
Subject: Re: [secdir] [lamps] Secdir last call review of draft-ietf-lamps-cms-shakes-11
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Jul 2019 18:12:10 -0000

Hi Dan,

Thank you for the thorough review. 

I addressed your comments in the latest version of the draft in git https://github.com/csosto-pk/adding-shake-to-pkix/blob/master/draft-ietf-lamps-cms-shakes-current.txt For the specific answers and fixes to your comments check out the git issue https://github.com/csosto-pk/adding-shake-to-pkix/issues/49#issuecomment-508312729 Let me know if something doesn't make sense. 

I will upload this iteration in a week or so. 

Rgs,
Panos


-----Original Message-----
From: Spasm <spasm-bounces@ietf.org> On Behalf Of Daniel Migault via Datatracker
Sent: Monday, July 01, 2019 8:26 PM
To: secdir@ietf.org
Cc: spasm@ietf.org; draft-ietf-lamps-cms-shakes.all@ietf.org; ietf@ietf.org
Subject: [lamps] Secdir last call review of draft-ietf-lamps-cms-shakes-11

Reviewer: Daniel Migault
Review result: Has Nits

Hi

I have reviewed this document as part of the security directorate's ongoing effort to review all IETF documents being processed by the IESG.  These comments were written primarily for the benefit of the security area directors.  Document editors and WG chairs should treat these comments just like any other last call comments.

I believe the document is ready with nits.

Yours,
Daniel

LAMPS WG                                                   P. Kampanakis
Internet-Draft                                             Cisco Systems
Updates: 3370 (if approved)                                      Q. Dang
Intended status: Standards Track                                    NIST
Expires: December 19, 2019                                 June 17, 2019

  Use of the SHAKE One-way Hash Functions in the Cryptographic Message
                              Syntax (CMS)
                     draft-ietf-lamps-cms-shakes-11

2.  Introduction

   In the SHA-3 family, two extendable-output functions (SHAKEs),
   SHAKE128 and SHAKE256, are defined.  Four other hash function
   instances, SHA3-224, SHA3-256, SHA3-384, and SHA3-512 are also
   defined but are out of scope for this document.  A SHAKE is a
   variable length hash function defined as SHAKE(M, d) where the output
   is a d-bits long digest of message M.  The corresponding collision
   and second preimage resistance strengths for SHAKE128 are
   min(d/2,128) and min(d,128) bits respectively (Appendix A.1 [SHA3]).
   And, the corresponding collision and second preimage resistance
   strengths for SHAKE256 are min(d/2,256) and min(d,256) bits
   respectively.

<mglt>
since we are introducing d in this section and the specification fixes d later, we may fix d here and list the associated security for the fixed value.

I would also suggest that additional resistance considerations be mentioned in the security consideration with a reference to it in the introduction. Additional consideration would also provide preimage resistance and extends the considerations regarding 128/256 bit security and post quantum resistance.

</mglt>

   A SHAKE can be used in CMS as the message digest function (to hash
   the message to be signed) in RSASSA-PSS and ECDSA, message
   authentication code and as the mask generation function (MGF) in
   RSASSA-PSS.  This specification describes the identifiers for SHAKEs
   to be used in CMS and their meaning.

3.  Identifiers

   This section defines four new object identifiers (OIDs) for using
   SHAKE128 and SHAKE256 in CMS.

<mglt>
It is unclear to me if this section defines OIDs. Instead, it seems to me that the section lists OIDs for convenience but these are defined in other documents.
</mglt>

   Two object identifiers for SHAKE128 and SHAKE256 hash functions are
   defined in [shake-nist-oids] and we include them here for
   convenience.

     id-shake128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
          country(16) us(840) organization(1) gov(101) csor(3)
          nistAlgorithm(4) 2 11 }

     id-shake256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
          country(16) us(840) organization(1) gov(101) csor(3)
          nistAlgorithm(4) 2 12 }

   In this specification, when using the id-shake128 or id-shake256
   algorithm identifiers, the parameters MUST be absent.  That is, the
   identifier SHALL be a SEQUENCE of one component, the OID.

<mglt>
It might be clearer if the AlgoritmIdentifier structure is added for convenience or referenced maybe by RFC5280 in the document.

On the other hand, I am also inclined to think that this section may be replaced with a reference to lamps-pkix-shake.and the list of id-*.
This could be one sentence in the introduction </mglt>

4.  Use in CMS

4.1.  Message Digests

   The id-shake128 and id-shake256 OIDs (Section 3) can be used as the
   digest algorithm identifiers located in the SignedData, SignerInfo,
   DigestedData, and the AuthenticatedData digestAlgorithm fields in CMS  x  [RFC5652].  The encoding MUST omit the parameters field and the

<mglt>
I might be missing one level of encapsulation, but my understanding is that digest algorithm identifiers and algorithm identifiers have the same structure. If that is correct, it seems that the requirement to omit the parameters is redundant with the definition of the algorithm identifiers as well as with lamps-pkix-shake.

I am reading the sentence as it provides some requirements on the message format (no parameters are provided) as well as the setting of an output size. I interpret the output size as a parameter for the message-digesting algorithm as opposed as a parameter that is provided in the message. If that is the case, that might be specified explicitly and maybe in two different sentences as to avoid coupling requirements of different nature.
</mglt>

   output size, d, for the SHAKE128 or SHAKE256 message digest MUST be
   256 or 512 bits respectively.

   The digest values are located in the DigestedData field and the
   Message Digest authenticated attribute included in the
   signedAttributes of the SignedData signerInfo.  In addition, digest
   values are input to signature algorithms.  The digest algorithm MUST
   be the same as the message hash algorithms used in signatures.

4.2.  Signatures

   In CMS, signature algorithm identifiers are located in the SignerInfo
   signatureAlgorithm field of SignedData content type and
   countersignature attribute.  Signature values are located in the
   SignerInfo signature field of SignedData content type and
   countersignature attribute.

   Conforming implementations that process RSASSA-PSS and ECDSA with
   SHAKE signatures when processing CMS data MUST recognize the
   corresponding OIDs specified in Section 3.

   When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus and ECDSA
   curve order SHOULD be chosen in line with the SHAKE output length.
   In the context of this document SHAKE128 OIDs are RECOMMENDED for
   2048 or 3072-bit RSA modulus or curves with group order of 256-bits.
   SHAKE256 OIDs are RECOMMENDED for 4096-bit RSA modulus and higher or
   curves with group order of 384-bits and higher.

<mglt>
I believe a reference to the security consideration  should be provided with further discussions on the meaning of  "in line".  The security consideration should maybe provide a reference that correlates symmetric
- as CMS can be used with AES -, factoring modulus Elliptic curves and hash. Though the current security consideration reference SP800-78-4 and SP800-107, maybe the following ones could be used in the security consideration. They look more recent but I have not deeply looked at those.

* Algorithms, Key Size and Protocols Report (2018), H2020-ICT-2014 – Project 645421, D5.4, ECRYPT-CSA, 02/2018. * Recommendation for Key Management, Special Publication 800-57 Part 1 Rev. 4, NIST, 01/2016.

</mglt>

4.2.1.  RSASSA-PSS Signatures

   The RSASSA-PSS algorithm is defined in [RFC8017].  When id-RSASSA-
   PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 specified in Section 3 is
   used, the encoding MUST omit the parameters field.  That is, the
   AlgorithmIdentifier SHALL be a SEQUENCE of one component, id-RSASSA-
   PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256.  [RFC4055] defines RSASSA-
   PSS-params that are used to define the algorithms and inputs to the
   algorithm.  This specification does not use parameters because the
   hash, mask generation algorithm, trailer and salt are embedded in the
   OID definition.

<mglt>
This is a similar comment as the one provided earlier. It does not seem to me that this document "specifies" (in section 3) algorithms. It seems to me these algorithms are provided for convenience but are specified in pkix-shake.

Similarly, the absence of parameter does not seems to me necessary here
- unless I am missing something. It seems that MUST and SHALL are aiming at preventing the NULL parameter, I am wondering if there are any reasons for having different terms.

The explanation may be moved to section 3.

</mglt>

   The hash algorithm to hash a message being signed and the hash
   algorithm as the mask generation function used in RSASSA-PSS MUST be
   the same, SHAKE128 or SHAKE256 respectively.  The output-length of
   the hash algorithm which hashes the message SHALL be 32 or 64 bytes
   respectively.

<mglt>
I suggest we use bytes or bits in the document.
</mglt>

4.2.2.  ECDSA Signatures

   The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in
   [X9.62].  When the id-ecdsa-with-shake128 or id-ecdsa-with-shake256
   (specified in Section 3) algorithm identifier appears, the respective
   SHAKE function is used as the hash.  The encoding MUST omit the
   parameters field.  That is, the AlgorithmIdentifier SHALL be a
   SEQUENCE of one component, the OID id-ecdsa-with-shake128 or id-
   ecdsa-with-shake256.

<mglt>
same comment regarding the parameter field </mglt>

4.3.  Public Keys

   The identifier parameters, as explained in Section 3, MUST be absent.
<mglt>
Same comment as above.
</mglt>
4.4.  Message Authentication Codes

6.  Security Considerations

   This document updates [RFC3370].  The security considerations section
   of that document applies to this specification as well.

   NIST has defined appropriate use of the hash functions in terms of
   the algorithm strengths and expected time frames for secure use in
   Special Publications (SPs) [SP800-78-4] and [SP800-107].  These
   documents can be used as guides to choose appropriate key sizes for
   various security scenarios.

   When more than two parties share the same message-authentication key,
   data origin authentication is not provided.  Any party that knows the
   message-authentication key can compute a valid MAC, therefore the
   content could originate from any one of the parties.

<mglt>
I would suggest to add some considerations on resistance with post quantum computers.
</mglt>


_______________________________________________
Spasm mailing list
Spasm@ietf.org
https://www.ietf.org/mailman/listinfo/spasm