4 ms·
I'd like to use Argon2 for web stuff but Web Crypto doesn't support it yet (https://github.com/WICG/proposals/issues/59 https://github.com/WICG/proposals/issues
by candiddevmike 3y ago
I'd like to use Argon2 for web stuff but Web Crypto doesn't support it yet (https://github.com/WICG/proposals/issues/59 https://github.com/WICG/proposals/issues/59) and the WASM flavor creates problems with bundling and testing. Stuck with PBKDF2 for now...
- djbusby 3y agoIs that WASM libsodium that's problematic? Can you expand on the issue?
- candiddevmike 3y agoIt was this WASM library: https://github.com/urbit/argon2-wasm https://github.com/urbit/argon2-wasm. I couldn't get vitest to work with code that imports WASM, and I couldn't get vite to bundle WASM code for web workers.
- jedisct1 3y agoAn algorithm that requires a ton of memory doesn't really make sense for web applications IMHO. bcrypt and bscrypt are better choices.
- re-thc 3y agoI wonder if it'd get anywhere. There's not enough CPU/memory allocated in a lot of these platforms to make it work e.g. Deno deploy and Cloudflare workers (bundled) has 50ms of CPU time.
- fmajid 3y agoThen that means those platforms are insecure and should not be used, or authentication moved to another layer that does not suffer from those limitations. My rule of thumb is that if authentication does not consistently require at least 1 second, passwords are probably stored insecurely. Fortunately password managers with unique generated passwords limit the blast radius.
- kentonv 3y agoCloudflare Workers "Bundled" is a legacy mode that is not the default these days. Unbound mode (the default for paid subscriptions) offers 30s CPU time.
- re-thc 3y agoSad to hear - until Unbound has more features such as more memory the bundled mode is useful in the common case to be "legacy".