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

Manu Sporny <msporny@digitalbazaar.com> Sun, 20 August 2023 15:24 UTC

Return-Path: <msporny@digitalbazaar.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 8B152C14CEFC for <multiformats@ietfa.amsl.com>; Sun, 20 Aug 2023 08:24:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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=digitalbazaar.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 Yv2scwUT81ZZ for <multiformats@ietfa.amsl.com>; Sun, 20 Aug 2023 08:24:33 -0700 (PDT)
Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) (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 65B01C14F721 for <multiformats@ietf.org>; Sun, 20 Aug 2023 08:24:32 -0700 (PDT)
Received: by mail-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-48d0eb04c8cso117026e0c.0 for <multiformats@ietf.org>; Sun, 20 Aug 2023 08:24:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalbazaar.com; s=google; t=1692545071; x=1693149871; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WCtX3UZwFQQjz5Dw/ewJeSsJJ7VpVgjqymyKhFeIzas=; b=CHoDBNygz2BUWoGVtV3Sq3nlmZKZn+wy6uxnOw9YteUGVBg3FyGHIi6Y0D2V/H56BM HF3faaNHFKIPw7N1h4ArCYMjnC4QwJXzlY4o/JyRCpj0izjrhymFH2xc/FsrIKga2ODC /RWiTwD40x9RubQYJLxqyrctvjBobcFbQTP6Thjl/iWTek79auvMKQ+5xuxdQ6Fq3bRS TdC1FEmJJwoarty9MvfaZEH8RhY5XJpoNFla6DYbNZMMDdF6JTnVZbWKtueDhSNDxKUL I7QMvzWn7+/b1I74AbP3X+Xc3nl3JVv7Thax1pfVUqlKSVnxLq8goVqT5cwbQaTuR2Do ktZw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692545071; x=1693149871; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WCtX3UZwFQQjz5Dw/ewJeSsJJ7VpVgjqymyKhFeIzas=; b=hvVZD0eFg/vMXTc6w/Vs+0NSKZBnpU4///lurDXv2D8q8vlYa2qn9CMb0bId1GjFUh pgck6mYSHgjS4IeoAyxtSprU/FAm3dqJb9m8JRIKi+m+RUu5VSJtcbM62KS5VHaJ6//s 7ng3kgheSUcHWlwU0G2KiZzdg0kUELGIaJcSC+dMv7/AUAq7osa49J3baDg4h1ER7D24 rBg+38BTN8aezMxbGXfkTMqTxM+nGCxdsqSf0T0w5csaDJ3QsfkuEBo9IfYveh7lR8Da Utg8vBo8ZJltqfr658/hdenAENNFyObWXr8yCsiL2EveOeh1qS468LQ1yWh0fxNKC89n AwAQ==
X-Gm-Message-State: AOJu0YyLI0RBVNKziP6lAn+F02Pq5Fp1h/7HzJHrXmJ9dWr+6G+iMG/X 6OsYX3UCQ36LPiibtPoaRY9ic2OqRnsFhU8S8r2Ulw==
X-Google-Smtp-Source: AGHT+IHwjgM0MMOCirxe4ryTpmHYzA/EGsDjCikD93f5PX3c9jbxquNyIChSzxty9UUi5WRZqOmOq/o0sCW4h/FDoDY=
X-Received: by 2002:a1f:edc4:0:b0:48d:c08:3e99 with SMTP id l187-20020a1fedc4000000b0048d0c083e99mr544578vkh.4.1692545071491; Sun, 20 Aug 2023 08:24:31 -0700 (PDT)
MIME-Version: 1.0
References: <CAMBN2CRDN9ft+youRagbFMypD8_z4tMn49DHzBNsR66ZgGxBkA@mail.gmail.com> <CAKaEYhLMAEd_4oyA-ahuCtB501weT3RCMAMCaq74SnVTQjNAWg@mail.gmail.com>
In-Reply-To: <CAKaEYhLMAEd_4oyA-ahuCtB501weT3RCMAMCaq74SnVTQjNAWg@mail.gmail.com>
From: Manu Sporny <msporny@digitalbazaar.com>
Date: Sun, 20 Aug 2023 11:23:55 -0400
Message-ID: <CAMBN2CS__7r73EdsSC4Yjfho+HQKkcGextOxsyT4M60Bioq83A@mail.gmail.com>
To: Melvin Carvalho <melvincarvalho@gmail.com>
Cc: multiformats@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/multiformats/Ei1M36CUGoXWJQEry0TmwxhRs3A>
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: Sun, 20 Aug 2023 15:24:37 -0000

On Sun, Aug 20, 2023 at 10:57 AM Melvin Carvalho
<melvincarvalho@gmail.com> wrote:
> Is it back compat (ie using the same string of characters) with the widely used CID format?

The short answer is "yes, almost certainly".

If by "widely used CID format", you mean the Multicodec headers 0x01,
0x02 and 0x03, then yes, nothing in these specifications prevent the
usage of those headers in a Multibase-encoded value and the Multihash
value headers don't conflict with the CID value headers.

However...

> Can I turn a CID into a URI and what would that look like?
>
> mh://<cid>
>
> ni://mh/<cid>
>
> Something like this?

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

IOW, nothing we're doing here precludes encoding a CID in a Multibase
value... but CIDs (all versions of them) contain more information than
just the content hash itself (which is all Multihash encodes). We are
not standardizing CIDs at this point in time, but we're not precluding
their usage or future standardization, either.

-- manu

-- 
Manu Sporny - https://www.linkedin.com/in/manusporny/
Founder/CEO - Digital Bazaar, Inc.
https://www.digitalbazaar.com/