Re: [jose] Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)

"Jim Schaad" <> Fri, 03 October 2014 04:34 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id A74D31ACFE7; Thu, 2 Oct 2014 21:34:41 -0700 (PDT)
X-Quarantine-ID: <Bx2pxdVyCHlq>
X-Virus-Scanned: amavisd-new at
X-Amavis-Alert: BANNED, message contains text/plain,.exe
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Bx2pxdVyCHlq; Thu, 2 Oct 2014 21:34:38 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id AC9431ACFDB; Thu, 2 Oct 2014 21:34:38 -0700 (PDT)
Received: from Philemon ( []) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id C21012CA2D; Thu, 2 Oct 2014 21:34:37 -0700 (PDT)
From: Jim Schaad <>
To: 'Richard Barnes' <>
References: <> <10d801cfde6e$4b109320$e131b960$> <>
In-Reply-To: <>
Date: Thu, 02 Oct 2014 21:32:07 -0700
Message-ID: <119f01cfdec2$fe29d5d0$fa7d8170$>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_11A0_01CFDE88.51CC3650"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQGjQ12FeR3xatkx2kc1agM8tSjaEwL34+kKAZk8igicUnYEkA==
Content-Language: en-us
Cc:, 'The IESG' <>,,
Subject: Re: [jose] Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Javascript Object Signing and Encryption <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 03 Oct 2014 04:34:41 -0000



From: Richard Barnes [] 
Sent: Thursday, October 02, 2014 11:38 AM
To: Jim Schaad
Cc: The IESG;;;
Subject: Re: Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)




On Thu, Oct 2, 2014 at 2:25 PM, Jim Schaad <> wrote:

-----Original Message-----
From: Richard Barnes []
Sent: Wednesday, October 01, 2014 9:22 PM
To: The IESG
Subject: Richard Barnes' Discuss on draft-ietf-jose-json-web-signature-33: (with DISCUSS and COMMENT)

Richard Barnes has entered the following ballot position for
draft-ietf-jose-json-web-signature-33: Discuss

When responding, please keep the subject line intact and reply to all email addresses included in the To and CC lines. (Feel free to cut this introductory paragraph, however.)

Please refer to
for more information about IESG DISCUSS and COMMENT positions.

The document, along with other ballot positions, can be found here:


Overall, this document is in much more solid shape than when it began.
Thanks to the WG for a lot of hard work.  I only have two remaining concerns, which should hopefully be easy to address.

Section 7.2.
I've had several implementors trying to use JWS in the JSON serialization ask why it was necessary to include a "signatures" array in cases where there's only one signer.  It seems like this is going to be a major barrier to deployment and re-use, so I would propose including the following text:

In cases where the JWS has been signed by only a single signer, the "signatures" array will contain a single object.  In such cases, the elements of the single "signatures" object MAY be included at the top level of the JWS object.  A JSON-formatted JWS that contains a "signatures" field MUST NOT contain a "protected", "header", or "signature" field, and vice versa.

This may also require some other changes where "signatures" is relied on, e.g., in Section 9 of the JWE spec.

Section 6.
These Header Parameters MUST be integrity protected if the information that they convey is to be utilized in a trust decision.
This smells really fishy to me.  What's your attack scenario?  I'm pretty certain that there's no way any of these fields can be altered in such a way that (1) the signature will validate, and (2) the recipient will accept a key it shouldn't.  By way of contrast, CMS doesn't sign the certificate fields, and the Certificate payload in TLS is only signed as a side effect of the protocol's verification that the remote end has been the same through the whole handshake (which doesn't apply here).

[JLS] There were a couple of attacks that were created for CMS based on using the SKI as the identifier in CMS.  There now exists a signed attribute for CMS to deal with this problem.   IMO the pointer the certificate probably should be a required signing field in CMS




[JLS} – RFC 2634 section 5 contains descriptions of attacks where a certificate can have different policy and usage information because it has been re-issued or just has the same SKI value.



Section 2.
In the definition of "Unsecured JWS", it would be good to note that this requires "alg" == "none".

Section 3.3.
Why doesn't this section have a JSON-encoded form as well?

Appendix A.5.
I would prefer if this example could be removed.  JWT is the only use case for Unsecured JWS right now, and there's already an example in that document.

Thanks for Appendix C.  FWIW, it has been implemented: