CryptoSys PQC  1.0.0
The C++ (STL) interface to CryptoSys PQC.

An interface to diCrPQC.dll for C++ programmers using STL (C++11 or above).Requires CryptoSys PQC to be installed on your system, available from https://www.cryptosys.net/pqc/. In particular that diCrPQC.dll is in your library path.

Required files
Required files to compile in a C++ project:
crsyspqc.hpp
diCrPQC.h
crsyspqc.cpp
{main}.cpp
#include "crsyspqc.hpp"
int main() { ... }
The C++ (STL) interface to the CryptoSys PQC.
Example minimal program
#include <iostream>
#include "crsyspqc.hpp"
int main() {
// Get version of native DLL (if this works, the library has been installed correctly)
std::cout << "Version=" << n << std::endl;
// Get length in bytes of signature for SLH-DSA-SHA2-128f
std::cout << "DSA::SignatureSize(SLH-DSA-SHA2-128f)=" << crsyspqc::Dsa::SignatureSize(crsyspqc::Dsa::Alg::SLH_DSA_SHA2_128F) << std::endl; // 17088
}
static int SignatureSize(Alg alg)
Return length of signature in bytes.
@ SLH_DSA_SHA2_128F
SLH-DSA-SHA2-128f from FIPS.205.
static int Version()
Get version number of the core native DLL as an integer value.
Compiling and linking
You must link to the library file diCrPQC.lib.
  • In MSVC++ IDE, use Project > Properties > Linker > Input > Additional Dependencies and add the full path to diCrPQC.lib. E.g.
    Additional Dependencies = $(OutDir)diCrPQC.lib;%(AdditionalDependencies)
  • Using the command-line with MSVC:
    CL test.cpp crsyspqc.cpp /link ..\Debug\diCrPQC.lib
  • Using GCC (make sure the DLL has been compiled for target X64):
    g++ -std=c++11 test.cpp crsyspqc.cpp "C:\fullpath\to\x64\Debug\diCrPQC.lib"
  • Don't forget to compile together with crsyspqc.cpp, and have the files crsyspqc.hpp and diCrPQC.h in the same directory.
Copyright (C) 2024-25 D.I. Management Services Pty Limited t/a CryptoSys ABN 78 083 210 584 Australia. All rights reserved. <www.di-mgt.com.au> <www.cryptosys.net>. Generated on Sat May 24 2025 20:58:07 by Doxygen 1.9.1.