8000 allow NIP-44 to encrypt more than 65535 bytes by fiatjaf · Pull Request #1907 · nostr-protocol/nips · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

allow NIP-44 to encrypt more than 65535 bytes #1907

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

fiatjaf
Copy link
Member
@fiatjaf fiatjaf commented May 4, 2025

This is backwards-compatible and no one has to change anything if they do not care about bigger messages.
The only reasonable case where this necessity has shown up so far was signing of big kind:3 lists via NIP-46.

@vitorpamplona
Copy link
Collaborator
vitorpamplona commented May 5, 2025

There is no need for the 0 length signal. You can just check if the whole message is bigger than 65603 and go for the 4-byte length.

@vitorpamplona
Copy link
Collaborator

Meaning.. current systems will misread the length bytes and will not be able to decrypt anyway. So why bother.

@fiatjaf
Copy link
Member Author
fiatjaf commented May 6, 2025

There is no need for the 0 length signal. You can just check if the whole message is bigger than 65603 and go for the 4-byte length.

Sounds good to me. Is that number 65603 exact?

@vitorpamplona
Copy link
Collaborator

I am not sure. I got from the documentation.

We need to get some tests for -1, 0, and +1 lengths from the 2-byte limit to ensure everyone is on the same page

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 this pull request may close these issues.

3 participants
0