<oembed><type>rich</type><version>1.0</version><title>Keychat wrote</title><author_name>Keychat (npub1h0…srwx8)</author_name><author_url>https://nostr.now/npub1h0uj825jgcr9lzxyp37ehasuenq070707pj63je07n8mkcsg3u0qnsrwx8</author_url><provider_name>njump</provider_name><provider_url>https://nostr.now</provider_url><html>Old Nostr DM (NIP-4) integrates four capabilities into a single Nostr key—it serves as an ID, an encryption key, a receiving address, and a sending address.&#xA;&#xA;The encryption key in NIP-4 does not change, so NIP-4 messages lack both forward secrecy and backward secrecy. &#xA;&#xA;Consequently, if the private key is compromised, both historical and future messages can be exposed.&#xA;&#xA;The receiving and sending addresses remain constant, which poses a severe issue for metadata privacy in NIP-4 messages; &#xA;&#xA;Everyone can see who (ID) is sending messages to whom (ID).&#xA;&#xA;Currently, most Nostr apps use NIP-4 for DM functionalities, such as Damus and Primal.&#xA;&#xA;——————————————————————————————————————&#xA;&#xA;New Nostr DM (NIP-17) integrates three capabilities into a single Nostr key—it serves as an ID, an encryption key, and a receiving address.&#xA;&#xA;Kind-17 separates the sending address from the ID, making the sending address random and concealing the sender&#39;s real ID, thus improving metadata privacy.&#xA;&#xA;The encryption key in NIP-17 does not change, so NIP-17 messages also lack forward secrecy and backward secrecy. Once the private key is leaked, both historical and future messages will be compromised.&#xA;&#xA;The receiving address remains constant, so there is still a slight issue with metadata privacy in NIP-17 messages; everyone can see who (ID) is receiving messages.&#xA;&#xA;Apps like 0xchat and Amethyst use NIP-17 to implement DM functionalities.&#xA;&#xA;——————————————————————————————————————&#xA;&#xA;In Keychat, the ID, encryption key, receiving address, and sending address are separated.&#xA;&#xA;The encryption key, the receiving address, and the sending address are updated independently and continuously.&#xA;&#xA;Keychat&#39;s encryption key is derived using the Signal protocol, and each message uses a unique encryption key, which is deleted after use.&#xA;&#xA;Thus, Keychat messages have both forward secrecy and backward secrecy. Even if an encryption key is compromised, only the current message can be leaked, and historical and future messages remain secure.&#xA;&#xA;Keychat&#39;s sending address is randomly generated for each message.&#xA;&#xA;Therefore, external parties do not know the sender&#39;s ID.&#xA;&#xA;Keychat&#39;s receiving address is derived using the Signal protocol, with almost every message using a unique receiving address.&#xA;&#xA;Thus, external parties do not know the receiver&#39;s ID.&#xA;——————————————————————————————————————&#xA;&#xA;However, it&#39;s important to emphasize that NIP-4 and NIP-17 offer superior multi-device synchronization capabilities because they integrate three capabilities into a single Nostr key—it serves as an ID, an encryption key, and a receiving address.</html></oembed>