You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dispute_chat.md
+2-94Lines changed: 2 additions & 94 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Once an admin takes a dispute, both the admin and the involved parties (buyer an
4
4
5
5
## Sending a message
6
6
7
-
Users and admins send messages using action `send-dm`. The message must be wrapped in a Gift Wrap event (kind 1059) to ensure privacy and encryption.
7
+
Users and admins send messages using action `send-dm`. The message content is wrapped in a Gift Wrap event (kind 1059) to ensure privacy and encryption.
8
8
9
9
### User sending a message
10
10
@@ -25,8 +25,6 @@ Here is an example of a user sending a message to the admin:
25
25
]
26
26
```
27
27
28
-
This content is wrapped in a RUMOR (kind 1, unsigned), then encrypted in a SEAL (kind 13), and finally wrapped in a Gift Wrap event (kind 1059) before being published to the relays.
29
-
30
28
### Admin sending a message
31
29
32
30
Admins use the same format to send messages to users:
@@ -46,96 +44,6 @@ Admins use the same format to send messages to users:
46
44
]
47
45
```
48
46
49
-
## Gift Wrap structure
50
-
51
-
The Gift Wrap protocol (NIP-59) provides three layers of encryption:
52
-
53
-
### Layer 1: RUMOR (kind 1)
54
-
55
-
The original unsigned message containing the actual content:
1. Subscribe to kind 1059 events with a `p` tag matching their pubkey
106
-
2. Decrypt the Gift Wrap using their private key and the ephemeral pubkey
107
-
3. Decrypt the SEAL using their private key and the sender's pubkey from the SEAL
108
-
4. Extract the RUMOR content and parse the message
109
-
110
-
The sender's identity is preserved in the SEAL's pubkey field, allowing the receiver to identify who sent the message (admin or user) while maintaining privacy through the ephemeral key in the Gift Wrap layer.
111
-
112
-
## Message flow
113
-
114
-
```
115
-
User writes message
116
-
↓
117
-
Create RUMOR (kind 1)
118
-
↓
119
-
Encrypt into SEAL (kind 13) with sender's key
120
-
↓
121
-
Encrypt into Gift Wrap (kind 1059) with ephemeral key
122
-
↓
123
-
Publish to relays
124
-
↓
125
-
Receiver gets kind 1059 event
126
-
↓
127
-
Decrypt Gift Wrap → SEAL
128
-
↓
129
-
Decrypt SEAL → RUMOR
130
-
↓
131
-
Parse and display message
132
-
```
133
-
134
-
## Privacy features
135
-
136
-
The Gift Wrap protocol provides:
137
-
138
-
-**Double encryption**: SEAL + Gift Wrap layers
139
-
-**Sender anonymity**: Ephemeral keys hide the real sender from relay observers
-**End-to-end encryption**: Only sender and receiver can read messages
49
+
Clients must subscribe to kind 1059 events with a `p` tag matching their pubkey. The Gift Wrap protocol (NIP-59) ensures that only the intended recipient can decrypt and read the messages, while preserving the sender's identity through the SEAL layer
0 commit comments