What is Nostr?
daedalus / Daedalus Labs
npub1zwn…tult
2024-12-12 15:26:34

daedalus on Nostr: ð“…¦ NOSTR tech update This week we successfully implemented our Nostr-based ...

ð“…¦ NOSTR tech update

This week we successfully implemented our Nostr-based messaging system based on NIP-17, instead of the still commonly used NIP-4.

NIP-4, the traditional direct messaging system in Nostr, has a significant privacy weakness: while it encrypts the message content, it exposes important metadata about who is talking to whom and when these conversations occur, "DM Reporter" (dm-reporter (npub164r…448c)) which seems to have been deleted from all relays made people aware of this.

At first our idea was to generate a unique keypair for communication with every client so it was harder to trace to see who is using our platform, luckily we found out that there was already a NIP with a better solution, namely NIP-17 which describes "gift wrapped" direct messaging.

The gift wrapped approach combines three NIPs to create a more private messaging system:

ð“…¦ NIP-44 provides strong encryption for the actual message content using modern cryptographic methods like ChaCha20 and HMAC-SHA256.

ð“…¦ NIP-59 introduces a clever three-layer wrapping system:

• The actual message becomes a "rumor" that isn't signed
• The rumor gets encrypted and sealed (kind 13)
• The seal gets encrypted, gift wrapped (kind 1059) and then posted by a randomized nostr key.

ð“…¦ NIP-17 ties it all together by defining how these wrapped messages should be handled, including:

• Using kind 14 for the actual chat message
• Randomizing timestamps to prevent time-based analysis
• Allowing users to specify which relays should receive their DMs

This approach provides several advantages:
• Hides who is talking to whom
• Makes it impossible to see when messages are exchanged
• Allows for message deniability

Relays are also advised to only serve wrapped messages (kind 1059) to their intended recipients, providing an additional layer of privacy protection.

Check out the code, fully open source:
https://github.com/DaedalusLabs

#grownostr #nip4 #nip14 #nip17 #nip44 #nip59
Author Public Key
npub1zwne90qpp0g20u99gcr44ukc42vhyg9yfw2tuc8kv9r00er9xwlqm5tult