Argon2 WebAssembly SIMD support, multi-threading on Web, Browser, Desktop #4777
Replies: 3 comments 9 replies
-
For reference on the max settings (iterations=10, memory=1GiB, parallelism=16) on my machine it would take unlocking time from ~24 seconds to ~13 seconds in Firefox. |
Beta Was this translation helpful? Give feedback.
-
To copy from the forum post. https://community.bitwarden.com/t/recommended-settings-for-argon2/50901/64 On Win11 x64 with edge browser.
~0.220ms (~15%) slower than KeePass with the same settings, from a browser no less. Impressive! |
Beta Was this translation helpful? Give feedback.
-
It looks like you're doing some pretty invasive things to the argon2 library we're using. Is it not a better solution to push these changes upstream? |
Beta Was this translation helpful? Give feedback.
-
PR: #4921
The argon2-browser library in use on the web / browser / desktop versions also compiles for SIMD, but does not include it in the loader scirpt of the NPM package.
My proposal would be to add a custom loader, a modified version of https://github.com/antelle/argon2-browser/blob/master/lib/argon2.js, which loads the SIMD binary if the browser supports it.
It should reduce the unlock times significantly (taken from the argon2 browser repository):
Beta Was this translation helpful? Give feedback.
All reactions