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 · 2 comments
Open

Payload differs when ECIES is used with lightpush #2131

vpavlin opened this issue Sep 12, 2024 · 2 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

@weboko weboko added bug Something isn't working enhancement New feature or request labels Sep 13, 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
Copy link
Collaborator

weboko commented Sep 17, 2024

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

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: Triage
Development

No branches or pull requests

2 participants