Definition
NIP-17 specifies private direct messages on Nostr that hide not just content but the surrounding metadata. It supersedes the old NIP-04 direct messages, which exposed sender, recipient, and timing in plain view on relays. NIP-17 combines two lower-level standards to close those gaps and is the current recommended way to do confidential one-to-one or small-group chat.
How a message is sent
The actual message is a kind 14 chat event (or kind 15 for files). That message is encrypted with NIP-44, sealed (kind 13), and then gift-wrapped (kind 1059) following NIP-59. A separate gift wrap is produced for each recipient and for the sender, each using a fresh random keypair. The result is that participant identities, the real date and time, the inner event kind, and other tags are all concealed from public view, and there is no shared group identifier to correlate conversations.
Relay handling
To make delivery work without a central directory, users publish a kind 10050 event listing their preferred DM relays. Clients send gift wraps only to relays on the recipient's list, and relays are expected to enforce NIP-42 authentication so wraps are served only to the tagged recipient. Clients also verify that the seal's pubkey matches the rumor's pubkey to prevent sender spoofing.
For sovereign users, this is the practical answer to private messaging without a custodial platform. The relay-discovery side connects naturally to the Nostr Outbox Model.
In Simple Terms
NIP-17 specifies private direct messages on Nostr that hide not just content but the surrounding metadata. It supersedes the old NIP-04 direct messages, which exposed…
