NaCl.Core 2.0.4

This package has a SemVer 2.0.0 package version: 2.0.4+build.81.
There is a newer version of this package available.
See the version list below for details.
dotnet add package NaCl.Core --version 2.0.4                
NuGet\Install-Package NaCl.Core -Version 2.0.4                
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="NaCl.Core" Version="2.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NaCl.Core --version 2.0.4                
#r "nuget: NaCl.Core, 2.0.4"                
#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 NaCl.Core as a Cake Addin
#addin nuget:?package=NaCl.Core&version=2.0.4

// Install NaCl.Core as a Cake Tool
#tool nuget:?package=NaCl.Core&version=2.0.4                

NaCl.Core, a cryptography library for .NET

Build Status CI Build status Build Status contributions welcome

Introduction

NaCl.Core is a managed-only cryptography library for .NET which provides modern cryptographic primitives.

Currently supported:
Crypto Description
ChaCha20 A high-speed stream cipher based on Salsa20
XChaCha20 Based on ChaCha20 IETF with extended nonce (192-bit instead of 96-bit)
Poly1305 A state-of-the-art secret-key message-authentication code (MAC) based on RFC8439
ChaCha20Poly1305 An Authenticated Encryption with Associated Data (AEAD) algorithm; IETF variant as defined in RFC8439 and in its predecessor RFC7539
XChaCha20Poly1305 A variant of ChaCha20-Poly1305 that utilizes the XChaCha20 construction in place of ChaCha20; as defined in the RFC Draft

Installation

NuGet CI NuGet

Install the NaCl.Core NuGet package from the .NET Core CLI using:

dotnet add package NaCl.Core

or from the NuGet package manager:

Install-Package NaCl.Core

Or alternatively, you can add the NaCl.Core package from within Visual Studio's NuGet package manager.

Daily NuGet builds of the project are also available in the Azure Artifacts feed:

https://pkgs.dev.azure.com/idaviddesmet/NaCl.Core/_packaging/NaCl.Core-CI/nuget/v3/index.json

Usage

alternate text is missing from this package README image

Symmetric Key Encryption
// Create the primitive
var aead = new ChaCha20Poly1305(key);

// Use the primitive to encrypt a plaintext
aead.Encrypt(nonce, plaintext, ciphertext, tag, aad);

// ... or to decrypt a ciphertext
aead.Decrypt(nonce, ciphertext, tag, plaintext, aad);
MAC (Message Authentication Code)
// Use the primitive to compute a tag
Poly1305.ComputeMac(key, data, tag);

// ... or to verify a tag
Poly1305.VerifyMac(key, data, tag);

Test Coverage

Azure DevOps tests Azure DevOps coverage

  • Includes the mandatory RFC test vectors.
  • Project Wycheproof by members of Google Security Team, for testing against known attacks (when applicable).

Learn More

License

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard1.6 is compatible.  netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on NaCl.Core:

Package Downloads
Paseto.Core

A Paseto (Platform-Agnostic Security Tokens) implementation for .NET

Branca

A .NET Standard 2.1 library for generating and validating Branca tokens.

ScottBrady.IdentityModel.Tokens.Branca

.NET support for Branca tokens using APIs from Microsoft.IdentityModel.Tokens.

Blockcore.Lyn.Protocol

Library implementation of the lightning protocol.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on NaCl.Core:

Repository Stars
ncatlin/rgat
An instruction trace visualisation tool for dynamic program analysis
daviddesmet/paseto-dotnet
🔑 Paseto.NET, a Paseto (Platform-Agnostic Security Tokens) implementation for .NET
Version Downloads Last updated
2.0.5 96,088 4/20/2023
2.0.4 140,671 4/6/2022
2.0.3 127 4/6/2022
2.0.2 18,046 11/22/2020
2.0.1 300 11/1/2020
2.0.0 416 9/28/2020
1.2.0 194,323 2/5/2019
1.1.0 2,659 11/27/2018
1.0.3 775 11/26/2018
1.0.2 706 11/19/2018
1.0.1 3,252 6/1/2018