3 ms·
Why this instead libsodium?
by VMG 10y ago
Why this instead libsodium?
- loup-vaillant 10y agoLibsodium is big. Smaller than NaCl, but still a little unwieldy. A bigger contender is TweetNaCl, but it doesn't provide password key derivation, and I dislike some of its primitives a tiny little bit. My library have two clear (albeit small) advantages: first, its interfaces are more consistent with its (non-existent) failure mode. NaCl and descendants have most of their function return an error code for no reason –the underlying primitives are foolproof. Second, my Argon2i implementation doesn't allocate. Okay, the user must allocate, but that give more control, and let me guarantee I cannot fail. For some reason, the reference implementation is not like that. Surprising, considering the Argon2 authors make sure implementers could avoid spurious allocations. --- My current recommendation still goes to TweetNaCl and Libsodium. My hope is to be able to recommend Monocypher instead. Maybe sometime later this year?
- VMG 10y agoThanks! Considering that this seems to be a popular question, maybe it makes sense to state this more clearly on the site.