gossip
gossip copied to clipboard
Client shared encryption key work
https://github.com/nostr-protocol/nips/pull/1647
- Gossip should generate a client key, store it as an ncryptsec under the user's same password, next time they use that password to login. This eventually becomes a device key in the keychains NIP too (rather than their current npub/nsec which will eventually be revoked).
- Gossip search for 10044 events to see if an encryption key already exists.
- If a 10044 exists, gossip publishes a 4454 and subscribes to the matching 4455. This has to persist across gossip sessions. Eventually if a 4455 comes in, gossip unwraps it and saves the encryption key.
- If a 10044 does not exist, gossip generates an encryption keypair (saving it under the same password ncryptsec) and publishes a 10044.
- Once an encryption keypair is achieved, gossip uses it to do DMs --- this part is not specified anywhere yet.
While #1647 is still a draft I can only do 1, which is done, so this is on hold