3 ms·
How does it compare to https://tweetnacl.js.org https://tweetnacl.js.org ? That's 7KB minified and gzipped.
by Thorrez 6y ago
How does it compare to https://tweetnacl.js.org https://tweetnacl.js.org ? That's 7KB minified and gzipped.
- BiteCode_dev 6y agoNever tried it
- buu700 6y agoTweetNaCl.js is great. I'd go with that if you really need something smaller than libsodium. Presumably it shares the downsides of TweetNaCl ("doesn't wipe internal buffers [...] [and] has two harmless instances of undefined behaviour"[1]; among, I expect, other shortcuts that may make it less optimal/safe than NaCl), and the fact that it's pure JS adds additional side channel attack surface, but those may be acceptable risks depending on your threat model. They're certainly the least of your concerns if you're just using it in a web page like 0bin.net. 1: https://monocypher.org/why https://monocypher.org/why