Closed reneaaron closed 2 years ago
@fiatjaf Is there any chance to get your feedback on this idea? The main questions for you are:
@reneaaron:
Awesome, I'll dig into that. Thanks for your quick feedback!
To my knowledge lnurl-auth works by signing a message with the underlying node key (basically lncli signmessage
), right? @bumi
For lnurl-auth Alby signs an arbitrary message DO NOT EVER SIGN THIS TEXT WITH YOUR PRIVATE KEYS! IT IS ONLY USED FOR DERIVATION OF LNURL-AUTH HASHING-KEY, DISCLOSING ITS SIGNATURE WILL COMPROMISE YOUR LNURL-AUTH IDENTITY AND MAY LEAD TO LOSS OF FUNDS!
.
I was just reading into nostr keys in NIP-06 and stumbled upon m/44'/1237'/0'/0/0
.
Would it make sense to re-use this derivation path here, too? While that probably wouldn't allow users to restore their nostr keys just by the node key itself there would at least be a reproducable way to generate nostr keys also for other extensions that might have a connection to your node and can sign messages. We could even support sub-accounts in future by deriving other keypaths like m/44'/1237'/0'/0/1
etc.
Let me know what you think!
I don't have opinions on these things. Whatever you do will be equally terrible because people will lose their keys anyway, so maybe don't worry too much.
Intro
More and more sites continue to build on nostr. Nostr is
which means that it requires users to have one or multiple sets of public-private keypairs. (one for each identity)
Since the browser extension is already connected to your node we could make use of the same cryptographic keypair to sign nostr messages. That would remove the need to separately backup nostr keys.
Technical analysis
Lot's of the UI is already there (to enable sites and sign messages) and could potentially be reused to handle
window.nostr
API calls in the same way we currently handlewindow.webln
calls.The following API specs would need to be implemented in the provider:
There already is an implementation available here:
https://github.com/fiatjaf/nos2x
Questions
Links