764 points · by Arathorn · 6y ago · 174 comments
I've been nerding out a bit playing with Matrix/Riot and Urbit - there's a lot of exciting stuff happening in this space.
If you like what Matrix is doing consider paying $10/month for your own server via Modular.im (https://modular.im/). It supports the Matrix devs and you get your own high performance federated server to use on the network.
Their automation makes it extremely easy to spin up your host so you don't have to manage anything yourself. The default server they run has a lot of traffic so having your own is a better experience, and it helps further decentralize the network (and you control your own server).
I'm excited to try out p2p, thanks Arathorn for being so responsive in the comments on HN.
After Keybase sold out users to Zoom my friend in China and I switched to Matrix/Riot. While the default Matrix server is blocked there if he doesn't use a VPN we can still communicate on others (for now).
One question for Arathorn re:
> "Hooking up E2E Encryption APIs in Dendrite (not that it buys us much in a pure P2P world)"
Doesn't this still matter if the internet traffic itself is tapped? If I'm understanding this correctly we'll still want E2E for things like deep packet inspection in China (or bulk collection by western governments).
> Doesn't this still matter if the internet traffic itself is tapped? If I'm understanding this correctly we'll still want E2E for things like deep packet inspection in China (or bulk collection by western governments).
If TLS has been compromised between your nodes, then yes - E2EE would give another level of protection; security in depth. I guess it depends on whether you believe your government has the ability to compromise transport layer security between arbitrary peers on the network.
For pure P2P Matrix, there might be some compromise where one uses the E2E keys and key verification to secure the transport layer security (thus giving you E2EE if there is no server in between, but without all the complexity of a cryptographic ratchet). This might give you best of both worlds - but the second you start accumulating data on a server somewhere you'd be back wanting proper E2EE.
So, it gives you some guarantees about encryption, that might or might not be redundant (and for some use-cases, better safe than sorry).
I've found the docs are generally pretty good and the community is helpful so if you're interested in playing with it it's worth it.
I am extremely proud of what work is being done online today to secure communications.
While we have companies telemetrying our native stacks[1], web browsers[2], and messaging platforms[3], we also have people working on software that doesn't do those things and still tries to empower the user to get what they need done without being a double agent for a 3rd party.
1 (windows 10, chrome OS, GMS android)
2 (cookies, pixels, fingerprinting, CDNs, chrome itself)
3 (whatsapp, FB messenger, telegram)
From OS[4] to browser[5] to messaging platform[6].
4 (debian, qubes)
5 (...maybe not? konqueror probably doesn't do telemetry?)
6 (irc probably, matrix, delta chat)
Matrix is IMHO in competition for mindshare not (directly) with WhatsApp, but with Signal.
Matrix | Signal
Increasingly decentralizable | Centralized
E2EE but not quite for metadata | E2EE and metadata-free mostly except recently requiring PINs and server-side storage
Federated with its costs (slower development etc) | Nonfederated with its costs (outages etc)
Temptingly close to P2P or CS | only CS
No voice comms | Voice and video comms
No built-in social graph | social graph via phone (being worked on?)
OSS in practice | OSS in law but hard to contribute to
Signal is attempting to design the system such that Signal can never know whose contacts are in your phone as a service provider. They deal with side-channel leakage of lookups from the contact DB into the enclave using a technique called linear scan which is a constant-time bitwise XOR operation on every contact. This is the most brute force version of a class of techniques known as oblivious RAM (ORAM) which are increasingly being used to manage data loads into secure enclaves.
Obvious caveat: if SGX gets broken then these contact lookups are vulnerable to side-channel analysis until the enclave is patched. I think this is a strictly better security property than not having the enclave, but it's far from perfect (no security model is perfect FWIW).
In short, Signal is doing everything they can to avoid having access to your social graph. If you still don't think what Signal is doing is enough, you can run your own signal (or matrix) server, but then you are running a very, very valuable server from a graph analysis perspective. At present, I believe the only way to make the metadata in these services less interesting is to put it inside of an enclave in the hopes that will reduce the value of attempting to attack the servers which manage the graphs for these comms networks.
Source: I work on MobileCoin which uses similar techniques for managing a side-channel resistant ledger.
...which is precisely why we’re working on P2P matrix. No servers; nowhere for metadata to accumulate (other than the clients, of course).
In general, as the number of nodes in a comms graph increases, the overhead of synchronizing the comms between those nodes increases to the point that noise dominates signal, which is why most comms networks end up being a hub and spoke system instead of a mesh. I think that mesh can potentially work in the ~10k node range, but I don't think you can have multi-million node mesh networks, which is what a P2P system will need to function at scale.
I would be thrilled to be proven wrong, but my knowledge of networking suggests that in a high node count network, the overhead of synchronizing node state dominates network traffic.
Edit: In summary, I think that in most big comms networks, the endpoints do the encryption and the servers do the heavy-lifting of routing. Again, I would love to be proven wrong.
Edit 2: Just to be clear, I am excited for the way matrix pushes the envelope on comms tech. I think it's cool to see active development in these systems wherever it comes from. My caution is only about what I've seen in pure mesh-networking systems (and the dangers of self-hosted systems becoming the very centralized systems users thought they were escaping from).
If the network itself is controlled by adversary, you leak more metadata passing data directly. If data goes through honest server, attacker needs to do time correlation analysis.
3rd party identifiers like phone numbers and email addresses can be registered and discovered via centralized service. At least for phone numbers it's not really possible decentralized.
I like this idea so much that I've found and opted-in https://wiki.archlinux.org/index.php/Pkgstats
On my work notebook, I get "your organization has blocked access to this page."
/me freaks out
incorrect. I use voice/video over matrix every day.
I somehow managed to convince 4 of my friends to use Riot and it's been great. We were originally using Group Me.
My friends are not tech savvy and couldn't care less about software freedom or privacy, but I was able to convince them to switch by luring them with the fact that they could post unlimited size videos. It's actually the easiest way to share high quality videos between Android and iOS users.
The only thing that annoys me is when you release updates to the default configuration file and I have to manually resolve the differences in the middle of an APT upgrade. That's not a big deal though.
Deploying with docker will eliminate this kind of issue.
Self hosted Riot is only relevant if you want to customize it, but I've found radical [1] to be a better alternative since I'm the only one using the server.
You can always fall back to using the Matrix-hosted Jitsi and TURN instances if you don't host your own (although I don't end up video calling with riot anyways).
The hard part of selling Matrix to family and friends who currently use WhatsApp is still the user experience. To be fair Riot has improved substantially since I first tried it but there's still some way to go before my Mum will be comfortable using it.
That said, I'm encouraged by the progress I'm seeing! My money's still on Matrix to supersede traditional centralized messaging systems.
Given the anti-privacy climate in the US, it's great how Matrix is not US based.
https://github.com/tijder/SmsMatrix
If you're on iOS, there is also an iMessage bridge that exists.
Which makes it interesting, and worth learning about.
I feel like internet blackouts are not a distant idea or all that improbable and I want to have some knowledge in my back pocket just in case.
Fixed ad-hoc routing is a little better, but tends to be kind of fragile since nodes can appear and disappear at random. I've never found a system that worked as well as I would like, although I think there could be value in a network that separates the high bandwidth user data from the low bandwidth routing data. Like it uses 802.11 for the data, and LoRa for the routing decisions.
It would be an interesting idea to have a device that could use 802.11 for data when in close enough range. With chips like the ESP8266 you could still have a relatively low power device but with much greater bandwidth.
I might not be thinking broadly enough here though.
A domain in this case is akin to a hash of a public key, or something like that, just enough to securely identify the target of the communication so there’s nothing to “revoke” although that’s not to say the peer discovery systems could not try to blacklist you.
Decentralized DNS with human readable addresses (unique screen names) is perhaps more a political problem than a technical one, and hence never fully “solved” just different sets of trade-offs that can be made.
However, between these two you can only pick one. You can't solve squatting problem without some kind of authority over issued names.
Careful with those words. Experience taught me that if there isn't a reason to ever want to do that, reality will eventually provide you with one.
There's no reason to ever revoke control for messaging systems, though, genuinely: imagine if your e-mail address could be taken on a whim by anyone. It can be! But you'd never want to revoke control of a domain rather than just marking it as spam or illegal and dropping messages from it. It functions as an inbox more than it functions as an outbox.
Addressing space should be permanent.
Especially given in an environment like this it'd be used mostly to get the initial connection, performance probably wouldn't be too big a problem.
IPFS is not a store-and-forward architecture; a file does not get automatically stored by the system, so when the sender disconnects, the file is no longer accessible. There's "solutions" to this, like Filecoin, but nobody wants folks to be paying to upload images.
Or, in other words - the problem IPFS solves is peer discovery for a given hash, not storage. In Matrix, you already know who your peer is - it's whoever sent you the message referencing the image.
You wouldn't need to save all of the media your homeserver is dealing with, but you still could be reasonably sure that your node would be able to find all media you are supposed to access.
Given that the post talks about libp2p and how libp2p's main driver is IPFS, it seemed reasonable to think that if you are adding Dentrite to your browser you might embed an IPFS server as well.
This idea always sounds interesting and dangerous to me. There's a lot of content you really don't want to be a provider for for legal and other reasons. Caching it for yourself is one thing - public distribution is another.
libp2p is what IPFS is built on, not the other way round.
checks the docs
Looks like you could point it at IPFS "MFS" mount (Mutable File System) instead of whatever directory it's using now for its normal local storage media store (which I assume exists?), and that'd do the trick. Files stored in IPFS (so mirrorable through that, or whatever it is that you've got in mind) but appearing as ordinary files with normal names, so the normal file storage media store might manage to Just Work.
[EDIT] Incidentally MFS is exactly what I wished existed back when was kinda halfway considering using IPFS for my personal files. Been added since the last time I looked in on the project. Was too easy to "lose" files in IPFS otherwise. That sort-of fixes the problem, at least, provided the file tree can also be replicated pretty easily.
- Facebook messenger - Instagram - Whatsapp - Slack - Discord - email (yes)
If I can use a local client (iOS or Android), and not have to resort to a separate server, it’s awesome
I'm curious about what eng tradeoffs and so on have been made and so on. Imo zookeeper type system with an eventual transition to async bft consensus is the best practical approach today. Node join / leave etc is too hard a problem right now in non centrally managed p2p topologies.
Edit: it's not "centralisation" :|
What is the value in federation if people can come away with different opinions as to what was said in a conversation? Eg. for example a $$ contract negotiation and an attacker using something like a msg replay attack that gives different sides different views of what the contract value is.
Edit: Or does federation mean proxying & replication in this case?
Matrix isn't a distributed ledger, and doesn't provide transactional guarantees. For unencrypted conversation, the user trusts their server not to spoof their messages. Other servers cannot spoof history as messages are signed into a room DAG. The worst scenario is that a malicious server could indeed withhold messages from a room DAG, and this would be indistinguishable from a network partition or a slow server.
The way we mitigate your own server attacking your conversations is at the E2EE layer - ensuring the messages are encrypted by the right user and spotting replay attacks based on signed E2EE metadata
There's no mitigation to servers dropping your messages, however, but practically that has little value - you're not going to be able to use it to give different sides of a $$ contract negotiation different views of what the contract value is.
Is it okay to run it at home, or will I lose messages on downtime? I assume other hosts will retry when my connection is back up?
https://matrix.org/blog/2020/04/06/running-your-own-secure-c... is a guide I did for selfhosting Synapse.
https://github.com/matrix-org/synapse/blob/master/INSTALL.md
[1] https://github.com/spantaleev/matrix-docker-ansible-deploy
This also means a total loss of data if something happens to the device.
Of course, I can imagine some usecases where this would be a plus, but I suspect that most of them are on the wrong side of the law. Now, coming from Russia, I know that it doesn't automatically mean it is something bad, but still, in vast majority of cases, it does.
Not my cup of tea, thanks, because keeping my data is very important for me. For this, good old federated model with client-server architecture strikes the best balance between reliability and privacy. Just use your own domain name, and all will be fine
> In Firefox, Service Worker APIs are also hidden and cannot be used when the user is in private browsing mode.
Says https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor...
Good announcement and look forward to test it as soon as possible.
> "We also want to take a look at the DAT / hypercore / hyperswarm / Cabal ecosystem to see if there’s a match :) "
In collaboration with the Hyper* team we have built a p2p chat app prototype using the hyper* stack and would like to share this with you.
> "Firstly: we do not yet have a solution for “store and forward” nodes which can relay messages on behalf of a room if all the participating devices are offline."
The main selling point for our prototype is how we are approaching and solving this exact problem. We're sure you will find it interesting.
I've reached out to your support email so that we can figure something out.
This new p2p stuff is a great addition to an already very versatile platform. I think Matrix has a huge potential.
1: Clicked on "Try Now".
2: Was greeted with a blob of text. Spotted "The easiest way to try Matrix is to use the Riot Web ...".
3: Clicked on "Riot Web" because that is a link.
4: Got transferred to a different website with a lot of buttons on it.
5: Clicked on the green "Get started button"
6: Got transferred to another page with a bunch of buttons on it
7: Clicked on "Browser"
8: A new window with a "Sign in" and a "Create Account" button opened
9: Clicked on "Create account"
10: Entered a username and password
11: Got asked to do the Google Captcha
12: Had to select 4 tiles with traffic lights and cklick next
13: Was told to select stairs.
14: Since there were no stairs, I clicked "Skip"
15: Had to select 7 tiles with fire hidrants and click next
16: Had to select 4 tiles with traffic lights and click next
17: Had to select 3 tiles with traffic lights and click next
18: Had to accept terms an conditions and click "accept"
19: Had to enter a recovery passphrase.
20: Had to confirm my recovery passphrase.
21: Was forced to click a "copy" button to copy the recovery passphrase.
22: Had to click "continue"
23: Staring at a spinner for a while.
24: Was prompted with an "OK" button. Clicked it.
25: Was prompted with a "Welcome to Riot" page with different options.
26: Clicked "Explore public rooms".
27: Clicked on the first one.
28: Had to look at a spinner for a while with "Joining room" next to it.
29: Still looking at the spinner ...
30: Spinner is still spinning ... will take the time to post this to HN.
Update:
31: Back to the Matrix window. Hurray! I'm in a channel. Typing "Hello" and enter. It seems to work.
I wonder if it would be an option to shortcut these 31 steps into just one and throw everyone who clicks "Try Now" into a "Welcome to Matrix" channel.
* We need to make it easier to jump into Riot/Web from the matrix.org home page.
* Google reCAPTCHA sucks; we know.
* The new recovery passphrase thing is an error - we know, we're in the middle of fixing it, targeting next week.
* Joining rooms is slow - we know, this is harder to fix, but is on the menu.
Thanks for spelling it out ;)
Since I did not save my password when signing up, I proceeded to set an email. Got a confirmation email and clicked the link in it.
Then signed out and clicked the "Set a new password" link.
But it does not work. I always get the message "Failed to send email: This email address was not found".
I will say, however, that a lot of the difficulty appears to be tied to the privacy aspects. I think it's the only service I checked out that didn't require an email or phone number to sign up. I think the privacy/ease of signup trade-off is okay right now, and I also think that Riot is trying to make it better.
Also, I'm successfully using it with non-tech-oriented family and it's been quite good!
Regarding the p2p app (https://p2p.riot.im), yeah, that's a proof-of-concept they bolted onto an existing client. They could have adjusted the login page.
I need to click "Create an account" for it to work, give or take one page refresh. Then I can open the room directory and pick a room.
However, I tend to like some of that hand-holding. Plus, when someone joins a chat system, they're generally introduced to it by acquaintances that already use it, so the next onboardings are easier. Not saying it shouldn't be improved, of course.