PrePostQuantumSignatureAPI 1.0.1
dotnet add package PrePostQuantumSignatureAPI --version 1.0.1
NuGet\Install-Package PrePostQuantumSignatureAPI -Version 1.0.1
<PackageReference Include="PrePostQuantumSignatureAPI" Version="1.0.1" />
<PackageVersion Include="PrePostQuantumSignatureAPI" Version="1.0.1" />
<PackageReference Include="PrePostQuantumSignatureAPI" />
paket add PrePostQuantumSignatureAPI --version 1.0.1
#r "nuget: PrePostQuantumSignatureAPI, 1.0.1"
#:package PrePostQuantumSignatureAPI@1.0.1
#addin nuget:?package=PrePostQuantumSignatureAPI&version=1.0.1
#tool nuget:?package=PrePostQuantumSignatureAPI&version=1.0.1
PrePostQuantumSignatureAPI
A unified C# API framework for integrating pre-quantum and post-quantum digital signature schemes. This library provides a consistent, strongly typed interface for developers, covering both classical algorithms like RSA and ECDSA, as well as post-quantum schemes such as CRYSTALS-Dilithium, SPHINCS+, and Falcon.
Features
- Unified interface for all signature schemes
- Strongly typed keys to prevent misuse
- Easy runtime selection of algorithms
- Includes safe memory handling for private keys
- Support for both .NET 9.0 and native C integrations
- 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 (4096-bit)
- ECDSA (P-256)
- EdDSA
- CRYSTALS-Dilithium
- SPHINCS+
- Falcon
Runtime Algorithm Selection
Algorithms can be selected at runtime without changing your code:
var scheme = (ISignatureSchemeDynamic)selector.GetRawScheme("dilithium");
Native Dependencies
This package includes required native DLLs under runtimes/win-x64/native
.
License
MIT License — see LICENSE for details.
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.