In order to improve the security of kind=4 encrypted direct messages, we'll translate the ideas from the [SimpleX Messaging Protocol](https://github.com/simplex-chat/simplexmq/blob/stable/protocol/overview-tjr.md#simplex-messaging-protocol) to nostr. Briefly, each side of the conversation creates an ephemeral "conversation key" and negotiates a secure location to continue the conversation. This allows for minimal metadata to be revealed.
## Conversation Negotiation
Alice (public key `b5a448349c963a6cffbd57e6de0466bbe5584e14959e2f7aa4a8c295db52be7d`) wants to have a DM conversation with Bob (public key `18d95d3b888e273c70aafd7fff2ea7f3ddc356171ded0fe5c452a6ff1848e08e`).
Her client will create a request that contains pointers to a relay and event kind where she will listen to responses from Bob:
Bob's client will see a DM from an unknown contact, will decrypt and validate that the request is addressed to him (the "p" tag is his public key).
The client should present Bob with a prompt, displaying the Alice's information, the requested relay and kind. If the requested kind is an ephemeral event (as shown in this example), the client can indicate that the chat with Alice would (may?) not be saved on the relay.
If Bob accepts the request, his client would first create another ephemeral private key and repeat the process described above, with his own conversation request to Alice, pointed to a relay of his choosing:
His client will send this event to `wss://relayalice.com`, where Alice's client will already be subscribed to events addressed to `{"authors": ["0d4684b3d8ecd52a2c276e505e872059f5bc98bf79ca28cff0d1e4a625a9c8f7"], "kinds": [20004]}`.
After Alice's client validates the request and connects to `wss://relaybob.com`, the conversation can continue between the two conversation keys, with Bob sending events as pubkey `0d4684b3d8ecd52a2c276e505e872059f5bc98bf79ca28cff0d1e4a625a9c8f7` to `wss://relayalice.com`, and Alice sending replies as `a2ab458e92c7c2434062cf94036168fce5ca4236294b48b4911ee765e1448f1b` to `wss://relaybob.com`.
Clients SHOULD connect to at least two relays – since the sender and recipient channels should be on separate connections.
The conversation kind MAY be any ephemeral event, or kind=4. As long as the clients agree to the requested destination, the conversation should proceed as normal.