Re: [Multiformats] New versions of Multibase and Multihash published

Robin Berjon <robin@berjon.com> Mon, 21 August 2023 13:52 UTC

Return-Path: <robin@berjon.com>
X-Original-To: multiformats@ietfa.amsl.com
Delivered-To: multiformats@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3A23CC15256E for <multiformats@ietfa.amsl.com>; Mon, 21 Aug 2023 06:52:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.994
X-Spam-Level:
X-Spam-Status: No, score=-1.994 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-0.091, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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=messagingengine.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 irlCCOcPEg3b for <multiformats@ietfa.amsl.com>; Mon, 21 Aug 2023 06:52:09 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 940FBC152567 for <multiformats@ietf.org>; Mon, 21 Aug 2023 06:52:09 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D8F075C24DA; Mon, 21 Aug 2023 09:52:04 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 21 Aug 2023 09:52:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1692625924; x=1692712324; bh=8fG8Soq7P5XrhCZDzZN6VooTmBh7tQgYsnK UnE6lnwc=; b=cjEE/Pfj5h0HQcN5Z3e6cq6I5mpYe8K4OjnG5ezAWtWZUPpMMg7 C4tOjDqNpM+kBD3xl4wauRuN9JiFXdG+p2+D1oWkaXfCWKBCKz4KfI8OFXC9ZYMn Ejkqu5drnwlZqicY5uL0+OxNtNJLgpLSLEBObNqSTMBbKNT4E320qkwCsIP/zuMd kr6DJc1ewnfoL0mL3vY7piIR20oQzcowPQOPQsD1IXykq2z0zroE22wHXZQQi+eq pRvMC2VeEaxiPfB0qyzQaz7CnDg3CTcWI//D5rE/Y9JmeTEksouHicji1i//WZvE tWhvhqsPpEP83LiTe1iW75j0rL0P/4zIT1Q==
X-ME-Sender: <xms:BGzjZE871UTeHp1sanXALYbiHSbQLgSWwodSxp31QZb5v5g2ENB4Lw> <xme:BGzjZMtW3Vh4hcmdj9IPTNfL26Sey0UiO8ymQ_QSDWwGvQtaVdoyhB3LFAkfzRmfU 1yYNL1uPnNoLw>
X-ME-Received: <xmr:BGzjZKCuvLZTrPdQc9Wo1ehknRB2qZ6TKpsgu9jJ1yvfTYjRIwgpiwvVfixmB4Et1l4ABT0C4jQnZtt8yvmBqT5kwyF5RhbiEAALJbROLhFh_OIx>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudduledgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftohgs ihhnuceuvghrjhhonhcuoehrohgsihhnsegsvghrjhhonhdrtghomheqnecuggftrfgrth htvghrnhepleffgfdtveefudffkedugedtleelveelgfeiveegveeujefffffgjefgffeh hfdtnecuffhomhgrihhnpehiphhfshdrthgvtghhpdgsvghrjhhonhdrtghomhdpmhgrsh htohguohhnrdhsohgtihgrlhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehrohgsihhnsegsvghrjhhonhdrtghomh
X-ME-Proxy: <xmx:BGzjZEeGnVPK7gnxwTJVyjncnmHt4cOCzWPnJD3WBKyDzS5bxCkS3w> <xmx:BGzjZJO6bbikox4s0VcxClFp-bUAHmOjJ9PFmXHKVzwtosVhJ0RFVg> <xmx:BGzjZOkewxYF15q99GrfE8lImMQVqUbmQjQweB87p47ywIDP40ekLw> <xmx:BGzjZLX_NIRunjtfJFcjXnFEDyWw8lvjaNHWXbt9jQ3XanDjcr8GqA>
Feedback-ID: i38c44178:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Aug 2023 09:52:03 -0400 (EDT)
Message-ID: <3455fcb9-8d05-7a29-824b-20a58528345f@berjon.com>
Date: Mon, 21 Aug 2023 15:52:01 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0
Content-Language: en-US
To: Manu Sporny <msporny@digitalbazaar.com>, multiformats@ietf.org
Cc: Melvin Carvalho <melvincarvalho@gmail.com>
References: <CAMBN2CRDN9ft+youRagbFMypD8_z4tMn49DHzBNsR66ZgGxBkA@mail.gmail.com> <CAKaEYhLMAEd_4oyA-ahuCtB501weT3RCMAMCaq74SnVTQjNAWg@mail.gmail.com> <CAMBN2CS__7r73EdsSC4Yjfho+HQKkcGextOxsyT4M60Bioq83A@mail.gmail.com> <b4172acb-1e08-d29c-9cd8-226a73fb7d01@berjon.com> <CAMBN2CT6z9Hz_C8Xb63pU6tCVVrz6FL8rfLWt-AKQ1o_DxHR3w@mail.gmail.com>
From: Robin Berjon <robin@berjon.com>
In-Reply-To: <CAMBN2CT6z9Hz_C8Xb63pU6tCVVrz6FL8rfLWt-AKQ1o_DxHR3w@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/multiformats/4SfHT-ah9fCvYmjwvP19J1kA5Nk>
Subject: Re: [Multiformats] New versions of Multibase and Multihash published
X-BeenThere: multiformats@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Discussion related to the various Multiformats data formats <multiformats.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/multiformats>, <mailto:multiformats-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/multiformats/>
List-Post: <mailto:multiformats@ietf.org>
List-Help: <mailto:multiformats-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/multiformats>, <mailto:multiformats-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Aug 2023 13:52:14 -0000

On 21/08/2023 15:06, Manu Sporny wrote:
> On Mon, Aug 21, 2023 at 8:39 AM Robin Berjon <robin@berjon.com> wrote:
>>> No, because CIDs are not file hashes, so you can't just use Multihash for them:
>>>
>>> https://docs.ipfs.tech/concepts/content-addressing/#cids-are-not-file-hashes
>>
>> I'm not sure how you reach that conclusion? You can put a CID in a URL
>> and the scheme will determine how it gets resolved. What that looks like
>> really depends on what you're trying to achieve.
> 
> All of the examples Melvin provided were specific to file hashes...
> the "mh" and "ni" schemes don't just work with any multicodec value,
> they are expected to be used with raw file hash values.

Ah, sorry, I took it as a reply to Melvin general question, not to the 
specific schemes he was exemplifying with.

> I can see the argument for "CIDs are just another type of content
> identifier that is based on a cryptographic hash -- therefore, they
> should be recognized by the mh and ni schemes", and that is /an/
> argument. It's a weak one, IMHO... a stretch, especially since CID
> v1-v3 are not identified as multihash values in the Multicodec
> registry. IPFS' own documentation is pretty clear on the matter that
> "CIDs are not file hashes".

I wouldn't use CIDs for hashes without further qualifications. The 
mapping can be sensible (e.g. for SRI, perhaps normalised around 
Iroh/Blake3, etc.) but not arbitrarily so.

-- 
Robin Berjon (he/him)
Governance & Standards at Protocol Labs
https://berjon.com/ - https://mastodon.social/@robin