PrePostQuantumSignatureAPI 1.0.2

dotnet add package PrePostQuantumSignatureAPI --version 1.0.2
                    
NuGet\Install-Package PrePostQuantumSignatureAPI -Version 1.0.2
                    
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.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PrePostQuantumSignatureAPI" Version="1.0.2" />
                    
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.2
                    
#r "nuget: PrePostQuantumSignatureAPI, 1.0.2"
                    
#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.2
                    
#: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.2
                    
Install as a Cake Addin
#tool nuget:?package=PrePostQuantumSignatureAPI&version=1.0.2
                    
Install as a Cake Tool

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

https://github.com/Rafi-boop/MasterThesis

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.2 101 1/19/2026
1.0.1 310 8/5/2025
1.0.0 285 8/5/2025