Re: [Json] [Technical Errata Reported] RFC7493 (5354)

Carsten Bormann <cabo@tzi.org> Fri, 11 May 2018 13:24 UTC

Return-Path: <cabo@tzi.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 23C2C1243F6 for <json@ietfa.amsl.com>; Fri, 11 May 2018 06:24:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YbUCpBMlWN41 for <json@ietfa.amsl.com>; Fri, 11 May 2018 06:24:17 -0700 (PDT)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 324F01201F2 for <json@ietf.org>; Fri, 11 May 2018 06:24:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id w4BDOC8V016759; Fri, 11 May 2018 15:24:12 +0200 (CEST)
Received: from [192.168.217.114] (p5DC7F793.dip0.t-ipconnect.de [93.199.247.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 40j9mD4ZQlzDWtY; Fri, 11 May 2018 15:24:12 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <dea9478a-6752-b723-a303-ef3544c57f33@gmail.com>
Date: Fri, 11 May 2018 15:24:11 +0200
Cc: Joe Hildebrand <hildjj@cursive.net>, json@ietf.org
X-Mao-Original-Outgoing-Id: 547737850.3057539-c4024a45630a2ccf662a22e74c62dbdb
Content-Transfer-Encoding: quoted-printable
Message-Id: <595C4165-6AED-4D0B-A286-A53BC605E631@tzi.org>
References: <20180510050214.916C4B81EA7@rfc-editor.org> <4EB0B6DE-2416-4909-9EDA-975439055F33@cursive.net> <b23ce436-22c3-17bf-c830-59ee88b9fc2f@gmail.com> <dea9478a-6752-b723-a303-ef3544c57f33@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/miTFMudDof5PoVFBpTp20XUxn2o>
Subject: Re: [Json] [Technical Errata Reported] RFC7493 (5354)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
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, 11 May 2018 13:24:19 -0000

On May 11, 2018, at 10:21, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> 
> Since we presumably agree on that integers represented as JSON Numbers can (in a scheme constrained by IEEE-754 double precision), cover exactly the range -(2**53) to 2**53, the issue boils down to the ability validating that you actually are sending or receiving integers within that range.

As I mentioned, you can’t validate that you are receiving -2**53, with a stock, fully interoperable I-JSON decoder implementation.

Both ECMAScript and I-JSON are right in taking out 2**53 out of the safe space.

(And, of course, lots more integers can be represented in binary64, e.g. all numbers 2**53+2*n where n is an unsigned integer < 2**52.  This is just not very useful for interoperable exchange of integers via JSON; neither for n=0 nor for other values of n.)

> Feel free rejecting this errata report.  

Yes, that is what should be done.

> Personally, I stick to “int53".

(int54, if such a thing existed, is still not I-JSON safe at MININT54 = -2**53.)

Grüße, Carsten