Repolode
jedisct1

jedisct1/libsodium

A portable, easy-to-use C cryptography library offering encryption, decryption, digital signatures and secure password hashing, forked from NaCl.

Stars
14,008
Forks
1,886
Open issues
0
Last commit
6 days ago

What is it?

libsodium is a cryptography library written in C that wraps common cryptographic operations behind a simpler API. It covers encryption and decryption, digital signatures, and secure password hashing, so applications can rely on vetted primitives instead of assembling their own.

The project is a portable, cross-compilable and packageable fork of NaCl. It keeps NaCl's API compatibility while adding usability improvements. It builds for Windows with MinGW and Visual Studio on x86, x64 and arm64, and runs on iOS, Android, JavaScript and WebAssembly.

Releases follow a two-tier model: point releases add features, while stable-branch updates deliver compatible fixes and security patches.

Key features

  • 01Authenticated encryption and decryption of data.
  • 02Digital signature creation and verification.
  • 03Secure password hashing.
  • 04Builds on Windows (MinGW, Visual Studio), iOS, Android, JavaScript and WebAssembly.
  • 05API compatible with NaCl, with added usability improvements.

Use cases

  • Adding encryption to a C or C++ application without writing low-level crypto code.
  • Verifying signed messages or data authenticity in cross-platform software.
  • Storing user passwords with a dedicated secure hashing function.
  • Using cryptography in mobile or WebAssembly projects.

Quick start

  1. 1

    Read the installation guide at doc.libsodium.org

  2. 2

    Follow the quickstart guide at doc.libsodium.org/quickstart

Topics

FAQ

What is libsodium?
A portable, easy-to-use C cryptography library offering encryption, decryption, digital signatures and secure password hashing, forked from NaCl. libsodium is a cryptography library written in C that wraps common cryptographic operations behind a simpler API. It covers encryption and decryption, digital signatures, and secure password hashing, so applications can rely on vetted primitives instead of assembling their own.
Is libsodium free to use? What license does it have?
libsodium is open source under the Other license. Check the license terms before using it in commercial products.
Is libsodium still maintained?
Actively maintained. The last commit to libsodium was on Oct 15, 2026.
What can I use libsodium for?
Adding encryption to a C or C++ application without writing low-level crypto code. Verifying signed messages or data authenticity in cross-platform software. Storing user passwords with a dedicated secure hashing function. Using cryptography in mobile or WebAssembly projects.
How do I install libsodium?
Read the installation guide at doc.libsodium.org Follow the quickstart guide at doc.libsodium.org/quickstart
Where can I get libsodium?
The source code and installation instructions are on GitHub: https://github.com/jedisct1/libsodium

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects