It occurred to me that the new key rotation thing makes it possible to implement a credible low friction "Sign up with email, then migrate a self custody nostr id later" sort of flow. So basically the way it would work is that the client allows the person to sign up with email, and you have a backend service that generates an nsec for them, and the backend signs stuff for them. Then if the user wants to move to self custody at any point, they go in their account settings and click like "Enable self custody" or something. This causes the client to generate a local nsec in the usual way, and the backend creates a key rotation event pointing at the self custodied nsec, and as soon as it's timestamped, immediately rotates to that new nsec. So far so good. However, there is still a problem -- there's no way for the backend to prove that it did not also publish an earlier timestamped rotation event with the new pubkey (which would allow the backend to rug the user in the future) But we can solve this by having the user rotate *again* (using their new nsec) to a second locally generated nsec. (which the backend service could not have known, and thus could not have created any prior key rotation events for) So bottom line is, yeah it involves two rotations (ie a 20 minute process on average given block time) but it massively reduces sign up friction while providing a way to migrate to self custody while keeping the social graph you may have accumulated prior to rotating into self custody. @hodlbod @Max

Replies (10)

There is an open questions for what is the longest chain algorithm. The service could have generated a chain of 10 rotation events and withhold them, then the user publishes his rotation, and later the service publishes its entire chain. Which one is valid?
No, the client generates an nsec along with email and password and sends it to the bunkers like in promenade, then something something send an ncryptsec to the email/password service. @rabble is also doing something with oauth and enclaves I don't fully understand
No, relays must not accept backdated events for this kind. A withholding attack is always possible otherwise.
Perhaps these "service" / custodial accounts should be declared as "genesis" type, and thus be deemed ineligible for backdated key rotation?