PrePostQuantumSignatureAPI 1.0.1

dotnet add package PrePostQuantumSignatureAPI --version 1.0.1
                    
NuGet\Install-Package PrePostQuantumSignatureAPI -Version 1.0.1
                    
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="PrePostQuantumSignatureAPI" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PrePostQuantumSignatureAPI" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="PrePostQuantumSignatureAPI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PrePostQuantumSignatureAPI --version 1.0.1
                    
#r "nuget: PrePostQuantumSignatureAPI, 1.0.1"
                    
#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.
#:package PrePostQuantumSignatureAPI@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PrePostQuantumSignatureAPI&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=PrePostQuantumSignatureAPI&version=1.0.1
                    
Install as a Cake Tool

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

GitHub Repository

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
1.0.1 220 8/5/2025
1.0.0 210 8/5/2025