Re: [dispatch] [art] Plain text JSON digital signatures

Anders Rundgren <> Tue, 27 April 2021 23:48 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2AE6F3A25DC; Tue, 27 Apr 2021 16:48:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Status: No, score=-2.099 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id mbyaJyerCugv; Tue, 27 Apr 2021 16:48:53 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::336]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 7E3083A25D9; Tue, 27 Apr 2021 16:48:53 -0700 (PDT)
Received: by with SMTP id i21-20020a05600c3555b029012eae2af5d4so8033445wmq.4; Tue, 27 Apr 2021 16:48:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IwfoDDY9l4QVtUBqexOAOFzt0mCO2fk8g0w3v01ySEM=; b=W5vgFXE6jXcIh07my29QfBM6ydkOnhDOsAYakaMDjQ9NnNln/ip2LU1UktTVpfOhEy +L+oKt+R9tWrwzLi+hzt+Q3FKfYqvxp73D6eFltMHcFsdAV0uh8uSKUPy6m7DmSp9PvH 962BbXaREG/lSk03fOvgYqAduadEl1fo7z2fUPdCJTyVvG3b0P50mQMNdU2X4R/VTlxs XyHHBC2HSniq0ZXWVggsMuJ+bka5uA8IPzCyabXhZIHPBM76XxDOgLOUVmXLtO0iexGb IApVw9+NN3gJqbnI3hFPhFxjTsFFWoVyvVVmk/ovxiOrAc42Lh9OpXAxudgK6dQchxOm DcJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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=IwfoDDY9l4QVtUBqexOAOFzt0mCO2fk8g0w3v01ySEM=; b=JBBt5p1sh2oRq0H5olgvjJ3yVJA3wRjewU+Jh6aWHbyMgOJ8dYaGNrtsYsKkpQSD06 a8Ff9ifaXq0TVkWWNQyS2H+bw82EQqaiImovDdrKllEJWbbOLTUMBS1xyYb3dpPxB+2Z DuSc8AkbkxegFO3B/tDkSZ5ifZCsFUnhomChtdg1P9woLQFd9Jch1QMneaTH8hdlcyKj JB4J23xDv0IOemdbt7CYEjCaLPtvi4v7UcXti6wJ8q279v2BWRUUpcs4aIY0HOKUD0OQ Eg/OJbQnbrHzNhQ3noM4nRC1TCQGUchdCcRhl76GtVuvMQSTmKxiOD2LFpCJE8kgEonQ Ti+w==
X-Gm-Message-State: AOAM533n8Y/nJbGvfW7F2H8aOC7ONZyiVlwTZ9kDHbg0L+aOhbFO+34D lvcWC2TzHWLMgAImZ5vIBTM=
X-Google-Smtp-Source: ABdhPJxy4TVFD1/fZjExeGXbBd8KtIuvHovfaaJy3crmN6BmKMuCn7EEUJjvPnWDxMB3Wk3SzUTTXQ==
X-Received: by 2002:a1c:e089:: with SMTP id x131mr9262910wmg.102.1619567330353; Tue, 27 Apr 2021 16:48:50 -0700 (PDT)
Received: from [] ( []) by with ESMTPSA id l12sm5770171wrm.76.2021. (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Apr 2021 16:48:49 -0700 (PDT)
To: Carsten Bormann <>
Cc:, IETF SecDispatch <>, DISPATCH <>,
References: <> <> <>
From: Anders Rundgren <>
Message-ID: <>
Date: Wed, 28 Apr 2021 01:48:46 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <>
Subject: Re: [dispatch] [art] Plain text JSON digital signatures
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DISPATCH Working Group Mail List <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 27 Apr 2021 23:48:58 -0000

On 2021-04-27 18:21, Carsten Bormann wrote:
> On 2021-04-27, at 17:47, Brian Rosen <> wrote:
>> There was a lot of opposition to the idea previously,
> Yes.

Dear Carsten,
There were indeed a lot of opposition at IETF-104 but nobody has to date bothered providing a single example showing why this idea {w|sh}ould not work [1].

If we take the better [and fully standardized] alternative (JWS), it transforms a JSON object into a Base64Url-encoded string and then puts it into a specific signature container.  That is, the result bears very little similarity to the original which obviously is a drawback. Then a [moderately] skillful attacker replaces the algorithm in the JWS header with the standardized "none" and the whole thing passes validation with flying colors [2].

Anyway, variants of detached (enveloped) JWS signatures in JSON are likely to become a de-facto standard.  Here is an example from a very active group withing the W3C:

Feel free rearchitecting using the current JOSE stack; it might even be fun :)

BTW, I have just started the design of a CBOR library needed for dealing with CTAP2/FIDO for the project above.  CBOR seems pretty cool.


1] In all fairness, it does require a bit of work for the application developer who may have to adjust the parsing scheme (not the parser) for things like RFC3339 data.

2] In a n00b world, where developers do not understand that a compliant JWS library does not necessarily come with suitable default policies.

> But there is also some opposition to the weird way this is presented:
>>> On Apr 27, 2021, at 11:27 AM, Bret Jordan <> wrote:
>>> JWS/CT enables JSON objects to remain in the JSON format after being signed (aka "Clear Text" signing).
> We have a lot of ways that enable signed objects to remain in the format in which they were at signature time.
> Maybe we can fix the presentation of the idea more towards “we really liked XMLDsig and want it back for JSON”, which is certainly a position one can take.
> Grüße, Carsten
> _______________________________________________
> dispatch mailing list