2 ms·
TweetNaCl.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 int
by buu700 6y ago
TweetNaCl.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