Re: [dispatch] PING2. Re: JSON Canonicalization Standard

Anders Rundgren <> Sat, 08 September 2018 08:13 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 3412C129C6A for <>; Sat, 8 Sep 2018 01:13:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id qYaYNGcQEG7e for <>; Sat, 8 Sep 2018 01:13:30 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 2961C126BED for <>; Sat, 8 Sep 2018 01:13:30 -0700 (PDT)
Received: by with SMTP id s12-v6so16745717wmc.0 for <>; Sat, 08 Sep 2018 01:13:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=F97il8h9OFUFYkyTOfRgW3Qbb803LenRM34DkuwiuCg=; b=KJpwfdHtN7hmQg4ZBDKCywv5gDHUg8uAXTi0Gvns9wzd4y4O004dhbNyUXcyfpbSOm TxzzzerAqqqCX2WCTaQzcV5PlHHOry+OR6O8e1NzGU9LqQurmCxKW7OLOOahj8hp0av/ DFBG8uDEYSrQfKTe+UEcF7Huzm22iFwehehHe2/Chg0Hume9Vwlkb2uIxMCSHT7qSnDc 2Sw0QE6+aeEv8w5VJ5BnFLIMOP1DCM+2eTBmy+vmbhefn2ydIJP8zli/Ggs0y40FC5ur TdK/0OLLVPkfZTMQADV+s+wlwmdKtoC5rimfp/t+0zdRgkiJTUK/s+LnP4Ad4Co8F8Kk uQFA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=F97il8h9OFUFYkyTOfRgW3Qbb803LenRM34DkuwiuCg=; b=WGfHGngqNNfGlueDsdsdJqrxJrVKwcUGzpVulhSquoiptyWJpX6NhIKdYm1IG7qXtA WkJTLZDgVAoBQ9tKQGRZYL4wGuY4w1t22QWSat6Vp+NYReTIWNWbxs/01vorKVgQqGcI Jdx+5r1v6pY40XhklWbe1UpO/wrvBD7HUIUyCGuFtGaj/x/ERC5FpyKKLXuPS+cVZp1F YgH48cCezOSKn8MzTmzla2zoF7Li7co8Ch8NWdUjLlqzh9/h9NtoyAX0LfBedNelLmr7 +o48oS4N12CbxNPtwCiolgydzqD1G9MuBqeKrYUjojaZ70s27U6IsF2ePJ/dN0wSxcGw bHfA==
X-Gm-Message-State: APzg51BxyHTjhrxyby73CxS7Pvelp0x2BWvjARExqk784NvFE2+uAB09 klCOyIB04sfO/WktrkLrqt4=
X-Google-Smtp-Source: ANB0VdZ7DaA5tc/7lJbpjJnuavSDN8p4AUYr4COZAWaDelSLNHyN/2jkw7rRczOqdjT8JUC1+3o87w==
X-Received: by 2002:a1c:be14:: with SMTP id o20-v6mr7554073wmf.73.1536394408616; Sat, 08 Sep 2018 01:13:28 -0700 (PDT)
Received: from [] ( []) by with ESMTPSA id l10-v6sm8151371wre.0.2018. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Sep 2018 01:13:27 -0700 (PDT)
To: Brian Campbell <>,
Cc: Eric Rescorla <>, Ben Campbell <>
References: <>
From: Anders Rundgren <>
Message-ID: <>
Date: Sat, 8 Sep 2018 10:13:24 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [dispatch] PING2. Re: JSON Canonicalization Standard
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DISPATCH Working Group Mail List <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 08 Sep 2018 08:13:32 -0000

On 2018-09-07 22:40, Brian Campbell wrote:
> XML Canonicalization and Signatures are notoriously brittle and difficult to 
> get right while also being the source of numerous serious security vulnerabilities.
> The JSON case is maybe simpler and thus somewhat less prone to the same issues but, 
> if history is any guide, it's really hard to get right and is fertile ground for all kinds of attacks.

This I've been told numerous of times.  I'm still waiting for a concrete example [*] of what could possibly be a problem.

Having worked pretty extensively with both variants I can attest that there is at least a factor 10 difference in code size due to the absence of schema, name-spaces and defaults.  I believe the quite complex WS security frameworks also were a source of interoperability issues with XML.

The only thing that (undeniable) is non-trivial is serialization of the JSON Number type.  Fortunately, the scheme defined by EMCAScript and supported by several open source implementations made even this part simple.  I performed a fully verified port to C# in just a couple of days.

FWIW, a "companion I-D" was recently published: