5 ms·
The Sodium crypto library
- netgusto 10y agoWebsite is down. Here's the page as it was archived in February : https://web.archive.org/web/20170221003148/https://download.libsodium.org/doc/ https://web.archive.org/web/20170221003148/https://download....
- silur 10y agookay, why does it hold any news relavance?
- deleted 10y ago[deleted]
- jedisct1 10y agoNot sure why this link was posted again today. For something new, you may want to look at its little brother instead: https://github.com/jedisct1/libhydrogen/wiki https://github.com/jedisct1/libhydrogen/wiki Anyway, version 1.0.12 will be released soon.
- speciallycraft 10y agoThanks for your efforts. Looking forward to 1.0.12, which will bring noticeable speed improvements to our application based on current testing. Also, thanks for not ignoring Windows.
- matthewaveryusa 10y agoExcellent library, the only thing that's a bit odd is the requirements for instruction sets seem arbitrary. For example aes-gcm requires sse3, blake hashing has full support for various intruction sets and chooses the best one while sha256 doesn't have optimized code for any instruction set. I'm genuinely interested in the reasoning.
- Asmod4n 10y agoaes is hard(impossible?) to do in constant time without special cpu instructions.
- jedisct1 10y agoIt's totally possible. Ditto for GCM. But it's slow, which defeats the whole point of using AES.
- matthewaveryusa 10y agoSome imbedded systems don't have sse3. But I guess if you're doing crypto on such hardware and using TLS then you'll want to use chachapoly and not aes-gcm. My question really focuses on it being bizarre that sha256 doesn't have a specialization for sse3.
- jedisct1 10y agoYou shouldn't look at libsodium as something that provides implementations for AES, SHA256 or whatever specific primitives. It was designed to provide high-level APIs to perform common operations, abstracting implementation details. And this is what it gets optimized for. The Hydrogen API which libsodium 2.0 will be based on makes this even more obvious. Low-level primitives are available (or partially available, in minimal builds) only to provide backward compatibility with NaCl, or because the final construction hasn't been chosen yet. That said, SHA-2 is about 20% faster in version 1.0.12 while remaining portable.
- matthewaveryusa 10y agoI understand the design of libsodium for sure, but because libsodium is well written I look at it for reference implementations of specific algorithms. In this particular case I needed a zero-dependency sha256 implementation and I turned to libsodium (and was a bit disappointed by the lack of an sse3 optimization.) Would you accept a pull request that folds in intel's reference implementation with sse3 for sha256? Fun fact, sha256 in openssl pulls in asn1 parsing even after section garbage collection. Yup.
- deleted 10y ago[deleted]
- libeclipse 10y agoThis is a nice read for anyone who wants to know how the whole NaCl/libsodium relationship works: https://en.m.wikipedia.org/wiki/NaCl_(software) https://en.m.wikipedia.org/wiki/NaCl_(software)
- arawde 10y agoNon-mobile link: https://en.wikipedia.org/wiki/NaCl_(software) https://en.wikipedia.org/wiki/NaCl_(software)