Nostr crypto idea: HD chains
Accounts could prove that they were generated by another account.
This could be useful for eg verifying that ActivityPub users bridged to Nostr have been generated by the Mostr Bridge. (Currently NIP-05 is used as proof.)
To do it, we'd generate a master keypair for the bridge. To get the pubkey for an ActivityPub user, we'd sha256 the user's ActivityPub ID, and use that as the chain code in an HD wallet of the master pubkey, then derive index 0.
Bridged accounts would include a "custody" tag, like: ["custody", <master-pubkey>, <chain-code>, <index>]
Clients could verify it by initializing an HD wallet with the chain code, and then deriving the index. If it matches the current event's pubkey, and the event's signature is valid, it proves the account was generated by the master account.
For it to be useful, though, the master pubkey would already have to be trusted by some metric. Either because it's followed, or labeled by a different trusted pubkey somehow, or something else like that.
It could be used for more than just bridged accounts. It could be used for account recover purposes, and more.
Accounts could prove that they were generated by another account.
This could be useful for eg verifying that ActivityPub users bridged to Nostr have been generated by the Mostr Bridge. (Currently NIP-05 is used as proof.)
To do it, we'd generate a master keypair for the bridge. To get the pubkey for an ActivityPub user, we'd sha256 the user's ActivityPub ID, and use that as the chain code in an HD wallet of the master pubkey, then derive index 0.
Bridged accounts would include a "custody" tag, like: ["custody", <master-pubkey>, <chain-code>, <index>]
Clients could verify it by initializing an HD wallet with the chain code, and then deriving the index. If it matches the current event's pubkey, and the event's signature is valid, it proves the account was generated by the master account.
For it to be useful, though, the master pubkey would already have to be trusted by some metric. Either because it's followed, or labeled by a different trusted pubkey somehow, or something else like that.
It could be used for more than just bridged accounts. It could be used for account recover purposes, and more.