Re: [secdir] secdir review of cose-msg-18
Kathleen Moriarty <kathleen.moriarty.ietf@gmail.com> Wed, 21 September 2016 16:40 UTC
Return-Path: <kathleen.moriarty.ietf@gmail.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 EEA3112B593; Wed, 21 Sep 2016 09:40:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 TzE2YUse5lVD; Wed, 21 Sep 2016 09:40:42 -0700 (PDT)
Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6E88D12B5A5; Wed, 21 Sep 2016 09:40:42 -0700 (PDT)
Received: by mail-yw0-x22d.google.com with SMTP id i129so63058954ywb.0; Wed, 21 Sep 2016 09:40:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=h3TuU42hYxb6Bw0JcAVU+ZRO6EBLUQIWlrnky9SVv04=; b=zvP8ks466ycAKfCTpqvpXAz1TEffDwVIQC48AKzKqNU/29Q6uwNwR0V4Ajt3GsaMXh OkddsLkUv62rQI0ioQsFvNe1RjbuIAgpxRobytjJJzo5Na3ZcmoToGRE2IOiLD/kqsRW sKPDQd0UEzca+OtJNjs2EcnDeme+RTpepxm/8Pg4RkQ2eC5i58xCEnHk52OxawUWZ9AH OJoVeMbjJ2fQL3jEsrjmOV6lJJH8KSwsqTUOHYQ9gJ7yvda6fplbS/suxWsn6LxadiIi bPla896y/uT0MRTOvQZPy+90lEs6xK3ZncRC8DROBnmKzJPCEB9TtQ7ZGssNBWKOjHHR 9rOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=h3TuU42hYxb6Bw0JcAVU+ZRO6EBLUQIWlrnky9SVv04=; b=AlHgUVUr8Lj5NinZn7xkePBC9sTlTP9rG7DqKKRkMvX1o0BHD93WIfBHj3XmDX+veS xSn54sgVe2Wj0j2grJXZL9ceINESV2nJtBAU8H3McCF6130v5exvv4XSJquN7M0a5BMD PiM6GIWPl5Coyz4Rbnyaz2FcFpV0inFVg/CT3a6Xz0eekodWsYjQVrUgEdc9AEYXyEdH KVGr7f61fOxkGu3uX51u7W4rbXdLYd9YgBRjiYkX2fZRtDz/svujAANWe/X/sYLJAuGm BU8l6NofZnxC6yKJqIKEkpJFQV1nZe55bFpBnKIAmfViC0yIgBGmnox7LiITLj6deHNr ByFg==
X-Gm-Message-State: AE9vXwPc2yThdkIvE54li4irxffQEk3Nrhln/UZobluXFOYnGls7ctEOVm4MoI+b52dryP60cN07QoRNy8WKzQ==
X-Received: by 10.13.197.197 with SMTP id h188mr32544997ywd.202.1474476041389; Wed, 21 Sep 2016 09:40:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.176.65.8 with HTTP; Wed, 21 Sep 2016 09:40:40 -0700 (PDT)
In-Reply-To: <33a10112-ee91-75df-a390-1c7c2a23a729@bbn.com>
References: <33a10112-ee91-75df-a390-1c7c2a23a729@bbn.com>
From: Kathleen Moriarty <kathleen.moriarty.ietf@gmail.com>
Date: Wed, 21 Sep 2016 12:40:40 -0400
Message-ID: <CAHbuEH7qOxDgDaT=Q5u-bc+J5yR+=BT8uaP1dacTRH3NrifVdg@mail.gmail.com>
To: Stephen Kent <kent@bbn.com>, "iesg@ietf.org" <iesg@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/nYaTuS7yFS3i_9G57zPJsgi0GXM>
Cc: Jim Schaad <ietf@augustcellars.com>, Kepeng Li <kepeng.lkp@alibaba-inc.com>, Justin Richer <jricher@mit.edu>, secdir <secdir@ietf.org>
Subject: Re: [secdir] secdir review of cose-msg-18
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.17
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: Wed, 21 Sep 2016 16:40:45 -0000
Hi Steve, Thank you very much for your detailed review, it's helpful. I'll respond on the normative/informative question, the chairs and/or Jim should respond on your other questions as some (like removing text) may not be done as I believe it was WG consensus to have the content you mention in this draft. The nits are helpful too, so Jim will add those into the next revision. On Wed, Sep 21, 2016 at 10:26 AM, Stephen Kent <kent@bbn.com> wrote: > SECDIR review of draft-ietf-cose-msg-18 > > > > 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 with the intent of improving security requirements and > considerations in IETF drafts. Comments not addressed in last call may be > included in AD reviews during the IESG review. Document editors and WG > chairs should treat these comments just like any other last call comments. > > > > This document defines formats for signing and/or encryption of data encoded > using CBOR (RFC7049). The signing/encryption approach adopted here is based > on the standards developed in JOSE (RFCs 7515-18), since CBOR is based on > JSON. > > > > This is a large document: about 90 pages plus almost 30 pages of appendices > (providing useful examples). Close to half of the (non-appendix portion) > document is devoted to specifications for a set of algorithms for > encryption, signatures, message authentication, and key distribution. Only > when the reader reaches page 73 is it made clear that the algorithm > descriptions are not MTI; they define a set from which application > developers must (?) choose when creating a profile for COSE use in a > specific application context. Given the long-standing IETF policy to trying > to facilitate algorithm agility, > > I think it preferable to extract these descriptions and publish them as > separate RFCs, a practice often employed in documenting many other security > protocols (including JOSE, from which this work is based). > > > > > > The document begins with a brief explanation of how COSE differs from JOSE, > an excellent preface to the document. The cited design differences all seem > very appropriate for CBOR, e.g., using binary encoding instead of base64url, > shedding some of the odd constraints adopted in JOSE because of pre-existing > work in the area, and updating the list of algorithms. > > > > Since there is no standard grammar for CBOR, the author adopted the > primitive types defined in an I-D (draft-ietf- > greevenbosch-appsawg-cbor-cddl) to allow for a concise specification of COSE > formats. I recommend that this document be held for publication until that > I-D is approved. I also note that the cited I-D is Informational, but this > document is Standards Track. the cited I-D is listed as informative, but the > syntax it defines is used extensively throughout this document, thus I > believe it really is normative. The reference is fine as informative IMO as it is clearly stated in the draft in Section 1.3: "The CDDL grammar is informational, the prose description is normative." This is common and we've seen many drafts using UML descriptions and other formats similarly. Thank you, Kathleen > > > > > > Section 2 defines the basic COSE data structure. The description seems clear > and logical, but the list of message types is a bit puzzling (absent > information that is provided later, in Sections 4 and 5). For example, there > is a Single Signer data Object, and a Signed Data Object. If the latter > accommodates multiple signers, why not make that part of the name? The same > nomenclature confusion arises for encrypted objects directed to a single > recipient vs. multiple recipients. > > > > > > Section 3 Describes the header parameters. It provides generally good, > detailed descriptions of the common header elements and explains why certain > conventions are adopted. It clearly describes requirements imposed on > senders and recipients. > > > > > > Section 4 describes the objects used to convey one or more signatures for > objects. The description here is a bit confusing when it discusses one vs. > multiple signatures. The format that allows carriage of multiple signatures > does not necessarily imply that there are multiple signers, e.g., the > multiple signatures may be present to accommodate different algorithm > capabilities for different recipients. The introduction to 4.2 says: > > “The COSE_Sign1 signature structure is used when only one signer is > going to be placed on a message.” > > Perhaps it would be clearer to say that this structure is used when only one > signature is to be placed in a message. > > > > Overall this section is well written and provides useful details about how > to compute signatures and counter signatures. > > > > > > Section 5 describes the COSE encryption objects. I disagree with one choice > of terminology adopted here: “recipient algorithm classes” which is > described in 5.1.1. This is really a discussion of classes of key > distribution/management algorithms, focusing on how each recipient of an > encrypted message acquires the CEK used to decrypt the message. I’d prefer a > less obscure name for this sub-section. Otherwise this section is well > written and provide lots of useful details about how to encrypt and decrypt > messages for two classes of encryption algorithms. > > > > > > Section 6 describes the MAC objects. Here too there are two types of > structures, depending on whether a recipient implicitly knows what key to > use to verify the MAC, or whether an ID for one or more MAC keys must be > communicated. The text here closely parallels that of Section 5 and is very > good. > > > > > > Section 7 describes the COSE key structure. It is designed to accommodate > the data needed by a wide range of key distribution mechanisms and > encryption techniques. > > > > > > Section 8 defines two classes of signature algorithms that can be used with > COSE, specifies an algorithm of each type, and provides security guidance > for each algorithm. I think it would be preferable to remove the detailed > algorithm descriptions (Sections 8.1 and 8.2) and associated security > considerations (which are well written) from this document. The comments > below apply to sections 9, 10, 11 and 12. > > > > I have several concerns about including the algorithm (vs. algorithm class) > descriptions here. For many security protocols (and security-focused data > formats), we usually (though not always) specify mandatory and optional to > implement algorithms in separate documents, to facilitate algorithm agility. > I think we should follow that model for COSE. Also, the text here does not > mandate support for these algorithms; it merely provides details for a set > of algorithms that a sender and/or receive may choose to implement. One has > to read the final sentence of the opening paragraph of Section 15 to learn > that this is the intent, i.e., that selection of specific algorithms is > deferred to the each application that makes use of COSE. Given that later > statement, it appears that the algorithms specified in Sections 8-12 ate > intended to define the set from which application developer MUST choose, but > that too is not clearly stated. I think this makes it even more appropriate > to remove the detailed algorithm discussions from this document. > > > > Section 12 describes the “recipient algorithm classes” aka key > distribution/management methods. Most of this section is analogous to the > preceding sections (9-11) where specific algorithms are described for use > with COSE, and thus my comments about undue bundling of algorithms with a > protocol specs apply here too. I do not object to describing key transport, > key wrapping and key agreement methods in general, but the detailed specs in > 12.2.1, 12.4.1 and 12.5.1 seem inappropriate here, for the reasons noted > above. > > > > > > Section 13 describes parameters for key objects used by COSE. The specs here > are sufficiently generic that they do not suffer from the problems I noted > for Sections 8-12. > > > > > > Section 15 provides guidance for application developers making use of COSE. > This is where a reader finally discovers that the algorithms described in > Sections 8-12 are not MTI, and that each application is expected to specify > which algorithms are MTI in that context, to facilitate interoperability. > > > > Section 16 (IANA Considerations) describes the registries that need to be > created for COSE, and extensions to the CoAP registry to support COSE. It > seem to be well written and comprehensive. > > > > Section 18 (Security Considerations) is a good adjunct to the already > well-written security considerations discussions provided for the algorithms > in Sections 8-12. > > > > > > Typos and suggested rewording. > > > > Section 2: > > > > The COSE object structure is designed so that there can be a large amount of > common code when parsing and processing the different > > security messages. > > -> The COSE object structure is designed so that there can be a large > amount of common code when parsing and processing the different types of > security messages. > > > > COSE messages are also built using the concept of using layers to … > > -> COSE messages are built using the concept of layers to … > > > > Section 3: > > > > The integer and string values for labels has been divided … > > -> The integer and string values for labels have been divided … > > > > Applications SHOULD perform the same checks that the same label … > > -> Applications SHOULD verify that the same label … > > > > Applications should have a statement if the label can be omitted. > > -> Applications SHOULD (?) have a statement if the label can be omitted. > > > > Integers are from the "CoAP Content-Formats" IANA registry table. (no > reference) > > > > As the IV is authenticated by the encryption process, it can be placed in > the unprotected header bucket. (in general, an encryption process will not > “authenticate” an IV, but use of a modified IV will yield mangled plaintext, > which can be detected by an integrity check or a signature. the same comment > applies to the similar statement in the “partial IV” description.) > > > > > > Section 4: > > > > Edwards Digital Signature Algorithm (EdDSA) signature algorithm and with the > Elliptic Curve Digital Signature Algorithm (ECDSA) signature algorithm. > > -> Edwards Digital Signature Algorithm (EdDSA) (cite) and with the Elliptic > Curve Digital Signature Algorithm (ECDSA) (cite). > > > > One of the features supplied in the COSE document is the ability… > > -> One of the features offered by the COSE format is the ability … > > > > This algorithm takes in the body information … > > -> The signing and verification processes take in the body information … > > > > Counter signatures provide a method of having a different signature occur on > some piece of content. > > -> Counter signatures provide a method of associating different signatures > generated by different signers with some piece of content. > > > > > > Section 5 > > > > Other: The key is randomly generated. > > -> Other: The key is randomly or pseudo-randomly generated. > > > > > > Section 6 > > > > (This knowledge of sender assumes that there are only two parties involved > and you did not send the message yourself.) > > -> (This knowledge of sender assumes that there are only two parties > involved and you did not send the message to yourself.) > > > > > > Section 15: > > > > It is intended that a profile of this document be created that > > defines the interopability > > -> It is intended that a profile of this document be created that > > defines the interoperability -- Best regards, Kathleen
- [secdir] secdir review of cose-msg-18 Stephen Kent
- Re: [secdir] secdir review of cose-msg-18 Kathleen Moriarty
- Re: [secdir] secdir review of cose-msg-18 Justin Richer
- Re: [secdir] secdir review of cose-msg-18 Jim Schaad
- Re: [secdir] secdir review of cose-msg-18 Jim Schaad
- Re: [secdir] secdir review of cose-msg-18 Stephen Kent
- Re: [secdir] secdir review of cose-msg-18 Stephen Kent
- Re: [secdir] secdir review of cose-msg-18 Jim Schaad
- Re: [secdir] secdir review of cose-msg-18 Jim Schaad