Skip to content

Remove crypto browserify library #8355

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 5 commits into
base: dev
Choose a base branch
from

Conversation

ryceg
Copy link
Collaborator

@ryceg ryceg commented May 10, 2025

This goes a step further than #8329 and instead uses the browser's native crypto library, or the node built-in for serverside.

This results in a bundle reduction of 0.87mb.

All tests are still passing. I opted not to change the SHA1 encoding- I saw that there's a SHA512 secret in enclave.js, so I assume that sha1 wasn't used just for lack of knowledge about its lack of cryptographic security?

@je-l
Copy link

je-l commented May 12, 2025

Using the browser crypto library makes sense. It's a small change, but as the bundle size drops, it should result in a visible performance improvement.

@ryceg
Copy link
Collaborator Author

ryceg commented May 12, 2025

Yep! Moving towards native methods will definitely help. Moment and lodash are also on the chopping block.

@ryceg
Copy link
Collaborator Author

ryceg commented May 16, 2025

Passes the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants