title: Peer-to-Peer Protocols for Our Cyber Commons class: animation-fade layout: true .bottom-bar[ {{title}} ] --- class: impact .big[{{title}}] .small[Benedict Lau // October 2018 @ NUUG] --- class: long # Outline
**Living with Our Internet** .small[.em[10 min]] --
**Networks of Our Distributed Web** .small[.em[30 min]] --
**Protocol Politics of Our Networks** .small[.em[10 min]] -
**Traffic routing** .small[.em[on distributed non-hierarchical networks]] -
**Name assignment** .small[.em[without a trusted global authority]] -
**Data aggregation** .small[.em[respecting user privacy and agency]] -
**Content moderation** .small[.em[prioritizing user interests over censoring authorities]] -
**Network participation** .small[.em[encouraging inclusive co-creations]] -
**Resource allocation** .small[.em[through collaborative decision making]] --
**Fabric of Our Cyber Commons** .small[.em[10 min]] --- class: impact .big[
Living with Our Internet] --- class: impact #
.code[First name] .code[Last name] .code[Email] .code[New password] .small[
.code[Agree to our Terms]] .big[.code[Sign Up]] --- class: long contain bottom small background-image: url(assets/facebook-publish.png) _
https://stratechery.com/2018/the-european-union-versus-the-internet/_ --- class: long ## Referral source of traffic to top web publishers .center[
] .small[_
https://blog.parse.ly/post/2855/facebook-continues-to-beat-google-in-sending-traffic-to-top-publishers/_] --- class: long ## Google Accelerated Mobile Pages .col-6[
] .col-6[
] .small[_
https://staltz.com/the-web-began-dying-in-2014-heres-how.html_] .small[_
https://developers.googleblog.com/2017/02/whats-in-amp-url.html_] --- class: impact .col-6[ .big[
] Google Play ] .col-6[ .big[
] Apple Store ] --- class: impact .big[ .col-2[
] .col-2[
] .col-2[
] .col-2[
] .col-2[
] .col-2[
] ] --- class: impact #
.big[Data ownership under surveillance capitalism] --- class: long contain bottom small background-image: url(assets/sidewalk-org.png) _
https://www.cigionline.org/articles/searching-smart-citys-democratic-future_ --- class: long contain bottom small .background[ .center[
] ] _
https://youtu.be/4z0fVAsHFro_ --- class: long contain bottom small background-image: url(assets/sidewalk-timeline.png) _
https://www.cigionline.org/articles/searching-smart-citys-democratic-future_ --- class: impact #
.big[Social control with aggregated data] --- class: long contain bottom small .background[ .center[
] ] _
https://n-o-d-e.net/political_censorship.html_ --- class: long bottom small em background-image: url(assets/censorship-platforms.png) _
https://n-o-d-e.net/political_censorship.html_ --- class: impact #
.big[Digital imperialism by high-barrier infrastructure] --- class: long contain bottom right small background-image: url(assets/private-fiber.png) _
https://www.economist.com/business/2017/10/07/tech-giants-are-building-their-own-undersea-fibre-optic-networks_ --- class: long small .big[Internet users in 2015 as a percentage of a country's population] .center[
] _
https://en.wikipedia.org/wiki/List_of_countries_by_number_of_Internet_users#/media/File:InternetPenetrationWorldMap.svg_ --- class: impact .big[
Networks of Our Distributed Web] --- # Distributed networks
and the protocols that bind them |
|
Network
|
|
Protocol
|
|
Description
| |:--|:--|:--|:--|:--|:--| | |
Aether
| |
c0 + Mim
| |
Community-moderated ephemeral boards
| | | Guifi.net | | FONN Compact | |
Catalonia telecommunications network
| | |
Hyperboria
| |
cjdns
| |
Source-routed encrypted IPv6 network
| | | InterPlanetary File System | | IPFS + libp2p | |
Content-addressed hypermedia protocol
| | |
Scuttleverse
| |
Secure Scuttlebutt
| |
Social topology-mapped data networks
| | | Yggdrasil Network | | Yggdrasil | |
Greedy-routed encrypted IPv6 network
|
among many others --- class: long .col-6[ #
Guifi.net
] .col-6[ ### FONN Compact
for a free, open, and neutral network - Establish shared values among community organizations and businesses to create Internet access infrastructure in Catalonia - Facilitate maintainance and expansion of wired, wireless, and fiber network - Prevent privatization of physical infrastructure while allowing business incentives to sustain a reliable production network ] .small[_
http://www.ebrecom.com/images/participa.png_] .small[_
http://krisdedecker.typepad.com/.a/6a00e0099229e8883301b7c7e2d9d7970b-pi_] --- class: long #
Guifi.net ## FONN Compact >- You have the freedom to use the network for any purpose as long as you don't harm the operation of the network itself, the rights of other users, or the principles of neutrality that allow contents and services to flow without deliberate interference. -- >- You have the right to understand the network and its components, and to share knowledge of its mechanisms and principles. -- >- You have the right to offer services and content to the network on your own terms. -- >- You have the right to join the network, and the obligation to extend this set of rights to anyone according to these same terms. .small[_
https://guifi.net/en/FONNC_] --- class: long .col-6[ #
Guifi.net ## Links and routes
] .col-6[ - Mix of wired, wireless, and fiber links - Carrier-grade hardware from vendors like Ubiquiti and MicroTik - Routing protocol within a community: - .alt[BMX6] .small[distance-vector dynamic routing] - .alt[OSPF] .small[link-state dynamic routing] - Backbone network: - .alt[BGP] .small[path-vector static routing] - Maintained and expanded by ISPs and communities bound by FONN Compact ] .small[_
https://csperkins.org/research/thesis-phd-strowes.pdf_] --- class: long contain bottom background-image: url(assets/guifi-mataro.jpg) .small[_
Mataró, Barcelona_] --- class: impact #
.big[Centralized components for .hi2[BGP backbone network management] and .hi2[IP address assignment]] --- class: long ## IPv4 prefixes in Internet BGP forwarding tables
stored by every Internet core router .center[
] .small[_
https://csperkins.org/research/thesis-phd-strowes.pdf_] --- class: long ## IPv4 prefixes in Internet BGP forwarding tables .col-6[ ### Proportional distribution
] .col-6[ ### Contribution to address space
] .small[_
https://csperkins.org/research/thesis-phd-strowes.pdf_] --- ## Compact routing
in comparison to BGP inter-domain routing - Keep small amounts of routing state at each router, rather than piling all that work onto the core network infrastructure -- - Without the full network view, a node cannot always determine shortest path .em[
e.g.
Dijkstra's algorithm as in OSPF] -- - Have routing table grow sublinearly with number of nodes, while getting close to shortest path routing with upper bound -- - Name-independent schemes that require no pre-processing are suitable for an unmanaged permissionless network --- class: impact #
.big[Route traffic in a non-hierarchical network with self-addressed flat node IDs] --- class: long .col-7[ #
Hyperboria
.small[_
https://www.fc00.org_] ] .col-5[ ### cjdns - Auto-configure overlay network - Secure all network traffic with end-to-end encryption: - .alt[Curve25519] .small[encryption keys] - .alt[Ed25519] .small[signatures] - .alt[XSalsa20] .small[stream cipher] - .alt[Poly1305] .small[MAC] - Self-assign IPv6 in `fc00::/8` from cryptographic keys - Source route with Kademlia-like distributed hash table ] --- ## Self-assignment of IP addresses
for permissionless network participation - Perform two rounds of SHA-512 on .alt[Curve25519 public key] then truncate to derive IPv6 address - `fc00::/8` address space has 2
120
addresses --
### Birthday problem >1 in 1,329,227,995,784,915,872,903,807,060,280,344,576 chance of generating the same IPv6. Feeling Lucky? .small[_
https://github.com/cjdelisle/cjdns/blob/master/doc/notes/arc-workings.md_] --- .col-8[ ## The Kademlia DHT ### Laying out IP addresses
] .col-4[ - Node .code[.hi1[0011]] has physical peers to _some_ neighbourhoods - Node .code[.hi1[0011]] learns paths to _every_ neighbourhood - Each node keeps a routing table at each .alt[XOR distance] - Each node knows its neighbourhood well relative to distant ones ] .small[_
https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf_] --- class: long .col-7[ ### Searching the DHT
.small[_
https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf_] ] .col-5[ #### Node .code[.hi1[0011]] searches .code[.hi2[1110]]: - .code[.hi1[0011]] knows path to .code[.hi3[101]] and makes first query to learn .code[.em[1101]] - .code[.hi1[0011]] makes successive queries .code[1] to .code[4] to reach .code[.hi2[1110]] - .code[.hi1[0011]] calculates XOR distance: >.code[.hi1[0011]] >.code[.hi2[1110]] >.code[.em[----.small[
]]] >.code[.alt[**1**101]] .em[.small[
XOR distance]] - .code[.hi1[0011]] adds newly learnt path to its routing table at .code[.alt[**1**---]] bucket ] --- class: impact #
.big[.hi1[Rick .code[1101]] wants to send a packet to .hi2[.code[1110]]] --- class: long ## Source routing #### Rick assembles the set of directors and sends
to his peer Morty | | | | | | | | |:--|:--|:--|:--|:--|:--|:--| | `0000000000000000000000000` | `0001` | `101011` | `011010` | `100101101` | `10111` | .code[.hi1[**0100011**]] | | .big[
] unused space | .big[
] | .big[
] | .big[
] | .big[
] | .big[
] | .big[.hi1[
]] | -- .small[
] #### Morty pops the .hi1[
] director and sends it down the .hi1[
] network interface | | | | | | | | |:--|:--|:--|:--|:--|:--|:--| | .code[.hi1[**1000000**]] | `0000000000000000000000000` | `0001` | `101011` | `011010` | `100101101` | .code[.hi2[**10111**]] | | .big[.hi1[
]] | .big[
] unused space | .big[
] | .big[
] | .big[
] | .big[
] | .big[.hi2[
]] | -- .small[
] #### The
reaches Morty's .hi1[
] peer, Summer, and she sees the .hi2[
] director --- class: long #
Hyperboria
with more than 1000 nodes mostly tunneled over Internet links -- ### DHT source routing limitations - XOR address space distance and DHT does not resemble physical network topology - Nodes lack local visibility to link quality typical of wireless links - 64-bit packet header cannot fit all the directors for long paths with many hops -- ### Supernodes - Supernodes have full network view and offer path discovery service to subnodes - Traffic is still source routed and distributed throughout the mesh --- class: long #
Yggdrasil Network .col-4[
] .col-8[ ### Yggdrasil
the mythical world tree of Norse cosmology - Auto-configure a self-addressing encrypted network similar to cjdns - Route traffic via paths resembling physical topology - Allow all nodes to make the same assumptions about the network topology without keeping a full view - Guarantee a path to every node, which although unbound in theory, is usually close to the shortest path ] .small[_
https://en.wikipedia.org/wiki/Yggdrasil#/media/File:The_Ash_Yggdrasil_by_Friedrich_Wilhelm_Heine.jpg_] --- ## Routing in Yggdrasil - Switch layer creates a .alt[globally agreed spanning tree
] -- - A DHT is used to look up the .alt[
] coordinates for a given IP address -- - .alt[
] edges are always direct peers, selected based on peering stability -- - .alt[
] coordinates are shared with peers and cryptographically verifiable from .alt[
] root -- - Switch layer uses .alt[
] coordinate system for greedy embedded routing -- - Each node keeps a partial view of .alt[
] where locally stored state information scale at `O(p*log(n))` for `p` peers in a network with `n` nodes -- - Routing traffic by walking .alt[
] represents a worst-case path with guaranteed reachablity, since greedy routing often take shortcuts not shown on .alt[
] --- class: long ## Yggdrasil global spanning tree
view from node .hi2[.code[**3efd**] .small[
.code[[ 3 ]]]] .center[
] --
to .hi1[.code[**d40c**] .small[
.code[[ 3 5 2 ]]]] - Tree path: .hi2[.code[[ 3 ]]] .small[
] .em[.code[[ 3 5 ]]] .small[
] .hi1[.code[[ 3 5 2 ]]] - Greedy path: .hi2[.code[[ 3 ]]] .small[
] .hi1[.code[[ 3 5 2 ]]] --- class: long ## Yggdrasil global spanning tree
view from node .hi3[.code[**5708**] .small[
.code[[ ? 2 2 ]]]] .center[
] --
which does not know the .alt[
] root node's IP in its DHT, but the switch layer knows there exists such a node based on its own coordinate --- class: impact #
.big[**\#yggdrasil:matrix.org**] .small[
] .big[**freenode/\#yggdrasil**] _Neil_ .small[_. . . we are in need of more people to deploy/test ygg in order to help us prove scalability . . ._] --- .col-5[ ### IPFS .small[ - Provide stable content addresses - Locate content - Self-verify content integrity - Support concurrent downloads - Auto-scale capacity with content popularity ] ### libp2p .small[ - Traverse nested networks - Relay connections between systems with different transports - Facilitate node discovery ] ] .col-7[ #
.small[InterPlanetary File System]
.right[.small[_
https://github.com/ipfs/artwork_]] ] --- #
InterPlanetary File System ## Content-addressing
referencing content by content hash
-- ### Host-address >https://.hi1[youtu.be/].hi2[0X95Nybu2g8] -- ### Content-address >ipfs://.hi2[QmcCXAbjDwnkhzL8qfrbJLH6DqEbrkBvaF8AiXsdXNLiDL] --- class: impact #
.big[What hashing algorithm is used to produce] .hi2[QmcCXAbjDwnkhzL8qfrbJLH6DqEbrkBvaF8AiXsdXNLiDL] --- class: full bottom small background-image: url(assets/multihash.jpg) _
https://github.com/multiformats/multiformats_ --- class: full bottom small background-image: url(assets/multiformats.jpg) _
https://github.com/multiformats/multiformats_ --- class: full bottom small background-image: url(assets/multiaddr.jpg) _
https://github.com/multiformats/multiformats_ --- class: long ## Downloading content from the IPFS network 1. Request ipfs://.hi2[QmcCXAbjDwnkhzL8qfrbJLH6DqEbrkBvaF8AiXsdXNLiDL] -- 1. Ask peer .hi3[QmXLWSa1AbLJfivfT9dQJdvs6AsdMkjZjjBMv5SVtimVBq] at: ``` /ip6/fcb0:3f14:ebc8:1f7b:a1ce:bd44:a410:5049/tcp/4001 /ipfs/QmXLWSa1AbLJfivfT9dQJdvs6AsdMkjZjjBMv5SVtimVBq ``` -- 1. Fetch located content from .small[.hi1[QmWhBDjaTRAdTi6rai18BwdWVfXRmzda544PcgT6DuBqP3]]: ``` /ip4/122.147.156.131/tcp/48872 /ipfs/QmWhBDjaTRAdTi6rai18BwdWVfXRmzda544PcgT6DuBqP3 ``` -- 1. Verify integrity of downloaded content with .alt[sha2-256] because `Q (0x12) -> sha2-256` which has a `m (0x20) -> 32` byte digest size -- 1. Cache content to scale up capacity making it more available on the IPFS network --- .col-7[ #
Aether
.small[_
https://vimeo.com/287330735_] ] .col-5[ ### c0 + Mim - Maintain participant identities without central authority - Author ephemeral posts and metadata with spam detering mechanism - Facilitate community content moderation - Ensure participant action-independent data distribution - Fast and scalable synchronization across network ] --- #
Aether .col-7[ ## Participant identities
using petname system - Globally-unique cryptographic .alt[key] as identity - Self-selected memorable .alt[nickname] - Viewer decides .alt[petname] per unique key and optionally ranks a list of naming authorities to resolve name conflicts ] .col-5[
] .right[.small[_
http://www.skyhunter.com/marcs/petnames/IntroPetNames.html_]] --- class: long .col-6[ #
Aether
] .col-6[ ## Posts and metadata - Public posts on Reddit-like board with proof-of-work for all participant actions as spam deterent - Participant opt-in censors to provide community moderation ## Ephemeral data syncs - Application runs frontend and backend, syncs 6 months of full network history - Participant-identifying actions performed on frontends, backends serve identitical data and cannot track participant actions ] --- .col-7[ #
Scuttleverse
] .col-5[ ### Secure Scuttlebutt - Browse data off-grid without assuming connectivity - Prioritize subjective decisions - Localize data visibilities - Map data network topology to social network topology - Facilitate peer discovery modes mirroring social interactions .small[_
https://www.scuttlebutt.nz_] .small[_
http://blog.altermundi.net/article/coolab-visita-tecnica-guyana-wapichan/_] ] --- class: long #
Scuttleverse ## Append-only database of signed messages - Petname system for identities - Each participant signs and appends to a personal log ## Social interactions - Friendships are public key exchanges - Signed messages for public posts and encrypted messages for private posts - Participant controls social bubble via friendships rather than determined by an authoratative algorithm --- class: long ## Data replication on Secure Scuttlebutt .right[
]
--- class: impact #
.big[What happens when _Rick_ joins the Scuttleverse] --- class: long .center[
] --- class: impact .big[
Protocol Politics of Our Networks] --- class: impact #
.big[Do artifacts have politics] _Langdon Winner_ .small[_Daedalus, Vol. 109, No. 1, Modern Technology: Problem or Opportunity? (Winter, 1980), pp. 121-136_] --- class: impact #
.big[Do _protocols_ have politics] --- #
Traffic routing
on distributed non-hierarchical networks .col-4[
] .col-8[ >.small[For a large network to scale, it must be subnetted into smaller, more easily manageable networks, which then must in turn be networked together (to form a network of networks from inter-network connections, i.e. the internet). This requires some level of expertise and planning to do, and tends to favor hierarchies wherein small networks are largely at the mercy of a larger network (e.g. the only connection your LAN has to another network is your connection to an ISP, and “peering” or directly connecting to your neighbor’s LAN is virtually unheard of).] .small[_
Arceliar_] .small[.small[_Yggdrasil: The World Tree, https://yggdrasil-network.github.io/2018/07/17/world-tree.html_]] ] --- #
Traffic routing .col-6[ ### ISP monopolies to our data access
] .col-6[ ### Auto-configurating and self-addressing compact routing
] .small[_
https://tomeshnet.github.io/p2p-internet-workshop/_] --- class: long ## Cost-accessible, available, and open hardware .col-7[
] .col-5[
.right[.small[_
https://librerouter.org_]] ] --- #
Name assignment
without a trusted global authority .col-8[ >.big[If ICANN's monopoly is a kind of _feudalism_, then Namecoin's method of associating records with tokens is a kind of _anarcho-capitalism_.] .small[_
ansuz_] .small[.small[_dnssb: Why dnssb?, https://github.com/ansuz/dnssb/blob/master/docs/WHY.md_]] ] .col-4[
] --- #
Data aggregation
respecting user privacy and agency .col-6[
] .col-6[ >.small[Now that we have experience with some of the intricacies of the social Web, we can reinvent it to put people first without intermediate companies. The peer-to-peer protocol Secure Scuttlebutt (SSB) does that, designed with diversity-first principles that prefigure (hopefully) social structures with freedom, subjectivity, and political structures that can prevent capitalistic monopolies.] .small[_
André Staltz_] .small[.small[_A plan to rescue the Web from the Internet, https://staltz.com/a-plan-to-rescue-the-web-from-the-internet.html_]] ] --- #
Data aggregation .col-6[ ### Centralized data
] .col-6[ ### Distributed data
] .small[_
https://tomeshnet.github.io/p2p-internet-workshop/_] --- #
Content moderation
prioritizing user interests over censoring authorities .col-9[ >Users can elect moderators, impeach them, or just enable, disable them just for themselves. So if somebody is unhappy with some moderators, s/he can just disable the ones that he doesn’t think are doing a good job, and choose new ones. This makes it so that the people who participate in the communities actually have a say in how they are governed (if they want to do so). .small[_
Burak Nehbit_] .small[.small[_Aether News & Updates - June 2018, http://blog.getaether.net/post/175104485127/aether-news-updates-june-2018_]] ] .col-3[
] --- #
Network participation
encouraging inclusive co-creations .col-6[
] .col-6[ >Traditional networks require manual configuration of IP addresses. For one to get these addresses one must join an Internet Registry and file a lengthy application. Cjdns nodes generate their own addresses along with their keys. When two nodes find each other, they connect. .small[_
cjdns: Project goals_] .small[.small[_https://github.com/cjdelisle/cjdns/blob/master/doc/projectGoals.md_]] ] --- class: long bottom right small em background-image: url(assets/mesh-workshop.jpg) _
https://tomeshnet.github.io/p2p-internet-workshop/_ --- class: long #
Resource allocation
through collaborative decision making .col-10[ >.small[. . . queremos demostrar que nuestro modelo de red abierta, libre y neutral es perfectamente compatible con la economía de mercado. Se trata de dar a la gente otra opción, y reclamar el derecho de los ciudadanos al uso de la infraestructura de las telecomunicaciones, en el espíritu de la gobernanza de los bienes comunes que proponía Elinor Ostrom".] ] .col-2[
] .small[. . . we want to show that our open, free and neutral network model is perfectly compatible with the market economy. It is about giving people another option, and claiming the right of citizens to the use of telecommunications infrastructure, in the spirit of the governance of common goods proposed by Elinor Ostrom.] .small[_
Ramón Roca_] .small[.small[_Guifi.net, la red que es de todos, http://www.elmundo.es/economia/2014/11/15/546668a1ca474118638b4579.html_]] --- class: long ## Design principles for common property systems .small[ >1. Clearly defined boundaries >1. Congruence between appropriation and provision rules and local conditions >1. Collective-choice arrangements allowing for the participation of most of the appropriators in the decision making process >1. Effective monitoring by monitors who are part of or accountable to the appropriators >1. Graduated sanctions for appropriators who do not respect community rules >1. Conflict-resolution mechanisms which are cheap and easy to access >1. Minimal recognition of rights to organize (e.g., by the government) >1. In case of larger CPRs: Organisation in the form of multiple layers of nested enterprises, with small, local CPRs at their bases. ] .small[_
Elinor Ostrom_] .small[.small[_Cambridge University Press, Governing the commons: the evolution of institutions for collective action (1990)_]] .small[.small[_via https://en.wikipedia.org/wiki/Common-pool_resource_]] --- class: impact .big[
Fabric of Our Cyber Commons] --- class: impact Commons infrastructure • Distributed content • .big[People centric] .small[.small[than] Monopolized lanes • Siloed data • Extractive economics] --- class: impact alt-bg .small[This presentation is influenced by the readings] [_The Web began dying in 2014, here’s how_](https://staltz.com/the-web-began-dying-in-2014-heres-how.html) .small[by André Staltz] [_Do Artifacts Have Politics?_](https://transitiontech.ca/pdf/Winner-Do-Artifacts-Have-Politics-1980.pdf) .small[by Langdon Winner] .small[
] .small[references protocol designs and discussions with contributors of] [Aether](http://getaether.com) [cjdns](https://github.com/cjdelisle/cjdns) [Guifi.net](https://guifi.net) [IPFS](http://ipfs.io) [Secure Scuttlebutt](https://scuttlebutt.nz) [Yggdrasil](https://yggdrasil-network.github.io) .small[
] .small[and is created using] [remark](https://remarkjs.com) [backslide](https://github.com/sinedied/backslide) [Font Awesome](https://fontawesome.com) [nomnoml](http://nomnoml.com) --- class: impact .big[Copyleft] • Political • Free .small[.small[than] Copyright • Permissive • Lock in] --- class: impact alt-bg .small[This presentation is licensed under the] [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/) .small[
] .small[and the source is available on [GitHub](https://github.com/benhylau/talks-and-workshops/)] --- class: impact .big[Offline first] • Inclusive co-creation • Local empowerment .small[.small[than] Always on • High barrier • Imperialistic dependencies] --- class: impact alt-bg .small[This presentation is currently served locally from a Raspberry Pi] .small[
SSID
] .code[tomesh] • .small[
Password
] .code[password] .small[
Address
] .code[http://tomesh.local] --- class: impact Permissionless • Flat • .big[Self agency] .small[.small[than] Centrally managed • Hierarchical • Authoritarian] --- class: impact alt-bg .small[The Raspberry Pi is configured using [Toronto Mesh Prototype](https://github.com/tomeshnet/prototype-cjdns-pi) software] .small[automatically meshes over] cjdns .small[distributes content with] IPFS .small[and runs] Secure Scuttlebutt --- class: impact .big[Subjective] • Diverse • Forkable .small[.small[than] Prescriptive • Monoculture • Assimilating] --- class: impact alt-bg .big[{{title}}] .small[_according to the hopes & dreams of Ben .small[from Toronto Mesh]_]