Skip to content
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

NIP-46: support NIP-44 encryption/decryption for RPC payloads #137

Closed
jiftechnify opened this issue Nov 4, 2024 · 1 comment · Fixed by #150
Closed

NIP-46: support NIP-44 encryption/decryption for RPC payloads #137

jiftechnify opened this issue Nov 4, 2024 · 1 comment · Fixed by #150

Comments

@jiftechnify
Copy link
Owner

jiftechnify commented Nov 4, 2024

How to detect the encryption method used:

  1. split ciphertext by "?iv="
  2. check the length of the last part
    • if the length is 24, payload is NIP-04 encrypted
    • if not, payload should be NIP-44 encrypted
@jiftechnify
Copy link
Owner Author

jiftechnify commented Nov 5, 2024

nostr-protocol/nips#1248 (comment)

  • by default, encrypt with NIP-04 for backward compatibility for now
  • use NIP-44 encryption only if explicitly specified as an option of connection initiation methods on Nip46RemoteSigner
  • when (almost) all remote signers become compatible with NIP-44 encrypted RPC, switch default to NIP-44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant