This repository provides an implementation in C# of RFC7515 (JSON Web Signature).
Notice: The current implementation has been used in a production environment.
However, no support will be offered for this project. Here be dragons. Please fill any bugs you may find.
JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures.
All details of the implementation are based on the following literature:
Supported algorithms for creating a digital signature / MAC:
Algorithm | Support | |
---|---|---|
RSA | RS256, RS384, RS512 | ✅ |
Eliptic Curves | ES256, ES384, ES512 | ✅ |
HMAC | HS256, HS384, HS512 | ❎ |
None | none | ❌ |
Meaning | |
---|---|
✅ | Fully implemented and tested |
❎ | Currently being implemented / Untested |
❌ | Not implemented yet |
The following configuration has been succesfully tested for building and running the project:
- .NET 8 / netstandard2.0
- [] Complete support for all JWK key types
- [] Support for JWS Unprotected Header values
- [] Support for jku, x5u, x5c, x5t, x5t#S256 parameters in a protected JoseHeader
- [] Do not serialize empty "jwk" object in JWS for "oct" keys
- [] Security Conciderations
https://www.nuget.org/packages/CreativeCode.JWS/
dotnet add package CreativeCode.JWS
git clone https://github.com/alexzautke/JWS.git
dotnet pack -c Release
- Install NuGet package from local source
See JWS Example
Simply run dotnet test
in the root folder of the project. All tests should be passing.
This project is licensed under the MIT License - see the LICENSE file for details