Cryptographic verification methodology

Primary question: How are records canonicalised, domain-separated, signed with ML-DSA-65, and verified independently?

Records are serialised to deterministic UTF-8 canonical JSON (recursive lexicographic key sorting), hashed with SHA-256 inside a self-describing envelope, prefixed with the UTF-8 domain separator and a single 0x00 byte, and signed with pure NIST FIPS 204 ML-DSA-65. Independent verifiers reproduce every byte of this pipeline locally against a pinned 1,952-byte public key.

AffixIO Post-Quantum Evidence Signing and Offline Verification Pipeline Diagram showing six sequential stages: Digital Record enters Canonical JSON serialisation, produces a SHA-256 digest, adds domain separation affixio.pqc-lab.evidence.v1 with a null byte, is signed with NIST FIPS 204 ML-DSA-65 (3,309-byte signature), and is checked offline against a pinned 1,952-byte public key to yield Valid, Invalid, or Unresolved. 01 INPUT Digital Record Canonical JSON 02 DIGEST SHA-256 Hash Envelope + Record 03 BINDING Domain Prefix domain || 0x00 || hash 04 FIPS 204 PQC ML-DSA-65 Sign 3,309-byte signature 05 OFFLINE VERIFIER Pinned 1,952 B Key VALID: Integrity + Key OK INVALID: Tampered / Bad Sig UNRESOLVED: Never Approval Scope boundary: ML-DSA-65 covers the domain-separated payload envelope. TLS transport, ZKP soundness, and key governance are verified separately.
Verification pipeline (text equivalent): A digital record is canonicalised into deterministic UTF-8 JSON, hashed with SHA-256 inside an explicit metadata envelope, prefixed with the UTF-8 domain string and a null byte, and signed using NIST FIPS 204 ML-DSA-65 (3,309 bytes). An independent verifier checks the record digest and ML-DSA-65 signature offline against a pinned 1,952-byte public key, returning Valid, Invalid, or Unresolved.

Reproducible FIPS 204 ML-DSA-65 test vectors

The following live vectors are generated by this instance's isolated demonstration key (pqc-demo-active-475799ad2dc96fec) and exposed at /api/test-vectors. Every vector can be checked offline with verify-pqc-evidence.mjs.

Live reproducible verification vectors (OpenSSL 3.5.7 · v26.8.1)
Vector IDScenarioExpected StateApproved?
vec-01-valid-mldsa65Valid ML-DSA-65 signed demonstration evidenceVALIDYes (demo integrity)
vec-02-tampered-recordModified record against unmodified evidence packageINVALIDNo
vec-03-retired-key-unresolvedEvidence signed with retired demonstration key under active-only trust policyUNRESOLVEDNo

1. Deterministic canonicalisation and digest calculation

Standard JSON serialisation does not guarantee consistent object key ordering across programming languages. Before hashing, the platform transforms any JSON record using recursive lexicographic key sorting: object keys are sorted by UTF-16 code unit order (standard JavaScript Array.prototype.sort), keys with undefined values are omitted, arrays preserve element order, and no insignificant whitespace is inserted.

First, record_digest_sha256 = SHA-256(UTF8(canonicalJson(record))). Second, the envelope object containing schema, domain, environment, production_attestation, issued_at, record_digest_sha256, and record is itself canonicalised and hashed: envelope_digest_sha256 = SHA-256(UTF8(canonicalJson(envelope))).

2. Domain separation and ML-DSA-65 signing input

Mirroring AffixIO's production API domain-separation model (affixio.attest.client-payload.v1), the verification laboratory never signs a bare hash digest. Instead, it constructs the exact byte buffer:

signing_input = UTF8("affixio.pqc-lab.evidence.v1") || 0x00 || raw_32_bytes(envelope_digest_sha256)

This 60-byte message is signed using pure NIST FIPS 204 ML-DSA-65 (empty FIPS 204 context string), yielding a 3,309-byte signature encoded as Base64. Evidence renewal chains use a distinct domain separator (affixio.pqc-lab.renewal.v1) so a renewal signature can never be replayed as a primary record attestation.

3. Public key encoding and cross-library interoperability

Raw ML-DSA-65 public keys are 1,952 bytes. In X.509 SubjectPublicKeyInfo (SPKI) DER format (OID 2.16.840.1.101.3.4.3.18), the raw key is preceded by the 22-byte ASN.1 header 308207b2300b0609608648016503040312038207a100, producing a 1,974-byte DER structure (also exported in PEM format inside every evidence package).

This encoding is verified interoperable across Node.js >= 24.7 native node:crypto (OpenSSL 3.5+), OpenSSL 3.5+ CLI (openssl pkeyutl -verify), and @noble/post-quantum/ml-dsa.

4. Threat model and verification decision matrix

Verifier threat model and deterministic state transitions
Adversarial or operational eventDetection stepDeterministic outcomeApproved?
Single character altered in digital recordStep 2: record_digest_sha256 mismatchInvalidNo
Envelope issued_at or environment flag tamperedStep 3: envelope_digest_sha256 mismatchInvalidNo
Signature bytes flipped, truncated, or substitutedStep 5: FIPS 204 ML-DSA-65 verification failsInvalidNo
Attacker embeds self-generated public key with unknown key_idStep 4: Trusted key store lookup rejects unknown key_idUnresolvedNo
Evidence signed by retired demonstration key under active-only policyStep 4: Key status is retiredUnresolvedNo
Evidence signed by retired key under explicit historical policyStep 4 + Step 5 pass with historical noticeValid (historical)Policy-dependent
Malformed JSON, missing envelope, or unknown schemaStep 1: Structural / schema validationUnresolvedNo
Key directory unreachable and no pinned key availableStep 4: Key unavailableUnresolvedNo

5. Independent offline verification instructions

Download any evidence package from the Verification Laboratory (evidence.json) and download our standalone zero-dependency verification script from /downloads/verify-pqc-evidence.mjs (or inspect its full source code directly). Run it locally on any machine with Node.js 24.7 or newer:

node verify-pqc-evidence.mjs evidence.json

To verify a separate or modified record file against the original evidence package, pass both paths:

node verify-pqc-evidence.mjs evidence.json modified-record.json

To verify with OpenSSL 3.5+ directly without Node.js, extract cryptography.public_key_spki_pem to pub.pem, decode cryptography.signing_input_hex to input.bin, decode cryptography.signature_b64 to sig.bin, and run: openssl pkeyutl -verify -pubin -inkey pub.pem -rawin -in input.bin -sigfile sig.bin

Relevant technical limitations

  • Reproducible test vectors served at /api/test-vectors use this instance's isolated demonstration key pair. Because FIPS 204 defaults to hedged signing, fresh signatures generated for the same record differ byte-for-byte while remaining deterministically verifiable under the same public key.

Primary sources and technical standards

  1. NIST FIPS 204: Module-Lattice-Based Digital Signature Standard (ML-DSA), National Institute of Standards and Technology (NIST) ()
  2. AffixIO Published Service Attestation Keys, AffixIO ()
  3. AffixIO Node.js SDK (affixio@2.0.5, Apache-2.0), AffixIO ()
  4. AffixIO Security Boundaries and Disclosure Policy, AffixIO ()