[Json] RFC 8785 - JSON Canonicalization Scheme

Anders Rundgren <anders.rundgren.net@gmail.com> Sat, 04 July 2020 18:27 UTC

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 808503A0C18 for <json@ietfa.amsl.com>; Sat, 4 Jul 2020 11:27:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, 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 hAFtdqGNi1Eo for <json@ietfa.amsl.com>; Sat, 4 Jul 2020 11:27:17 -0700 (PDT)
Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 DF5F73A0C13 for <json@ietf.org>; Sat, 4 Jul 2020 11:27:16 -0700 (PDT)
Received: by mail-wm1-x333.google.com with SMTP id o8so35071085wmh.4 for <json@ietf.org>; Sat, 04 Jul 2020 11:27:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:references:to:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=drqcfNOt5D9oUQDYZUfl7MpBYniTS8BgM18S60C4m7g=; b=uebpkPhRuMMybC77RYYcCfi0ncKD/5KPOgtO6SkeOdR2/J+Xe3kOd6iNpDTyDovNcm FwdLxuacc4gKWEmvsbGP5s6hFD47iie7McE5zn7wWDBQxIvL/HAJxwVUL0JfNgR2e2zg tGIaCzA+uG+dpGQiQAZEKGK7mhuFeKP0e/9agOueQ17r3070od8mLTJWAn0ahFraefNv IM3PujtQ+z4NuJqhH3iAdikqs+D6aYgMI9+XglVpF1yDJG3wPSrI96BENkqaiQQV0wtU CLCNyrVdUO1vLeix4LZkmwRQEFfGecXVZd9YL1XNRqrtW5fUBzNhJNIcyEYX0BUkeuLr iakQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=drqcfNOt5D9oUQDYZUfl7MpBYniTS8BgM18S60C4m7g=; b=JGbHXPtpnR83xFrcSDagRUabVR0Y5e9ce1ZPqLsURwcAFDq9C64PNf/oy5EEYXjbYQ HAqrz2CmVNNkOrXphGeG2NH72MwWbb0yPg7DYAvPQemkubEVmHtNBN1vrDoNSxoikp6D jLfhw9dABCFWbltYXaCIrGDGdM1iLJGkLkVgEtpZNyh1q2fzakHg0kE+Ml8zFtpsoGE1 sbvqXrLDZyGx5i4kAHO3hAq+SCG3OxzHXKfzlKaTfX+MngVZc0qhwJu3/jja1s20PEXB TTemTiAdf1H0NBgr8Uf8MphXQZVviAAA72ZzH2fjIcOq9PmGikn/GyYJcCck+JTScb1b W9aw==
X-Gm-Message-State: AOAM532s8AZ2280oJblyY3nF5YrniEDAbL1sb/NggFH17togRCwSc6M9 RPktOCrxQqmXpTPD8H2pdvcvFtM6Fg4=
X-Google-Smtp-Source: ABdhPJxtT60ZbGkgxGLck0Fxi0utYbH4ztWRMwSOF0ANZRz6Z37qt6tLhqKmtvwG0lcQg2EgVpINcA==
X-Received: by 2002:a1c:6408:: with SMTP id y8mr41004392wmb.122.1593887234872; Sat, 04 Jul 2020 11:27:14 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id z1sm17794418wru.30.2020.07.04.11.27.13 for <json@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Jul 2020 11:27:13 -0700 (PDT)
References: <ce98d1e6-1f39-84ca-b9b0-d11b0aa3c2f7@gmail.com>
To: "json@ietf.org" <json@ietf.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Forwarded-Message-Id: <ce98d1e6-1f39-84ca-b9b0-d11b0aa3c2f7@gmail.com>
Message-ID: <715bce33-a744-5a97-8c6b-c7d2b27510f2@gmail.com>
Date: Sat, 04 Jul 2020 20:27:12 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <ce98d1e6-1f39-84ca-b9b0-d11b0aa3c2f7@gmail.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/wZIv14RRoVhbMIFCfZTr8DLj7qs>
Subject: [Json] RFC 8785 - JSON Canonicalization Scheme
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, 04 Jul 2020 18:27:19 -0000

https://www.rfc-editor.org/rfc/rfc8785

In case you would like to test what you can do with JSON canonicalization, there are two public Web applications at your disposal:
Using JWS: https://mobilepki.org/jws-jcs
Using an "unwrapped" JWS called Java Signature Format (JSF): https://mobilepki.org/jsf-lab

A real-world implementation from OWASP using JSF: https://cyclonedx.org/use-cases/#authenticity

In Saturn JSF is not only a security solution, it is also used for counter-signatures to simplify state-holding in payment systems:
https://cyberphone.github.io/doc/saturn/hybrid-payment.html#6

By securely embedding related messages in each other (aka "Russian doll"), there is no need for external references to previous messages.

Enjoy!

Anders