nips/22.md
2024-02-17 18:10:37 -05:00

2.2 KiB

NIP-22

Key Migration

draft optional

Kind 18 informs the network that the owner of the pubkey is migrating to a new key.

The event MUST contain a single p tag with the new pubkey owner will be using.

{
  "kind": 18,   
  "tags": [
    ["p", "<pubkey>", "<relay_url>"],
  ],
  "content": "<comment to followers>"
  //...
}

Confirmation Chains

Since the owner's keys might have leaked, Kind:18s alone can't be trusted.

Close acquaintances to the owner should verify the owner's intention off nostr and signal their conclusion by adding the new key to their contact lists.

Others can follow based on their individual trust on such those acquaintances.

Interpretation

The presence of one or more kind:18s, no matter who writes it, declares the key to be out of use, unreliable, unsafe and potentially stolen: No event, past and future, from this key can be trusted anymore.

Users that have a kind:18 published by their keys MUST migrate to a new key.

There can be multiple kind:18s pointing to separate new keys. Finding which event is the right one requires observing contact lists of trusted keys.

Information retention

Clients SHOULD send kind:18 to as many relays as possible, not only to the owner's relay list.

Relays and Clients MUST reject Event Deletion (NIP-09) requests of kind:18s.

Clients SHOULD use Generic Repost (kind:16) with a stringified version of the kind:18 and a k tag to 18 to let users warn followers and guarantee kind:18's retention as much as possible.

Generic Re-posts events simply warn followers and MUST NOT be considered the user's final decision on which key to switch to. Contact lists are the only source of confirmation.

Client Behavior

Upon receiving a new kind:18, Clients MUST warn their user the pubkey is unsafe.

Clients MAY download follow lists of follows and display when a follow has switched to a new key.

It's ok to delay confirmation until trusted keys start informing their assessments.

Upon confirmation, Clients SHOULD offer transition to the new key by:

  1. Changing the contact list accordingly
  2. Changing any NIP-51 list accordingly
  3. Adding the old key to the Mute List