PrePostQuantumSignatureAPI 1.0.2
dotnet add package PrePostQuantumSignatureAPI --version 1.0.2
NuGet\Install-Package PrePostQuantumSignatureAPI -Version 1.0.2
<PackageReference Include="PrePostQuantumSignatureAPI" Version="1.0.2" />
<PackageVersion Include="PrePostQuantumSignatureAPI" Version="1.0.2" />
<PackageReference Include="PrePostQuantumSignatureAPI" />
paket add PrePostQuantumSignatureAPI --version 1.0.2
#r "nuget: PrePostQuantumSignatureAPI, 1.0.2"
#:package PrePostQuantumSignatureAPI@1.0.2
#addin nuget:?package=PrePostQuantumSignatureAPI&version=1.0.2
#tool nuget:?package=PrePostQuantumSignatureAPI&version=1.0.2
PrePostQuantumSignatureAPI
A unified C# API framework for integrating pre-quantum and post-quantum digital signature schemes. The library provides a consistent, strongly typed abstraction for developers, supporting both classical algorithms such as RSA and ECDSA and post-quantum schemes including CRYSTALS-Dilithium, SPHINCS+, and Falcon.
Features
- Unified, algorithm-neutral signature interface
- Strongly typed public and private keys to prevent misuse
- Runtime selection of signature algorithms
- Safe memory handling and zeroization for private keys
- Support for .NET 9.0 and native C based cryptographic implementations
- Ships with required native DLLs for Windows
Installation
dotnet add package PrePostQuantumSignatureAPI
Quick Start
Generate Keys
using MasterThesis.Core;
var selector = new SignatureSchemeSelector();
var scheme = (ISignatureSchemeDynamic)selector.GetRawScheme("rsa");
var keys = scheme.GenerateKeysDynamic();
Console.WriteLine($"Public Key: {keys.PublicKey}");
Console.WriteLine($"Private Key: {keys.PrivateKey}");
Sign a Message
byte[] message = System.Text.Encoding.UTF8.GetBytes("Hello PQ World");
byte[] signature = scheme.SignDynamic(message, keys.PrivateKey);
Console.WriteLine($"Signature: {Convert.ToBase64String(signature)}");
Verify a Signature
bool isValid = scheme.VerifyDynamic(message, signature, keys.PublicKey);
Console.WriteLine($"Signature valid: {isValid}");
Supported Algorithms
- RSA (15360-bit)
- ECDSA (P-521)
- EdDSA (Ed25519)
- CRYSTALS-Dilithium (ML-DSA-87)
- SPHINCS+ (SPHINCS+-SHAKE-256f)
- Falcon (Falcon-1024)
Runtime Algorithm Selection
Runtime Selection is possible with the Additional WebAPI, which can be found on the Github page. With that, signature algorithms can be selected at runtime without code changes:
var scheme = (ISignatureSchemeDynamic)selector.GetRawScheme("dilithium");
This enables seamless switching between classical and post-quantum schemes using configuration or user input.
Native Dependencies
The package includes required native binaries under:
runtimes/win-x64/native
These are automatically resolved when running on Windows x64 systems.
License
MIT License.
Repository
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.