Can anyone give me suggestions on a stable crypto library that can be converted to wasm so that I can dynamically link into my framework I am building.
Thanks
Libsodium supports WebAssembly since 2017, and is widely used in production, including in JavaScript applications.
Check out https://github.com/jedisct1/libsodium.js
Also on NPM https://www.npmjs.com/package/libsodium-wrappers
BoringSSL / OpenSSL have also been ported to WASI/WASIX but these are not well tested configurations.
https://github.com/jedisct1/boringssl-wasm
https://github.com/jedisct1/openssl-wasm
Even easier: if you're using Go or Zig, all the crypto functions from the standard library are going to work in WebAssembly without any changes.
But don't expect any protection against side channels, and performance is not great, especially for symmetric crypto.
Thank you.
Last updated: Apr 09 2025 at 06:04 UTC