Skip to main content
The PQC substrate layer is the AlgoVoi-authored binding between the canonicalisation discipline and post-quantum signature primitives. It binds RFC 8785 JCS canonical bytes to FIPS 204 (ML-DSA-65) and draft FIPS 206 (Falcon-1024) signature schemes under a single signature_algorithm open-enum convention with a fail-closed verifier rule. It is published as standalone reference implementations: Both are Apache-2.0 licensed, browser + Node + Bun + Deno + CPython 3.10+ compatible, and depend on audited upstream PQC libraries (PQClean via pqcrypto on Python, @noble/post-quantum by Paul Miller on TypeScript).

Honest layer-split

The PQC primitives themselves are not AlgoVoi-authored. The substrate convention sits above audited upstream PQC implementations: Every line of attribution is verifiable against the actual code in the GitHub source.

signature_algorithm open-enum (12 rows)

The 12-row recommended-values registry covers classical, post-quantum, and HMAC families. Case-sensitive lookup per RFC 7517 §4.1. Verifiers MUST treat unknown identifiers as opaque and refuse to verify (fail-closed).

Cross-product matrix attestation

The substrate-author convention is producer-verifier symmetric — signatures emitted in any language verify in any other language for the schemes available in each environment. Demonstrated by a 6-producer × 8-verifier matrix that runs every producer artefact against every available verifier. Matrix attestation document 48/48 cells PASS. All six producers agreed on canonical SHA-256 sha256:cc8315f7696c65b2a07eb278de0e45c3149319526c8d443c7e38a17de04c28e0 — six independent JCS canonicalisation implementations producing byte-identical canonical bytes from the same payload. Go produces ES256 + Ed25519 + ML-DSA-65 (no Falcon — no clean pure-Go library without CGo). Rust produces all four schemes (ES256 + Ed25519 + ML-DSA-65 + Falcon-1024) via p256, ed25519-dalek, ml-dsa (RustCrypto FIPS 204), and pqcrypto-falcon (PQClean C wrapper). Reproduce locally:

Four audit-grade PQC implementations cross-validated

The strongest substrate-author signal: four independent audit-grade PQC implementations agree on Falcon-1024 and ML-DSA-65 signatures over identical canonical bytes.
Java verifier source at verifiers/java/.

PQC cross-implementor contribution

The ML-DSA-65 cross-implementor fixture this substrate verifies against was contributed by PQSafe (@rayc0) per the AP2 #250 joint conformance fixture. PQSafe is named co-maintainer of the joint conformance repo per the published policy. Credit is scoped to that ML-DSA-65 contribution only. Substrate-author work for this layer (the signature_algorithm open-enum convention, the JCS+PQC binding pattern, the fail-closed verifier discipline, the byte-anchor convergence proof methodology, the multi-language verifier suite) is AlgoVoi’s.

Multi-language verifier suite

In addition to the Python + TypeScript reference impls, the substrate ships verifier scripts in additional scripting languages — all demonstrating that the JCS canonicalisation + classical-signature discipline reproduces in any environment with standard primitives: Full cross-runtime matrix (9 verified runtime/language combinations) at the docs/CROSS_RUNTIME.md document.

Why no scripting-language PQC

PQC schemes (Falcon-1024, ML-DSA-65) are out of scope for the scripting-language verifiers (Ruby, PHP, Perl, Lua, Elixir). No audit-grade PQC libraries exist in those ecosystems at this time. The alternative — vendoring PQClean’s reference C source ourselves and binding via FFI per language — was explicitly considered and rejected in the design phase because:
  1. Falcon-1024 patent encumbrance. Patent US7308097B2 covers parts of Falcon; FRAND-style royalty-free pledge applies via FIPS 206 standardisation. Vendoring PQClean source makes the substrate package a named redistributor of patent-encumbered code. The current wrap-existing-audited-package design avoids this status.
  2. Per-language FFI maintenance burden. Each scripting-language FFI binding would require per-language audit + maintenance + patent disclosure surface. Not justified for the substrate-author claim when the canonicalisation + classical-signature coverage already demonstrates substrate is environment-independent.
PQC verification is established by the Python + TypeScript + Java implementations, which span the JVM and non-JVM ecosystems with three audit-grade PQC implementations.

Verifier discipline (fail-closed)

Verifiers MUST treat unknown signature_algorithm values as opaque and refuse to verify.
This is the substrate-author fail-closed normative discipline that allows the signature_algorithm registry to evolve without breaking schema changes. Implementors MAY declare any value. Verifiers MUST reject unknown values or escalate to a registered extension, rather than guessing. The Python implementation surfaces this rule as UnknownSignatureAlgorithm raised from lookup_signature_algorithm(). The TypeScript implementation throws UnknownSignatureAlgorithmError. Both consistent in semantics. Empty-signatures invariant (since 0.1.2): Artefacts with zero declared signatures are never valid even when the canonical SHA is correct. The verifier requires at least one positive verification signal.

Regulatory alignment

Post-quantum migration is moving from “best practice” to “regulatory requirement” across multiple jurisdictions. The PQC substrate is designed against the following frameworks. The substrate provides the cryptographic primitives, the algorithm-class declaration, and the verifier discipline; production deployment additionally requires organisational migration planning, key-management process, and periodic re-assessment. The substrate does not claim compliance certification under any of these frameworks. It provides the cryptographic substrate that a downstream implementer can use to make their own compliance attestation. Auditors evaluating PQ-readiness against any of the above frameworks will find the substrate’s algorithm coverage, fail-closed discipline, layer-split disclosure, and cross-implementation byte-for-byte agreement evidence useful as part of a broader compliance posture.

ES256 interop vs. strict modes (TypeScript)

The TypeScript package exports two ES256 verifiers: verifyArtefact() uses verifyES256 (interop mode) by default so that artefacts produced by Python, Java, or other producers verify cleanly. Call verifyES256Strict directly when you need malleability protection.

Install + quickstart

Python

TypeScript

Java (Bouncy Castle)

PQC credential binding and federation layer

The PQC substrate is the foundation for two production protocols built above it:
  • PQC Credential Binding — Falcon-1024 / ML-DSA-65 credentials bound to x402 agentic payment authorization. Eliminates long-lived API keys from the payment hot path. Specified in draft-hopley-x402-pqc-credential-binding-00.
  • Cross-Issuer ZKP Federation — composes independently-issued PQC credentials from different issuers into a single composite token without a shared trust root. Specified in draft-hopley-x402-federation-zkp-00.
Both protocols are described in the peer-reviewed research paper: IACR ePrint 2026/109852AlgoVoi Agent Trust Bench: Adversarial Evaluation, Post-Quantum Credential Binding, and Cross-Issuer Federation for Agentic Payment Safety. The implementation packages (algovoi-federation-validator, algovoi-zkp-receipt) are available under the AlgoVoi Commercial License v1.0. The substrate itself remains Apache 2.0.

See also

License

Apache 2.0. Same as the rest of the AlgoVoi substrate.