Re: [jose] draft-ietf-jose-json-web-signature ; flattened serialization

Mike Jones <> Wed, 29 October 2014 04:26 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 694B01A6F63 for <>; Tue, 28 Oct 2014 21:26:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.902
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id I82WyrsnvCP8 for <>; Tue, 28 Oct 2014 21:26:07 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id DDB851A6F5A for <>; Tue, 28 Oct 2014 21:26:06 -0700 (PDT)
Received: from ( by ( with Microsoft SMTP Server (TLS) id; Wed, 29 Oct 2014 04:26:05 +0000
Received: from (2a01:111:f400:7c10::156) by (2a01:111:e400:4000::15) with Microsoft SMTP Server (TLS) id via Frontend Transport; Wed, 29 Oct 2014 04:26:04 +0000
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.1049.20 via Frontend Transport; Wed, 29 Oct 2014 04:26:04 +0000
Received: from ([]) by ([]) with mapi id 14.03.0210.003; Wed, 29 Oct 2014 04:25:33 +0000
From: Mike Jones <>
To: Fraser Tweedale <>, "" <>, "" <>
Thread-Topic: draft-ietf-jose-json-web-signature ; flattened serialization
Thread-Index: AQHP8y5fIRbO5Va9Y0STZ0rwvdUYypxGeatg
Date: Wed, 29 Oct 2014 04:25:32 +0000
Message-ID: <>
References: <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
x-originating-ip: []
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:; CTRY:US; IPV:CAL; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(199003)(377454003)(189002)(13464003)(106116001)(66066001)(19580395003)(15975445006)(95666004)(85806002)(2201001)(97736003)(46102003)(86612001)(87936001)(15202345003)(107046002)(69596002)(44976005)(19580405001)(81156004)(84676001)(106466001)(68736004)(50466002)(120916001)(85852003)(50986999)(92726001)(6806004)(92566001)(4396001)(21056001)(33656002)(46406003)(80022003)(2656002)(99396003)(31966008)(230783001)(64706001)(76176999)(47776003)(85306004)(20776003)(76482002)(55846006)(104016003)(26826002)(97756001)(86362001)(77096002)(23726002)(54356999)(2501002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1208;; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-Microsoft-Antispam: UriScan:;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1208;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 03793408BA
Received-SPF: Pass ( domain of designates as permitted sender); client-ip=;;
Authentication-Results: spf=pass (sender IP is;
Cc: Richard Barnes <>
Subject: Re: [jose] draft-ietf-jose-json-web-signature ; flattened serialization
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: Wed, 29 Oct 2014 04:26:09 -0000

Thank you for your feedback, Fraser.  It would be useful to hear from others who have implemented the JSON Serializations whether they agree with Fraser or Richard.

				-- Mike

P.S.  The list you sent it to reached the editors and chairs.  The list reaches the whole JOSE working group.

-----Original Message-----
From: Fraser Tweedale [] 
Sent: Tuesday, October 28, 2014 9:11 PM
Subject: draft-ietf-jose-json-web-signature ; flattened serialization


(I am not familiar with IETF WG processes so I hope I am communicating in a useful way and in the right place.)

JWS draft 36 adds a "flattened JWS syntax" for the case where there is a single signature.  A similar change was made for JWE in the single recipient case.

Richard Barnes proposed these changes on the following basis:

    ``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.''

I am the author of a Haskell JOSE library
( and object to these changes on the following bases:

- They add substantial complexity to the parsing of JWS and JWE
  objects (which is already complex).

- The nature of the "optimisation" for the single-signature case is
  unclear.  If the optimisation is for compactness, this is obviated
  by "7.2. JWE JSON Serialization" which states ``This
  representation is neither optimized for compactness nor
  URL-safe.''  If the optimisation is for simplicity, it is a false

- The fact that implementors were asking about this part of the spec
  does not imply an impediment to deployment and re-use.  (Perhaps
  comments to this effect were in fact made, but as written the
  justification is speculative.)

The wish for a "simpler" serialization for a common use case is understandable, but this is a case of "be careful what you wish for".  Commentary to the effect of "the signatures array is used even when there is a single signature/recipient to keep parsing as simple as possible" would give implementors the answer to this question and relieve them of the additional complexity required to support the Flattened Serialization in addition to the General Serialization.

Please consider reverting this recent change to the specification.


Fraser Tweedale