Installation

Use the following command to install the NSec.Cryptography NuGet package:

$ dotnet add package NSec.Cryptography --version 26.4.0

Supported Platforms

NSec 26.4.0 is intended to run on all supported versions of .NET on the following platforms:

-x64-x86-arm64-arm
android-
ios-
linux-
linux-musl-
maccatalyst-
osx-
tvos-
win-

Please note:

  1. On Windows, the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022 is required. This is part of Visual Studio and the .NET SDK but might not be present on a clean Windows installation.

  2. The AES-GCM implementation in NSec is hardware-accelerated and may not be available on all architectures. Support can be determined at runtime using the static IsSupported property of the NSec.Cryptography.Aes256Gcm class.

Tested Platforms

NSec 26.4.0 has been tested to run on the following platforms and .NET versions at the time of release:

OSVersionArchitecture.NET
Windows Server10.0.26100x6410.0.7 / 9.0.15
macOS14.8arm6410.0.7 / 9.0.15
15.7arm6410.0.7 / 9.0.15
26.3arm6410.0.7 / 9.0.15
Alpine Linux3.22x6410.0.3
3.23x6410.0.7
Debian12x6410.0.7 / 9.0.15
13x6410.0.7 / 9.0.15
Fedora42x6410.0.7 / 9.0.15
43x6410.0.7 / 9.0.15
Ubuntu22.04x6410.0.7 / 9.0.15
24.04x6410.0.7 / 9.0.15

The other supported platforms should work as well, but have not been tested.

Frequently Asked Questions

Below are some frequently asked questions:

Q: What causes a System.DllNotFoundException: Unable to load shared library ‘libsodium’ or one of its dependencies. when using the NSec.Cryptography NuGet package?
A: This exception can occur if the operating system or architecture is not supported, or if the Visual C++ Redistributable has not been installed on a Windows system. Please refer to the Supported Platforms section above.