Thread

I've just published the draft NIP to bring highly secure DM and group messaging to Nostr via the MLS protocol. I've been studying this space for months now and after looking at a lot of different options, MLS (messaging layer security) stood out as the right way to approach solving DMs and group messages. It's highly scalable, an internet standard, and allows for graceful upgrading over time. Done right – this NIP allows us to build extremely secure, uncensorable messaging clients that have no centralized coordinators or servers. Which is what I plan to do next. πŸ˜‰

Replies (65)

πŸ‘€
JeffG 's avatar JeffG
I've just published the draft NIP to bring highly secure DM and group messaging to Nostr via the MLS protocol. I've been studying this space for months now and after looking at a lot of different options, MLS (messaging layer security) stood out as the right way to approach solving DMs and group messages. It's highly scalable, an internet standard, and allows for graceful upgrading over time. Done right – this NIP allows us to build extremely secure, uncensorable messaging clients that have no centralized coordinators or servers. Which is what I plan to do next. πŸ˜‰
View quoted note →
It doesn't quite work like that. The messages that are sent in the DM or group chat are decrypted on the client that has access to the group. Once the message is decrypted the client throws away the decryption key (for forward secrecy). But keeps a separately encrypted log of the chat. This is what happens with Signal, Whatsapp, etc. Each device keeps a copy of the transcript but at no point are they trying to rebuild the conversation from past messages (because they no longer have the cryptographic state to do that). Make sense? It's definitely a trade off with this sort of approach; security for convenience in using lots of devices or different clients.
Wow, sounds fantastic!
JeffG 's avatar JeffG
I've just published the draft NIP to bring highly secure DM and group messaging to Nostr via the MLS protocol. I've been studying this space for months now and after looking at a lot of different options, MLS (messaging layer security) stood out as the right way to approach solving DMs and group messages. It's highly scalable, an internet standard, and allows for graceful upgrading over time. Done right – this NIP allows us to build extremely secure, uncensorable messaging clients that have no centralized coordinators or servers. Which is what I plan to do next. πŸ˜‰
View quoted note →
πŸ‘€
JeffG 's avatar JeffG
I've just published the draft NIP to bring highly secure DM and group messaging to Nostr via the MLS protocol. I've been studying this space for months now and after looking at a lot of different options, MLS (messaging layer security) stood out as the right way to approach solving DMs and group messages. It's highly scalable, an internet standard, and allows for graceful upgrading over time. Done right – this NIP allows us to build extremely secure, uncensorable messaging clients that have no centralized coordinators or servers. Which is what I plan to do next. πŸ˜‰
View quoted note →
Excellent, can't wait!
JeffG 's avatar JeffG
I've just published the draft NIP to bring highly secure DM and group messaging to Nostr via the MLS protocol. I've been studying this space for months now and after looking at a lot of different options, MLS (messaging layer security) stood out as the right way to approach solving DMs and group messages. It's highly scalable, an internet standard, and allows for graceful upgrading over time. Done right – this NIP allows us to build extremely secure, uncensorable messaging clients that have no centralized coordinators or servers. Which is what I plan to do next. πŸ˜‰
View quoted note →
I think that NIP-17 is still a really good spec. It's just that it doesn't handle groups or give you any forward or post-compromise security. Meaning if your identity key leaks, then all your conversations for all time have leaked. But, it's very easy to show messages across multiple devices and clients with NIP-17 which is nice for simple clients that might not need high security.
Private Messaging is probably solved for a long time without needing any centralized intermediary.
JeffG 's avatar JeffG
I've just published the draft NIP to bring highly secure DM and group messaging to Nostr via the MLS protocol. I've been studying this space for months now and after looking at a lot of different options, MLS (messaging layer security) stood out as the right way to approach solving DMs and group messages. It's highly scalable, an internet standard, and allows for graceful upgrading over time. Done right – this NIP allows us to build extremely secure, uncensorable messaging clients that have no centralized coordinators or servers. Which is what I plan to do next. πŸ˜‰
View quoted note →
This is why I've spent so much time working on and understanding the OpenMLS library. It's a really solid open source implementation of the MLS spec that I think most client devs will use to implement this NIP. Of course, once this NIP gets some feedback and settles down I'll start work on implementing it myself and adding the necessary abstractions to NDK (and other nostr libraries) to make it easy on client devs. That said, it's quite different to the way that people think about DMs so far. Each client keeps it's own chat transcript and has it's own set of keys and state so it's less "syncable" than something like NIP-04 or NIP-17 DMs.
So, each client counts as a distinct member of the group. Which means that you have to individually join the group from each client that you want to use. On the surface, this sounds annoying, but it's the same thing that you're doing with Signal or Whatsapp when you connect with the desktop app. You're just inviting your new client to the chat and then that client has it's own set of keys and state and goes forward as an independent client. The app itself makes sure that your messages from those distinct clients show up as from the same person. And the app itself could have the ability to sync your chat transcript between the two devices but that's not handled at the spec level here, it's handled at the application level. Does that clarify?