CryptoSys Home > CryptoSys PQC > Examples using CryptoSys PQC

Examples using CryptoSys PQC


Example Code

Example code files using CryptoSys PQC are available in the distribution. They are installed by default in C:\Program Files (x86)\CrSysPQC and are reproduced below.

Alternatively use the Windows Start Key ⊞ > All > diCrPQC > Reference Files

C:\PROGRAM FILES (X86)\CRSYSPQC
+---C
+---Cpp
+---DotNet
+---PyNist
\---X64

Examples

Rationale behind tests

The tests are meant to illustrate at least the following

NIST Test Vectors

The NIST test vectors for the PQC algorithms are available at their ACVP-Server GitHub site. You want the file internalProjection.json. Here are links to files we used (accessed 2025-04-29).

These can be downloaded as a convenient zip file ACVP-pqc-json.zip (46 MB) [NIST-licence].

PreHash Values

Here are four JSON files with pre-computed prehash values for the NIST sigGen/sigVer test vectors where the "preHash" flag is set.

Pass the ph value to the SignPreHash/VerifyPreHash function instead of the message along with the hashAlg.

These four JSON files are included in the ACVP-pqc-json.zip file above. Example extract:
"algorithm": "ML-DSA",
"mode": "sigGen",
"preHashes": {
	"107": {
		"tcId": 107,
		"messagelength": 7565,
		"hashAlg": "SHA2-224",
		"ph": "1e659ab398f8aa3db73ae099e2b4835d78f3ba4d514d678424e8287e"
	},

where ph = H(M) where M is the message and H the prehash algorithm. Each entry is keyed on the "tcId" value in the NIST file internalProjection.json. See the code in test_DSA_json.cs above.

Contact us

To contact us or comment on this page, please send us a message.

[Go to top]

This page last updated 8 July 2025

Comments

   [Go to last comment] [Our comments policy]
[Go to first comment]