Re: [Json] Canonicalization

Paul Hoffman <paul.hoffman@vpnc.org> Wed, 20 February 2013 01:21 UTC

Return-Path: <paul.hoffman@vpnc.org>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DD0DB21F87BB for <json@ietfa.amsl.com>; Tue, 19 Feb 2013 17:21:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.592
X-Spam-Level:
X-Spam-Status: No, score=-102.592 tagged_above=-999 required=5 tests=[AWL=0.007, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gfI0i3QLEfyo for <json@ietfa.amsl.com>; Tue, 19 Feb 2013 17:21:33 -0800 (PST)
Received: from hoffman.proper.com (IPv6.Hoffman.Proper.COM [IPv6:2605:8e00:100:41::81]) by ietfa.amsl.com (Postfix) with ESMTP id 3846621F8439 for <json@ietf.org>; Tue, 19 Feb 2013 17:21:20 -0800 (PST)
Received: from [10.20.30.90] (50-1-98-12.dsl.dynamic.sonic.net [50.1.98.12]) (authenticated bits=0) by hoffman.proper.com (8.14.5/8.14.5) with ESMTP id r1K1LJ51057350 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for <json@ietf.org>; Tue, 19 Feb 2013 18:21:19 -0700 (MST) (envelope-from paul.hoffman@vpnc.org)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Paul Hoffman <paul.hoffman@vpnc.org>
In-Reply-To: <CAK3OfOhkSdi_4kuM3SG2N=bcfAwE-3E9+_SWW8ULSfedO8HAkQ@mail.gmail.com>
Date: Tue, 19 Feb 2013 17:21:18 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <2510D743-1CCE-42D0-9067-836F03BDD606@vpnc.org>
References: <BF7E36B9C495A6468E8EC573603ED9411513E818@xmb-aln-x11.cisco.com> <A723FC6ECC552A4D8C8249D9E07425A70F897263@xmb-rcd-x10.cisco.com> <255B9BB34FB7D647A506DC292726F6E11507579808@WSMSG3153V.srv.dir.telstra.com> <1F2DF9AD-EE7A-4CC6-BBA6-AF07D02347F9@vpnc.org> <CAK3OfOhkSdi_4kuM3SG2N=bcfAwE-3E9+_SWW8ULSfedO8HAkQ@mail.gmail.com>
To: "json@ietf.org" <json@ietf.org>
X-Mailer: Apple Mail (2.1499)
Subject: Re: [Json] Canonicalization
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Discussion related to JavaScript Object Notation \(JSON\)." <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Feb 2013 01:21:34 -0000

On Feb 19, 2013, at 5:11 PM, Nico Williams <nico@cryptonector.com> wrote:

> On Tue, Feb 19, 2013 at 7:00 PM, Paul Hoffman <paul.hoffman@vpnc.org> wrote:
>> One only needs to canonicalize at the time when one is comparing two objects. We should say *nothing* that suggests that JSON sent on the wire should be canonicalized at all.
> 
> When to canonicalize:
> 
> - when you're signing something that a peer has to reconstruct independently

Canonicalizing is part of the signature process, not part of the JSON creation process. The spec that specifies how to sign JSON will pick what to do about canonicalization; the JOSE WG is dealing with this.

> - when you want to compare with memcmp()

Sure. That's what I said above.

--Paul Hoffman