[Cbor] Fwd: New deterministic CBOR Libraries (Rust & Swift) from Blockchain Commons

Anders Rundgren <anders.rundgren.net@gmail.com> Thu, 16 February 2023 05:12 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 17F3DC14CE46; Wed, 15 Feb 2023 21:12:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.095 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F3CB8JZQ0EyW; Wed, 15 Feb 2023 21:12:11 -0800 (PST)
Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 05EF8C14F748; Wed, 15 Feb 2023 21:12:11 -0800 (PST)
Received: by mail-wm1-x333.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so694333wms.1; Wed, 15 Feb 2023 21:12:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:to:content-language:references:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=DCQJD+UhGAqFghani+zV8igdVfpQ2w/VjUGkkq7WOoU=; b=Op15y6RczkDMHP8X6TFFWKqqEGgKsvlxEvuC1SB1z1yTKXNv06VyLmGY/na8vw1imU dkzRyCrgfpK8uUazRaRWRJ2sE0TOinrDrNslnkJne37n04ryzqEjz0VMYt9DPkayOulL 1gdD+WebQeF/z9rOtsJVAQ5NAcJxA65bgcx0m2f+F2JbydO5zDnOOFBfZ3/XoJ7Kw8Ml VR5tNhqxDMn0yyreX8bgVCPPyVgywau9L/m4mIWf/U89NE21P99QGdNXorry9HeAUaiZ DLnzgZvQOXcAc/hCdADOseMkeOcNWERLBVTPo+Cw8N8pm683y1sfCKwTVevIQPiGMXNQ YO1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:to:content-language:references:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=DCQJD+UhGAqFghani+zV8igdVfpQ2w/VjUGkkq7WOoU=; b=VpBkWQtCCdk0NIkeVXjI+ZwKeNndXPV4EI+LjKt/xysIaN/s+qU6fYWdPz6Fhf88T5 p6U+c8AtIW7SYNZVF8qCPsFpkHoy5TorU3ZKEleTcHrb6NLrAtsWEaPto4FQ6yr+yNte unQyQrOSZ3MIUsc9LGP2V5SeM74zCs+xVGstMQWcWR5tKPZkWQ7NiFMWVNUwfgJe+ygk UAJH1jUEeplfBHQCTSI5kWc+bGjuQbQchlrMQ74tJLuBXjS0eoh/hsG6esaujmCNNvXJ rix+apz+QLfiwPtQQ/naBj1uzuHkFTNLub6t6+dCZlqoodbxrvoJc4MZEvpCuolQy65F klRg==
X-Gm-Message-State: AO0yUKXNptballkVnUZSuZVOxW0DjtdFlBZMHvg979E6RsdatoPLfmQ9 /l6JSB6zN9EGF1N1S1Gz+jE20ARi510=
X-Google-Smtp-Source: AK7set+LX/v1Qmwfx51+BfJMfF2/IUB0OIlxI/pA8EXU6CD+rHDZOUrkhEV7F1gh2wkXj5PfnzxPzA==
X-Received: by 2002:a05:600c:6011:b0:3da:fc07:5e80 with SMTP id az17-20020a05600c601100b003dafc075e80mr679587wmb.12.1676524329052; Wed, 15 Feb 2023 21:12:09 -0800 (PST)
Received: from ?IPV6:2a01:e34:ec4e:5670:e5fb:6d48:456d:df13? ([2a01:e34:ec4e:5670:e5fb:6d48:456d:df13]) by smtp.googlemail.com with ESMTPSA id f17-20020a7bc8d1000000b003e2066a6339sm473602wml.5.2023.02.15.21.12.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Feb 2023 21:12:08 -0800 (PST)
Content-Type: multipart/alternative; boundary="------------p0VaqIGi6J79kndvryxgjq20"
Message-ID: <b8b34b95-1b9c-37d6-9788-d30be719d0af@gmail.com>
Date: Thu, 16 Feb 2023 06:12:08 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2
References: <CACrqygDmeTin3WmyOtdJH4UZQqqTncnBCqxFY-A2uE87RmJX_w@mail.gmail.com>
Content-Language: en-US
To: cbor@ietf.org, "cose@ietf.org" <cose@ietf.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <CACrqygDmeTin3WmyOtdJH4UZQqqTncnBCqxFY-A2uE87RmJX_w@mail.gmail.com>
X-Forwarded-Message-Id: <CACrqygDmeTin3WmyOtdJH4UZQqqTncnBCqxFY-A2uE87RmJX_w@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/l7nzQHFjfpK9nfBOHiQ1L-Rr558>
Subject: [Cbor] Fwd: New deterministic CBOR Libraries (Rust & Swift) from Blockchain Commons
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Feb 2023 05:12:15 -0000

Deterministic CBOR will as I predicted go where JOSE and COSE did not.
What's missing (IMO) is well-defined subset where for example map keys would either be tstr or integer.
Anders


-------- Forwarded Message --------
Subject: 	New deterministic CBOR Libraries (Rust & Swift) from Blockchain Commons
Resent-Date: 	Thu, 16 Feb 2023 01:00:25 +0000
Resent-From: 	public-vc-wg@w3.org
Date: 	Wed, 15 Feb 2023 16:59:31 -0800
From: 	Christopher Allen <ChristopherA@lifewithalacrity.com>
To: 	Credentials Community Group <public-credentials@w3.org>, W3C Verifiable Credentials WG <public-vc-wg@w3.org>
CC: 	Wolf McNally <wolf@wolfmcnally.com>, Shannon Appelcline <shannon.appelcline@gmail.com>



Since I know that many projects in the broader Credentials Community already use CBOR, I'd like to announce Blockchain Commons' release of dCBOR libraries for Rust and Swift. In particular, these two languages demonstrate our support of use cases for dCBOR for mobile in Android and iOS:

  * *dCBOR Codec for Rust:* https://github.com/BlockchainCommons/bc-dcbor-rust
  * *dCBOR Codec for Swift:* https://github.com/BlockchainCommons/BCSwiftDCBOR

We've also produced a CLI app using our Rust library, which can be used to test parsing and validation:

  * *dCBOR CLI:* https://github.com/BlockchainCommons/dcbor-cli

We focused on the deterministic flavor of CBOR per §4.2 of RFC-8949 <https://www.rfc-editor.org/rfc/rfc8949.html#name-deterministically-encoded-c>because of our specific need to produce deterministically repeatable hashes in the Merkle Tree underlying our Gordian Envelope <https://www.blockchaincommons.com/introduction/Envelope-Intro/> data format. We suspect that there will be others with similar needs and hope these dCBOR libraries will prove useful for other specs & standards using CBOR!

I'd love to get any advice, comments, or thoughts you have on our dCBOR libraries, as well as any requirements that the libraries may need to meet. I'd also appreciate to get any CCG-related CBOR test examples that we can use in documents and examples, such as mDL and COSE tests.

I'm also happy to discuss why we picked CBOR <https://www.blockchaincommons.com/introduction/Why-CBOR/> as a data format and why dCBOR is particularly advantageous, either here or in our discussion forums at GitHub <https://github.com/orgs/BlockchainCommons/discussions/184>.

Thanks!

-- Christopher Allen
    Blockchain Commons