Re: [secdir] secdir review of draft-ietf-jose-json-web-encryption-31

Mike Jones <Michael.Jones@microsoft.com> Tue, 23 September 2014 23:14 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F96B1A6F04; Tue, 23 Sep 2014 16:14:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 Ve3xBhelXZVc; Tue, 23 Sep 2014 16:14:07 -0700 (PDT)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0126.outbound.protection.outlook.com [65.55.169.126]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 827F21A024C; Tue, 23 Sep 2014 16:14:07 -0700 (PDT)
Received: from CO2PR03CA0046.namprd03.prod.outlook.com (10.141.194.173) by BLUPR03MB391.namprd03.prod.outlook.com (10.141.78.21) with Microsoft SMTP Server (TLS) id 15.0.1034.13; Tue, 23 Sep 2014 23:14:05 +0000
Received: from BN1BFFO11FD023.protection.gbl (2a01:111:f400:7c10::1:158) by CO2PR03CA0046.outlook.office365.com (2a01:111:e400:1414::45) with Microsoft SMTP Server (TLS) id 15.0.1034.13 via Frontend Transport; Tue, 23 Sep 2014 23:14:04 +0000
Received: from mail.microsoft.com (131.107.125.37) by BN1BFFO11FD023.mail.protection.outlook.com (10.58.144.86) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 23 Sep 2014 23:14:04 +0000
Received: from TK5EX14MBXC286.redmond.corp.microsoft.com ([169.254.1.23]) by TK5EX14MLTC102.redmond.corp.microsoft.com ([157.54.79.180]) with mapi id 14.03.0195.002; Tue, 23 Sep 2014 23:13:26 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Scott Kelly <scott@hyperthought.com>
Thread-Topic: secdir review of draft-ietf-jose-json-web-encryption-31
Thread-Index: AQHPxFQt46oyUhN9qUyAY7sezVzBjpvzIWwQgAKW0gCAGcYRgA==
Date: Tue, 23 Sep 2014 23:13:25 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739439BA6EFF7@TK5EX14MBXC286.redmond.corp.microsoft.com>
References: <3266E6F3-AB87-4B45-9C6F-A3B6976DBCEC@hyperthought.com> <4E1F6AAD24975D4BA5B16804296739439AE9D53F@TK5EX14MBXC292.redmond.corp.microsoft.com> <88AAAE10-880A-410A-A582-245FBB07E592@hyperthought.com>
In-Reply-To: <88AAAE10-880A-410A-A582-245FBB07E592@hyperthought.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.78]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(51704005)(24454002)(189002)(51914003)(13464003)(52604005)(69234005)(51444003)(377454003)(199003)(110136001)(19580395003)(83322001)(106116001)(92566001)(21056001)(2656002)(50986999)(76482002)(50466002)(83072002)(6806004)(79102003)(64706001)(107046002)(19580405001)(85852003)(77982003)(33656002)(20776003)(84676001)(92726001)(69596002)(74502003)(85306004)(74662003)(44976005)(23676002)(97736003)(90102001)(86362001)(81342003)(99396002)(54356999)(561944003)(81156004)(230783001)(76176999)(81542003)(15975445006)(104016003)(95666004)(86612001)(47776003)(68736004)(106466001)(55846006)(4396001)(80022003)(85806002)(46102003)(77096002)(66066001)(87936001)(15202345003)(31966008)(10300001)(120916001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB391; H:mail.microsoft.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en;
X-Microsoft-Antispam: UriScan:;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB391;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 0343AC1D30
Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 131.107.125.37 as permitted sender) receiver=protection.outlook.com; client-ip=131.107.125.37; helo=mail.microsoft.com;
Authentication-Results: spf=pass (sender IP is 131.107.125.37) smtp.mailfrom=Michael.Jones@microsoft.com;
X-OriginatorOrg: microsoft.onmicrosoft.com
Archived-At: http://mailarchive.ietf.org/arch/msg/secdir/rotuQuHivmJ5XjSTBj7J-HmE2mk
Cc: "draft-ietf-jose-json-web-encryption.all@tools.ietf.org" <draft-ietf-jose-json-web-encryption.all@tools.ietf.org>, "iesg@ietf.org" <iesg@ietf.org>, "jose@ietf.org" <jose@ietf.org>, "secdir@ietf.org" <secdir@ietf.org>
Subject: Re: [secdir] secdir review of draft-ietf-jose-json-web-encryption-31
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Tue, 23 Sep 2014 23:14:11 -0000

Thanks again for your review, Scott.  The resolutions discussed below have been applied in the -32 draft, except for the proposal to use more normative references in the Security Considerations section, which Jim Schaad disagreed with.

				-- Mike

-----Original Message-----
From: Scott Kelly [mailto:scott@hyperthought.com] 
Sent: Sunday, September 07, 2014 6:35 AM
To: Mike Jones
Cc: secdir@ietf.org; draft-ietf-jose-json-web-encryption.all@tools.ietf.org; iesg@ietf.org; jose@ietf.org
Subject: Re: secdir review of draft-ietf-jose-json-web-encryption-31

Hi Mike,

Responses inline below…

On Sep 5, 2014, at 4:13 PM, Mike Jones <Michael.Jones@microsoft.com> wrote:

> Thanks for the useful review, Scott.  I’ve cc’ed the working group in my reply so that they’re aware of the contents of your review.  Jim Schaad – also please see questions to you below.  Replies are inline below…
>  
> -----Original Message-----
> From: Scott Kelly [mailto:scott@hyperthought.com] 
> Sent: Saturday, August 30, 2014 6:13 AM
> To: secdir@ietf.org; draft-ietf-jose-json-web-encryption.all@tools.ietf.org; iesg@ietf.org
> Subject: secdir review of draft-ietf-jose-json-web-encryption-31
>  
> 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.
>  
> From the abstract, JSON Web Encryption (JWE) represents encrypted content using JavaScript Object Notation (JSON) based data structures. A little like CMS for web transactions.
>  
> The security considerations section begins
>  
>    "All of the security issues that are pertinent to any cryptographic
>    application must be addressed by JWS/JWE/JWK agents.  Among these
>    issues are protecting the user's asymmetric private and symmetric
>    secret keys, preventing various attacks, and helping avoid mistakes
>    such as inadvertently encrypting a message to the wrong recipient.
>    The entire list of security considerations is beyond the scope of
>    this document, but some significant considerations are listed here."
>  
>   "All the security considerations in the JWS specification also apply
>    to this specification.  Likewise, all the security considerations in
>    XML Encryption 1.1 [W3C.REC-xmlenc-core1-20130411] also apply, other
>    than those that are XML specific."
>  
> If you are going to point to the JWS specification, you should use a normative reference. It's fine to point at other references to avoid re-stating the obvious, but all security considerations *are* within scope, and require coverage, either directly or by reference. I haven't reviewed the referenced W3C spec, so I'm not sure that everything has been covered. The JWS security considerations section only talks about crypto algs and server identity verification. So, the ADs will want to pay attention here.
>  
> We plan to remove the sentence “The entire list of security considerations is beyond the scope of this document, but some significant considerations are listed here” since several reviewers have taken exception to it.
>  
> I’m a bit confused by your comment about normative references, because the JWS reference already is normative.

I started by reading the security considerations, and that comment was triggered by the fact that it says “the JWS specification” rather than [JWS]. This is a nit, not sure its important so long as you do already have the reference.

>  
> Jim Schaad, etc., do you agree that the XMLENC reference should become normative?  I’d though that earlier you’d advised me that security considerations references should be informative.

See https://www.ietf.org/iesg/statement/normative-informative.html, where it says

   "Within an RFC, references to other documents fall into two general 
    categories: "normative" and "informative". Normative references specify
    documents that must be read to understand or implement the technology 
    in the new RFC, or whose technology must be present for the technology
    in the new RFC to work. An informative reference is not normative; 
    rather, it only provides additional information. For example, an 
    informative reference might provide background or historical information.
    Informative references are not required to implement the technology in 
    the RFC."

If what is being described are security *requirements*, then I think the reference should be normative.


>  
> FYI, as part of addressing Russ Housley’s comments on the Security Considerations section, I do expect to explicitly reference a number of security considerations called out in XMLENC, such as the text on chosen-ciphertext attacks, backwards compatibility attacks, etc.
>  
> In section 5.1 (Message Encryption), step 16 says "Encrypt M..." without ever defining M. One might guess it stands for Message, but this should be stated.
>  
> Agreed
>  
> Section 8 (TLS Requirements) points at JWS, but neither document references the channel binding problem. If you are depending on TLS to provide essential and necessary security features (which, presumably, you are since TLS is a MUST), then you should give clear guidance as to how to effectively use it. JWS requires combined confidentiality and integrity protection, and also requires server identity verification per RFC6125, but does not mention channel binding.
>  
> Scott, is there text on the channel binding problem in another specification that you’d recommend that we reference or use?  If not, would you mind supplying proposed text for us to use?

RFC5056 covers channel bindings, and RFC5929 covers channel bindings for TLS. My comment is related to the requirement for TLS, which is described in the JWS document. Note that I didn’t say channel bindings are definitely a problem here, only that I’m surprised they are not mentioned.

Whether or not channel bindings need to be addressed depends on the threats you intend to address. Some of my other comments were intended to indicate that the scope of threats/protections are not explicit in this draft, and after a quick scan of JWS, they still were not clear to me. Any ADs reading all the drafts will have information/context I lack, so the comment was intended as a heads up.

>  
> Section 11.1 (Using Matching Algorithm Strengths) says
>  
>   "Algorithms of matching strengths should be used together whenever
>    possible.  For instance, when AES Key Wrap is used with a given key
>    size, using the same key size is recommended when AES GCM is also
>    used."
>  
> This doesn't quite scan for me, but editorial nits aside, it might be good to say greater or equal key sizes should be used for wrapping.
>  
> The “matching strengths” guidance came from Eric Rescorla and I believe was supported by then-Security AD Sean Turner.  It’s not clear to me that the ≥ language is better than what’s there now, in part because if the strengths don’t match, it’s not clear to me which way the inequality should go.

Ruling out the use of stronger keys for wrapping seems non-intuitive to me, but your point illustrates that this may introduce additional security considerations. Personally, I like the language in the security considerations section of RFC5652:

   "When using key-agreement algorithms or previously distributed
   symmetric key-encryption keys, a key-encryption key is used to
   encrypt the content-encryption key.  If the key-encryption and
   content-encryption algorithms are different, the effective security
   is determined by the weaker of the two algorithms.  If, for example,
   content is encrypted with Triple-DES using a 168-bit Triple-DES
   content-encryption key, and the content-encryption key is wrapped
   with RC2 using a 40-bit RC2 key-encryption key, then at most 40 bits
   of protection is provided.  A trivial search to determine the value
   of the 40-bit RC2 key can recover the Triple-DES key, and then the
   Triple-DES key can be used to decrypt the content.  Therefore,
   implementers must ensure that key-encryption algorithms are as strong
   or stronger than content-encryption algorithms.”

>  And you might want to point to RFC3766 for BCPs when using public keys.
>  
> The RFC 3766 reference looks like a good one.  Thanks for providing it.
>  
> Section 11.2 introduces the term "key tainting". "Strict key management/usage policy" might be better understood. Also, it might be valuable to use SHOULD here.
>  
> Jim Schaad, you suggested using the term “key tainting”.  Is there a place where this term is defined, which we could reference?
>  
> Also, Jim, I believe in our in-person discussions of issue #70 (Review of 2119 Language) you’d suggested that we use 2119 keywords in the Security Considerations statements.  Am I remembering that right, or would you prefer that the Security Considerations sections use 2119 language?
>  
> I was surprised not to see any mention of the lack of replay protection. TLS channel binding could presumably be leveraged for this purpose, but in any event, the fact that JWEs can be replayed should be mentioned.
>  
> It’s not clear to me that being able to decrypt an encrypted object multiple times if you hold the correct key constitutes an attack, any more than being able to check a signature multiple times does.

One example: once a symmetric key is compromised (wrapping or wrapped key), the bad actor who holds that key can impersonate the server and provide the wrapped key to the target client. This is one of the threats you may be intending to mitigate with TLS, but based on my reading, that is not clear to me. And I think that to fully leverage TLS for this purpose, you must address the channel bindings problem.
 
(I think you allude to this in the next paragraph of your reply, but it seems less confusing to insert this comment here)

> I agree with you that some higher-level objects that may use JWE (or JWS) may want replay protection.  For instance,http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-25#section-4.1.7 describes a means of replay protection for JWTs.  At most, if we mention replay protection, I would propose that we say that some applications using JWE encryption may choose to incorporate replay protection mechanisms, such as by including IDs in the protected content that change with each application-level usage.  Would that work for you Scott, or is there something else you had in mind?
>  
> As always, if you can supply specific proposed language to address your concern, that would probably be the clearest statement of what you’d like to see.
>  
> I would suggest that the authors read the security considerations in rfc5652; most of the same concerns apply here, and you could almost cut/paste from there to here.
>  
> Thanks.  I expect to reference some of these as well when addressing Russ Housley’s gen-art review comments of JWS.
>  
> For the ADs: I'm not sure if one of the companion documents provides a comprehensive threat model, but you will want to pay attention here. This doc does not.
>  
> Each doc tries to list security considerations specific to that document and where they span documents, they are described in one and referenced in others.
>  
>                                                                 Thanks again, Scott,
>                                                                 -- Mike

One more comment related to security considerations, comprehensive threat model, etc.: RFC3552 gives a roadmap for security considerations. Your family of documents should cover that roadmap. I understand that you don’t want to repeat things in every document, but the ADs will have to ensure that, however you approach it, everything is covered. That was my point.

—Scott