Re: [Last-Call] Secdir last call review of draft-ietf-cose-rfc8152bis-algs-08

"Nancy Cam-Winget (ncamwing)" <ncamwing@cisco.com> Fri, 29 May 2020 17:48 UTC

Return-Path: <ncamwing@cisco.com>
X-Original-To: last-call@ietfa.amsl.com
Delivered-To: last-call@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1C7CE3A0E9F; Fri, 29 May 2020 10:48:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.598
X-Spam-Level:
X-Spam-Status: No, score=-9.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=f9ycjuDK; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=dCgukVFb
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 A5JTpo1aYiDD; Fri, 29 May 2020 10:48:50 -0700 (PDT)
Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D5EBC3A0EA1; Fri, 29 May 2020 10:48:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=11558; q=dns/txt; s=iport; t=1590774530; x=1591984130; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=A0ii+NlApK/PQ0FioT7qJaTz0uTqsQ3XyISgaGdAnao=; b=f9ycjuDKCYmzODpp9wiQGPh7plgxOktIhtYkmHWx++y2Mean+yMI28rn 1sCt3RuXdxiPEUIVNYDSHPLqG1NMyILxToLILm+zlfmqr5CchZwNFw8Hf POWMBVhz/ZJ3IQnaohzK1C0B4a0eu12OlXeLKMWSyKXUCEQTdLKlKbId8 I=;
IronPort-PHdr: 9a23:kM6JRR2sVNlQogXGsmDT+zVfbzU7u7jyIg8e44YmjLQLaKm44pD+JxWEv6dkkVDURpnQ5vZAgvDN9avnXD9I7ZWAtSUEd5pBH18AhN4NlgMtSMiCFQXgLfHsYiB7eaYKVFJs83yhd0QAHsH4ag7bv3Kv9iIZFxH7PBBuYO/yH92ag8G+zevn/ZrVbk1Bjya8ZrUnKhKwoGCz/skbiIdvMOA/0BzM93BJYO9Rg2hvIAGe
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DbAQB1StFe/4MNJK1mGwEBAQEBAQEBBQEBARIBAQEDAwEBAUCBSoFQIy8Hb1gvLAqEG4NGA41CmEmBQoEQA1ULAQEBDAEBHw4CBAEBhEQCF4ILAiQ4EwIDAQELAQEFAQEBAgEGBG2FWQyFcgEBAQEDEhERDAEBNwELBAIBBgIOAwQBAQMCJgICAjAVCAgCBAENBSKDBAGCSwMuAQ6UbJBnAoE5iGF2gTKDAQEBBYVHGIIOAwaBDiqCZIlEHRqCAIERJxyCTT6CZwICgTsOgy4zgi2Rb49hgSEvkCcKglSIMYtfhFsegmaQaYpFkF2BXogVk30CBAIEBQIOAQEFgWoigVZwFRpLAYI+UBcCDZBACxiDT4pWdDcCBgEHAQEDCXyKGAEmB4EGAYEPAQE
X-IronPort-AV: E=Sophos;i="5.73,449,1583193600"; d="scan'208";a="765689458"
Received: from alln-core-1.cisco.com ([173.36.13.131]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 29 May 2020 17:48:44 +0000
Received: from XCH-RCD-001.cisco.com (xch-rcd-001.cisco.com [173.37.102.11]) by alln-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id 04THmi8S023176 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 29 May 2020 17:48:44 GMT
Received: from xhs-rcd-003.cisco.com (173.37.227.248) by XCH-RCD-001.cisco.com (173.37.102.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 29 May 2020 12:48:44 -0500
Received: from xhs-rtp-001.cisco.com (64.101.210.228) by xhs-rcd-003.cisco.com (173.37.227.248) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 29 May 2020 12:48:43 -0500
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-001.cisco.com (64.101.210.228) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 29 May 2020 13:48:42 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lOib3tlobB8p9ChPSk0W0HgFurO8YInpYRvjczxt4RpanfeLw1aq36cKY14xA3updYHzcieVIdpQ/OY+12YbP1w1MEGhnxn++o4eTHMHxFeG9ZzH61ifUUnrrBnxK/YE34Fy9z16t1LIBAzaSvacw7AJ/seh0lCbbdfpu9K4Ul0eA5CHOSs+J9vAn9JMRXRo6p0RC6tbU2/o3bLlFqYFwnb9izuyFm3CONNapKLcoG4xkfp76HkYn0HX+LZ0edIHHkvlCvlDzwACtgZU238/egLvLpVR9eXqn7CGmeqzthncDL9TRMFAaBje2H2BXRcAGTrtJKXi+uuhHAIyFwyOrA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A0ii+NlApK/PQ0FioT7qJaTz0uTqsQ3XyISgaGdAnao=; b=IJ3Ein1OXRGBxLOJlhI8BHhvBi7ddKOP6IALeZBDg1atxwe2IgiO+QFyppFrk2ZPxNiMJSl9IzWDOrnDcmBzZW4w+OfYMt2l7EltAQrQOmWQGM40g5rnFgq+dMxKcI1E18Ab/WBmDHlfsYPLqrko70BUVz36MtN7oPtNKvHqyfYO+C7+1Dx0rztSehcSf0psz04Nomo2j5qcGOoWIwlVNfQElVhngcYsrgefDMG6h6af1UjYDQ6It8SlLTSQrDg76KKVkic+xeW7HHxxEQ84WmO6gJ6Tdb8gegPMWkygri1+CQr65DrHyhJoiH9iolK1+x00JtKi7Fq3MFSQgP/dyQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
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=A0ii+NlApK/PQ0FioT7qJaTz0uTqsQ3XyISgaGdAnao=; b=dCgukVFb0fPy3vTJIxkzstVpDkc+Oz2i1UiDzc9L0y0O9MAliCCGw35GLagNDyX5+rbOPgKytDeTHcmBOGBac8K7C66eEuzX/tL9rJTDb/94O7PKMTE2AfjMny2s/XG4dyiyRcRooRX4enrTEnzrbaiOMG+4DlTGrrywetUI9z0=
Received: from BY5PR11MB4070.namprd11.prod.outlook.com (2603:10b6:a03:181::16) by BY5PR11MB4196.namprd11.prod.outlook.com (2603:10b6:a03:1ce::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.26; Fri, 29 May 2020 17:48:41 +0000
Received: from BY5PR11MB4070.namprd11.prod.outlook.com ([fe80::101e:db5b:b661:949]) by BY5PR11MB4070.namprd11.prod.outlook.com ([fe80::101e:db5b:b661:949%6]) with mapi id 15.20.3045.018; Fri, 29 May 2020 17:48:41 +0000
From: "Nancy Cam-Winget (ncamwing)" <ncamwing@cisco.com>
To: Jim Schaad <ietf@augustcellars.com>, "secdir@ietf.org" <secdir@ietf.org>
CC: "cose@ietf.org" <cose@ietf.org>, "last-call@ietf.org" <last-call@ietf.org>, "draft-ietf-cose-rfc8152bis-algs.all@ietf.org" <draft-ietf-cose-rfc8152bis-algs.all@ietf.org>
Thread-Topic: Secdir last call review of draft-ietf-cose-rfc8152bis-algs-08
Thread-Index: AQHWNd21+VD/kmDL3kuB39KUi65/xqi+4bEA
Date: Fri, 29 May 2020 17:48:41 +0000
Message-ID: <B03F352A-C595-477E-92EF-679739369E80@cisco.com>
References: <159052818935.17307.5095159295288146706@ietfa.amsl.com> <041f01d635dd$ad489cf0$07d9d6d0$@augustcellars.com>
In-Reply-To: <041f01d635dd$ad489cf0$07d9d6d0$@augustcellars.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.10.16.200509
authentication-results: augustcellars.com; dkim=none (message not signed) header.d=none;augustcellars.com; dmarc=none action=none header.from=cisco.com;
x-originating-ip: [73.162.233.180]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 4fc9b105-13ae-4584-2c61-08d803f88695
x-ms-traffictypediagnostic: BY5PR11MB4196:
x-microsoft-antispam-prvs: <BY5PR11MB419612168F252E1FBBAFCCC5D68F0@BY5PR11MB4196.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 04180B6720
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: ML6RvPDLNrttJoK5Y0MrRRfYC00JE9Siqg0PD5w6r6ZaHrJMcJ8acq/7xeGy29c9SSbEEq+cAWvuCN8Y7YQMIqBqW7zGL5pbzMmnAmhwOtSLg6Y8H2VUhABqd9vJf5q6MjzttL284lQt+jps7VK0RkuUcBP6itdri16alQpIXARxbDJgjI6mFJbYloZE96DNgdjdV3Kg6UPmIRtCGjv5fx2Dv8j03gbgtSEkXT+yXcscWtV9m6yno8OXfwDB5qJq+ZaOfkB2yb98BWpp9xmNy8I4PbpEwc4GrMR8tTjAlmfZJ56sjPXkRuVYmR+impdYFBrWXJpL0hYHXROCTZC+6cLSAK0xUiDH7AaTMpDYEiaUa+WZGl7bzHO4fjSwluaoPLv099BDSG39HaNYvcpWOg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4070.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(376002)(136003)(346002)(39860400002)(396003)(110136005)(316002)(4326008)(54906003)(6506007)(71200400001)(66476007)(64756008)(6512007)(83380400001)(66446008)(36756003)(66556008)(66946007)(76116006)(53546011)(6486002)(2616005)(5660300002)(8676002)(186003)(478600001)(8936002)(33656002)(86362001)(2906002)(26005); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: FROM6qHfucXs+JkWytHYJ7OGMFRUD12EzSUc2npniXcgbpTzTy/GXIXjt32omgGgs62EKrtXd+l1M7O2tvQE6/b2MeTILRRnvKWjA9m1jGhWlguRrUoM8Koqs2vgCP32w5lYwpfPdFRtLyFk8zq4eZa2dwVEDpJRXdQFxF7q4V/a0baCtIbMc5k2/RBwyhBkPdzIDugfP72bNDNcAi/tvEK6u5zNgnScOwv0BdRDvlAPljOGjr/4AkMdgwR6g7avdRh7s0cHoikYQVkyKqq8TLULlVhqAE2K0EwmP+QH4d6Aw3t3kWRRvssNoAkprzsXoauY9nqOx+CGP59ojmkR3sOHxrbQJ3gxhkJD1lkLt8IYj2oRoAE5cmY5DIPebRIB67YWJM7taTtaHJe2rvtth+5UrFqrGWlifNcTMmr7XtP/CI4x2VEzo/A0PKp8WTAPg6TM0nl0lPREEINIuRCeKL7OACS+PvLuY2KBV/RmBSNDxOP0ybb5/NkLYch4Mj4z
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <242D2C4DB280D342885E315D6A7360DA@namprd11.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 4fc9b105-13ae-4584-2c61-08d803f88695
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2020 17:48:41.5732 (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: AyrAUOJ+WUOcOwfKMiPo/82sZzMKc1f7w1UEUdMqy8ftc/jNcZTtqs0R05nF5KbjTyS6+S5Q39u/zQBcmbqKrg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4196
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.11, xch-rcd-001.cisco.com
X-Outbound-Node: alln-core-1.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/last-call/wjeXLSBkM0fw40kctQwLDE2AROI>
Subject: Re: [Last-Call] Secdir last call review of draft-ietf-cose-rfc8152bis-algs-08
X-BeenThere: last-call@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF Last Calls <last-call.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/last-call>, <mailto:last-call-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/last-call/>
List-Post: <mailto:last-call@ietf.org>
List-Help: <mailto:last-call-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/last-call>, <mailto:last-call-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 May 2020 17:48:52 -0000

Hi Jim,
Thanks for addressing the comments!  Answers below:

On 5/29/20, 10:22 AM, "Jim Schaad" <ietf@augustcellars.com> wrote:

    Hi Nancy,
    
    Comments inline.
    
    Jim
    
    
    -----Original Message-----
    From: Nancy Cam-Winget via Datatracker <noreply@ietf.org> 
    Sent: Tuesday, May 26, 2020 2:23 PM
    To: secdir@ietf.org
    Cc: cose@ietf.org; last-call@ietf.org; draft-ietf-cose-rfc8152bis-algs.all@ietf.org
    Subject: Secdir last call review of draft-ietf-cose-rfc8152bis-algs-08
    
    Reviewer: Nancy Cam-Winget
    Review result: Has Nits
    
    IOTDIR review of draft-ietf-cose-rfc8152bis-algs-08
    
    Reviewer: Nancy Cam-Winget
    
    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.
    
    This document describes an initial set of cryptographic algorithms used to protect CBOR, I believe this document is almost ready, barring some editorial nits (I only made a few below).  In general, the description of the "initial"
    set of algorithms used in COSE make sense and it is good to see each section carry their own security section for better mapping of the considerations based on the security algorithm applied.  As a reader (like myself) who is not fully versant to the nuances of CBOR it was a little hard to follow as the structures and taxonomy is described in the companion draft (draft-ietf-cose-rfc8152bis-struct). As a whole, I think the document is close to ready, I only noted a few technical and editorial nits for the earlier sections below:
    
    Section 2.1:
    - What field does the ECDSA algorithm value map to? I presume it is the 'alg'
    field (if present)? But should be made explicit. - It seems that the "should"
    in the 4th paragraph is normative (e.g. SHOULD) as it is needed for interoperability, and perhaps even a MUST as I'm not seeing negotiation or selection of curve choice.  So, if it is to be implicit, then a MUST would be more appropriate.
    [JLS] I have added text to section 1.3 (terminology) to describe the contents of the tables to make what the value is clearer.
[NCW] Thanks, that will help.
    
    [JLS] There is no need to negotiate the curve as this is implicit from the size of the signature.  That is P-256 is going to end up with two 256-bit values as the signature.  One implication is that only a single curve of any given length can be assigned to ECDSA, thus the effort to use the Ed25519 curve with ECDSA requires a different identifier so that there is no confusion on what curve is being used.  This means that the length of the hash algorithm is not part of this selection process.  It is therefore possible to use SHA-256 with P-521 and SHA-512 with P-256 (the hash value is truncated in this case).  The only issue is that if a piece of hardware supports the P-256 curve then it might only support SHA-256 and thus would not be able to validate a signature that uses SHA-512.  There is no special security issue here, this is just a recommendation for making things more likely to succeed. This is the reason that it is not a 'SHOULD' or 'MUST' but is an 'suggested'.  Does this both make things clearer and reduce the feeling on you part that a stronger statement is needed?
[NCW] Agree that there is no security issue, it was more of breaking interoperability.  I don't feel strongly either way, it was by the way it reads....if you want to ensure interoperability the it seems that stronger language would be needed (but that’s my personal bias).
    
    Section 2.2:
    - The rationaleThere may be some corner case in which there may be a very large
    (2K?) structure to be protected.  It would be better to quantify "extremely large" or perhaps another/additional rationale for the need to ONLY do Pure edDSA is the intent for constrained devices not have enough memory to compute the block updates.
    
    [JLS] I don't know that I would consider a 2K message to be very large, I would expect a firmware update to be at least that large.  The issue is that EdDSA needs to do two passes over the message, this means that the entire message needs to be held in memory.  That would be limitation on what I would consider to be "extremely large".  The presumption is that one is not going to try and create and stream the object out as this would also require a streaming processing on the recipient.  If streaming is removed from the equation then there is no benefit not to use Pure EdDSA.   This means that ones idea of large is going to be very device specific.  I will not be surprised if some firmware packages do indirect signing, but the manifest description is still going to need to fit in memory.
[NCW] 2Kbytes can seem very large to some IoT devices __.  But your point is well taken...sorry if I was too nit-picky....as for guidance I personally prefer to have quantification (ranges).
    
    Section 4.1.1:
    - GCM's limitation for one encryption string is 2^39-256 e.g. not "a single key"....so sufficiently large for COSE!  However, it does mean that the nonce MUST be unique for every encrypted message (e.g. the bullet before this one is correct).  I think the limit for one key using GCM is based on the size of the nonce as it must be unique.
    [JLS] You are going to make me look this up again.  However I think that this limit may end up being smaller with more modern analysis so going back and re--checking this is going to be worthwhile.  It just will take a few days.
[NCW] No worries, as an early adopter of GCM, I do recall that number being for a packet....
    
    Section 4.2:
    - 'k' is the key size in bits (I presume), would be good to describe that before the table.
    [JLS] I changed the title of the column to 'Key Length'
[NCW] Thanks.
    
    Editorial nits:
    Section 1.5
    - The second sentence is hard to parse.  Is it that the intermediate values used for debugging are represented in both a hex as well as a CBOR diagnostic notation format"? - Third sentence, is it that some examples were designed to fail (e.g. they are "failure test bases")?
    [JLS]  I have updated this section.  I think that this should solve your issues.
            <t>
              A GitHub project has been created at &lt;https://github.com/cose-wg/Examples&gt; that contains a set of testing examples as well. 
              Each example is found in a JSON file that contains the inputs used to create the example, some of the intermediate values that can be used for debugging, and the output of the example.
              The results are encoded using both hexadecimal and CBOR diagnostic notation format.
            </t>
            <t>
              Some of the examples are designed to test failure case; these are clearly marked as such in the JSON file. 
              If errors in the examples in this document are found, the examples on GitHub will be updated, and a note to that effect will be placed in the JSON file. 
            </t>
    [NCW] Thank you, I can parse this better.

    Section 2.2:
    - The rationale for why Pure EdDSA is used only (vs. HashEdDSA) may leave more room for questions; as there may be some corner case in which there may be a very large (2K?) structure to be protected.  For those that are in the healthcare sector (of IoT), I could see potential for large blocks and may wonder what qualifies as "extremely large".  RFC 8032 speaks to HashEdDSA as providing better collision resilience...so am inclined to suggest to either remove this rationale or be more complete in justification.
    [JLS] See above.
[NCW] OK
    
    Section 3.1
    - 3rd paragraph: "Some recipient algorithms carry the key while others derive a key from secret data"....I think you mean "Some algorithms are used to transmit a key, e.g. key wrapping."  "Carry the key", in this sentence leads me to imply it's the same key being used in the HMAC.
    [JLS]  This is the same key that is being used in the HMAC algorithm.  I have changed "carry" to "transport" because I think that is going to be clearer.
[NCW] Yes, indeed, that makes it better.