Secure Scuttlebutt - p2p social network that works offline

scuttlebutt - a slang word common among American sailors, denoting rumors and gossip. Node.js developer Dominic Tarr, who lives on a sailboat off the coast of New Zealand, used the word for a p2p network for news and private messaging. Secure Scuttlebutt (SSB) allows you to share information using only occasional or no Internet access.

SSB has been operating for several years now. The social networking features can be tested using two desktop applications (patchwork fabric и patchfoo) and Android apps (manyverse). For geeks there ssb-git. Are you wondering how the offline-first p2p network works without ads and without registration? Please under cat.

Secure Scuttlebutt - p2p social network that works offline

For the operation of Secure Scuttlebutt, two computers connected to a local network are sufficient. Applications based on the SSB protocol send broadcast UDP messages and can automatically find each other. Finding nodes on the Internet is a little more complicated, and we will return to this issue in a few paragraphs.

A user account is a linked list of all its records (log). Each subsequent entry contains the hash of the previous entry and is signed with the user's private key. The public key is the user's identifier. Deleting and editing records is not possible either by the author himself or by anyone else. The owner can add entries to the end of the log. Other users - read it.

Applications located in the same local network see each other and automatically request updates from their neighbors in the logs they are interested in. It doesn't matter which site you download the update from, because You can verify the authenticity of each entry using the public key. During synchronization, no personal information is exchanged except for the public keys of the journals you are interested in. As you switch between different WiFi / LAN networks (at home, in a cafe, at work), copies of the logs you have stored locally will be automatically transferred to the devices of other users who are near you. It looks like how it works Word of mouth: Vasya told Masha, Masha told Petya, and Petya told Valentina. The essential difference from "word of mouth" is that when copying magazines, the information in them is not distorted.

“Being friends with someone” takes on a concrete physical meaning here: my friends keep a copy of my journal. The more friends I have, the more accessible my magazine is to others. In the description of the puncture writtenthat the Patchwork app syncs logs up to 3 steps away (friends of friends of friends) from you. In most cases, this allows you to read long discussions with many participants while offline.

The user's journal can contain entries of various types: public messages similar to the entries on the VKontakte wall, private messages encrypted with the recipient's public key, comments on other users' posts, likes. This is an open list. Pictures and other large files are not placed directly in the magazine. Instead, it writes a hash of the file, which can be used to query the file separately from the log itself. The visibility of comments for the author of the original message is not guaranteed: if there is no short enough path between you from mutual friends, then you most likely will not see such comments. Thus, even if the goofy warriors make an attempt to take over your post, then if it was not your friends or friends of friends of friends, you will not notice anything.

Secure Scuttlebutt is not the first p2p network and not even the first p2p social network. The desire to communicate without intermediaries and get out of the sphere of influence of big companies has been around for a long time, and there are several obvious reasons for it. Users are annoyed by the imposition of the rules of the game by the big players: few people want to see ads on their screen or be banned and wait several days for a response from the support service. The uncontrolled collection of personal data and its transfer to third parties, which eventually leads to the fact that this data is sometimes sold on the dark web, again and again reminds us of the need to build other ways of interaction, where the user would have more control over their data. And he himself would be responsible for their distribution and safety.

Well-known decentralized social networks such as Diaspora or Mastodon, and protocol Matrix are not peer-to-peer, because they always have a client and a server part. Instead of a shared Facebook database, you can choose your "home" server to host your data, and that's already a big step forward. However, the administrator of your "home" server still has many options: he can share your data without your knowledge, delete or block your account. In addition, he may lose interest in maintaining the server and not warn you about it.

Secure Scuttlebutt also has intermediary nodes that facilitate synchronization (they are called "pubs"). However, the use of pubs is optional, and they are interchangeable. If the site you are used to is not available, you can use the others without losing anything, since you always have a complete copy of all your data. The proxy node does not store irretrievable data. The pub, if you ask, will add you as a friend and will update its copy of your journal when you join. When your subscribers connect to it, they will be able to download your new entries, even if you have already disconnected. In order for the pub to become friends with you, you must get an invite from the pub administrator. Most often, this can be done independently through a web interface (pub list). If you receive a ban from all pub administrators, then your magazine will be distributed in the manner described earlier, i.e. only among those with whom you meet in person. Transferring updates on a flash drive is also possible.

Although the network has been operating for quite some time, there are not many people in it. According to André Staltz, Android app developer manyverse, in June 2018 his local database had about 7 thousand keys. For comparison, in Diaspora - over 600 thousand, in Mastodon - about 1 million.

Secure Scuttlebutt - p2p social network that works offline

Instructions for beginners are here. Basic steps: install the application, create a profile, get an invite on the pub site, copy this invite to the application. You can connect several pubs at the same time. You will need to be patient: the network is much slower than Facebook. The local cache (.ssb folder) will quickly grow to several gigabytes. It is convenient to search for interesting posts by hash tags. You can start reading, for example, with Dominic Tarr ( @EMovhfIrFk4NihAKnRNhrfRaqIhBv1Wj8pTxJNgvCCY=.ed25519 ).

All images are from André Staltz article "An off-grid social network" and twitter.

Useful links:

[1] Official site

[2] patchwork fabric (application for Windows/Mac/Linux)

[3] manyverse (android app)

[4] ssb-git

[5] Protocol Description ("Scuttlebutt Protocol Guide - How Scuttlebutt peers find and talk to each other")

Source: habr.com

Add a comment