CryptoEx 2.0.3

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

// Install CryptoEx as a Cake Tool
#tool nuget:?package=CryptoEx&version=2.0.3                

About CryptoEx project

This project provides a couple of .NET / C# libraries for cryptographically signing and verifying data using .NET in some advanced scenarios.

As the name CryptoEx suggests, it can be think of both as Extension of and Example of the usage of the standard capabilities provided by the .NET platform in areas like:

Important disclaimer

This project does not have an intention to be a full-featured library that fully implements all possible features and applications in all possible scenarios for digital signatures (In my humble opinion it is not feasible option anyway). Rather than, that it's purpose is to be used as a reference (or example if you prefer) of how to achieve some tasks using platform's abilities in some areas and how to extend minor platform's gaps in other areas.

Example areas and gaps

For example in XML signatures area, there is mature (and not very much evolving) library provided by the platform itself - System.Security.Cryptography.Xml, but in my personal experience there are two major issues with it:

  1. Examples and documentation are messy - You may easily see from Microsoft's docs how to do basic sign / verify of an enveloped XML message, but you will be in trouble finding "official" docs and examples on some more advanced scenarios, like - detached signatures or signing additional Reference XML data.

  2. The basic library also lacks some algorithms that are part of the XML digital signature specification - namely the ones with EcDSA.

Now this might be annoying flaws, but also they are to some extend either "natural" (the all possible implementations, ways to implement XML signing, is vast area, because of the "openness" of the specification) or easy to overcome. So, in the current project I have extended the standard library to support the missing algorithms and have provided some implementations to show, as an example, how to sign Detached data and additional Reference XML elements.

You can check the code and some pages in the Wiki.

You can freely use it as an example and further amend or extend the code to suit your particular needs as possible applications are vast.

Other example is the JSON Web signatures area. In this domain there are few open source libraries, but either their focus is JSON Web Tokens (that are private case of the broader JSON Web Signatures) or they are limited in application for jAdES.

In the current project you can find an implementation of the RFC 7515 (JSON Web Signatures) specification and practical implementation for the European Union's Advanced digital signatures for JSON data specification (jAdES), that builds on top of RFC 7515 (JSON Web Signatures).

Please, check the code and the corresponding Wiki Pages.

Again, you are free and encouraged to use these as an example or to extend these to suit you purposes in a better way.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CryptoEx:

Package Downloads
CryptoEx.Ed

A .NET library to serve as extension of standard .NET libraries and example how to use Ed25519 and Ed448 to sign / verify signatures of JSONs, especially in regards to JAdES. Also may be used by parties to exchnage private key material using X25519 and X448.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 45 11/22/2024
2.0.3 36 11/21/2024
2.0.2 134 5/28/2024
2.0.1 178 2/15/2024
2.0.0 169 2/3/2024

Updated other dependecies, to apply security and bug fixes