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

Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 27 April 2021 23:48 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: secdispatch@ietfa.amsl.com
Delivered-To: secdispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2AE6F3A25DC; Tue, 27 Apr 2021 16:48:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
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: 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 mbyaJyerCugv; Tue, 27 Apr 2021 16:48:53 -0700 (PDT)
Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 7E3083A25D9; Tue, 27 Apr 2021 16:48:53 -0700 (PDT)
Received: by mail-wm1-x336.google.com 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; d=gmail.com; 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; d=1e100.net; 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 [192.168.1.67] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id l12sm5770171wrm.76.2021.04.27.16.48.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Apr 2021 16:48:49 -0700 (PDT)
To: Carsten Bormann <cabo@tzi.org>
Cc: art@ietf.org, IETF SecDispatch <Secdispatch@ietf.org>, DISPATCH <dispatch@ietf.org>, rfc-ise@rfc-editor.org
References: <CAPCpN4v_KaTWQAjqCUScV067MdKqjZ1N9s7yEeugAiJ8kZJEYA@mail.gmail.com> <19176491-A66F-41E9-9670-C842F82FCE68@brianrosen.net> <38EA765F-6FF9-4C45-95D9-7429612B08EC@tzi.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <c59d4ac2-e4b3-a790-f64a-1a5919ee7fb0@gmail.com>
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: <38EA765F-6FF9-4C45-95D9-7429612B08EC@tzi.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdispatch/FhKbUJRKger2U9oDuliUL3n7tF8>
Subject: Re: [Secdispatch] [dispatch] [art] Plain text JSON digital signatures
X-BeenThere: secdispatch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Dispatch <secdispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdispatch/>
List-Post: <mailto:secdispatch@ietf.org>
List-Help: <mailto:secdispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=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 <br@brianrosen.net> 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:
https://w3c-ccg.github.io/ld-proofs/#example-2-a-simple-signed-linked-data-document

Feel free rearchitecting https://fido-web-pay.github.io/ 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.

Regards,
Anders

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 <jordan.ietf@gmail.com> 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
> dispatch@ietf.org
> https://www.ietf.org/mailman/listinfo/dispatch
>