Skip to content

Quantova/PostQuantum-test-vectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantova PQ Test Vectors

Known-answer test (KAT) vectors for verifying a Quantova implementation: the Quantova post-quantum account layer (address derivation, QSigner account-id), the chain's hashing (SHA3-256), the QVM Solidity ABI (keccak-256 selectors and event topics), QNS namehash, and the post-quantum signature schemes (Dilithium, Falcon, SPHINCS+).

If you are building a wallet, an indexer, a signer, a bridge client, or any tool that has to produce Quantova addresses, hashes, or signatures, these vectors let you confirm your implementation matches the protocol exactly.

What is covered

Vector file What it pins down Status
vectors/address-derivation.json Canonical Quantova address from a public key Computed & verified
vectors/qsigner-accountid.json 20-byte QSigner account-id (H160 body) Computed & verified
vectors/sha3-256.json SHA3-256 (tx/state/block hash) Computed & verified
vectors/keccak-256.json keccak-256 (QVM ABI hash) Computed & verified
vectors/abi-selectors.json Function selectors + event topics Computed & verified
vectors/qns-namehash.json ENS-style namehash for .q names Computed & verified
vectors/signature-sizes.json PQ public-key / signature sizes From protocol + NIST params
vectors/signatures/ Dilithium / Falcon / SPHINCS+ KATs Template + generator (see below)

The "Computed & verified" vectors are generated by the reference implementation in reference/ and cross-checked against published constants (the standard SHA3-256 and keccak-256 KATs and the well-known ENS namehash vector), so they are correct, not invented. Re-running the generator reproduces them byte-for-byte.

Quick start

Verify the bundled reference against every vector (no dependencies needed for the Quantova-layer vectors):

python verify.py

Expected: all Quantova-layer vectors pass; the signature KAT templates are skipped until populated.

  43 pass · 0 fail · 3 skip
  RESULT: OK

Regenerate the computed vectors (deterministic):

cd scripts && python generate_vectors.py

Verifying your own implementation

Point your implementation at the vectors and compare:

  • Hashes: digest == SHA3-256(message) / keccak-256(message).
  • ABI: selector == keccak256(sig)[0:4], topic == keccak256(sig).
  • Namehash: ENS-style keccak256(namehash(parent) || keccak256(label)), right-to-left; namehash('') is 32 zero bytes.
  • Address: body = SHA3-256(public_key)[0:20], set body[0] = 0x40, then Base64 — the canonical address always begins with Q.

The exact field layout of each file is in SCHEMA.md. You can either diff your output against the JSON directly, or adapt verify.py to call your code in place of the reference.

Post-quantum signature KATs

Raw Dilithium / Falcon / SPHINCS+ signature vectors come from the algorithms' authoritative test vectors or a real library run — never hand-authored. The files in vectors/signatures/ carry the correct schema and parameter sizes; populate them with real vectors using liboqs (the same library Quantova's node uses):

pip install oqs
cd scripts && python generate_signature_vectors.py

verify.py then checks any implementation against the populated vectors via liboqs. For fixed-seed, byte-for-byte NIST KATs and the full list of sources, see SOURCES.md.

Quantova's parameter sets: Dilithium2 (ML-DSA-44, FIPS 204), Falcon-512 (FN-DSA), SPHINCS+ SLH-DSA-SHA2-128s (FIPS 205).

A note on this repository

Everything here is public test data by design — test seeds, messages, digests, and (once populated) test signatures. There are no secrets: no funded-account keys, no API credentials, no endpoints. The secret keys that may appear in generated signature KATs are throwaway test keys produced by the KAT generator and must never be used with real value.

Repository layout

pq-test-vectors/
  reference/      _keccak.py, quantova_ref.py   (the canonical derivations)
  vectors/        the Quantova-layer KAT files
  vectors/signatures/   per-scheme signature KAT files (template + generated)
  scripts/        generate_vectors.py, generate_signature_vectors.py
  verify.py       verify an implementation against all present vectors
  SCHEMA.md       vector file formats
  SOURCES.md      authoritative upstream KAT sources

License

Licensed under the Business Source License 1.1 (BUSL-1.1), © 2026 Quantova Inc. See LICENSE and LICENSE-OVERVIEW.md.

About

Verify any Quantova implementation against known-answer test vectors: post-quantum address derivation, QSigner account-id, SHA3-256 hashing, QVM ABI selectors and event topics, QNS namehash, and Dilithium/Falcon/SPHINCS+ signatures. Includes a verifier and reference derivations.

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-OVERVIEW.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages