Re: [jose] Canonical JSON form

David Waite <david@alkaline-solutions.com> Mon, 22 October 2018 02:47 UTC

Return-Path: <david@alkaline-solutions.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3FFBA130DC3 for <jose@ietfa.amsl.com>; Sun, 21 Oct 2018 19:47:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.435
X-Spam-Level: *
X-Spam-Status: No, score=1.435 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_SBL_CSS=3.335, SPF_PASS=-0.001] autolearn=no autolearn_force=no
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 HfwhfDcOrI8c for <jose@ietfa.amsl.com>; Sun, 21 Oct 2018 19:47:04 -0700 (PDT)
Received: from alkaline-solutions.com (lithium5.alkaline-solutions.com [IPv6:2600:3c00::f03c:91ff:fe93:6974]) by ietfa.amsl.com (Postfix) with ESMTP id CCBDE12F1AC for <jose@ietf.org>; Sun, 21 Oct 2018 19:47:04 -0700 (PDT)
Received: from [IPv6:2601:282:202:b210:4179:bfa3:f068:e354] (unknown [IPv6:2601:282:202:b210:4179:bfa3:f068:e354]) by alkaline-solutions.com (Postfix) with ESMTPSA id C60B8315EC; Mon, 22 Oct 2018 02:47:02 +0000 (UTC)
From: David Waite <david@alkaline-solutions.com>
Message-Id: <FE6C1732-D16A-4D97-99F4-1350AF23A748@alkaline-solutions.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_F1BE2A4F-7738-4F90-AB91-21D42B34D033"
Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.100.43\))
Date: Sun, 21 Oct 2018 20:47:01 -0600
In-Reply-To: <3b6a338b-5588-deb2-9a9c-23e0cc24a2f1@gmail.com>
Cc: Bret Jordan <jordan.ietf@gmail.com>, Carsten Bormann <cabo@tzi.org>, "Manger, James" <James.H.Manger@team.telstra.com>, Kathleen Moriarty <kathleen.moriarty.ietf@gmail.com>, jose@ietf.org, Phil Hunt <phil.hunt@oracle.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
References: <12DD2F97-80C3-4606-9C6B-03F7A4BF19DE@gmail.com> <D21F3A95-0085-4DB7-A882-3496CC091B34@gmail.com> <CAOASepM=hB_k7Syqw4+b7L2vd6E_J0DSAAW0mHYdLExBZ6VBuw@mail.gmail.com> <00ad01d460f4$69ae8a00$3d0b9e00$@augustcellars.com> <8436AEE7-B25A-4538-B8F6-16D558D9A504@gmail.com> <MEAPR01MB35428606C09BF315DE04CC79E5E10@MEAPR01MB3542.ausprd01.prod.outlook.com> <CAHbuEH6DCD7Zc+PK3TnCBkKv1esnROwyCcDb8ZR+TKwgQQ+yXQ@mail.gmail.com> <0E6BD488-74D5-4640-BC31-5E45B0531AFC@gmail.com> <CAHbuEH5oH-Km6uAjrSr0pEHswFBLuDpfVweQ+gpj472yk+8iTQ@mail.gmail.com> <073CB50F-8D91-4EF6-90BE-FC897D557AA6@oracle.com> <A37D69B1-6B77-4E11-8BB9-A0209C77752C@tzi.org> <45bf6c0f-e510-4afc-4277-bdd486a8ce8c@gmail.com> <213796DB-D875-46B0-9F3C-1A56F9E154BA@gmail.com> <ff1dcd4e-2bf4-b85b-dde3-2cc8fe29fb17@gmail.com> <447AB837-7208-4A96-91CC-89D30A2734FA@gmail.com> <24cc6bb7-ea40-1a9c-8847-8d6c74131587@gmail.com> <92B9F9AF-BBCA-472D-9155-935F695CE7CE@gmail.com> <3b6a338b-5588-deb2-9a9c-23e0cc24a2f1@gmail.com>
X-Mailer: Apple Mail (2.3445.100.43)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/BT8MqApzJ9JylMeC06sfoTyNpWY>
Subject: Re: [jose] Canonical JSON form
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Oct 2018 02:47:06 -0000


> On Oct 19, 2018, at 10:55 PM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> 
> There is also a (very active) W3C community group working with a similar concept so clear-text signatures based on JSON canonicalization will probably reach the market regardless of IETF's position on the matter: https://w3c-dvcg.github.io/ld-signatures/
> 

This document is not on a standards track. The group which published this it is not a standards group. So this isn’t currently on track to reach the market as a IETF or W3 standard.

It also is based on RDF canonicalization; it canonicalized a specific format expressed in JSON, not arbitrary JSON. 

That isn't to say that there couldn’t be multiple canonicalization formats supported, possibly built as filters so you could combine them together, such as existed with XML-DSIG. Then you have a compatibility matrix to deal with.

This still doesn’t solve the problem that many internal representations of JSON will not preserve the full data set you are representing in your canonical form. 

From my development experience with XML-DSIG, this is most commonly that tools will discard information they do not understand, such as properties which aren’t part of the public schema. For developers who do not understand the additional restrictions a cleartext signature is placing on them, this causes issues that only come up late in broad interoperability testing, that can only be resolved through per-vendor workarounds or reimplementation to use different tools. This actually occurred multiple times across different implementations, sometimes when leveraging libraries that did claim to preserve the full information set of the XML document.

> The 1 million of random and "edge" JSON Numbers used for testing the devised JSON canonicalization scheme, uncovered flaws in other systems as well...
> https://github.com/dotnet/coreclr/issues/17467 <https://github.com/dotnet/coreclr/issues/17467>

This yet another case against canonical JSON, is it not? Or rather, how are people expected to deal with intermittent interoperability failures until a new language runtime release which revises the numerical print and parse functions comes out?

-DW