Re: [Json] Update Standard to support ECMA-262 BigInt

Tim Bray <tbray@textuality.com> Fri, 30 April 2021 20:07 UTC

Return-Path: <tbray@textuality.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 8E2793A2530 for <json@ietfa.amsl.com>; Fri, 30 Apr 2021 13:07:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=textuality-com.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 Hs2rULC2eOIK for <json@ietfa.amsl.com>; Fri, 30 Apr 2021 13:07:31 -0700 (PDT)
Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 DAEA03A252B for <json@ietf.org>; Fri, 30 Apr 2021 13:07:30 -0700 (PDT)
Received: by mail-lf1-x131.google.com with SMTP id n138so112030319lfa.3 for <json@ietf.org>; Fri, 30 Apr 2021 13:07:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=textuality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C8HK3f32PTfxTJxo/q1ZyVWd9AnqJyM5Poe+ARU5Ntw=; b=NvJjXtfA6Ms1GzbuRWWU5gHWJE2mYiMoEm1kazeKOvKwSebVRGDgHtEB1BRD8g1h5W i2ud1C7ZxEjUndMAt6Monp/2VfcM7ZdxuwAqPeQFNjOToo1V4/CB3AAD+GbkxDA5Qt2h J8rVE6wx6b41xKjjFDSomc7e7XWYKBuVmF6Fu/4PK8Eag3S2gZ+tIuOz6cozKJ80JMST mBiRllmsGy5Za4aZArqyOQG/9aGdheK1Sktu4MTbFiUbgvuYmQKLbkentgrbiVsL8jd4 u/kTuERpEYxSWOnw9aoBpe+naGwpwFbfevlD4o7rZHw1joWgmcFybdRVaL6jK7S7+64z bNpw==
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=C8HK3f32PTfxTJxo/q1ZyVWd9AnqJyM5Poe+ARU5Ntw=; b=eiXpRD6rL6SoqkHSV8zX1P1TEux1cOTMRHVKczZMWyPvZyj6PAH0sm/dzXEqG0TWjq TW872jiV4qDyQ/DbTXdrFXRmnEmWjqGq4tOi5ucEAjGLXEejyllftOELLSoK3tVvz2V5 DmrsNb6s/P9MDoBW8fTfV8qmAb6LS/3Cz4tfIfDuOGLfRAgJ9zaNSMpaLpczF+k5bdTx GfyCjgQucOnRB4jg7miVJpGisFy7fv4lXjETqIzkwVFeKh2jQaFUauAVtYqpqHpE9M/z QTizH3lc2xg5eVWCcrTJlMvMMCdLI2JExCua3NvbkgK8dhvZq3P1Zd8QldSjItYpwJ46 /QBg==
X-Gm-Message-State: AOAM530UgOwk0RUmR/wzBEu+hSHuxnglIe9xKS0jalZlhGVPB0qJQT5w 9KTyBQCS0Kma3au3/wqKJB9tyjRVa5Cd4uKD0VkTGg==
X-Google-Smtp-Source: ABdhPJyjYcKZObkf9aq+IPyhnsBLlO025vL6jokYjc0QqAxz+XXcK+hAXO9XTYcKJ6FUmc3qp3cbOBBSUl9ibm8yRP4=
X-Received: by 2002:a05:6512:3f93:: with SMTP id x19mr4458730lfa.182.1619813244876; Fri, 30 Apr 2021 13:07:24 -0700 (PDT)
MIME-Version: 1.0
References: <014e01d73aa1$81aa0d30$84fe2790$@thisisbeacon.com> <5987db79-06a7-69ab-faff-29c763a9a98d@codalogic.com> <CAE5tNmrrk8KjHh7-31Og0x-R+2S_4TQ-K4P+eJutO0p6K57FHg@mail.gmail.com> <CAHBU6ivd4nLuoZR-1NugkR2FEriSxH3D7Gg4zK+E6xceFu+xFg@mail.gmail.com> <CAChr6Sz17YRmNxkKMtfng+36O+dbuZqVqMsyvsr3vf2zYRTrWQ@mail.gmail.com>
In-Reply-To: <CAChr6Sz17YRmNxkKMtfng+36O+dbuZqVqMsyvsr3vf2zYRTrWQ@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
Date: Fri, 30 Apr 2021 13:07:13 -0700
Message-ID: <CAHBU6iumua4xHZqsh3MAT8GQfH7RuSDTjTXkAtp=ZwqQOZVS7A@mail.gmail.com>
To: Rob Sayre <sayrer@gmail.com>
Cc: David Kemp <dk190a@gmail.com>, JSON WG <json@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000010482605c1362909"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/WRgsDuS5gZ5dPdFUKb97a7Rjxp8>
Subject: Re: [Json] Update Standard to support ECMA-262 BigInt
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, 30 Apr 2021 20:07:33 -0000

On Fri, Apr 30, 2021 at 12:58 PM Rob Sayre <sayrer@gmail.com> wrote:

> For crypto apps, you pretty well have to put the big numbers in strings.
>>
>
> JSON numbers interchanged between languages that have arbitrary-precision
> numbers work fine. But, JS BigInt (original post) operations aren't
> constant time, so you shouldn't use them for crypto anyway [1].
>

Um, some popular JSON libraries in languages that can handle big numbers
fail to do the right thing.  You're really asking for trouble if you put
anything that can't fit in a IEEE double.  *sadface*



>