Skip to content

spec: ipfs:// and ipns:// URI schemes - #544

Open
lidel wants to merge 2 commits into
mainfrom
spec/ipfs-ipns-uri
Open

spec: ipfs:// and ipns:// URI schemes#544
lidel wants to merge 2 commits into
mainfrom
spec/ipfs-ipns-uri

Conversation

@lidel

@lidel lidel commented Aug 2, 2026

Copy link
Copy Markdown
Member

Problem

What browsers and gateways need to know about ipfs:// and ipns:// has only ever lived in ADDRESSING.md, a memo in ipfs/in-web-browsers. Nothing can cite a memo, and it leaves the sharp edges implicit: why the authority has to survive case-folding, what actually defines an origin, when a CID must be normalized before a request goes out. Implementers keep rediscovering those by shipping something that breaks.

Fix

Two draft specs that supersede the memo:

  • ipfs-uri.md: the required authority form, base32 normalization of the content root, the origin model and the two serializations that work, and how the root CID's codec decides path traversal.
  • ipns-uri.md: the IPNS Name and DNSLink authority forms, the ordered parse that separates them, and a key codec rule left open so post-quantum keys can land without a revision.

They also fill in the syntax, encoding, interoperability, and security sections that the IANA provisional registrations for ipfs and ipns left open. Gateway behavior is unchanged, and path resolution stays in the Path Gateway spec.

Refs

Write down as a spec what the ADDRESSING.md memo in ipfs/in-web-browsers
has carried informally, so the rules browsers, gateways, and protocol
handlers already follow live somewhere citable.

ipfs-uri.md covers what both schemes share: the required authority form
and why // is not optional, the case-insensitivity and base32
normalization rules for the content root, the origin model and how it
may be serialized, and how the root CID's codec drives path traversal.

ipns-uri.md adds only what mutable roots need: the IPNS Name and DNSLink
authority forms, the ordered parse that tells them apart, and a key
codec rule left open so a new key type can ship without revising the
spec.

Closes #138
Closes #432
Closes #474
Closes #248
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🚀 Build Preview on IPFS ready

@lidel
lidel requested a review from a team August 2, 2026 00:04
The "RSA names may not fit" note had it backwards. An IPNS Name is a
multihash of the serialized public key, and go-libp2p only inlines the
key with the identity hash when its marshalled form is at most 42
bytes. RSA and ECDSA keys exceed that, so they get a sha2-256 digest
and produce the shortest names, around 57 characters in base36 against
63 for an inlined Ed25519 key.

Reframe the note around inlining rather than length: what a non-inlined
key costs is that the resolver cannot recover it from the name, so the
record carries a copy that MUST hash back to the authority, and the key
is content-addressed under that same multihash.

Correct the two claims the same error had seeded: post-quantum names
will be digests rather than oversized keys, and Ed25519 is the largest
name in practice precisely because it is inlined.
lidel added a commit to ipfs/in-web-browsers that referenced this pull request Aug 2, 2026
@lidel
lidel marked this pull request as ready for review August 2, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant