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

Revert "feat!: export crypto primitives (#1728)" #1754

Closed
wants to merge 1 commit into from

Conversation

fryorcraken
Copy link
Collaborator

This reverts commit 7eb3375

The original PR states:

In some cases users don't want to encrypt whole payload but only some part of it to have additional features.

I would argue the opposite. If a user has a key to decrypt or encrypt, then Waku Message v1 should be used to encrypt the whole message.

By only encrypt part of the messages, we open the door for developers to encrypt metadata and leak them. Which against why we are building Waku in the first place.

Also, within days of exposing these primitives, I got a developer confused on whether they should use them.

@fryorcraken fryorcraken requested a review from a team as a code owner December 8, 2023 10:11
Copy link

github-actions bot commented Dec 8, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 78.48 KB (0%) 1.6 s (0%) 217 ms (+85.58% 🔺) 1.8 s
Waku Simple Light Node 241.3 KB (0%) 4.9 s (0%) 322 ms (+52.75% 🔺) 5.2 s
ECIES encryption 73.1 KB (+0.19% 🔺) 1.5 s (+0.19% 🔺) 173 ms (+2.17% 🔺) 1.7 s
Symmetric encryption 73.11 KB (+0.22% 🔺) 1.5 s (+0.22% 🔺) 190 ms (+49.47% 🔺) 1.7 s
DNS discovery 120.91 KB (0%) 2.5 s (0%) 314 ms (+144.68% 🔺) 2.8 s
Privacy preserving protocols 126.01 KB (0%) 2.6 s (0%) 138 ms (-16.41% 🔽) 2.7 s
Light protocols 76.06 KB (0%) 1.6 s (0%) 193 ms (+45.64% 🔺) 1.8 s
History retrieval protocols 74.97 KB (0%) 1.5 s (0%) 153 ms (-6.04% 🔽) 1.7 s
Deterministic Message Hashing 5.65 KB (0%) 113 ms (0%) 106 ms (+566.3% 🔺) 219 ms

@adklempner
Copy link
Member

Does this change affect the notes example PR? waku-org/examples.waku.org#286

@fryorcraken
Copy link
Collaborator Author

Does this change affect the notes example PR? waku-org/js-waku-examples#286

I am stating that we do not need these API for the notes example: waku-org/examples.waku.org#291

I do need to triple check.

@weboko
Copy link
Collaborator

weboko commented Jan 2, 2024

This and we should keep exposing those methods to prevent unnecessary packages being added by consumers in case they would try to do encryption, signing.

@weboko
Copy link
Collaborator

weboko commented Apr 12, 2024

Closing this for now, let's change it in future based on feedback from people.

@weboko
Copy link
Collaborator

weboko commented Apr 12, 2024

#1955

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