nostr-protocol / nips

Nostr Implementation Possibilities
2.39k stars 582 forks source link

Add NIP-104: E2EE messaging using MLS #1427

Open erskingardner opened 3 months ago

erskingardner commented 3 months ago

Take 2!

This NIP outlines a way to do secure direct and group messaging on Nostr using the MLS protocol.

Easy to read

rabble commented 3 months ago

Is this the code implementing it?

https://github.com/erskingardner/openmls_nostr_crypto

I feel like this is only part of it.

reyamir commented 3 months ago

I'm working on implement this NIP for https://github.com/lumehq/coop let see how it go 😄

erskingardner commented 3 months ago

I feel like this is only part of it.

@rabble yes, this is definitely only part of it. I started that library and intend for it to be complete but then got sucked into updating upstream dependencies to support Schnorr signatures over secp256k1. Ultimately though, it's possible for clients to be built using the other ciphersuites that are already supported by OpenMLS though so I wanted to get the spec out here for review.

The future benefit of that library you liked above will be that nostr clients will have fewer dependencies on underlying crypto primitives, that's basically it.

erskingardner commented 3 months ago

I'm working on implement this NIP for https://github.com/lumehq/coop let see how it go 😄

🤙 Definitely feel free to DM me if you run into anything or have questions.

paulmillr commented 3 months ago

Farcaster implemented Signal protocol in DMs. Then they've dropped it because it was too complex to support on different devices (old / new / different libraries).

It would be great to have some kind of demo app first. I suspect it'll be quite complicated.

kngako commented 2 months ago

Nice, how can one extend the Group creation to use FROST (Maybe even have the FROST signers as group admins)?

erskingardner commented 2 months ago

Nice, how can one extend the Group creation to use FROST (Maybe even have the FROST signers as group admins)?

I've had a bit of a look at FROST but haven't really thought about how it might apply. For now, it's completely out of scope.

erskingardner commented 2 months ago

It would be great to have some kind of demo app first. I suspect it'll be quite complicated.

@paulmillr working on it :)

Sjors commented 2 months ago

Some very initial thoughts on a potential choice of cipher suite: https://njump.me/nevent1qvzqqqqqqypzpp59a0hkv5ecm45nrckvmu7pnk0sukssvly33u3wwzquy4v037hcqyg8wumn8ghj7mn0wd68ytnddakj7qgwwaehxw309ahx7uewd3hkctcqyprq4w327fynj7wa6lha6pktmer8c0979ds0sc89cgsmh5af4pet60p3dcc

@erskingardner looking forward to see your demo app, and what dependencies it pulls in. That might help inform the above.

EthnTuttle commented 2 months ago

Nice, how can one extend the Group creation to use FROST (Maybe even have the FROST signers as group admins)?

This makes me wonder how Signal does group admin stuff. They have a nice features to tweak within groups. For these different MLS events, is it expected that all participants are publishing all event types for the group?

paulmillr commented 2 months ago

Signal groups is just a bunch of 1-to-1 messages. Group settings are stored in the server in enclaves.

github-tijlxyz commented 2 months ago

This looks super great, I have been thinking about something like this for a while and will maybe try building a client for it. Any update on the more specific example process/app?

erskingardner commented 2 months ago

This looks super great, I have been thinking about something like this for a while and will maybe try building a client for it. Any update on the more specific example process/app?

I'm working on a reference client right now @github-tijlxyz I'll let everyone know here and on nostr when it's ready. :)