There is a newer version of this package available.
See the version list below for details.

Requires NuGet 4.0 or higher.

dotnet add package libsodium --version
NuGet\Install-Package libsodium -Version
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="libsodium" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add libsodium --version
#r "nuget: libsodium,"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install libsodium as a Cake Addin
#addin nuget:?package=libsodium&version=

// Install libsodium as a Cake Tool
#tool nuget:?package=libsodium&version=
  • Version 1.0.19-stable
  • Building with zig build now requires Zig 0.12.
  • When using the traditional build system, -O3 is used instead of -Ofast.
  • Improved detection of the compiler flags required on aarch64.
  • Improved compatibility with custom build systems on aarch64.
  • apple-xcframework: VisionOS packages are not built if Xcode doesn't include that SDK.
  • crypto_kdf_hkdf_sha512_statebytes() was added.
  • When using Visual Studio, runtime CPU feature detection is now enabled on Windows/aarch64.
  • There were issues with C++ guards affecting usage of libsodium using Swift on Windows. This has been fixed.
  • Emscripten: crypto_aead_aegis*() functions are now exported in JavaScript builds
  • Emscripten: unsupported --memory-init-file option has been removed.
  • apple-xcframework: the minimal deployment target can be set to iOS 11+.
  • .NET packages now include precompiled libraries for Windows/arm64, iOS, TvOS and Catalyst.
  • .NET precompiled libraries now work on any CPUs, using only runtime feature detection.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (27)

Showing the top 5 NuGet packages that depend on libsodium:

Package Downloads

Provides modern cryptographic algorithm implementations for .NET based on libsodium. Commonly Used Types: NSec.Cryptography.Aes256Gcm NSec.Cryptography.Blake2b NSec.Cryptography.Chacha20Poly1305 NSec.Cryptography.Ed25519 NSec.Cryptography.HkdfSha256 NSec.Cryptography.X25519


libsodium for .net core


Native API binding for libsodium.


A secure cryptographic library


libsodium for .net core

GitHub repositories (6)

Showing the top 5 popular GitHub repositories that depend on libsodium:

Repository Stars
A simple, modern, and secure encryption and signing tool that aims to be a better version of age and Minisign.
A modern and easy-to-use cryptographic library for .NET 8+ based on libsodium
Secure, Modern, Fully-Featured, All-In-One Cross-Architecture & Cross-Platform DNS Server Using .NET 7.0
.NET Standard 1.3 implementation of the Noise Protocol Framework (revision 33 of the spec)
WebAuthn (Passkeys) library for .NET.
Version Downloads Last updated
1.0.20 1,684 5/25/2024 8,936 4/28/2024 152 4/28/2024
1.0.19 372,387 9/19/2023 501,647 12/11/2022 2,440,762 3/29/2022 39,553 6/13/2021
1.0.18 3,086,030 1/20/2020 671,023 4/22/2019
1.0.17 131,558 1/16/2019
1.0.16 917,869 12/20/2017
1.0.15 19,812 10/2/2017
1.0.14 1,545 9/24/2017
1.0.13-preview-01 1,103 8/22/2017
1.0.12-preview-01 5,618 7/13/2017