-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nip44 v2 #326
Add nip44 v2 #326
Conversation
@paulmillr I ported everything from your repo to nostr-tools, just want to double check that it's ready for primetime. Ok to merge this? |
wait until branch gets into main and it'll be good to go. |
This is up to date with @paulmillr's library and ready to merge |
perhaps we should later publish nip44 pkg separately? thoughts? |
I think this would be ideal for people who want small dependencies. nostr-tools is a good place to start, and could later include the standalone as a dependency |
@staab offtopic, with regards to mac stuff: it wasn’t mentioned in audits, so there was nothing to fix. it’s just something i’ve mentioned in spec - we should keep the notice there for now. |
NOS-01-009 says:
This seems to be fixed based on Encryption step 6, but the spec says:
Just trying to understand here, which signature is this talking about? Is encrypt-then-sign-then-mac the standard because it authenticates the signature? Are nostr event signature self-authenticating? |
This package can be imported as |
@staab MAC should be the last step (after signature) because calculating and verifying mac is fast. If the message has been tampered with, it would be shown immediately. We can't use MAC as last step, because then the whole thing would need to be a bunch of bytes instead of nicely formatted JSON. MAC is calculated over ciphertext, so we'll need to encrypt full event, and we can't do that - relays won't accept it. Also there is no standard way. Everybody cooks something for their own goal. Our current way is good enough. |
No description provided.