
From nobody Wed Dec 19 19:12:48 2018
Return-Path: <anders.rundgren.net@gmail.com>
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 B600F12D7EA; Wed, 19 Dec 2018 19:12:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
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: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 cSSW6LaEo0UN; Wed, 19 Dec 2018 19:12:37 -0800 (PST)
Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CB35C130DD5; Wed, 19 Dec 2018 19:12:36 -0800 (PST)
Received: by mail-wr1-x42d.google.com with SMTP id r10so195916wrs.10; Wed, 19 Dec 2018 19:12:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=JXRTRwaSb1CgbHsZNgXkHMvicPA59+aREepA4kR4qEw=; b=WuE1oyCNcG6X4N9+o4njVinxW5CH6YpTXG7RkhRn880ziIskdISWBZXbv/uSDBllgj LOgeAknOGv8vRiiA7ut6Db2snsaWFeE+QYHi54LCtbv7BBHAT9T6ZyttYHR0+3lZ/GXs wuMHwOOz5JzwdibJnnNJ9hxeWRQJKZqHvs8gydJt5fYmAM8lBziqst+MhXV8AYR3g1mm 96NqHSTEv35zRT7b1lqoY8L5maPVGmL3FChwV4nUw2FP1yDCY8GJOVn/LfbXAw69MHKU 5I2yMNIn8nNK5dy6ESvQ42s7tOJfeQsoSwtVFK0ZLEaPgGmytLGXGpOrzuI2k+WE+Feh Pgrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:from:to:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JXRTRwaSb1CgbHsZNgXkHMvicPA59+aREepA4kR4qEw=; b=MfxqXgpFMhSiggxgvxL6Z7+JN3Nl1tpltFndn2/AfCDgwZV0NdTHj3LMUv+/Zl+4Tw FG/iAgtb3wWR5X6V6j+8fkdNa9AgJcVoFy1sbIM3QWGbSMvpu7+q0TzTB2AaiEyu9ln2 8RMG026tZHaCDInzI8uT4bg0gV8QwDsHzkWJSv+kuPj6UG5mpmkgSaJg6QJG40/gLQ1w Ntkyy+iD1rLklVG4MnGKJmVtHbfJK2FONNGq8cvzfMKD3yKqX3A39Lv5/taLDScXj+LT Kq/clu4cWs7zBa1v8IdsG/7OvYUDGVaoSeaNMURSfRbS1O6DRATHn5bwwvvZZHtOiGXH rhwA==
X-Gm-Message-State: AA+aEWangt4R4tizsg/zI2zCbnfZCF7JGR8qqpivBZzvwyADR/n7+Wy5 pmLBrui61s6WzpdltAV+RdHEQFtK
X-Google-Smtp-Source: AFSGD/XgGeTQZvIM53g9jEQM5X01L5UFOFYZSiK3haC2q8qJ+/RRWkxWpLTtydmIfVdkk59PwMrYzQ==
X-Received: by 2002:adf:900f:: with SMTP id h15mr20675555wrh.18.1545275554728;  Wed, 19 Dec 2018 19:12:34 -0800 (PST)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id y8sm8132743wmg.13.2018.12.19.19.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 19:12:33 -0800 (PST)
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
To: "json@ietf.org" <json@ietf.org>, "jose@ietf.org" <jose@ietf.org>
X-Forwarded-Message-Id: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com>
Message-ID: <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com>
Date: Thu, 20 Dec 2018 04:12:28 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3
MIME-Version: 1.0
In-Reply-To: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/WsXo2QbVRI2PMGcGvbkTjJhcur0>
Subject: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Thu, 20 Dec 2018 03:12:39 -0000

https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02

Abstract:
    Cryptographic operations like hashing and signing depend on that the
    target data does not change during serialization, transport, or
    parsing.  By applying the rules defined by JCS (JSON Canonicalization
    Scheme), data provided in the JSON [RFC8259] format can be exchanged
    "as is", while still being subject to secure cryptographic
    operations.  JCS achieves this by building on the serialization
    formats for JSON primitives as defined by ECMAScript [ES6],
    constraining JSON data to the I-JSON [RFC7493] subset, and through a
    platform independent property sorting scheme.

    The intended audiences of this document are JSON tool vendors, as
    well as designers of JSON based cryptographic solutions.

////
In addition to some wordsmithing, this revision is supposed to make it
clearer that JCS is not a traditional canonicalization scheme working
on the text level, but a serialization scheme providing a canonical
form of JSON data conforming to a strict interpretation of I-JSON.

The serialization-only scheme makes implementation straightforward
and improves performance.

A list of Open Source implementations is also included in this revision.

Enjoy!

Anders


From nobody Fri Dec 21 13:04:50 2018
Return-Path: <jordan.ietf@gmail.com>
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 B57FC130E1D for <json@ietfa.amsl.com>; Fri, 21 Dec 2018 13:04:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 OjFQz4UGp5r3 for <json@ietfa.amsl.com>; Fri, 21 Dec 2018 13:04:46 -0800 (PST)
Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0388D130E74 for <json@ietf.org>; Fri, 21 Dec 2018 13:04:43 -0800 (PST)
Received: by mail-yb1-xb2e.google.com with SMTP id a10so2646490ybl.7 for <json@ietf.org>; Fri, 21 Dec 2018 13:04:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=7VdRusWEP66pJsncUo2V3Io3a5kvG24ijNL+zLXTXZM=; b=oGpCmJscglmYjhVt758hzWfopObngJx7zNv0ePy7AkE413bQ4D5MxZf+r+RNlLFzVx Ma3nCbVtScWbWuP5vPNIv2DvntTxy9YAmWp3dV1EU4j7gU4ahcd6JW+JItJtCcmtaieR vNQPnHQtisNgk9AmO4jV8h2K6nfpK4GO5pgRG2l+lw/sqMNTccYuS9MWozSUFPPlx3LT 165+/MOap3FemNygpaUKiuUPtu1qPLMUQa7oIkWhr0ALw0uu3F3Ly/St8+njuDq7NMMd kD/P5h6OaA0P7unm8kOct5ZVjahOANQqXtLh8latOEwF9Rdeb+IVsiYGZGFeemXfR+Xp A72g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=7VdRusWEP66pJsncUo2V3Io3a5kvG24ijNL+zLXTXZM=; b=re3gGwKgUeqHbceLf7/3HCcw+95uKRxA/hWywH2sisF+86bciASGxMqP3vriF7xlxx K6rm1VnCD8IjI7x6jwb7S39xzdSehyEzRJlB4CM8IgQNyCZNpcFiJzaSGhu+yTNEHt+Q Htj/yveKu/Y3PsSALXXN9G/Psza2u45aatGueMD0vCWbTO+YgICQ3z6LZgiGjR3c02p6 dhSnx9XfdL5+euHosu5hCDPOxnTL+Lpp9ermVn6dNgD5sRM4KrW7DgeF7yOd3l/RG2PQ TCog8RdBqGiasl1KlHbibqw8EmrNPxnvLJuuMvyuEfSJeTBuLJqJggiu94hlQxzbRt+s 8Dag==
X-Gm-Message-State: AA+aEWZQk6Iu9I3hrvr64M9AQFIQh0V1vfF/p7aTGsvC4lhpHiXf2Ol/ +pjnqAZc/4/DJMZUfS1VBc5eqD/R
X-Google-Smtp-Source: AFSGD/X2ufmeBLD2Jj+GhP0fGAk/PjimUv0idNqJYfZLiwwdO+woUu/SlKUjQuOr9tctyE/vv+9LQw==
X-Received: by 2002:a25:bd11:: with SMTP id f17mr4362357ybk.100.1545426283166;  Fri, 21 Dec 2018 13:04:43 -0800 (PST)
Received: from ?IPv6:2605:a601:a028:986:4494:3:2226:69f9? ([2605:a601:a028:986:4494:3:2226:69f9]) by smtp.gmail.com with ESMTPSA id l16sm8593960ywa.25.2018.12.21.13.04.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 13:04:42 -0800 (PST)
From: Bret Jordan <jordan.ietf@gmail.com>
Message-Id: <9751BDE8-BD9B-43A6-A5A0-E0868BC22CB2@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_BE25A561-0675-4E29-90E6-72FC8D9BDA40"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Fri, 21 Dec 2018 14:04:36 -0700
In-Reply-To: <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com>
Cc: "json@ietf.org" <json@ietf.org>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/k4g8G9qsmUG0o0eovJEewtSSJXE>
Subject: Re: [Json] [jose] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Fri, 21 Dec 2018 21:04:48 -0000

--Apple-Mail=_BE25A561-0675-4E29-90E6-72FC8D9BDA40
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Anders,

Would you be willing to put this in a Google Doc and share it out so =
that I can more easily comments and provide suggestions? =20


Thanks,
Bret
PGP Fingerprint: 63B4 FC53 680A 6B7D 1447  F2C0 74F8 ACAE 7415 0050
"Without cryptography vihv vivc ce xhrnrw, however, the only thing that =
can not be unscrambled is an egg."

> On Dec 19, 2018, at 8:12 PM, Anders Rundgren =
<anders.rundgren.net@gmail.com> wrote:
>=20
> =
https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02=

>=20
> Abstract:
>   Cryptographic operations like hashing and signing depend on that the
>   target data does not change during serialization, transport, or
>   parsing.  By applying the rules defined by JCS (JSON =
Canonicalization
>   Scheme), data provided in the JSON [RFC8259] format can be exchanged
>   "as is", while still being subject to secure cryptographic
>   operations.  JCS achieves this by building on the serialization
>   formats for JSON primitives as defined by ECMAScript [ES6],
>   constraining JSON data to the I-JSON [RFC7493] subset, and through a
>   platform independent property sorting scheme.
>=20
>   The intended audiences of this document are JSON tool vendors, as
>   well as designers of JSON based cryptographic solutions.
>=20
> ////
> In addition to some wordsmithing, this revision is supposed to make it
> clearer that JCS is not a traditional canonicalization scheme working
> on the text level, but a serialization scheme providing a canonical
> form of JSON data conforming to a strict interpretation of I-JSON.
>=20
> The serialization-only scheme makes implementation straightforward
> and improves performance.
>=20
> A list of Open Source implementations is also included in this =
revision.
>=20
> Enjoy!
>=20
> Anders
>=20
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose


--Apple-Mail=_BE25A561-0675-4E29-90E6-72FC8D9BDA40
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D"">Anders,<div class=3D""><br class=3D""></div><div =
class=3D"">Would you be willing to put this in a Google Doc and share it =
out so that I can more easily comments and provide suggestions? =
&nbsp;</div><div class=3D""><br class=3D""></div><div class=3D""><br =
class=3D""><div class=3D"">
<div style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
orphans: auto; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; widows: auto; word-spacing: 0px; =
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><div class=3D"" style=3D"orphans: 2; widows: 2; =
font-variant-ligatures: normal; font-variant-east-asian: normal; =
font-variant-position: normal; line-height: normal; =
-webkit-text-decorations-in-effect: none;"><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
font-variant-ligatures: normal; font-variant-east-asian: normal; =
font-variant-position: normal; line-height: normal; border-spacing: 0px; =
-webkit-text-decorations-in-effect: none;">Thanks,</span></div><div =
class=3D"" style=3D"orphans: 2; widows: 2; font-variant-ligatures: =
normal; font-variant-east-asian: normal; font-variant-position: normal; =
line-height: normal; -webkit-text-decorations-in-effect: none;"><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
font-variant-ligatures: normal; font-variant-east-asian: normal; =
font-variant-position: normal; line-height: normal; text-align: =
-webkit-auto; border-spacing: 0px; -webkit-text-decorations-in-effect: =
none;">Bret</span></div><div class=3D"" style=3D"orphans: 2; widows: =
2;"><span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
text-align: -webkit-auto; border-spacing: 0px;"><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
text-align: -webkit-auto; border-spacing: 0px;"><div class=3D"" =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; text-align: -webkit-auto; =
border-spacing: 0px;"><div class=3D"" style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
text-align: -webkit-auto; border-spacing: 0px;"><div class=3D"" =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; text-align: -webkit-auto; =
border-spacing: 0px;"><div class=3D""><font color=3D"#7c7c7c" =
face=3D"Calibre, Verdana" class=3D"" style=3D"font-variant-ligatures: =
normal; font-variant-east-asian: normal; font-variant-position: normal; =
line-height: normal; -webkit-text-decorations-in-effect: none;"><span =
class=3D"" style=3D"font-size: 11px;">PGP =
Fingerprint:&nbsp;</span></font><span class=3D"" style=3D"text-align: =
-webkit-auto; font-size: 11px;"><font color=3D"#7c7c7c" face=3D"Calibre, =
Verdana" class=3D"">63B4 FC53 680A 6B7D 1447 &nbsp;F2C0 74F8 ACAE 7415 =
0050</font></span></div><div class=3D"" style=3D"font-variant-ligatures: =
normal; font-variant-east-asian: normal; font-variant-position: normal; =
line-height: normal; -webkit-text-decorations-in-effect: none;"><span =
class=3D"" style=3D"color: rgb(124, 124, 124); font-size: 8pt; =
font-family: Calibre, Verdana; text-align: -webkit-auto;">"Without =
cryptography vihv vivc ce xhrnrw, however, the only thing that can not =
be unscrambled is an =
egg."</span></div></span></div></span></div></span></div></span></span></d=
iv></div>
</div>
<div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Dec 19, 2018, at 8:12 PM, Anders Rundgren &lt;<a =
href=3D"mailto:anders.rundgren.net@gmail.com" =
class=3D"">anders.rundgren.net@gmail.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-rundgren-json-canonicalization-s=
cheme-02" =
class=3D"">https://tools.ietf.org/html/draft-rundgren-json-canonicalizatio=
n-scheme-02</a><br class=3D""><br class=3D"">Abstract:<br class=3D""> =
&nbsp;&nbsp;Cryptographic operations like hashing and signing depend on =
that the<br class=3D""> &nbsp;&nbsp;target data does not change during =
serialization, transport, or<br class=3D""> &nbsp;&nbsp;parsing. =
&nbsp;By applying the rules defined by JCS (JSON Canonicalization<br =
class=3D""> &nbsp;&nbsp;Scheme), data provided in the JSON [RFC8259] =
format can be exchanged<br class=3D""> &nbsp;&nbsp;"as is", while still =
being subject to secure cryptographic<br class=3D""> =
&nbsp;&nbsp;operations. &nbsp;JCS achieves this by building on the =
serialization<br class=3D""> &nbsp;&nbsp;formats for JSON primitives as =
defined by ECMAScript [ES6],<br class=3D""> &nbsp;&nbsp;constraining =
JSON data to the I-JSON [RFC7493] subset, and through a<br class=3D""> =
&nbsp;&nbsp;platform independent property sorting scheme.<br =
class=3D""><br class=3D""> &nbsp;&nbsp;The intended audiences of this =
document are JSON tool vendors, as<br class=3D""> &nbsp;&nbsp;well as =
designers of JSON based cryptographic solutions.<br class=3D""><br =
class=3D"">////<br class=3D"">In addition to some wordsmithing, this =
revision is supposed to make it<br class=3D"">clearer that JCS is not a =
traditional canonicalization scheme working<br class=3D"">on the text =
level, but a serialization scheme providing a canonical<br class=3D"">form=
 of JSON data conforming to a strict interpretation of I-JSON.<br =
class=3D""><br class=3D"">The serialization-only scheme makes =
implementation straightforward<br class=3D"">and improves =
performance.<br class=3D""><br class=3D"">A list of Open Source =
implementations is also included in this revision.<br class=3D""><br =
class=3D"">Enjoy!<br class=3D""><br class=3D"">Anders<br class=3D""><br =
class=3D"">_______________________________________________<br =
class=3D"">jose mailing list<br class=3D"">jose@ietf.org<br =
class=3D"">https://www.ietf.org/mailman/listinfo/jose<br =
class=3D""></div></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_BE25A561-0675-4E29-90E6-72FC8D9BDA40--


From nobody Fri Dec 21 20:46:40 2018
Return-Path: <anders.rundgren.net@gmail.com>
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 9035613102D for <json@ietfa.amsl.com>; Fri, 21 Dec 2018 20:46:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
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: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 JzQYkBAXEP9f for <json@ietfa.amsl.com>; Fri, 21 Dec 2018 20:46:37 -0800 (PST)
Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9796213102C for <json@ietf.org>; Fri, 21 Dec 2018 20:46:37 -0800 (PST)
Received: by mail-wr1-x42a.google.com with SMTP id u4so7135605wrp.3 for <json@ietf.org>; Fri, 21 Dec 2018 20:46:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7Pm+APs8trdqea737U9Sxk0r6Y1ql/lf5GV1Kal0nSY=; b=L3wV4zDndwd1jPHMcNrREcQ0qdI8fW+JQQRxr2oSgfaKjNN58AvIn0by3DP4GaoFAp ylB1mlNjgpQku98+PZrVzeF5cXdIwLsMTG+VXqUh/t3rD0kA2cLgiGKr7OvpXOugORVu ubryG50wp3EmaQAEpLbGT0uaOoTeBkuEZjdxYvtbXpzaI8tTOcWvYKQLWlpXR3ITyB+H cMogwqOR1xkLqkTWxdFZ7MWi7vsdubjFs8BBAkKl4p4oQA2UjSZfFRZdvRsFSZjjlTvG vbq5zcBqWPyUpo0PDSVCFQVCAB6eVS4CIJgSMi8mQstqKB630DGZsde75Jv4DxoArLyA ApqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; 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=7Pm+APs8trdqea737U9Sxk0r6Y1ql/lf5GV1Kal0nSY=; b=VtxocSGJZcqoZyhlDI9/O0ICUhysCNxVqvOVmpCYDMgykXdjd0KrLaZ+9g+V/d2L7S f/mzl/r0MnXCZpiNzPc1bgQP6/aa93VAGUG4eOb6LkHHUjyzrKQUGJYVGkCW8cOC+o4d PiKesmq3jMTbIUpGSK1fYCOHfDorB7bgAKfhKmEPmI8DOU72YXAx1xAgw+LkFuKXQHFk fbN5tjZTpLskbTP3NK/qCLj0eIo743nKYoU5baRzt6dbE953tb2tZaZM1X7P5dB3IHkA U1QoGldHw88BgpHH94l5CKpy06EGgg7ty+ICStwjp2LzEurgkHF/GkbKfowcOcS3IBq/ Uj+Q==
X-Gm-Message-State: AJcUukcMNQ+jFJUdS+RLb4a1Zta8NzE1vxAcy8Tiy44T3pLREm+vBAPl tdyXtqF0rMGBKEZsnttj3gwAMr2b
X-Google-Smtp-Source: ALg8bN6cDkC8kp2WZsLkpGlgY/g/U6unvGlwnxTuqR2EKf7GkAZZyCsSNhcimTUX9It81eo8RpATcA==
X-Received: by 2002:adf:9521:: with SMTP id 30mr4722626wrs.192.1545453995342;  Fri, 21 Dec 2018 20:46:35 -0800 (PST)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id 199sm16792438wmh.21.2018.12.21.20.46.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 20:46:33 -0800 (PST)
To: Bret Jordan <jordan.ietf@gmail.com>
Cc: "json@ietf.org" <json@ietf.org>
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com> <9751BDE8-BD9B-43A6-A5A0-E0868BC22CB2@gmail.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <94ede8c0-0320-330b-6e23-660488400e36@gmail.com>
Date: Sat, 22 Dec 2018 05:46:32 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3
MIME-Version: 1.0
In-Reply-To: <9751BDE8-BD9B-43A6-A5A0-E0868BC22CB2@gmail.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/ntTQ7qDCAcj-Vy4Ovt0JcQe2nGM>
Subject: Re: [Json] [jose] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Sat, 22 Dec 2018 04:46:39 -0000

On 2018-12-21 22:04, Bret Jordan wrote:
> Anders,
> 
> Would you be willing to put this in a Google Doc and share it out so that I can more easily comments and provide suggestions?

Hi Bret,

The specification is already supported by an "issue" system:
https://github.com/cyberphone/json-canonicalization/issues
It is quite simple to use.  Questions may also be put there.

Anyway, here is a content-wise identical specification but in a more reader-friendly format
https://cyberphone.github.io/doc/security/draft-rundgren-json-canonicalization-scheme.html
which I guess could be put in Google Docs.  Feel free doing that, the text is not copyrighted in any way.

The I-D source language is XML and pretty unreadable :-|

Happy Christmas all you JSON aficionados out there!

Thanks,
Anders
> 
> 
> Thanks,
> Bret
> PGP Fingerprint: 63B4 FC53 680A 6B7D 1447  F2C0 74F8 ACAE 7415 0050
> "Without cryptography vihv vivc ce xhrnrw, however, the only thing that can not be unscrambled is an egg."
> 
>> On Dec 19, 2018, at 8:12 PM, Anders Rundgren <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>> wrote:
>>
>> https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02
>>
>> Abstract:
>>   Cryptographic operations like hashing and signing depend on that the
>>   target data does not change during serialization, transport, or
>>   parsing.  By applying the rules defined by JCS (JSON Canonicalization
>>   Scheme), data provided in the JSON [RFC8259] format can be exchanged
>>   "as is", while still being subject to secure cryptographic
>>   operations.  JCS achieves this by building on the serialization
>>   formats for JSON primitives as defined by ECMAScript [ES6],
>>   constraining JSON data to the I-JSON [RFC7493] subset, and through a
>>   platform independent property sorting scheme.
>>
>>   The intended audiences of this document are JSON tool vendors, as
>>   well as designers of JSON based cryptographic solutions.
>>
>> ////
>> In addition to some wordsmithing, this revision is supposed to make it
>> clearer that JCS is not a traditional canonicalization scheme working
>> on the text level, but a serialization scheme providing a canonical
>> form of JSON data conforming to a strict interpretation of I-JSON.
>>
>> The serialization-only scheme makes implementation straightforward
>> and improves performance.
>>
>> A list of Open Source implementations is also included in this revision.
>>
>> Enjoy!
>>
>> Anders
>>
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
> 


From nobody Sat Dec 22 13:23:02 2018
Return-Path: <brong@fastmailteam.com>
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 C8112130E64 for <json@ietfa.amsl.com>; Sat, 22 Dec 2018 13:23:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.982
X-Spam-Level: 
X-Spam-Status: No, score=-1.982 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_HEADER_CTYPE_ONLY=0.717, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=U1yWHoZE; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=aJ3EYlJ7
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 IJ9Il1LgWNvX for <json@ietfa.amsl.com>; Sat, 22 Dec 2018 13:22:58 -0800 (PST)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4FE98129BBF for <json@ietf.org>; Sat, 22 Dec 2018 13:22:58 -0800 (PST)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 59DA2211B7 for <json@ietf.org>; Sat, 22 Dec 2018 16:22:57 -0500 (EST)
Received: from imap7 ([10.202.2.57]) by compute6.internal (MEProxy); Sat, 22 Dec 2018 16:22:57 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=message-id:in-reply-to:references:date:from :to:subject:content-type; s=fm1; bh=49yvQr+wdCl4fsGIS4zOc3dXq3m1 X15dPqj7+NqomwI=; b=U1yWHoZE6OJUYuhF8Sk8AqtmPtU0rZ6cjli5Q5I3H+g1 twLVXwCRBzJwmEJZ5/IKoSiUtm9MajklNFVU91C4eKoPpY3BRcI7VAAM2f/YzKMg AZGEJ6zWL8tElm68Z/qZdIyaPHYGh33z9xyoXoaeo+Isz/058SbkBgKVni5Wp7MY rNaHWHpmIseQVbxHxC6l4dTb54KJEZF/LYjKiZ9hjQ2MwltHRXKbOWMSRacF/Y+d xzuFLLloSSokU/jJA33DmeBHnto3djhC6dXds/ncggD4zcu1+Hr/479pSYhhZPaL 0KHrEFredHM+J0cHlmK4Z/E1Y2REu82uSQkL+YdyqQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:references:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=49yvQr+wdCl4fsGIS 4zOc3dXq3m1X15dPqj7+NqomwI=; b=aJ3EYlJ7WAOtyhx41BgtS2DOBN5UarpIn MFD7VKwBc4zLJokPXVzzY7Rz+mZZnIp9IXUQUN4oiXn5YLjuYvOnbT0jKcDxgBYa /9CwT3FxET7+4iQjAGCz04/yRh9LAnSwGV8etUAbhbH88EpP+j3vSIF07zZ3biYR 1IVR5PTuj3Esq7i4N8zS9LTHCfnTgsg1RiW9fB+ftUyYAGDkD46vGIYP9kuI7qZ2 QDsCuEG6mw+RihAVI2yXMYjxtu223Y3OmrEVMDKL2XuS6Ge+93eyCw617mS4x5s2 DZ5D8D5aPmDfwjqPb0s0oluL30eSIOqww2RGxNTJYdseXmKZGOK8Q==
X-ME-Sender: <xms:MKseXBr0sPJE_ZFrTLzndL0zlsNB0heOkyxzGa-nGsIgtkaHCBoXZQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudejjedgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucenucfjughrpefofgfkjghffffhvffutgesrgdtreerreertdenucfhrhhomh epfdeurhhonhcuifhonhgufigrnhgrfdcuoegsrhhonhhgsehfrghsthhmrghilhhtvggr mhdrtghomheqnecuffhomhgrihhnpehivghtfhdrohhrghdpuhhtfhekvghvvghrhiifhh gvrhgvrdhorhhgnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsrhhonhhgsehfrghsthhm rghilhhtvggrmhdrtghomhenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:MKseXOhmm1rfMfFuMsU2jPsbqKDexYVDICF_KQvTV0-Mq5diA4_K_g> <xmx:MKseXIaM5RGRHzsBHxYmdeYNU5V6-ezFuC4Nhu6iTxCmASSfiukLAg> <xmx:MKseXOl2hGoeAFUQRmAsBhCdy_jFiCw95oB3cHGWCMVbuDBDnoNupQ> <xmx:MaseXDrhItwoo6Dq1h8V1ZOPCbSEgg4_xuRoTVlPbVa9aqXgw90lhg>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6DFD320176; Sat, 22 Dec 2018 16:22:56 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.5-714-g75bf9ad-fmstable-20181221v5
X-Me-Personality: 56629417
Message-Id: <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com>
In-Reply-To: <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com>
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com>
Date: Sat, 22 Dec 2018 16:21:56 -0500
From: "Bron Gondwana" <brong@fastmailteam.com>
To: json@ietf.org
Content-Type: multipart/alternative; boundary=c4c62b855a0e414e90035bd3c1fa1f1a
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/IePAqXNJ3On_mSRbJGn6zYt-HRs>
Subject: Re: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Sat, 22 Dec 2018 21:23:01 -0000

--c4c62b855a0e414e90035bd3c1fa1f1a
Content-Type: text/plain

An obvious wart here is that keys are sorted as UTF-16 and output as UTF-8 because of the internal representation in current software.

This strikes me as a bad long-term approach - the sort order should be identical to the output representation - aka UTF-8. This would mean that implementations which currently use UTF-16 internally would need to convert the text before sorting, but lead to a better long-term standard as software moves away from the "worst of all worlds" UTF-16:

https://utf8everywhere.org/

(in particular since this draft does not specify an endianness for the utf-16 code units, it could easily lead to bugs amongst software only tested on ASCII input which sorts the same way regardless of the endianness of the codepoints)

Regards,

Bron.

On Thu, Dec 20, 2018, at 14:13, Anders Rundgren wrote:
> https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02
> 
> Abstract:
>  Cryptographic operations like hashing and signing depend on that the
>  target data does not change during serialization, transport, or
>  parsing. By applying the rules defined by JCS (JSON Canonicalization
>  Scheme), data provided in the JSON [RFC8259] format can be exchanged
>  "as is", while still being subject to secure cryptographic
>  operations. JCS achieves this by building on the serialization
>  formats for JSON primitives as defined by ECMAScript [ES6],
>  constraining JSON data to the I-JSON [RFC7493] subset, and through a
>  platform independent property sorting scheme.
> 
>  The intended audiences of this document are JSON tool vendors, as
>  well as designers of JSON based cryptographic solutions.
> 
> ////
> In addition to some wordsmithing, this revision is supposed to make it
> clearer that JCS is not a traditional canonicalization scheme working
> on the text level, but a serialization scheme providing a canonical
> form of JSON data conforming to a strict interpretation of I-JSON.
> 
> The serialization-only scheme makes implementation straightforward
> and improves performance.
> 
> A list of Open Source implementations is also included in this revision.
> 
> Enjoy!
> 
> Anders
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
> 

--
 Bron Gondwana, CEO, FastMail Pty Ltd
 brong@fastmailteam.com


--c4c62b855a0e414e90035bd3c1fa1f1a
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div style=3D"font-f=
amily:Arial;">An obvious wart here is that keys are sorted as UTF-16 and=
 output as UTF-8 because of the internal representation in current softw=
are.<br></div><div style=3D"font-family:Arial;"><br></div><div style=3D"=
font-family:Arial;">This strikes me as a bad long-term approach - the so=
rt order should be identical to the output representation - aka UTF-8.&n=
bsp; This would mean that implementations which currently use UTF-16 int=
ernally would need to convert the text before sorting, but lead to a bet=
ter long-term standard as software moves away from the "worst of all wor=
lds" UTF-16:<br></div><div style=3D"font-family:Arial;"><br></div><div s=
tyle=3D"font-family:Arial;"><a href=3D"https://utf8everywhere.org/">http=
s://utf8everywhere.org/</a><br></div><div style=3D"font-family:Arial;"><=
br></div><div style=3D"font-family:Arial;">(in particular since this dra=
ft does not specify an endianness for the utf-16 code units, it could ea=
sily lead to bugs amongst software only tested on ASCII input which sort=
s the same way regardless of the endianness of the codepoints)<br></div>=
<div style=3D"font-family:Arial;"><br></div><div style=3D"font-family:Ar=
ial;">Regards,<br></div><div style=3D"font-family:Arial;"><br>Bron.<br><=
/div><div style=3D"font-family:Arial;"><br></div><div style=3D"font-fami=
ly:Arial;">On Thu, Dec 20, 2018, at 14:13, Anders Rundgren wrote:<br></d=
iv><blockquote type=3D"cite" id=3D"fastmail-quoted"><div style=3D"font-f=
amily:Arial;">https://tools.ietf.org/html/draft-rundgren-json-canonicali=
zation-scheme-02<br></div><div style=3D"font-family:Arial;"><br></div><d=
iv style=3D"font-family:Arial;">Abstract:<br></div><div style=3D"font-fa=
mily:Arial;">&nbsp;&nbsp;&nbsp; Cryptographic operations like hashing an=
d signing depend on that the<br></div><div style=3D"font-family:Arial;">=
&nbsp;&nbsp;&nbsp; target data does not change during serialization, tra=
nsport, or<br></div><div style=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp;=
 parsing.&nbsp; By applying the rules defined by JCS (JSON Canonicalizat=
ion<br></div><div style=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp; Scheme=
), data provided in the JSON [RFC8259] format can be exchanged<br></div>=
<div style=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp; "as is", while stil=
l being subject to secure cryptographic<br></div><div style=3D"font-fami=
ly:Arial;">&nbsp;&nbsp;&nbsp; operations.&nbsp; JCS achieves this by bui=
lding on the serialization<br></div><div style=3D"font-family:Arial;">&n=
bsp;&nbsp;&nbsp; formats for JSON primitives as defined by ECMAScript [E=
S6],<br></div><div style=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp; const=
raining JSON data to the I-JSON [RFC7493] subset, and through a<br></div=
><div style=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp; platform independe=
nt property sorting scheme.<br></div><div style=3D"font-family:Arial;"><=
br></div><div style=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp; The intend=
ed audiences of this document are JSON tool vendors, as<br></div><div st=
yle=3D"font-family:Arial;">&nbsp;&nbsp;&nbsp; well as designers of JSON =
based cryptographic solutions.<br></div><div style=3D"font-family:Arial;=
"><br></div><div style=3D"font-family:Arial;">////<br></div><div style=3D=
"font-family:Arial;">In addition to some wordsmithing, this revision is =
supposed to make it<br></div><div style=3D"font-family:Arial;">clearer t=
hat JCS is not a traditional canonicalization scheme working<br></div><d=
iv style=3D"font-family:Arial;">on the text level, but a serialization s=
cheme providing a canonical<br></div><div style=3D"font-family:Arial;">f=
orm of JSON data conforming to a strict interpretation of I-JSON.<br></d=
iv><div style=3D"font-family:Arial;"><br></div><div style=3D"font-family=
:Arial;">The serialization-only scheme makes implementation straightforw=
ard<br></div><div style=3D"font-family:Arial;">and improves performance.=
<br></div><div style=3D"font-family:Arial;"><br></div><div style=3D"font=
-family:Arial;">A list of Open Source implementations is also included i=
n this revision.<br></div><div style=3D"font-family:Arial;"><br></div><d=
iv style=3D"font-family:Arial;">Enjoy!<br></div><div style=3D"font-famil=
y:Arial;"><br></div><div style=3D"font-family:Arial;">Anders<br></div><d=
iv style=3D"font-family:Arial;"><br></div><div style=3D"font-family:Aria=
l;">_______________________________________________<br></div><div style=3D=
"font-family:Arial;">json mailing list<br></div><div style=3D"font-famil=
y:Arial;">json@ietf.org<br></div><div style=3D"font-family:Arial;">https=
://www.ietf.org/mailman/listinfo/json<br></div><div style=3D"font-family=
:Arial;"><br></div></blockquote><div style=3D"font-family:Arial;"><br></=
div><div id=3D"sig56629417"><div class=3D"signature">--<br></div><div cl=
ass=3D"signature">&nbsp; Bron Gondwana, CEO, FastMail Pty Ltd<br></div><=
div class=3D"signature">&nbsp; brong@fastmailteam.com<br></div><div clas=
s=3D"signature"><br></div></div><div style=3D"font-family:Arial;"><br></=
div></body></html>
--c4c62b855a0e414e90035bd3c1fa1f1a--


From nobody Sun Dec 23 02:02:54 2018
Return-Path: <anders.rundgren.net@gmail.com>
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 71D0312D4E6 for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 02:02:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level: 
X-Spam-Status: No, score=-2 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] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 ACOUO3yEDH5j for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 02:02:51 -0800 (PST)
Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2453A1200B3 for <json@ietf.org>; Sun, 23 Dec 2018 02:02:51 -0800 (PST)
Received: by mail-wm1-x32d.google.com with SMTP id g67so9585016wmd.2 for <json@ietf.org>; Sun, 23 Dec 2018 02:02:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=LGmAbOCU1OmFZ+6WecBAfDI4iyLMVffe3Aj+KaMt4VQ=; b=BlTpMwpMFDiB1Ki2Pn0ReBH3RhGbJyVCvrKJMkIZj3o1sZ1RCGl5C4xNKZShNF3trj nwYharmLbumRInMAaf/zvOASC+5R4qftAz/IhhDb2QZOcpO+iSGfT/PgLSfJZI/SicQO t3ffAXHQx1E9JCut37o5UO5iWKKy01Rc68xiWgz16LndnaRnfupNUObsz5TewUY41qb5 fKkVFJY8FzksodUjSRLbNoErGQy6piM+/d7ZMcUaeSVwC7V4NpRHCQl3GquCEp4RfFV9 DPL43arob8o2mHZxKCzATd3motrjap5TRTef4fU04AHpKCzgl4p9chFJNwOzFpZyLlFe ps/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LGmAbOCU1OmFZ+6WecBAfDI4iyLMVffe3Aj+KaMt4VQ=; b=TBmfSP3uNY8lcoh7mrlAEDajluv+iiTnjTpHXaNTOGLPD0uVSHpKQ+sg4UTlLhhnQe ADanBqMt34yRxWiVVLrvH4R+BCp84hjizHK0GfqQ+5WgtSDM52O4mby4sstaWOveXzuW EAiXMvtHjziHIPKjNbxz9AvOn4IWrUGWpEgVufF3c9mQArj0moflSFoIk1WxvovLhQ4o 2GT5juRE/hkI9cCLUG9fyQCPONIQrSnAl3XOQULrbbOKrqskq3YUWfEmIs0WWZ0N7mKk dQUWW7Ly8bInS4EE2S3nPcSVmKbOos260zChvl3yCcaS1EkyuMwumzlGcezbO4jIxkBL 1QGw==
X-Gm-Message-State: AJcUukcgqVpnLhqOPZme8WFFGLtD3Atyv2qvep4IIYRKmKamBAeTLsi/ H20uS+4q4Xrf9RjpLZUKlclASjgf
X-Google-Smtp-Source: ALg8bN70dtOYHt8tiiw9YKsNMDT1GHBTaJpUyFugwWKQBWN2Qfolb0g99oo9MEZQ0rW4BZSxujo4iQ==
X-Received: by 2002:a1c:2b01:: with SMTP id r1mr8675179wmr.7.1545559368747; Sun, 23 Dec 2018 02:02:48 -0800 (PST)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id y12sm12067229wmi.7.2018.12.23.02.02.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Dec 2018 02:02:47 -0800 (PST)
To: Bron Gondwana <brong@fastmailteam.com>, json@ietf.org
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com> <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com>
Date: Sun, 23 Dec 2018 11:02:44 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3
MIME-Version: 1.0
In-Reply-To: <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/BTnjCvRASiCrM3QOYI7q1sIISd4>
Subject: Re: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Sun, 23 Dec 2018 10:02:54 -0000

On 2018-12-22 22:21, Bron Gondwana wrote:
> An obvious wart here is that keys are sorted as UTF-16 and 
> output as UTF-8 because of the internal representation in current software.

Hi Bron,

Since JCS is in a fairly advanced state including some pilot usage, I created an issue for this:
https://github.com/cyberphone/json-canonicalization/issues/6

That UTF-8 is the only reasonable external representation of text is clear.

That the JCS specification (at the time of writing) sorts properties based on big endian UTF-16 code units is indeed for maintaining optimal performance on legacy software platforms, but also due to JSON itself which specifies Unicode string escapes as UTF-16 constants. If there actually is a problem using UTF-16 for sorting, wouldnâ€™t this affect JSON as well?

Just to make things a bit more complicated, other JSON canonicalization schemes rather prescribe using Unicode code points:
https://tools.ietf.org/html/rfc7638
https://gibson042.github.io/canonicaljson-spec/

I am not in any way married to using UTF-16 as the foundation for sorting but since sorting is an internal operation, I do not see that as a necessity for interoperability.

https://unicode.org/faq/utf_bom.html states the following regarding the different UTF variants:
"The conversions between all of them are algorithmically based, fast and lossless"

> This strikes me as a bad long-term approach - the sort order should be identical to the output representation - aka UTF-8.Â  This would mean that implementations which currently use UTF-16 internally would need to convert the text before sorting, but lead to a better long-term standard as software moves away from the "worst of all worlds" UTF-16:
> 
> https://utf8everywhere.org/

The lack of UTF-8 string escapes remains an issue in JSON.  I don't expect this will change.


> (in particular since this draft does not specify an endianness for the utf-16 code units, it could easily lead to bugs amongst software only tested on ASCII input which sorts the same way regardless of the endianness of the codepoints)

I believe UTF-16 has big endian as default but you are right, it could be explicit as well.  Fixed in next version.  Thanx!

There is quite a lot of test data for JCS which deals with this as well as other issues:
https://github.com/cyberphone/json-canonicalization/tree/master/testdata

Regards,
Anders

> 
> Regards,
> 
> Bron.
> 
> On Thu, Dec 20, 2018, at 14:13, Anders Rundgren wrote:
>> https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02
>>
>> Abstract:
>> Â Â Â  Cryptographic operations like hashing and signing depend on that the
>> Â Â Â  target data does not change during serialization, transport, or
>> Â Â Â  parsing.Â  By applying the rules defined by JCS (JSON Canonicalization
>> Â Â Â  Scheme), data provided in the JSON [RFC8259] format can be exchanged
>> Â Â Â  "as is", while still being subject to secure cryptographic
>> Â Â Â  operations.Â  JCS achieves this by building on the serialization
>> Â Â Â  formats for JSON primitives as defined by ECMAScript [ES6],
>> Â Â Â  constraining JSON data to the I-JSON [RFC7493] subset, and through a
>> Â Â Â  platform independent property sorting scheme.
>>
>> Â Â Â  The intended audiences of this document are JSON tool vendors, as
>> Â Â Â  well as designers of JSON based cryptographic solutions.
>>
>> ////
>> In addition to some wordsmithing, this revision is supposed to make it
>> clearer that JCS is not a traditional canonicalization scheme working
>> on the text level, but a serialization scheme providing a canonical
>> form of JSON data conforming to a strict interpretation of I-JSON.
>>
>> The serialization-only scheme makes implementation straightforward
>> and improves performance.
>>
>> A list of Open Source implementations is also included in this revision.
>>
>> Enjoy!
>>
>> Anders
>>
>> _______________________________________________
>> json mailing list
>> json@ietf.org
>> https://www.ietf.org/mailman/listinfo/json
>>
> 
> --
>  Â  Bron Gondwana, CEO, FastMail Pty Ltd
>  Â  brong@fastmailteam.com
> 
> 
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
> 


From nobody Sun Dec 23 12:39:23 2018
Return-Path: <cowan@ccil.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 765DB1277CC for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 12:39:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level: 
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ccil-org.20150623.gappssmtp.com
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 HAoI6fYLPdJi for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 12:39:20 -0800 (PST)
Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E0D8F1277BB for <json@ietf.org>; Sun, 23 Dec 2018 12:39:19 -0800 (PST)
Received: by mail-wm1-x335.google.com with SMTP id n190so9867663wmd.0 for <json@ietf.org>; Sun, 23 Dec 2018 12:39:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3l2kso2akpNwSjr1gnRN7UKzwOaxUI20ZJ/Mf1vbUjk=; b=c/3awiFfO0Vz66Cqmk5paB2ST93RNFQ8onWsgi72JJDgrsji9W3dK+KUAXActiHKVR eMUQMn+1RkrMOT8RdyDzPPewbzRN3R9Bf3A5L8/hBGybcsKvETF1qu/31oXffHN+oxwx yngTvji75nFaKiD0PhBKLoVJ8p6iFcNIAYvh6K9Vw0Z7xjq01d/zdkmGPaYG7leF16ei 7EqSJRt8QatOLnaYzh2D9dkavocOspwp1ZjKuvI53UQA1scFcLPcNkiMvPTFt5afYvrC umwh9/zIwb7CuJ5am+3JTO8xYlO/kpEIAcIVo2sKUmE+a7eXV3SKHQA9Z7YsajgymKwS tiGw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3l2kso2akpNwSjr1gnRN7UKzwOaxUI20ZJ/Mf1vbUjk=; b=d1GXQle54+6g7pPn8rvhbc1owAKuSHXNNtwDy58mS9jz6bYPKKhKjEI+8BKy+dbjTS 7q5x/doO+8uUwD/HVYysp2OEu7vXzzqosUu42EobS2hg63InGJ7N8yb7p87xT5XnNGdy 6MmtT9D+aLTkwsot2hu7JRiPYUbcCEESQ3R6MJ3xvW0jD0HjCMYW1A0Iwq4h+kLrdTEG 42+h4xFwSWh00w9eW2g+kVb8/WKTD7j1+fdJb50057IT71nm6PQ+hIYRdrj8xDplJxrM 395bXIpcwdAMkbdEpcEfzKfxUd9cJGc3EwFlr4otKBYYz2eUHon+iBr8hZsKS63HwZJx 18uQ==
X-Gm-Message-State: AJcUukeq/BOCmfyo/LVjJwzFuWVWMyFKrAC6bYolE+sY01rbb6sFNkVs M/8YQuQK8SF6uUsc/6+lKqKKxI6/qoLicPRzj2Ldqw==
X-Google-Smtp-Source: AFSGD/VsgJDQPWP3yCLOY5gi5plUgN+rhUrOeCz3ZUDvDjGIt2hTYmmtyTvnbPiTc8iV/XJy2ovhLVmrbxadgOD+V9E=
X-Received: by 2002:a1c:8f41:: with SMTP id r62mr9631201wmd.141.1545597558146;  Sun, 23 Dec 2018 12:39:18 -0800 (PST)
MIME-Version: 1.0
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com> <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com> <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com>
In-Reply-To: <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com>
From: John Cowan <cowan@ccil.org>
Date: Sun, 23 Dec 2018 15:39:06 -0500
Message-ID: <CAD2gp_QV0hK4_M2vPKLmi_Wp3kO+zv23raFm0eH++86V818TWA@mail.gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: Bron Gondwana <brong@fastmailteam.com>, json@ietf.org
Content-Type: multipart/alternative; boundary="0000000000006b6099057db679fa"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/8jt1F9w675-L4rv5GIsaSjNc90Y>
Subject: Re: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Sun, 23 Dec 2018 20:39:23 -0000

--0000000000006b6099057db679fa
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 23, 2018 at 5:02 AM Anders Rundgren <
anders.rundgren.net@gmail.com> wrote:

That the JCS specification (at the time of writing) sorts properties based
> on big endian UTF-16 code units is indeed for maintaining optimal
> performance on legacy software platforms, but also due to JSON itself whi=
ch
> specifies Unicode string escapes as UTF-16 constants. If there actually i=
s
> a problem using UTF-16 for sorting, wouldn=E2=80=99t this affect JSON as =
well?
>

It is indeed annoying that none of Java, C#, or JavaScript have standard
methods for comparing strings in Unicode codepoint order.   At least in
Java and C#, however, such routines are easily written and not inherently
less efficient (in a big-O sense) than native routines.  The standard
technique is to change code units in the range D800-DFFF to F800-FFFF and
vice versa (an O(n) operation) and then run a native comparison (also
O(n)).  In Java this behavior can be provided as a class implementing the
standard interface Comparator.

The fact that the external representation of Astral Plane characters uses
two consecutive \unnnn sequences is irrelevant.  JSON parsers and writers
that use UTF-8 or UTF-32 as their native representations are perfectly able
to deal with this convention, just as XML parsers and writers in
Java/C#/JavaScript are able to convert between the external &#nnnnnn;
representation and  two consecutive UTF-16 code units.

--=20
John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
So they play that [tune] on their fascist banjos, eh?
        --Great-Souled Sam

--0000000000006b6099057db679fa
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr">On Sun, Dec 23, 2018 at 5:02 AM Anders Ru=
ndgren &lt;<a href=3D"mailto:anders.rundgren.net@gmail.com">anders.rundgren=
.net@gmail.com</a>&gt; wrote:<br></div><div dir=3D"ltr"><br></div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
solid rgb(204,204,204);padding-left:1ex">That the JCS specification (at the=
 time of writing) sorts properties based on big endian UTF-16 code units is=
 indeed for maintaining optimal performance on legacy software platforms, b=
ut also due to JSON itself which specifies Unicode string escapes as UTF-16=
 constants. If there actually is a problem using UTF-16 for sorting, wouldn=
=E2=80=99t this affect JSON as well?<br></blockquote><div><br></div><div>It=
 is indeed annoying that none of Java, C#, or JavaScript have standard meth=
ods for comparing strings in Unicode codepoint order.=C2=A0 =C2=A0At least =
in Java and C#, however, such routines are easily written and not inherentl=
y less efficient (in a big-O sense) than native routines.=C2=A0 The standar=
d technique is to change code units in the range D800-DFFF to F800-FFFF and=
 vice versa (an O(n) operation) and then run a native comparison (also O(n)=
).=C2=A0 In Java this behavior can be provided as a class implementing the =
standard interface Comparator.</div><div><br></div><div>The fact that the e=
xternal representation of Astral Plane characters uses two consecutive \unn=
nn sequences is irrelevant.=C2=A0 JSON parsers and writers that use UTF-8 o=
r UTF-32 as their native representations are perfectly able to deal with th=
is convention, just as XML parsers and writers in Java/C#/JavaScript are ab=
le to convert between the external &amp;#nnnnnn; representation and=C2=A0 t=
wo consecutive UTF-16 code units.</div><div><br></div><div>--=C2=A0</div><d=
iv><div>John Cowan=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://vric=
i.lojban.org/~cowan">http://vrici.lojban.org/~cowan</a>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 <a href=3D"mailto:cowan@ccil.org">cowan@ccil.org</a></div><div>So t=
hey play that [tune] on their fascist banjos, eh?</div><div>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 --Great-Souled Sam</div></div><div><br></div></div></div></di=
v>

--0000000000006b6099057db679fa--


From nobody Sun Dec 23 18:03:02 2018
Return-Path: <brong@fastmailteam.com>
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 DBA79130DF2 for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 18:03:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.468
X-Spam-Level: 
X-Spam-Status: No, score=-0.468 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_HEADER_CTYPE_ONLY=0.717, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_RHS_DOB=1.514] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=UVEKCkF/; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=D2fNNi5G
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 Cr6G_fcBUvYw for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 18:02:59 -0800 (PST)
Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9909D130DEF for <json@ietf.org>; Sun, 23 Dec 2018 18:02:59 -0800 (PST)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9BD321140; Sun, 23 Dec 2018 21:02:58 -0500 (EST)
Received: from imap7 ([10.202.2.57]) by compute6.internal (MEProxy); Sun, 23 Dec 2018 21:02:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=message-id:in-reply-to:references:date:from :to:subject:content-type; s=fm1; bh=SGZBp49hrTQDB5TUtcmfibQXIDGK UbZmbhgIS5HnQu8=; b=UVEKCkF/ZhtOMC4xRjcuYTaswYZtedQRXjZHZomZlZVU XlpktMZtcJ6luq9Ct4iallGWeco+ZJ+YyjKbaCe47FnzYOcO8TpAL56cYT7/YT6B d11PNMzviyCHK3/skINFv7wnpK2tUl6E3f4a7bE5kiI1k8MRGn56VWLz6qemwQud x5BUWlhIwxhtScuf9lo4Di0blaJjpPKDWf2CEq6o96RtY9UdcMzvXbcPWDv4EFQk FALbM9vUOXzAzgcRoYH2+clgHlc4UN34lYI3l7zjE9Tz7O4y2T2hgConSRui40kb NuKnSu70PBXH3tRRUa+SeyeOnLySZ2jGDWY2kIUmbw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:references:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=SGZBp49hrTQDB5TUt cmfibQXIDGKUbZmbhgIS5HnQu8=; b=D2fNNi5G0oH1thT5mGwgwGbByAIIXlcv3 fRzscfQqQRmb+RqxuIW2u9dJ2rCQ3X8Ifr/VarcXfln6NG+J05oobdQaXJuu6qf0 Se6onTRbN87lBLnGs9KRUGCaRmSc38LUZiwcUiZOBz62vLk8iyYYm41SaxTUElpF G8Rb72dNqvCIvn5E3uvl2xYb/+afeGf6s65zuprbziCcUIw6zKBErPEVopuH90tz ropO54TJSP73cHV4U92UOjuPK1fCqsWKbW+shDywPd964hyESOutDBc4Pumlzzcb xOSf1K3PVuqlwxWI1UwCjKjcl+rBjowKVDOayw0fbViccY2DRXaaA==
X-ME-Sender: <xms:UT4gXIpU8cmohPeBs1adD4ny7z-dD4SwUIOFcn2bul5_ktgNuLuWRA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudektddggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhepofgfkfgjfhffhffvufgtsegrtderreerredtnecuhfhrohhmpe dfuehrohhnucfiohhnugifrghnrgdfuceosghrohhnghesfhgrshhtmhgrihhlthgvrghm rdgtohhmqeenucffohhmrghinhepuhhnihgtohguvgdrohhrghenucfrrghrrghmpehmrg hilhhfrhhomhepsghrohhnghesfhgrshhtmhgrihhlthgvrghmrdgtohhmnecuvehluhhs thgvrhfuihiivgeptd
X-ME-Proxy: <xmx:UT4gXHqU_dW7Q-IGxiJJIhz-ROoQbVyKnYSpO_Lvns7va8KJJXuzuw> <xmx:UT4gXKEMRqVnWEKZ3_U4fSqAShm4pJA1LabzQZf3Zxe9APLOj7oHuQ> <xmx:UT4gXCzg6-zgJe46lWIMRg33qVo0IfAixI3XWNCphNyjUUF-g4NL4w> <xmx:Uj4gXFw9RRagPRpAx95iqKMu3vKtyoenscKBLSLiog3lSQguC1WrqA>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6F1DC20176; Sun, 23 Dec 2018 21:02:57 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.5-714-g75bf9ad-fmstable-20181221v5
X-Me-Personality: 56629417
Message-Id: <7e04f62c-88c0-4f31-99a9-84b580c4ad64@beta.fastmail.com>
In-Reply-To: <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com>
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com> <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com> <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com>
Date: Sun, 23 Dec 2018 21:02:57 -0500
From: "Bron Gondwana" <brong@fastmailteam.com>
To: json@ietf.org, "Anders Rundgren" <anders.rundgren.net@gmail.com>
Content-Type: multipart/alternative; boundary=81f18a7737da4f9bbae506340322997f
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/iAV0oAqg9AyMTzfKIVcXPfAZ_BY>
Subject: Re: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Mon, 24 Dec 2018 02:03:01 -0000

--81f18a7737da4f9bbae506340322997f
Content-Type: text/plain

On Sun, Dec 23, 2018, at 21:02, Anders Rundgren wrote:
> I am not in any way married to using UTF-16 as the foundation for sorting but since sorting is an internal operation, I do not see that as a necessity for interoperability.

I'm not sure what you mean by this - since you can't be canonical without sorting, everyone has to sort the same way.

> https://unicode.org/faq/utf_bom.html states the following regarding the different UTF variants:
> "The conversions between all of them are algorithmically based, fast and lossless"

That's true - I have no overall objection to whatever works, I'm just sad that UTF-16 is continuing to get baked into things.

> I believe UTF-16 has big endian as default but you are right, it could be explicit as well. Fixed in next version. Thanx!

No worries. That's definitely a good thing to specify.

Cheers,

Bron.

--
 Bron Gondwana, CEO, FastMail Pty Ltd
 brong@fastmailteam.com


--81f18a7737da4f9bbae506340322997f
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div style=3D"font-f=
amily:Arial;">On Sun, Dec 23, 2018, at 21:02, Anders Rundgren wrote:<br>=
</div><blockquote type=3D"cite" id=3D"fastmail-quoted"><div style=3D"fon=
t-family:Arial;">I am not in any way married to using UTF-16 as the foun=
dation for sorting but since sorting is an internal operation, I do not =
see that as a necessity for interoperability.<br></div></blockquote><div=
 style=3D"font-family:Arial;"><br></div><div style=3D"font-family:Arial;=
">I'm not sure what you mean by this - since you can't be canonical with=
out sorting, everyone has to sort the same way.<br></div><div style=3D"f=
ont-family:Arial;"><br></div><blockquote type=3D"cite" id=3D"fastmail-qu=
oted"><div style=3D"font-family:Arial;">https://unicode.org/faq/utf_bom.=
html states the following regarding the different UTF variants:<br></div=
><div style=3D"font-family:Arial;">"The conversions between all of them =
are algorithmically based, fast and lossless"<br></div></blockquote><div=
 style=3D"font-family:Arial;"><br></div><div style=3D"font-family:Arial;=
">That's true - I have no overall objection to whatever works, I'm just =
sad that UTF-16 is continuing to get baked into things.<br></div><div st=
yle=3D"font-family:Arial;"><br></div><blockquote type=3D"cite" id=3D"fas=
tmail-quoted"><div style=3D"font-family:Arial;">I believe UTF-16 has big=
 endian as default but you are right, it could be explicit as well.&nbsp=
; Fixed in next version.&nbsp; Thanx!<br></div></blockquote><div style=3D=
"font-family:Arial;"><br></div><div style=3D"font-family:Arial;">No worr=
ies. That's definitely a good thing to specify.<br></div><div style=3D"f=
ont-family:Arial;"><br></div><div style=3D"font-family:Arial;">Cheers,<b=
r></div><div style=3D"font-family:Arial;"><br>Bron.<br></div><div style=3D=
"font-family:Arial;"><br></div><div id=3D"sig56629417"><div class=3D"sig=
nature">--<br></div><div class=3D"signature">&nbsp; Bron Gondwana, CEO, =
FastMail Pty Ltd<br></div><div class=3D"signature">&nbsp; brong@fastmail=
team.com<br></div><div class=3D"signature"><br></div></div><div style=3D=
"font-family:Arial;"><br></div></body></html>
--81f18a7737da4f9bbae506340322997f--


From nobody Sun Dec 23 21:00:36 2018
Return-Path: <duerst@it.aoyama.ac.jp>
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 A47F2130EB2 for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 21:00:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.923
X-Spam-Level: 
X-Spam-Status: No, score=-0.923 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=itaoyama.onmicrosoft.com
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 mTY2d2DuabXO for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 21:00:32 -0800 (PST)
Received: from JPN01-OS2-obe.outbound.protection.outlook.com (mail-eopbgr1410117.outbound.protection.outlook.com [40.107.141.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6537C130EB4 for <json@ietf.org>; Sun, 23 Dec 2018 21:00:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itaoyama.onmicrosoft.com; s=selector1-it-aoyama-ac-jp; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ek7QNsVNydwVkdmbvhEbpvPKDvleyiDtZI6sbumxJO0=; b=fn7Zw0530iJrO8yPv0Rlo/QGNdXaaunp8P4I5buAB9rNZNXLafJfcUi0wQPgZLOdYjDQduYNJIKwV5nPU3/04rDkzDlZThWWANhlfoZ6MN3t4UgTHZ0jYe1wRXL3BSInEJyAycHrYvO7NfwNynBu2uh9cGRDYgLj2HNtJlqR5+s=
Received: from OSAPR01MB4434.jpnprd01.prod.outlook.com (20.179.176.23) by OSAPR01MB2481.jpnprd01.prod.outlook.com (52.134.245.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.23; Mon, 24 Dec 2018 05:00:29 +0000
Received: from OSAPR01MB4434.jpnprd01.prod.outlook.com ([fe80::7847:bb06:297e:c78b]) by OSAPR01MB4434.jpnprd01.prod.outlook.com ([fe80::7847:bb06:297e:c78b%6]) with mapi id 15.20.1446.026; Mon, 24 Dec 2018 05:00:29 +0000
From: =?utf-8?B?TWFydGluIEouIETDvHJzdA==?= <duerst@it.aoyama.ac.jp>
To: John Cowan <cowan@ccil.org>, Anders Rundgren <anders.rundgren.net@gmail.com>
CC: Bron Gondwana <brong@fastmailteam.com>, "json@ietf.org" <json@ietf.org>
Thread-Topic: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
Thread-Index: AQHUmjyKJWsnvyzZGkKkHC+O1JhBd6WMGNIAgACxzQCAAIwUAA==
Date: Mon, 24 Dec 2018 05:00:29 +0000
Message-ID: <99ad1daf-d207-6d38-a128-48e84c38000d@it.aoyama.ac.jp>
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com> <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com> <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com> <CAD2gp_QV0hK4_M2vPKLmi_Wp3kO+zv23raFm0eH++86V818TWA@mail.gmail.com>
In-Reply-To: <CAD2gp_QV0hK4_M2vPKLmi_Wp3kO+zv23raFm0eH++86V818TWA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-clientproxiedby: TY1PR01CA0174.jpnprd01.prod.outlook.com (2603:1096:402::26) To OSAPR01MB4434.jpnprd01.prod.outlook.com (2603:1096:604:60::23)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=duerst@it.aoyama.ac.jp; 
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [133.2.210.64]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; OSAPR01MB2481; 6:+dMMJySEk9PuMeT/weZ72fUnxLby6JEUgV3VLFjFj5vnLkxH//W86DaIB2o1W4QxyvxANQJaDVHxuZYZ3cgOO3IfBtKqoCNHUnifa4J8yboqrIXDGg6KPTB1l3u0tRUbwhjJnfi7HxvhI7H7S3fs88Iq9TQUdoMkMmT827HzmB0KL9LdTndI8SK9pR0BZ5WHjEBlIwwtX1d3z2CCeyq0af8AVG1Lt3bbChwI1eEsZZl/SY5akJFouVKSBxcOsH2YUgWph0sO2dmrG+6rzwJxuEWNBhJfVahDv7OIRoOiIzF8m5vLUhPaKi7mEYWQ1iRP23YkS7S1EdMen+Ra5P+XDNhhZfsnjbZQfKNruzCm/eb0ZuLMhklDVehYMiamj3+9PbOTS614KV+IzfrwJMoCiwgwNxtZADZJ9u2afycZg3TJ8dImHGs0QqvSO/PeZTNwhYOij6wON9F4eXkypxHM+w==; 5:QPRGf+TsJFuSATKDIAxK8mBFT28/eECfNOoJg7w/akJss7IbAASEF75PQFgS/qXLAuTPqkzOmpes91W5Ko4LEh6jQ6fSULsyRfDPstVR4l8GPHDL7Xxl2xT7jn/8I5Zdr4jpDwkhU7XgjkRGQr4RiPZ6a32o/UBV6QK2e+U8xSI=; 7:x8A/k94FHP8g3ybTEj58pb0HlmopzMiWnb+3mjLII+SHUSQ4a5aJXuZFboT0SQYvR53sao9TU7XEMjogrlUpfRdjyLbmvpATNPjp22rBu8CsoU42NaOU7i/vgkL2NXYU3U2RnckCQNo6xnKCiXYsMA==
x-ms-office365-filtering-correlation-id: 3e05b3df-639c-45d1-1d95-08d6695cb9a5
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7025125)(7024125)(7027125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:OSAPR01MB2481; 
x-ms-traffictypediagnostic: OSAPR01MB2481:
x-microsoft-antispam-prvs: <OSAPR01MB24812AEDE8F01BFDD0ECA4B1CABB0@OSAPR01MB2481.jpnprd01.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(908002)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(10201501046)(3002001)(6041310)(2016111802025)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(6043046)(201708071742011)(7699051)(76991095); SRVR:OSAPR01MB2481; BCL:0; PCL:0; RULEID:; SRVR:OSAPR01MB2481; 
x-forefront-prvs: 0896BFCE6C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39840400004)(376002)(346002)(136003)(396003)(366004)(199004)(189003)(14454004)(53546011)(31696002)(102836004)(6512007)(76176011)(7736002)(11346002)(8676002)(6246003)(105586002)(71190400001)(39060400002)(71200400001)(229853002)(6436002)(68736007)(186003)(386003)(85202003)(476003)(2616005)(26005)(14444005)(256004)(25786009)(6506007)(446003)(508600001)(106356001)(305945005)(86362001)(52116002)(31686004)(53936002)(4326008)(81166006)(316002)(786003)(110136005)(5660300001)(81156014)(6116002)(54906003)(3846002)(6486002)(85182001)(2906002)(99286004)(97736004)(74482002)(486006)(66066001)(93886005)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:OSAPR01MB2481; H:OSAPR01MB4434.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; 
received-spf: None (protection.outlook.com: it.aoyama.ac.jp does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: xlKStnkOrQ3BO4OxMF8wxlRWDgbg1NdS7Bv5Thf6+YyTkOIgLWiaxNvnRYmYfZF6wuuRnpzba3Y/vSrPmNIv9XrFofXak/AvgDurwA4BO9mcOv6XJRAiaI8cVaOX28vU+Mviu0n8nTbtgJgFhZfXlja0zKutECrSt9G+V8R9DsT5WFuOL14leqM7jfchzUyE4spsBVV86vlxTZ8mQuC/6sKDJJZU5f7J66TbyoQMiMgj3Raoy/aA9t4xR7dYpx9vFkAU/4EBYrUDO/VONBrTqG9qwFUhwrtmgwMSbvi+PnSw4aVSvpXaM+lJU68z+aag
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <5F15B6FA802D634CBFC128AD5FEB3E61@jpnprd01.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: it.aoyama.ac.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: 3e05b3df-639c-45d1-1d95-08d6695cb9a5
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Dec 2018 05:00:29.5540 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: e02030e7-4d45-463e-a968-0290e738c18e
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB2481
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/WwFN0YBmYpTiwCh8aLgxUgtFqwQ>
Subject: Re: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Mon, 24 Dec 2018 05:00:35 -0000

SGVsbG8gSm9obiwgb3RoZXJzLA0KDQpPbiAyMDE4LzEyLzI0IDA1OjM5LCBKb2huIENvd2FuIHdy
b3RlOg0KPiBPbiBTdW4sIERlYyAyMywgMjAxOCBhdCA1OjAyIEFNIEFuZGVycyBSdW5kZ3JlbiA8
DQo+IGFuZGVycy5ydW5kZ3Jlbi5uZXRAZ21haWwuY29tPiB3cm90ZToNCj4gDQo+IFRoYXQgdGhl
IEpDUyBzcGVjaWZpY2F0aW9uIChhdCB0aGUgdGltZSBvZiB3cml0aW5nKSBzb3J0cyBwcm9wZXJ0
aWVzIGJhc2VkDQo+PiBvbiBiaWcgZW5kaWFuIFVURi0xNiBjb2RlIHVuaXRzIGlzIGluZGVlZCBm
b3IgbWFpbnRhaW5pbmcgb3B0aW1hbA0KPj4gcGVyZm9ybWFuY2Ugb24gbGVnYWN5IHNvZnR3YXJl
IHBsYXRmb3JtcywgYnV0IGFsc28gZHVlIHRvIEpTT04gaXRzZWxmIHdoaWNoDQo+PiBzcGVjaWZp
ZXMgVW5pY29kZSBzdHJpbmcgZXNjYXBlcyBhcyBVVEYtMTYgY29uc3RhbnRzLiBJZiB0aGVyZSBh
Y3R1YWxseSBpcw0KPj4gYSBwcm9ibGVtIHVzaW5nIFVURi0xNiBmb3Igc29ydGluZywgd291bGRu
4oCZdCB0aGlzIGFmZmVjdCBKU09OIGFzIHdlbGw/DQo+Pg0KPiANCj4gSXQgaXMgaW5kZWVkIGFu
bm95aW5nIHRoYXQgbm9uZSBvZiBKYXZhLCBDIywgb3IgSmF2YVNjcmlwdCBoYXZlIHN0YW5kYXJk
DQo+IG1ldGhvZHMgZm9yIGNvbXBhcmluZyBzdHJpbmdzIGluIFVuaWNvZGUgY29kZXBvaW50IG9y
ZGVyLiAgIEF0IGxlYXN0IGluDQo+IEphdmEgYW5kIEMjLCBob3dldmVyLCBzdWNoIHJvdXRpbmVz
IGFyZSBlYXNpbHkgd3JpdHRlbiBhbmQgbm90IGluaGVyZW50bHkNCj4gbGVzcyBlZmZpY2llbnQg
KGluIGEgYmlnLU8gc2Vuc2UpIHRoYW4gbmF0aXZlIHJvdXRpbmVzLiAgVGhlIHN0YW5kYXJkDQo+
IHRlY2huaXF1ZSBpcyB0byBjaGFuZ2UgY29kZSB1bml0cyBpbiB0aGUgcmFuZ2UgRDgwMC1ERkZG
IHRvIEY4MDAtRkZGRiBhbmQNCj4gdmljZSB2ZXJzYQ0KDQpQbGVhc2UgYmUgY2FyZWZ1bC4gVGhl
cmUgYXJlIGNvZGVwb2ludHMgaW4gdGhlIHJhbmdlIEUwMDAtRjdGRiwgdG9vLiANClRoZXNlIGFy
ZSBpbiB0aGUgUHJpdmF0ZSBVc2UgQXJlYSAoUFVBKSwgc28gdGhlIGNoYW5jZXMgdGhhdCB0aGVy
ZSdzIA0Kc29tZSBkYXRhIHRoZXJlIGlzIG5vdCB2ZXJ5IGhpZ2gsIGJ1dCBzdGlsbCwgaXQncyBi
ZXR0ZXIgdG8gZG8gdGhpcyBieQ0KbW92aW5nIEQ4MDAtREZGRiB0byBGODAwLUZGRkYgYW5kIHNo
aWZ0aW5nIGRvd24gYWxsIG9mIEUwMDAtRkZGRiB0byANCkQ4MDAtRjdGRi4gT3RoZXJ3aXNlLCBq
dXN0IG9uZSBzcHVyaW91cyBjb2RlcG9pbnQgaW4gdGhlIFBVQSBjYW4gcnVpbiANCnNvcnQgb3Jk
ZXIgaW50ZXJvcGVyYWJpbGl0eSBiZXR3ZWVuIFVURi04IGFuZCBVVEYtMTYuDQoNClJlZ2FyZHMs
ICAgTWFydGluLg0KDQo+IChhbiBPKG4pIG9wZXJhdGlvbikgYW5kIHRoZW4gcnVuIGEgbmF0aXZl
IGNvbXBhcmlzb24gKGFsc28NCj4gTyhuKSkuICBJbiBKYXZhIHRoaXMgYmVoYXZpb3IgY2FuIGJl
IHByb3ZpZGVkIGFzIGEgY2xhc3MgaW1wbGVtZW50aW5nIHRoZQ0KPiBzdGFuZGFyZCBpbnRlcmZh
Y2UgQ29tcGFyYXRvci4NCg0K


From nobody Sun Dec 23 21:49:54 2018
Return-Path: <cowan@ccil.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 BBD1D130EB9 for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 21:49:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ccil-org.20150623.gappssmtp.com
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 uI1rH2GrhO22 for <json@ietfa.amsl.com>; Sun, 23 Dec 2018 21:49:50 -0800 (PST)
Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 550D5130EBB for <json@ietf.org>; Sun, 23 Dec 2018 21:49:49 -0800 (PST)
Received: by mail-wr1-x42c.google.com with SMTP id q18so10635474wrx.9 for <json@ietf.org>; Sun, 23 Dec 2018 21:49:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2N//YY7Cj/XrWL32MKXomWaGMGaD34GXEcU1fQ3yuRo=; b=r9iHhWbBADLOagLZ65kf5+hOOeEdqLVBhcUa/zS2KWaGFUEJJYBUhnS9lW7QOuBxqi Bh2JAy6uhmGfK1lcP1PDIa08ScFRwLQVIgEK/QvTVX475vz5GgXl0nbNzPKbI+83DCiz iCDmvLgeaN9cwcpUGYKUTI2Z2gxAMkq/CkTjwwuf5hmuFDDi1y2Kjlabfc15HIiC56h9 tabaepI33gRUY8LxP/yVkAaKSQBZcZL1KVGY51pjXj8+WXP2G4uqzGvlZxni2ZLGXob5 yFBAPMQZW3h9Ib40R0Sg/+BoDaQyZISAvZRSwwYsQSDZlGNKTi614T4DZujQue+k/E3Z KbwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2N//YY7Cj/XrWL32MKXomWaGMGaD34GXEcU1fQ3yuRo=; b=bHGYHv1D8T5rX2vS5h+xgT2qNJEEcOX6kNV9HcvH8Kn4VtEGUuDt0J5+K+Gm7yT6Lw eVWoo8kyyanlogpC3lKjPaM5kNU4EDn0Q5LQFjGV+3Sn5akfyu6Xwkc7ze2h4CXzpmdc QxKOOUjS81e5aybPfusHjAXMlAJeH6WdQ9hIMKoqUbazX6+cOjC8n9UUJ7By5BdDXaHm inwae/PZrbgr8Vd2xwZFtQAnLFURQ+NtQJP+bDLZuXWADSaO/JgUWJV5fpgb1Lq450yI 8LX2pDsfhY/oil22vytyBu9mMN25GYodGbNipn6zHhBBEabJo+nT3v0RxCVc6Wzq78vI eLvQ==
X-Gm-Message-State: AJcUuke6UcER7ycqAoo5/oyQ59ytfbNpYzfoNlKYeKJOHuwIVKHVSAOH fElxJoAPNs4yc5+ielUEn9RkOXBoSdJZtaorVvUupg==
X-Google-Smtp-Source: ALg8bN5AcTjMtHhT+cBwY8hHHn5Vh8Ct4CHD+uHW+DLQ8uyu/pCIfbPYBOkdwWJb1tBUdD8GPje1SILRB6ovNXWGrCY=
X-Received: by 2002:a5d:5089:: with SMTP id a9mr10768098wrt.327.1545630587784;  Sun, 23 Dec 2018 21:49:47 -0800 (PST)
MIME-Version: 1.0
References: <154524860359.1830.15798957210923037180.idtracker@ietfa.amsl.com> <983a6cb9-cca5-697f-73a4-d2fa8de6c27e@gmail.com> <893a23dd-3a3d-43cc-a7b9-001a08b2f545@www.fastmail.com> <3de2d879-ce2f-3478-50cf-c6570f01a7f0@gmail.com> <CAD2gp_QV0hK4_M2vPKLmi_Wp3kO+zv23raFm0eH++86V818TWA@mail.gmail.com> <99ad1daf-d207-6d38-a128-48e84c38000d@it.aoyama.ac.jp>
In-Reply-To: <99ad1daf-d207-6d38-a128-48e84c38000d@it.aoyama.ac.jp>
From: John Cowan <cowan@ccil.org>
Date: Mon, 24 Dec 2018 00:49:36 -0500
Message-ID: <CAD2gp_SjLGS0YFAKyckWvgusSW0SfL+Rxb=FAyhYp-8qDqmBqA@mail.gmail.com>
To: =?UTF-8?Q?Martin_J=2E_D=C3=BCrst?= <duerst@it.aoyama.ac.jp>
Cc: Anders Rundgren <anders.rundgren.net@gmail.com>, Bron Gondwana <brong@fastmailteam.com>, "json@ietf.org" <json@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000023a880057dbe2a04"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/vMtaQ1kXc5uj7Y3DwE8yPzM4D8A>
Subject: Re: [Json] I-D: draft-rundgren-json-canonicalization-scheme-02
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Mon, 24 Dec 2018 05:49:53 -0000

--00000000000023a880057dbe2a04
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

You're right, of course.

On Mon, Dec 24, 2018 at 12:00 AM Martin J. D=C3=BCrst <duerst@it.aoyama.ac.=
jp>
wrote:

> Hello John, others,
>
> On 2018/12/24 05:39, John Cowan wrote:
> > On Sun, Dec 23, 2018 at 5:02 AM Anders Rundgren <
> > anders.rundgren.net@gmail.com> wrote:
> >
> > That the JCS specification (at the time of writing) sorts properties
> based
> >> on big endian UTF-16 code units is indeed for maintaining optimal
> >> performance on legacy software platforms, but also due to JSON itself
> which
> >> specifies Unicode string escapes as UTF-16 constants. If there actuall=
y
> is
> >> a problem using UTF-16 for sorting, wouldn=E2=80=99t this affect JSON =
as well?
> >>
> >
> > It is indeed annoying that none of Java, C#, or JavaScript have standar=
d
> > methods for comparing strings in Unicode codepoint order.   At least in
> > Java and C#, however, such routines are easily written and not inherent=
ly
> > less efficient (in a big-O sense) than native routines.  The standard
> > technique is to change code units in the range D800-DFFF to F800-FFFF a=
nd
> > vice versa
>
> Please be careful. There are codepoints in the range E000-F7FF, too.
> These are in the Private Use Area (PUA), so the chances that there's
> some data there is not very high, but still, it's better to do this by
> moving D800-DFFF to F800-FFFF and shifting down all of E000-FFFF to
> D800-F7FF. Otherwise, just one spurious codepoint in the PUA can ruin
> sort order interoperability between UTF-8 and UTF-16.
>
> Regards,   Martin.
>
> > (an O(n) operation) and then run a native comparison (also
> > O(n)).  In Java this behavior can be provided as a class implementing t=
he
> > standard interface Comparator.
>
>

--00000000000023a880057dbe2a04
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">You&#39;re right, of course.<br></div><br><div class=3D"gm=
ail_quote"><div dir=3D"ltr">On Mon, Dec 24, 2018 at 12:00 AM Martin J. D=C3=
=BCrst &lt;<a href=3D"mailto:duerst@it.aoyama.ac.jp">duerst@it.aoyama.ac.jp=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
Hello John, others,<br>
<br>
On 2018/12/24 05:39, John Cowan wrote:<br>
&gt; On Sun, Dec 23, 2018 at 5:02 AM Anders Rundgren &lt;<br>
&gt; <a href=3D"mailto:anders.rundgren.net@gmail.com" target=3D"_blank">and=
ers.rundgren.net@gmail.com</a>&gt; wrote:<br>
&gt; <br>
&gt; That the JCS specification (at the time of writing) sorts properties b=
ased<br>
&gt;&gt; on big endian UTF-16 code units is indeed for maintaining optimal<=
br>
&gt;&gt; performance on legacy software platforms, but also due to JSON its=
elf which<br>
&gt;&gt; specifies Unicode string escapes as UTF-16 constants. If there act=
ually is<br>
&gt;&gt; a problem using UTF-16 for sorting, wouldn=E2=80=99t this affect J=
SON as well?<br>
&gt;&gt;<br>
&gt; <br>
&gt; It is indeed annoying that none of Java, C#, or JavaScript have standa=
rd<br>
&gt; methods for comparing strings in Unicode codepoint order.=C2=A0 =C2=A0=
At least in<br>
&gt; Java and C#, however, such routines are easily written and not inheren=
tly<br>
&gt; less efficient (in a big-O sense) than native routines.=C2=A0 The stan=
dard<br>
&gt; technique is to change code units in the range D800-DFFF to F800-FFFF =
and<br>
&gt; vice versa<br>
<br>
Please be careful. There are codepoints in the range E000-F7FF, too. <br>
These are in the Private Use Area (PUA), so the chances that there&#39;s <b=
r>
some data there is not very high, but still, it&#39;s better to do this by<=
br>
moving D800-DFFF to F800-FFFF and shifting down all of E000-FFFF to <br>
D800-F7FF. Otherwise, just one spurious codepoint in the PUA can ruin <br>
sort order interoperability between UTF-8 and UTF-16.<br>
<br>
Regards,=C2=A0 =C2=A0Martin.<br>
<br>
&gt; (an O(n) operation) and then run a native comparison (also<br>
&gt; O(n)).=C2=A0 In Java this behavior can be provided as a class implemen=
ting the<br>
&gt; standard interface Comparator.<br>
<br>
</blockquote></div>

--00000000000023a880057dbe2a04--

