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

All of the sodium related computations should be moved to a web worker to prevent the browser from hanging #31

Open
thelmuxkriovar opened this issue Oct 6, 2023 · 1 comment
Assignees

Comments

@thelmuxkriovar
Copy link

thelmuxkriovar commented Oct 6, 2023

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers

For example this:

frontend/src/lib/account.ts 192:199

rawDerivedKey = sodium.crypto_pwhash(
  32,
  password,
  rawSalt,
  publicUser.kdf.time_cost as number,
  publicUser.kdf.memory_cost as number,
  sodium.crypto_pwhash_ALG_DEFAULT
);
@WardPearce
Copy link
Owner

yea agreed at least the long running functions like the KDF should use web workers 👍

@WardPearce WardPearce self-assigned this Oct 7, 2023
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

No branches or pull requests

2 participants