📜 ⬆️ ⬇️

Secure Scuttlebutt - p2p offline social network

Scuttlebutt is 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 this word in the name of a p2p network for exchanging news and personal messages. Secure Scuttlebutt (SSB) allows you to share information using only occasional access to the Internet or even without it.

SSB has been operating for several years. Social networking features can be tested using two desktop applications ( Patchwork and Patchfoo ) and Android applications ( Manyverse ). For geeks there is ssb-git . Are you interested in how an offline-first p2p network works without ads and without registration? I ask under the cat.



To operate Secure Scuttlebutt, two computers connected to the local network are sufficient. Applications based on the SSB protocol send UDP broadcast messages and can automatically find each other. Finding nodes on the Internet is a little more difficult, and we will return to this question in a few paragraphs.
')
A user account is a coherent list of all his records (log). Each subsequent entry contains the previous hash and is signed with the user's private key. The public key is the user ID. Deleting and editing entries is not possible either by the author or by someone else. The owner can add entries to the end of the log. Other users - read it.

Applications on the same local network see each other and automatically request updates from their neighbors in the journals of interest. It does not matter which node you are downloading the update from. You can check the authenticity of each entry with the public key. When synchronizing, no personal information is exchanged except for the public keys of the journals of interest to you. As you switch between different WiFi / LAN networks (at home, in a cafe, at work), copies of the logs you have stored locally will automatically be transferred to the devices of other users next to you. This is similar to how word of mouth works: Vasya told Masha, Masha told Pete, and Petya told Valentina. The essential difference from the word of mouth is that when copying journals the information in them is not distorted.

“Being with someone as a friend” here acquires a specific physical meaning: my friends keep a copy of my journal. The more friends I have, the more accessible my journal is to others. In the description of the puncture it is written that the Patchwork application synchronizes magazines that are 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 being offline.

User log can contain different types of records: public messages, similar to the posts on the wall of VKontakte, private messages encrypted with the recipient's public key, comments to the records of other users, likes. This is an open list. Pictures and other voluminous files are not directly logged. Instead, a hash of the file is written to it, with which the file can be queried separately from the log itself. Visibility of comments for the author of the original message is not guaranteed: if you don’t have a short enough path out of mutual friends, then you most likely will not see such comments. Thus, even if the warriors upyachki attempt to zohvaty your post, then if it were 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 large companies has existed for a long time, and it has several obvious reasons. Users are annoyed by the big players forcing the rules of the game: few people want to see ads on their screens or be banned and wait a few days for a response from the support service. The uncontrolled collection of personal data and its transfer to third parties, leading ultimately to the fact that this data is sometimes sold on a darknet, again and again reminds us of the need to build other methods of interaction, where the user would get more control over his data. And he himself would be responsible for their distribution and preservation.

Well-known decentralized social networks, such as Diaspora or Mastodon , and the Matrix protocol are not peer-to-peer, since they always have a client and server part. Instead of a shared Facebook database, you can choose your “home” server on which your data will be placed, and this is a big step forward. However, the administrator of your “home” server still has many opportunities: he can share your data without your knowledge, delete or block your account. In addition, he may lose interest in server support and not warn you about this.

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 your usual site is not available, you can use others without losing anything, since you always have a complete copy of all your data. The proxy node does not store irreplaceable data. The pub, if you ask for it, will add you as a friend and, when connected, will update its copy of your journal. When your subscribers connect to it, they will be able to upload your new records, even if you have already disconnected. In order for the pub to become friends with you, you must get an invite from the administrator of the pub. Most often this can be done independently through a web interview ( list of pubs ). If you get banned from all pub administrators, then your log will be distributed in the manner described earlier, i.e. only among those you meet in person. Transfer updates on a flash drive is also possible.

Although the network has been around for quite some time, there are few people in it. According to André Staltz, developer of the Manyverse Android application, in June 2018 there were about 7,000 keys in its local database. For comparison, in Diaspora - more than 600 thousand , in Mastodon - about 1 million.



Instructions for beginners are here . Basic steps: install the application, create a profile, get an invite to the pub site, copy this invite to the app. You can connect multiple pubs at the same time. You will need patience: the network works much slower than Facebook. Local cache (.ssb folder) will quickly grow to a few 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 the An Off-Grid Social Network article by André Staltz and his twitter .

Useful links:

[1] Official site

[2] Patchwork (Windows / Mac / Linux application)

[3] Manyverse (Android app)

[4] ssb-git

[5] Protocol Description (“Scuttlebutt Protocol Guide - How to Scourtlebutt Peers Find and Talk to Each Other”)

Source: https://habr.com/ru/post/449568/


All Articles