owned this note
owned this note
Published
Linked with GitHub
# Comparison of ÐWeb protocols
Several dweb protocols [IPFS][], [Dat][], [SSB][] have emerged over last couple of years. They do share number of underlying similarities but also have differences. This is my attempt to explore / explain those differences and corresponding effects.
**Disclaimer:** I am by no means an expert in this space and might be wrong. Please correct me improve this document.
----
## Content Addressing
#### [IPFS][]
[IPFS][] is using network wide content-addressing and has following benefits:
- [IPFS][] removes duplication across the network.
- When looking up files, you're asking the network for the corresponding hash.
- Difficult to censor content without network-wide support *(One wound need to take down every node in the network that has content)*
- Easy to take down content if there is network-wide support *(Network could use federated blacklist for censoring specific content)*
Network wide content-addressing has drawbacks as well:
- It easy to track which node is accessing / sharing specific content.
#### [Dat][]
[Dat][] is using archive wide content-addressing and has a following benefits:
- Difficult to track who is accessing specific content *(Nodes only talk to nodes with a dat link)*.
- Difficult to censor content *(Adversary not only needs to take down every node, it needs to track down any forked dat link)*
This choice also has drawbacks:
- There is no network wide deduplication resource sharing *(Nodes from two different dat's won't talk even if they share most of the content)*
- Difficult to to take down content *(One could always fork dat)*
### [SSB][]
**TODO:** If you now please share
[@olizilla]: ssb object ids allows you to get a message by it's id if it's already in your log. The id is a content-address. https://github.com/ssbc/scuttlebot/blob/master/api.md#get-async
> Messages and blobs are referred to by their hashes, but a feed is referred to by its signing public key.
> https://github.com/ssbc/secure-scuttlebutt#object-ids
#### Observations / Questions:
[Dat][] seems to make tracking more difficult as tracker needs to posses public key of the Dat in order to track. On the other hand in [IPFS][] you could also add encrypted content to the network in which case tracker will only know certain nodes access / share certain content without knowing what it is. In that sense that is also true for [Dat][] as tracker could track requests for discovery key.
It appears to me that privacy constraint boils down to defaults *(which are extremeley important)*. If I had to characterize two, [Dat][] is private by default while [IPFS][] is private by choice.
I wonder if prioritization of privacy would be rendered irrelevant if underying protocols were to adopt mechanims to prenent tracking. For example would something like [onion routing][] prevent tracking all together ?
- **[@lidel]** On IPFS:
- IPFS has pluggable transports, so in theory IPFS node could run in Tor-only mode, announce itself as onion service under `/onion/<onion-key>/ipfs/<ipfs-key>` and remain anonymous within Tor guarantees. While proof of concept Tor transports were created by the community, none of them was audited (yet) and we don't want to advertise it until proper controls are in place and we are sure there is no privacy leakage when IPFS node runs over Tor (eg. real IPs being announced to DHT). Audit may happen before reaching v1.0. More: [ipfs/notes: Tor onion integration](https://github.com/ipfs/notes/issues/37)
- It is possible to create closed, private IPFS networks that does not communicate with main public nodes.
----
## Naming system
_[olizilla]: What are we naming here? Aliases for hashes? Would be good to define it._
#### [Dat][]
[Dat][] uses [PKI][] namespace, where names are the hashes of public public keys and private keys enable updating that namespace with verifiable data and publisher integrity and has following properties:
- [Dat][] archive has URL and it maps directly to notion of web site or a code/data repository.
- Verifiable publisher integrity.
- Incremental versioning.
- Versioned resolution *(ability to view past version assuming it's available in the network)*
It has some drawbacks:
- Naming is not human memorable
- Naming is not human distinguishable
#### [IPFS][]
[IPFS][] has companion protocol [IPNS][] that can be used to map immutable [IPFS][] content address to a mutable namespace (address). It also uses a [PKI][] namepace, where names are the hashes of public keys, and the private key enables publishing new (signed) values. This provides following benefits:
- Verifiable publisher integrity.
- Human distinguishable naming _(see [mnemonic naming][])_
- Flexiblity in name hashing _(see https://multiformats.io/)_
System has following drawbacks:
- Naming is not human memorable
- No versioning support
Has also being widely criticised for:
- Poor performance
- Records tend to expire
Although it appears that [IPNS][] has not benig high priority for the team and likely performance and expiration issues could be addressed with some effort.
_[@olizilla]: slow ipns resolution is annoying, but it's not intended to be a property of the system and is being worked on. Is your intention to document how you see things today, or capture the essential similarities and differences of the systems?_
#### [SSB][]
**TODO:** If you now please share
_[@olizilla]: ssb is significantly different; there is no dht, no global singletons. All names are subjective. There is only your log, and mechanisms for replicating other peoples logs. Your view is determined by reducing over your log. Those logs can contain "about" messages, which suggest your non-unique, personal alias for a given feed id. An ssb client may choose to track those aliases and offer to map the alias to a public feed id, but it's not part of the protocol. Anyone can post about messages about anything, so you can see nicknames that others assign to anyone, but only within the set of logs that you have elected to replicate._
#### Observations / Questions:
I have being lead to believe that performance and record expiry issues with [IPNS][] is due to it being [DHT][] based, but then as far as I understand it's also the case with [Dat][] which suggests that those issues aren't inherent to [DHT][].
As far as I gathered from my convesations with [IPFS][] team leaving out versioning is intentional as there are some applications where versioning is explicitly not wanted (**TODO:** examples of such appliactions).
I happen to think that verifiable versioning in the web context would be invaluable property. This leads me to beleive that naming system should be integral part of dweb protocol, that not to say [IPNS][] should support it, maybe it can be alternative or overlayng naming system.
According to [Zooko's conjecture][Zooko's triangle] out of Decentralized, Secure, and Human-Meaningful, you can achieve at most two. Still various user studies by Mozilla tell us that human-memorable URLs are critical.
- **[@lidel]** I think the assumption is that versioning in [IPFS][] should be built on different abstraction layers with [IPLD][] (need to confirm)
----
## [DNS][] resolution
#### [Dat][]
[Dat][] provides human-meaningful naming at the cost of centralization and reduced security via [Dat DNS resolution][]
#### [IPFS][]
[IPFS][] also provides human-meaningful naming via [IPFS DNS links][] *(although it's poorly documented)* also at the cost of centralization and reduced security.
----
## Networking
#### [IPFS][]
- In order for IPFS to provide guarantees about interoperability, IPFS applications use the modular network stack provided by [libP2P][]
#### [Dat][]
- Dat is only an application protocol and is agnostic to which network protocols (transports and naming systems) are used.
#### [SSB][]
TODO
_[olizilla]:
- https://github.com/ssbc/scuttlebot - is the networking layer on top of ssb.
which is built on:
- https://github.com/ssbc/secret-stack
- https://github.com/ssbc/muxrpc
- https://github.com/ssbc/multiserver
Also of note:
- https://ssbc.github.io/scuttlebutt-protocol-guide/
----
----
[DHT]:https://en.wikipedia.org/wiki/DHT
[DNS]:https://en.wikipedia.org/wiki/Domain_Name_System
[Dat DNS resolution]:https://www.datprotocol.com/deps/0005-dns/
[IPFS DNS links]:https://ipfs.io/ipfs/QmQwAP9vFjbCtKvD8RkJdCvPHqLQjZfW7Mqbbqx18zd8j7/websites/README.md
[Zooko's triangle]:https://en.wikipedia.org/wiki/Zooko%27s_triangle
[SLEEP]:https://github.com/datproject/docs/blob/master/papers/sleep.md
[Dat Links]:https://github.com/datproject/docs/blob/master/papers/dat-paper.md#dat-links
[PKI]:https://en.wikipedia.org/wiki/Public_key_infrastructure
[IPFS]:https://ipfs.io
[IPNS]:https://github.com/ipfs/notes/issues/260
[IPLD]:https://ipld.io/
[LibP2P]:https://libp2p.io/
[Dat]:http://datproject.org/
[SSB]:https://www.scuttlebutt.nz/
[Onion Routing]:https://en.wikipedia.org/wiki/Onion_routing
[mnemonic naming]:https://github.com/ipfs/notes/issues/286
[@olizilla]: https://github.com/olizilla