diff --git a/112.md b/112.md index 003141d..3338144 100644 --- a/112.md +++ b/112.md @@ -30,14 +30,18 @@ It reserves 8 event kinds (1059, 400-406) for immediate use. ## Kind 1059: Encrypted Gift Wrap -For all encrypted group chat messages, the client first generates a kind 4XX message, as below. +For all encrypted group events, the client first generates the approrpiate kind 4XX message, as below, and signs it with the user's identity key. -Then they generate a new public/private keypair, and uses this to sign and encrypt the message. +Then they generate a new public/private keypair, and uses this to sign new kind 1059 message. -The `content` is [NIP-44](https://github.com/nostr-protocol/nips/pull/574) encrypted JSON string with the temporary key, this is the inner event. +The `content` of that message is a [NIP-44](https://github.com/nostr-protocol/nips/pull/574) encrypted JSON string. + +The content is encrypted using the public key of the destination (the chat room public key, or the invitee public key. All events called "wrapped-kind XX" refer to these kind 1059 gift wrapped events. +For more information on gift-wrapping, see: https://github.com/nostr-protocol/nips/pull/468 + ## Wrapped Kind 400: Create Encrypted channel Create a Encrypted event channel.