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

Payload differs when ECIES is used with lightpush #2131

Open
vpavlin opened this issue Sep 12, 2024 · 3 comments
Open

Payload differs when ECIES is used with lightpush #2131

vpavlin opened this issue Sep 12, 2024 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@vpavlin
Copy link
Member

vpavlin commented Sep 12, 2024

This is a bug report

Problem

When you use ECIES createEncoder from message-encryption package and publish via Lightpush, the message is encrypted for each peer, which results in different payload for each lighpush peer (because randomness is part of encryption https://github.com/waku-org/js-waku/blob/master/packages/message-encryption/src/crypto/ecies.ts#L128)

This is problematic because it wastes resources on encrypting multiple time and it also means differen message hash, so it is harder to deduplicate.

Proposed Solutions

Not sure:)

Notes

@chair28980 chair28980 added this to Waku Sep 12, 2024
@weboko weboko added the bug Something isn't working label Sep 13, 2024
@weboko weboko moved this to To Do in Waku Sep 17, 2024
@weboko weboko added the enhancement New feature or request label Sep 17, 2024
@weboko
Copy link
Collaborator

weboko commented Sep 17, 2024

The problems that are mentioned:

  • wastes resources on encrypting multiple time;
  • differen message hash;
  • harder to deduplicate;

Multiple time encryption - seems to be a minor problem but a good follow up.
Different message hash - isn't it anyway the problem when message sent to different peers as each will have it's own proof?

Harder to deduplicate - this one shouldn't be a problem for js-waku as I think we are catching duplicates just fine in our SDK level Filter subscription implementation.
This comes problematic when we talk about js-waku <-> go-waku communication. As to address that I think we need to align SDK implementations so that they are more or less compatible in that regard and provide similar toolchains.

We can try to pin point such places and follow up with particular fixes so that in our case I believe we need to align message deduplication for js-waku and go-waku. Is it the case @vpavlin ?

@weboko weboko moved this from To Do to Triage in Waku Sep 17, 2024
@weboko
Copy link
Collaborator

weboko commented Sep 17, 2024

Moving back to triage as we are figuring criteria for this task.

@vpavlin
Copy link
Member Author

vpavlin commented Oct 18, 2024

Yeah, I guess it makes sense to tie this to other client SDKs - I would not focus on go-waku, since it is going away anyway, so we need to match this with nwaku in the future.

But no need to prioritize probably

@weboko weboko moved this from Triage to Icebox in Waku Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Icebox
Development

No branches or pull requests

2 participants