Re: [Acme] [jose] [Json] Signed JSON document / Json Content Metaheader / JSON Container

Phillip Hallam-Baker <> Fri, 30 January 2015 00:47 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id C24201A88ED; Thu, 29 Jan 2015 16:47:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.277
X-Spam-Status: No, score=-1.277 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id uqhvZzGdNCBV; Thu, 29 Jan 2015 16:47:56 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4010:c04::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 862EA1A8889; Thu, 29 Jan 2015 16:47:54 -0800 (PST)
Received: by with SMTP id z12so33886624lbi.7; Thu, 29 Jan 2015 16:47:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=/gPIYPaFVa58uVQheWrmDtTSODqF+V8AVRjuKHzk9bY=; b=n7j2Xfuzvdqq4F6ig0ToZeZLxHZsj/i5GgCXpugNCpGz109Ur3S2sS+CmHO6bJrSgw B2kD3y8PzTp9eKaF+TWPZmcxE3GwseohfP0ED2RA51jKqFxlWsOmfzWBR+nN2a4kTJ+A /abLXMK5ZckAg3gMT0N1bHchSRnXFautBLYdRUaq+ogbJLKtf7nQpM2VTuWlIIfN/z7C OPZgoF98OMpowxNOdhopQHn9pqtdlfRLfCvx6hiZDuMjNAzHQ3aK3GH38g+LT+F8XU4K m9EjAO9xwVGv+hPX7GHgMNsjZs2Ge+3RHx1y/3Nu8SK6MLJh5guecaQS4pr69SXXpls4 gYQw==
MIME-Version: 1.0
X-Received: by with SMTP id xm1mr3987076lbb.5.1422578873048; Thu, 29 Jan 2015 16:47:53 -0800 (PST)
Received: by with HTTP; Thu, 29 Jan 2015 16:47:52 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <>
Date: Thu, 29 Jan 2015 19:47:52 -0500
X-Google-Sender-Auth: 0RuwJOL8aqSTy0pp7yAnM7uLVUQ
Message-ID: <>
From: Phillip Hallam-Baker <>
To: "Richer, Justin P." <>
Content-Type: multipart/alternative; boundary="001a11c3381864a53b050dd3f430"
Archived-At: <>
Cc: "" <>, Anders Rundgren <>, Nat Sakimura <>, "" <>, "Manger, James" <>, Fraser Tweedale <>
Subject: Re: [Acme] [jose] [Json] Signed JSON document / Json Content Metaheader / JSON Container
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Automated Certificate Management Environment <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 30 Jan 2015 00:47:58 -0000

On Thu, Jan 29, 2015 at 4:28 PM, Richer, Justin P. <>

>  I think you missed my point. I wasn't saying that I *liked*
> canonicalization and normalization but rather that you *need* either it or
> something *equivalent* in order to get the same set of bits out of either
> end. Like you, what I was saying was that you need *something* that makes
> your bit stream stable.

Sure but that does not need to be in the signature format. I would prefer
to simply tell people that they have to get this package from A to B with
absolutely no modifications or it won't work.

> I'm actually in favor of the JOSE approach, which is exactly to keep the
> original bits around by protecting them with Base64url over the network so
> that they don't get munched. As an implementor, this is fantastic, as it
> makes my code much simpler in terms of both generation and consumption.

I don't like that for the general case though as the main advantage of JSON
is that it is human readable and I can't translate back and forth between
Base64 in my head any more.

> I have the JSON objects where I need them and the raw streams where I need
> them, and I can easily keep them separated with a reasonable assumption
> about them not being confused with each other. For heaven's sake, don't do
> canonicalization. But at the same time, don't assume that a JSON blob is
> going to be kept pristine as a string by any JSON-processing system.

That is one of the reasons for insisting on a sharp division between 'that
which is signed' and 'the JSON bit'.

> So we're actually in violent agreement on this point. In my view, JOSE's
> approach of keeping the original bits around is the desirable one by far.

I thought you might intend something like that but its not what I think you
said and it gave me an opportunity to use the phrase steaming piles of
stupid :-)