{"slug": "libsodium", "name": "libsodium", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 6, "commenters": 11, "warners": 1, "score": 5.41, "rising": 0.69, "first": "2025-11-07", "latest": "2026-10-13", "why": "Libsodium tried to protect users from themselves in that regard. I think that's a worthy goal", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 6, "neutral": 4, "compare": 0, "warn": 1}, "spark": [1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1], "listed": true, "loved": [], "caveat": "", "short_quote": "Libsodium tried to protect users from themselves in that regard. I think that's a worthy goal", "kind": "", "icon": true, "domain": "libsodium.org", "github_repo": null, "official_url": "https://libsodium.org", "pricing": "", "aliases": ["libsodium", "Libsodium"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 801113573, "item_id": 50069598, "url": "https://news.ycombinator.com/item?id=50069598", "by": "aragilar", "date": "2026-10-13", "stance": "recommend", "quote": "which are also well maintained", "excerpt": "I'm not sure what you think specifically needs maintaining, it's the same as LAMP, LEAN, JAM and the various stack acronyms? The BSD you choose is naturally maintained by the various BSD distros (though there's an implicit assumption of OpenBSD as will become obvious), C is C (so defer to your C-complier), httpd comes from OpenBSD (https://man.openbsd.org/httpd.8), and SQLite is SQLite. You can naturally choose to ad", "context": "", "use_case": "", "switched_from": "", "story": "A Modern Web App in C"}, {"id": 793806849, "item_id": 49612928, "url": "https://news.ycombinator.com/item?id=49612928", "by": "strenholme", "date": "2026-09-08", "stance": "recommend", "quote": "Yes, libsodium supports them", "excerpt": "Linux kernel crypto code has resulted in security issues, e.g. CVE-2026-31431. The advantage of using a cryptographically secure stream cipher [1] is that we only need about 128-256 bits of good entropy to generate an arbitrary large number of secure random numbers, across multiple systems (e.g. MaraDNS has a native Windows port where /dev/urandom randomness is instead done with proprietary Windows API calls). It can", "context": "", "use_case": "stream cipher primitives", "switched_from": "", "story": "I've factored the RSA keys of a Certificate Authority from the 90s"}, {"id": 746119776, "item_id": 46632486, "url": "https://news.ycombinator.com/item?id=46632486", "by": "ForHackernews", "date": "2026-01-15", "stance": "recommend", "quote": "Whatever happened to libsodium that was designed to provide vetted cryptographic primitives with a modern API?", "excerpt": "Whatever happened to libsodium that was designed to provide vetted cryptographic primitives with a modern API? https://doc.libsodium.org/doc", "context": "", "use_case": "", "switched_from": "", "story": "The State of OpenSSL for pyca/cryptography"}, {"id": 743137056, "item_id": 46446066, "url": "https://news.ycombinator.com/item?id=46446066", "by": "integralid", "date": "2025-12-31", "stance": "recommend", "quote": "Libsodium tried to protect users from themselves in that regard. I think that's a worthy goal", "excerpt": ">That is interesting to see the common fallacy of what we think users want versus what they really want. Or a fallacy of what users think they want versus what they really want. Non-cryptographers shouldn't use cryptographic primitives directly in security critical coffee paths. Libsodium tried to protect users from themselves in that regard. I think that's a worthy goal - library should try to make it impossible to ", "context": "", "use_case": "high-level crypto APIs", "switched_from": "", "story": "A Vulnerability in Libsodium"}, {"id": 743014640, "item_id": 46438415, "url": "https://news.ycombinator.com/item?id=46438415", "by": "CiPHPerCoder", "date": "2025-12-30", "stance": "recommend", "quote": "If libsodium is useful to you", "excerpt": "From the article: If libsodium is useful to you, please keep in mind that it is maintained by one person, for free, in time I could spend with my family or on other projects. The best way to help the project would be to consider sponsoring it, which helps me dedicate more time to improving it and making it great for everyone, for many more years to come. The \"sponsoring it\" links to https://opencollective.com/libsodi", "context": "", "use_case": "", "switched_from": "", "story": "A Vulnerability in Libsodium"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["stream cipher primitives", "high-level crypto apis", "crypto via lean ffi bindings"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46435614", "title": "A Vulnerability in Libsodium", "mentions": 5}, {"url": "https://news.ycombinator.com/item?id=50058528", "title": "A Modern Web App in C", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49604637", "title": "I've factored the RSA keys of a Certificate Authority from the 90s", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46624352", "title": "The State of OpenSSL for pyca/cryptography", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46364567", "title": "Junk Theorems in Lean", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46234806", "title": "Programmers and software developers lost the plot on naming their tools", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {"warn": 1, "neutral": 4, "recommend": 2}, "2026-01": {"recommend": 1}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {"recommend": 1}, "2026-10": {"recommend": 1}}, "quotes": [{"id": 801113573, "item_id": 50069598, "url": "https://news.ycombinator.com/item?id=50069598", "by": "aragilar", "date": "2026-10-13", "stance": "recommend", "quote": "which are also well maintained", "excerpt": "I'm not sure what you think specifically needs maintaining, it's the same as LAMP, LEAN, JAM and the various stack acronyms? The BSD you choose is naturally maintained by the various BSD distros (though there's an implicit assumption of OpenBSD as will become obvious), C is C (so defer to your C-complier), httpd comes from OpenBSD (https://man.openbsd.org/httpd.8), and SQLite is SQLite. You can naturally choose to ad", "context": "", "use_case": "", "switched_from": "", "story": "A Modern Web App in C"}, {"id": 793806849, "item_id": 49612928, "url": "https://news.ycombinator.com/item?id=49612928", "by": "strenholme", "date": "2026-09-08", "stance": "recommend", "quote": "Yes, libsodium supports them", "excerpt": "Linux kernel crypto code has resulted in security issues, e.g. CVE-2026-31431. The advantage of using a cryptographically secure stream cipher [1] is that we only need about 128-256 bits of good entropy to generate an arbitrary large number of secure random numbers, across multiple systems (e.g. MaraDNS has a native Windows port where /dev/urandom randomness is instead done with proprietary Windows API calls). It can", "context": "", "use_case": "stream cipher primitives", "switched_from": "", "story": "I've factored the RSA keys of a Certificate Authority from the 90s"}, {"id": 746119776, "item_id": 46632486, "url": "https://news.ycombinator.com/item?id=46632486", "by": "ForHackernews", "date": "2026-01-15", "stance": "recommend", "quote": "Whatever happened to libsodium that was designed to provide vetted cryptographic primitives with a modern API?", "excerpt": "Whatever happened to libsodium that was designed to provide vetted cryptographic primitives with a modern API? https://doc.libsodium.org/doc", "context": "", "use_case": "", "switched_from": "", "story": "The State of OpenSSL for pyca/cryptography"}, {"id": 743137056, "item_id": 46446066, "url": "https://news.ycombinator.com/item?id=46446066", "by": "integralid", "date": "2025-12-31", "stance": "recommend", "quote": "Libsodium tried to protect users from themselves in that regard. I think that's a worthy goal", "excerpt": ">That is interesting to see the common fallacy of what we think users want versus what they really want. Or a fallacy of what users think they want versus what they really want. Non-cryptographers shouldn't use cryptographic primitives directly in security critical coffee paths. Libsodium tried to protect users from themselves in that regard. I think that's a worthy goal - library should try to make it impossible to ", "context": "", "use_case": "high-level crypto APIs", "switched_from": "", "story": "A Vulnerability in Libsodium"}, {"id": 743129649, "item_id": 46445603, "url": "https://news.ycombinator.com/item?id=46445603", "by": "1vuio0pswjnm7", "date": "2025-12-31", "stance": "neutral", "quote": "I use software compiled with libnacl every day but none compiled with \"libsodium\"", "excerpt": "Is libnacl affected I use software compiled with libnacl every day but none compiled with \"libsodium\"", "context": "", "use_case": "", "switched_from": "", "story": "A Vulnerability in Libsodium"}, {"id": 743093825, "item_id": 46443364, "url": "https://news.ycombinator.com/item?id=46443364", "by": "pseudohadamard", "date": "2025-12-31", "stance": "neutral", "quote": "libraries that implement the check differently to libsodium", "excerpt": "Did you also check all of the libraries that implement the check differently to libsodium? That's one problem with the near-universal cargo-culting of ref10, it never did any of the checking so everyone has to reinvent it themselves in different ways. It might be useful to have a single known-good check for both x25519 and ed25519 that people could integrate into their own ref10-derived code. For people not familiar ", "context": "", "use_case": "", "switched_from": "", "story": "A Vulnerability in Libsodium"}, {"id": 743047520, "item_id": 46440470, "url": "https://news.ycombinator.com/item?id=46440470", "by": "commandersaki", "date": "2025-12-30", "stance": "neutral", "quote": "", "excerpt": "If you donate via GitHub Sponsors to https://github.com/jedisct1 from an individual / personal account GitHub won't take a cut (or pays for it from their own purse) for any credit card processing fees.", "context": "", "use_case": "", "switched_from": "", "story": "A Vulnerability in Libsodium"}, {"id": 743014640, "item_id": 46438415, "url": "https://news.ycombinator.com/item?id=46438415", "by": "CiPHPerCoder", "date": "2025-12-30", "stance": "recommend", "quote": "If libsodium is useful to you", "excerpt": "From the article: If libsodium is useful to you, please keep in mind that it is maintained by one person, for free, in time I could spend with my family or on other projects. The best way to help the project would be to consider sponsoring it, which helps me dedicate more time to improving it and making it great for everyone, for many more years to come. The \"sponsoring it\" links to https://opencollective.com/libsodi", "context": "", "use_case": "", "switched_from": "", "story": "A Vulnerability in Libsodium"}, {"id": 742431952, "item_id": 46401997, "url": "https://news.ycombinator.com/item?id=46401997", "by": "proof_by_vibes", "date": "2025-12-27", "stance": "neutral", "quote": "I've been writing [libsodium](https://doc.libsodium.org/) bindings in Lean4", "excerpt": "I've been writing [libsodium](https://doc.libsodium.org/) bindings in Lean4 and have ended up using `native_decide` quite liberally, mostly as a convenience. Can any Lean devs provide a more thorough interrogation of this? Should I go back and try to scrub its usage out of my library? Logically it seems consistent with what I'm trying to do with Lean4's FFI (i.e. you really do need to explicitly trust the Lean kernel", "context": "", "use_case": "Crypto via Lean FFI bindings", "switched_from": "", "story": "Junk Theorems in Lean"}, {"id": 739816304, "item_id": 46238519, "url": "https://news.ycombinator.com/item?id=46238519", "by": "forrestthewoods", "date": "2025-12-11", "stance": "warn", "quote": "", "excerpt": "lol no. There are literally a hundred plus Unix tools and commands. I couldn\u2019t tell you what 90% of them mean. I sure as hell couldn\u2019t have told you what sed stood for. And if you asked me tomorrow I also wouldn\u2019t be able to tell you. C programmers are great. I love C. I wish everything had a beautiful pure C API. But C programmers are strictly banned from naming things. Their naming privileges have been revoked, per", "context": "", "use_case": "", "switched_from": "", "story": "Programmers and software developers lost the plot on naming their tools"}, {"id": 733522897, "item_id": 45845181, "url": "https://news.ycombinator.com/item?id=45845181", "by": "pona-a", "date": "2025-11-07", "stance": "recommend", "quote": "Just look at the latter's FAQ page and you'll see they're taking your approach targeting developers", "excerpt": "If your needs are this simple, you may be better served by an opinionated crypto library like Monocypher [0] or libsodium [1]. Just look at the latter's FAQ page and you'll see they're taking your approach targeting developers, not cryptographers. They'll provide you one blessed algorithm for every primitive with secure alternatives if your use-case demands them. XChaCha20-Poly1305 for encryption, EdDSA for signature", "context": "", "use_case": "", "switched_from": "", "story": "Cryptography 101 with Alfred Menezes"}]}