Re: [jose] Stephen Farrell's Discuss on draft-ietf-jose-jws-signing-input-options-08: (with DISCUSS and COMMENT)

Vladimir Dzhuvinov <> Sun, 20 December 2015 16:13 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 5B7D51B2E6E; Sun, 20 Dec 2015 08:13:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id plyDKc5BuiCm; Sun, 20 Dec 2015 08:13:45 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id DF6201B2E6B; Sun, 20 Dec 2015 08:13:44 -0800 (PST)
Received: from [] ([]) by with id vsDg1r00315ZTut01sDhvn; Sun, 20 Dec 2015 09:13:44 -0700
To: Justin Richer <>, Matt Miller <>
References: <> <> <> <> <> <> <> <> <> <>
From: Vladimir Dzhuvinov <>
X-Enigmail-Draft-Status: N1110
Organization: Connect2id Ltd.
Message-ID: <>
Date: Sun, 20 Dec 2015 18:13:39 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms030706060108060706020607"
Archived-At: <>
X-Mailman-Approved-At: Sun, 20 Dec 2015 10:37:16 -0800
Cc: "" <>, Jim Schaad <>, Mike Jones <>, Kathleen Moriarty <>, The IESG <>, "" <>, John Bradley <>, Stephen Farrell <>, "" <>
Subject: Re: [jose] Stephen Farrell's Discuss on draft-ietf-jose-jws-signing-input-options-08: (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: Sun, 20 Dec 2015 16:13:49 -0000

I read the entire discussion and my opinion is that "b64" must be
explicitly stated as a critical parameter in "crit".

Here is what JWS (RFC 7515), the parent spec of
draft-ietf-jose-jws-signing-input-options, says about "crit":

   The "crit" (critical) Header Parameter indicates that extensions to
   this specification and/or [JWA <>] are being used that MUST be
   understood and processed.  Its value is an array listing the Header
   Parameter names present in the JOSE Header that use those extensions.

Not marking "b64" as a critical parameter breaks the general contract of
the JWS framework. Signing input options is an extension, and
understanding "b64":false is critical to processing the JWS correctly.

There is an argument that parties will have to understand "b64":false
anyhow in order to participate. But if we follow this line of thought,
then one could also argue that "b64":false in itself is redundant. I
don't think we should be setting such a precedent here with a spec that
inherits from base JWS. I mean a precedent for future JWS extensions.

Another argument for "crit":

I help maintain one of the libraries for JOSE. Developers often reuse
code, or put existing code to uses that weren't originally intended.
Also, because of tight schedules and other pressures, security
considerations are not always given their proper due. Because base JWS
is already mainstream, and signing input options isn't yet, I imagine a
lot of developers will take existing code and try to apply it for
signing-input options. Having "b64" marked as "crit" will make it easier
to trigger the correct behaviour for an extension such as this one, and
not lead to other unexpected exceptions if unencoded payloads are fed by
mistake into a verifier where such are not expected. Having said that, I
also suspect there are libraries which don't observe "crit" at all, so
this is another argument for insisting on its usage.

Finally, I think section 8 - Security considerations - will become a lot
simpler and straightforward if "crit" is used.



On 17/12/15 19:42, Justin Richer wrote:
> I prefer Jame’s proposal as well.
>  — Justin
>> On Dec 17, 2015, at 12:19 PM, Matt Miller (mamille2) <> wrote:
>> I prefer James' proposed text.  I believe this draft came about primarily because there are use cases where the content to sign is large enough that the burden of base64url encoding is too great.  By that measure, I'm not sure how worthwhile size-of-header arguments are, as content so large that base64url might be prohibitive would dwarf the concerns around header size.  I think the risk of bad verifies outweighs the reduced-headher-size benefits.
>> --
>> - m&m
>> Matt Miller
>> Cisco Systems, Inc.
>>> On Dec 17, 2015, at 08:39, Kathleen Moriarty <> wrote:
>>> On Thu, Dec 17, 2015 at 9:32 AM, John Bradley <> wrote:
>>>> Sorry I just recounted, it is a extra 20 bytes per message with the encoded header and not 6.
>>>> That is a bit more but probably not worth dying over.   I still prefer the smaller option.
>>> If we could get to a consensus on this and which text is preferred,
>>> that would be helpful.
>>> Thanks!
>>> Kathleen
>>>> John B.
>>>>> On Dec 17, 2015, at 3:04 PM, John Bradley <> wrote:
>>>>> I prefer making crit only required if the producer is not certain that all potential recipients understand/the extension.
>>>>> However it would not be the end of the world for me from a size perspective if crit was always required.  Trading 6 octets for saving 1/4 of the body size is not a bad trade off.
>>>>> The issue for me is more always requiring something to be sent that is known to not be used.
>>>>> So I am on the not forcing crit side but could live with the consensus if it goes the other way.
>>>>> John B.
>>>>>> On Dec 17, 2015, at 2:48 PM, Stephen Farrell <> wrote:
>>>>>> Great. For completeness, the alternative proposed by James Manger
>>>>>> (which I'd also prefer) was:
>>>>>> The "crit" Header Parameter MUST be included with "b64" in its set
>>>>>> of values to ensure the JWS is rejected (instead of being
>>>>>> misinterpreted) by implementations that do not understand this
>>>>>> specification.
>>>>>> My discuss then is asking if, after all this discussion, the WG
>>>>>> prefer the above or that below. I'll take the WG chairs word on what
>>>>>> they conclude as the outcome.
>>>>>> S.
>>>>>> On 17/12/15 13:44, Mike Jones wrote:
>>>>>>> Sure, I'm obviously fine asking the working group what they think of the new text.  Working group - this new text at is:
>>>>>>> 6.  Using "crit" with "b64"
>>>>>>> If a JWS using "b64" with a value of "false" might be processed by
>>>>>>> implementations not implementing this extension, then the "crit"
>>>>>>> Header Parameter MUST be included with "b64" in its set of values to
>>>>>>> cause such implementations to reject the JWS.  Conversely, if used in
>>>>>>> environments in which all participants implement this extension, then
>>>>>>> "crit" need not be included, since its inclusion would have no
>>>>>>> effect, other than increasing the JWS size and processing costs.
>>>>>>>                          Thanks all,
>>>>>>>                          -- Mike
>>>>>>>> -----Original Message-----
>>>>>>>> From: Stephen Farrell []
>>>>>>>> Sent: Thursday, December 17, 2015 2:32 PM
>>>>>>>> To: Mike Jones <>om>; The IESG <>
>>>>>>>> Cc:;; draft-ietf-jose-jws-signing-
>>>>>>>> Subject: Re: Stephen Farrell's Discuss on draft-ietf-jose-jws-signing-input-
>>>>>>>> options-08: (with DISCUSS and COMMENT)
>>>>>>>> Hiya,
>>>>>>>> On 17/12/15 13:20, Mike Jones wrote:
>>>>>>>>> Thanks for your review, Stephen.  Replies inline below...
>>>>>>>>>> -----Original Message----- From: Stephen Farrell
>>>>>>>>>> [] Sent: Thursday, December 17,
>>>>>>>>>> 2015 12:20 PM To: The IESG <> Cc:
>>>>>>>>>>; Mike Jones
>>>>>>>>>> <>om>; Jim Schaad <>om>;
>>>>>>>>>>;; Subject:
>>>>>>>>>> Stephen Farrell's Discuss on draft-ietf-jose-jws-signing-input-
>>>>>>>>>> options-08: (with DISCUSS and COMMENT)
>>>>>>>>>> Stephen Farrell has entered the following ballot position for
>>>>>>>>>> draft-ietf-jose-jws-signing-input-options-08: 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:
>>>>>>>>>> tions/
>>>>>>>> ----------------------------------------------------------------------
>>>>>>>>>> DISCUSS:
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> -
>>>>>>>> The "crit" point raised in the gen-art review and maybe elsewhere is I think
>>>>>>>>>> correct but I don't think section 6 of -08 is a good resolution of
>>>>>>>>>> this topic. However, I'll clear if this is the WG consensus but it's
>>>>>>>>>> hard to know that's the case for text just added yesterday. To
>>>>>>>>>> resolve this discuss we just need to see what the WG list says about
>>>>>>>>>> the new text.
>>>>>>>>> Jim's shepherd write-up at
>>>>>>>>> ions/shepherdwriteup/ records the working group's desire to not
>>>>>>>>> require the use of "crit"
>>>>>>>>> when it isn't needed.  He wrote:
>>>>>>>>> "(6)  The fact that there are two different versions of encoding that
>>>>>>>>> produce the same text string for signing is worrisome to me.  The WG
>>>>>>>>> had the ability to address this when producing the JWS specification
>>>>>>>>> and decided not to do so that time.  In this document, the desire to
>>>>>>>>> allow for things to be smaller has lead to the fact that the b64 and
>>>>>>>>> crit headers can be omitted as being implicit.  This was the desire of
>>>>>>>>> the WG, but I personally feel that it is the wrong decision."
>>>>>>>> Fair enough, so the chair/shepherd, gen-art reviewer and seems like a few
>>>>>>>> IESG members all find the current position unconvincing as does the one
>>>>>>>> implementer who posted to the WG list since the new text was added.
>>>>>>>> Wouldn't you agree there's enough there to justify asking the WG once more
>>>>>>>> what they think about that 13 byte overhead to prevent interop and maybe
>>>>>>>> even security problems?
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> -
>>>>>>>> COMMENT:
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> -
>>>>>>>> - abstract: the description of the update to 7519 is odd. It seems to be saying
>>>>>>>>>> "Here we define a thing. This specification updates 7519 to say you
>>>>>>>>>> must not use this thing." but prohibiting is an odd verb to use
>>>>>>>>>> there. (Since it wasn't previously there to be allowed or not.)
>>>>>>>>> Would you like this text better?
>>>>>>>>> "This specification updates RFC 7519 by stating that JSON Web Tokens
>>>>>>>>> (JWTs) MUST NOT use the unencoded payload option defined by this
>>>>>>>>> specification."
>>>>>>>> Better yep. Thanks.
>>>>>>>>> Or do you think this spec doesn't need to have the "Updates 7519"
>>>>>>>>> clause at all?  People seemed split on whether this was needed or not.
>>>>>>>> Happens all the time. Personally I mostly don't care about updates which is
>>>>>>>> the case this time too:-)
>>>>>>>>>> - section 6: "It is intended that application profiles specify up
>>>>>>>>>> front whether" "intended" is very wishy washy and "up front" makes no
>>>>>>>>>> sense at all.
>>>>>>>>> How about this wording change? "It is intended that application
>>>>>>>>> profiles specify up front whether" -> "Application profiles should
>>>>>>>>> specify whether"
>>>>>>>> Also better,
>>>>>>>> Ta,
>>>>>>>> S.
>>>>>>>>> Thanks again, -- Mike
>>>>>>> _______________________________________________
>>>>>>> jose mailing list
>>>>>> _______________________________________________
>>>>>> jose mailing list
>>> --
>>> Best regards,
>>> Kathleen
>> _______________________________________________
>> jose mailing list
> _______________________________________________
> jose mailing list

Vladimir Dzhuvinov ::