ipfs / notes

IPFS Collaborative Notebook for Research
MIT License
401 stars 30 forks source link

Human Friendly Names #286

Open olizilla opened 6 years ago

olizilla commented 6 years ago

We've been adding IPFS support to browsers via ipfs-companion, and I lean heavily on autocomplete to find things; I'll type out the first few characters to reduce the list of matches and then pick the one I want from the list.

My browser url bar autocomplete history now looks like

screenshot 2018-03-12 11 25 05

Seeing that reminded me of the wisdom of xkcd:

Password Strength

So @alanshaw and I got excited about the idea of adding an xkcd correct-horse-battery-staple style multibase encoding, that would let us represent IPFS CIDs as sequences of random words rather than cryptic base58 hashes.

We used mnemonic.js to map byte arrays to words, so we called called it the mnemonic base, and we got it successfully encoding and decoding in mutlibase as CID, and got a POC to have ipfs generate and resolve addresses in mnemonic base.

mnemonic

On announcing the idea, we were introduced to the already built in support for proquint encoding for IPNS PeerIds. From the IPFS whitepaper section 3.7.2 Human Friendly Names:

proquint flavour IPNS

It would be useful to have a spec for how to support human-friendly encodings in IPFS CIDs and multibase. As a minimum it would be a win for consistency to support proquint encoded IPFS CIDs as they are already supported by go-ipfs.

Having tried out mnemonic encodings, they felt more natural and memorable than proquint. I'm not yet convinced that proquint is much better than base58, so I'm keen to see if there is any support for further investigation in to the ergonomics of a better human-friendly CID multibase encoding.

olizilla commented 6 years ago

For completeness; also mentioned in section 3.7.2 Human Friendly names of the ipfs white paper are:

Peer Links: As encouraged by SFS, users can link other users’ Ob- jects directly into their own Objects (namespace, home, etc). This has the benefit of also creating a web of trust (and sup- ports the old Certificate Authority model)

# Alice links to bob Bob
ipfs link /<alice-pk-hash>/friends/bob /<bob-pk-hash>

...but the ipfs link command isn't available yet.

DNS TXT IPNS Records.

these are a thing, and we'll be working with browser vendors to open up a generic dns request api for WebExtensions that'll allow us to resolve dnslink entries for ipfs hosted sites.

Name Shortening Services. Services are bound to spring up that will provide name shortening as a service, offering up their namespaces to users. This is similar to what we see today with DNS and Web URLs:

User can get a link from

/ipns/shorten.er/foobar

To her own namespace

/ipns/XLF2ipQ4jD3UdeX5xp1KBgeHRhemUtaA8Vm

I've not seen any of these, but related works exist like: https://monkybrain.github.io/ipfs-to-ens/

olizilla commented 6 years ago

Also worth reading, despite the clickbait title: https://decentralized.blog/ten-terrible-attempts-to-make-ipfs-human-friendly.html

alanshaw commented 6 years ago

Changes to js-multibase to support mnemonic base: https://github.com/multiformats/js-multibase/compare/36d60d3f9379ea005327fe3a375f03ba286d0ecc...tableflip:feat/mnemonic-base

olizilla commented 6 years ago

From @lgierth

we should define how it [proquint support] maps to CID and multibase

a similar need for a more human-readable cid format also arised in peerpad to visually verify you get the whole link - apparantly some url shorteners interfere with parts of the peerpad link

From @VictorBjelkholm

@lgierth telegram shows emojis that you can speak confirm out-of-band, think there are five emojis, supposed to be able to validate no mitm that way

From @lidel

@olizilla not sure how useful this data point is, but Urbit seems to be using "~" as a prefix for phonetic names (https://urbit.org/posts/address-space/). For IPFS dot (".") may be problematic as it will make file hidden in some OSes (if user chooses to save resource under a name from NURI).