Skip to content

Conversation

@weboko
Copy link
Collaborator

@weboko weboko commented Nov 23, 2023

Problem

In some cases users don't want to encrypt whole payload but only some part of it to have additional features.
To do some one would need to implement encryption on their own or find a library.

Solution

Export already implemented primitives to allows consumers build more features.

Notes

Follow-up

@weboko
Copy link
Collaborator Author

weboko commented Nov 23, 2023

This PR is mostly re-naming and exporting of existing functions.

@weboko weboko requested a review from fryorcraken November 24, 2023 09:41
Copy link
Collaborator

@danisharora099 danisharora099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a failing CI size check. opened a PR to fix that: #1734. feel free to merge it into your PR. perhaps we should also move #1435 into priority.

added some minor nitpicks.
else, lgtm!

@github-actions
Copy link

github-actions bot commented Nov 27, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 78.1 KB (0%) 1.6 s (0%) 160 ms (-7.63% 🔽) 1.8 s
Waku Simple Light Node 240.72 KB (0%) 4.9 s (0%) 533 ms (+11.04% 🔺) 5.4 s
ECIES encryption 72.75 KB (-0.23% 🔽) 1.5 s (-0.23% 🔽) 305 ms (+38.52% 🔺) 1.8 s
Symmetric encryption 72.73 KB (-0.26% 🔽) 1.5 s (-0.26% 🔽) 215 ms (-10.95% 🔽) 1.7 s
DNS discovery 120.85 KB (0%) 2.5 s (0%) 425 ms (-1.46% 🔽) 2.9 s
Privacy preserving protocols 125.66 KB (0%) 2.6 s (0%) 347 ms (+65.27% 🔺) 2.9 s
Light protocols 75.71 KB (0%) 1.6 s (0%) 134 ms (-48.43% 🔽) 1.7 s
History retrieval protocols 74.64 KB (0%) 1.5 s (0%) 251 ms (-5.68% 🔽) 1.8 s
Deterministic Message Hashing 5.65 KB (0%) 113 ms (0%) 76 ms (+135.67% 🔺) 189 ms

@weboko
Copy link
Collaborator Author

weboko commented Nov 27, 2023

@danisharora099 thanks for the PR and I also agree that it is better to get the getKey functions into the modules :)

@weboko weboko merged commit 7eb3375 into master Nov 28, 2023
@weboko weboko deleted the weboko/encryption branch November 28, 2023 00:02
@fryorcraken
Copy link
Collaborator

@waku-org/js-waku-developers I believe this PR should be reverted as it encourages metadata leaking by enabling developers to partial message encryption.

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.

4 participants