[Json] Update: Signed JavaScript/JSON Objects using ES6

Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 27 October 2015 14:46 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 55C5A1A8AC1; Tue, 27 Oct 2015 07:46:15 -0700 (PDT)
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, SPF_PASS=-0.001] autolearn=ham
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 0mcMZMnUDPtx; Tue, 27 Oct 2015 07:46:14 -0700 (PDT)
Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (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 B2E4E1A8ABB; Tue, 27 Oct 2015 07:46:13 -0700 (PDT)
Received: by wikq8 with SMTP id q8so215134325wik.1; Tue, 27 Oct 2015 07:46:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=4YmrKZgcg52srdx868IIaZJofvOl0qAhqbOLxLZIImw=; b=GkSCrqyaJyVANyqjo+Yy2u5sVvkgJNQ3lcvdsqUPap8WALZASQ3z4THkUQQCHnWsdg rFTj6tKstLSjzWj0kv8b+ftEDUJcAwpS2aCQc3/KsRsMhC0shjgYnxm8qYFQK/uBj1+Q 3BLByS63PipD1UOTJE2tsCTSliUazwKxgIyZVNNsmM2S1Q9BRy1YIuqZCejLwTbfNH4y cXtFnijmCu3Li/rW4Awd7ekhFCCqEGEQJBIqjgDck7OlbUcZ3nEy1Mw9FA8h9b/N+RXt ovGRTamqeQcAJpMB+KxrpymwfIKgjNhBFCfX6GVturf3XZOmRelyjglZ52PADhfJ9JzV xrAg==
X-Received: by 10.180.85.134 with SMTP id h6mr29145444wiz.75.1445957171951; Tue, 27 Oct 2015 07:46:11 -0700 (PDT)
Received: from [192.168.1.79] (148.198.130.77.rev.sfr.net. [77.130.198.148]) by smtp.googlemail.com with ESMTPSA id pi5sm18048986wic.3.2015.10.27.07.46.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2015 07:46:11 -0700 (PDT)
From: Anders Rundgren <anders.rundgren.net@gmail.com>
To: "json@ietf.org" <json@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Message-ID: <562F8E2F.7050605@gmail.com>
Date: Tue, 27 Oct 2015 15:46:07 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/0MeQBaLDn8G9Eugg1mQTb9uaP_o>
Subject: [Json] Update: Signed JavaScript/JSON Objects using ES6
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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: Tue, 27 Oct 2015 14:46:15 -0000

I believe the following (thanx to James Manger...) should be correct:

http://webpki.org/ietf/draft-rundgren-predictable-serialization-for-json-tools-00.html#rfc.section.3.3

I have used this scheme (modulo floating point) in practice for more than a year with all the major browsers without any hiccups but now it feels much better since the "black magic/guessing" is gone :-)

Anders