CryptoEx 1.1.0
See the version list below for details.
dotnet add package CryptoEx --version 1.1.0
NuGet\Install-Package CryptoEx -Version 1.1.0
<PackageReference Include="CryptoEx" Version="1.1.0" />
paket add CryptoEx --version 1.1.0
#r "nuget: CryptoEx, 1.1.0"
// Install CryptoEx as a Cake Addin #addin nuget:?package=CryptoEx&version=1.1.0 // Install CryptoEx as a Cake Tool #tool nuget:?package=CryptoEx&version=1.1.0
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:
- XML digital signatures - XML Signature Syntax and Processing Version 1.1
- JSON digital signatures - JSON Web Signature (JWS)
- Advanced Electronic Signatures and Infrastructures standardized by the European Union, so called jAdES & xAdES
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:
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.
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- System.Security.Cryptography.Pkcs (>= 7.0.1)
- System.Security.Cryptography.Xml (>= 7.0.1)
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.
1. Added suport for b64 header - both in JWS and jAdES
2. Support some other common header properties of JWS
3. Some minor optimizations