Skip to main content


 
At @lightone 's request, I wrote a blurb about what it would take to protect user's private data from their node admin on a decentralized social network node. I use #Friendica as a reference (extending this Friendica GitHub issue about encrypting data at rest), but this applies to #Mastodon, #Diaspora and #Hubzilla as well.

Let me know what you think about it. #cryptography #decentralization #socialnetworking
Hm. This is a topic I spent a lot of time thinking about. I get the concern, but I always doubt the actual usefulness of such an encryption level for applications that are not p2p. Some random thoughts.

With your first method, storing the private key encrypted in the database, there is an even more drastic downside than the ones you mentioned, unfortunately.
The plain text private key is accessible to prying admins when the user’s session is open.
is actually not your biggest concern at all. The admins have access to the source, and thus also have access to the login form itself. There is absolutely no guarantee that they did not implement a method that logs your clear text password into the database - and the end user has no way of checking that. Or, even worse, the admins could simply use a static encryption key, regardless of the users password. Even if you would do the entire encryption within the browser with some JS, for normal users, they are unable to actually check if the password gets transfered over to the server.

This method migh... Show more...

There are a number of problems which I didn’t see addressed, like how does the server propagate the decrypted content to other servers? What protects users from JavaScript copying their password and decrypting their content? How do federated servers protect content?

@Dennis Schubert Thanks for the follow-up. Indeed, I naively assumed that an admin would run vanilla code and the client would be untampered but you're right, neither have to be.

@🛫 Brad Koehn 🛬 Initially, I only thought about incoming content. The server would encrypt the plain text message before storage, and the decryption would only be for display. Outgoing messages would have to be plain text and again, the local copy would be encrypted with the public key before storage. But this is moot given @Dennis Schubert reservations.

However, we already are exchanging a couple of public keys between accounts (for the diaspora and salmon protocol), so we could exchange one more so that the encryption could be done from remote servers as well.

I'm... Show more...

So that’s why I like to market distributed social networking as a way to evade corporate surveillance but not state surveilance. I think it’s fair to say use us for your daily shit-shat, but if you need actual private, anonymous communication, please use (established) E2EE messaging tools like GPG, XMPP/OMEMO, Signal etc. As Dennis outlined E2EE easily breaks most amenities users expect from social networks and while you might be able to reengineer some of these with certain zero knowledge protocols or whatever, that approach will always fall behind what any kind of social network not doing this can offer. So when it comes to outreach, I’d keep the message of fighting corporate surveillance rather than surveillance in general.

I was thinking of something along the lines of matrix. You can run most things unencrypted for usual chatter, but have encrypted rooms or forums for groups. It's not as easy as everything E2E but could be less challenging to implement.

But even better would be to make the ability to self host easier somehow. Maybe with more verbose instructions for setting up a server (VM, RPi, etc). That way you can (hopefully) trust yourself as an admin.

The issue, in my common user opinion, is not the easiness (or otherwise) of self-hosting. Not all people have administrator skills. Not all people wish to spend time on it. For some it's easier to grasp the idea that one should donate a little for using a friend's server rather than everyone should learn to self-host. Not all people have friends administrators. So there is no easy workaround solution to avoid large servers with thousands of users. And there is no way to force better distribution.

In case the initial approach does not assume same experience for all users across federation (what M. Marlinspike said is impossible), if direct messages protection were available only in a certain native desktop client, it could be the choice of a user to degrade convenience for the sake of privacy. As for user experience, judging by Protonmail example, probably, there are ways. Although the decision to decrypt in the browser may be debatable.

I started working on a self hosted solution that keeps all the software that handles cleartext content on the user’s machine, and used free services for moving content and notifications. The idea was to use a public folder on a store like Dropbox, Google Drive, etc to store all of your encrypted content (posts, comments, etc), and a dedicated, free email account like Gmail for sending and receiving notifications, all driven by an app on your mobile device, which would orchestrate assembling a coherent view of everyone’s content without placing the burden of running a server, TLS, etc. on the user. It’s viable, but it’s not web-based, not that that matters much these days.