← Back to section · Post-Quantum Migration

Interoperability Testing: Cross-Implementation Verification from the Deployer's Side

Whether two implementations of the same standard actually interoperate is something the deployer must test personally. Known-answer tests, cross-implementation matrices, the correct way to use ACVP, and negative testing: confirm not only that inputs are accepted correctly, but that bad ones are rejected.

Published 22 November 2026 · 5 min read · PQ Frontier

Interoperability Testing: Cross-Implementation Verification from the Deployer's Side
AI-generated site artwork
Video explainer · Compatibility Testing: Size, Performance, Interoperability

Why deployers must test interoperability themselves

A common misconception: the algorithm has a FIPS standard and the library is validated, so interoperability is automatic. In reality, a standard fixes the mathematics and the byte layout, while implementations still make their own decisions at dozens of detail points — encoding formats, parameter negotiation, error handling, randomness usage. In every historical algorithm transition, interoperability failures came not from the algorithms but from these details: a length field off by one, unused bits not zeroed, a peer offering a legal but uncommon parameter combination. This article does not cover how vendors obtain certification (that belongs to the standards and certification sections); it covers only what a deployer should run before joining two implementations on one link.

Layer one: known-answer tests (KAT)

The most basic layer is the known-answer test: given fixed inputs (seed, public key, message), the implementation’s output must match official reference vectors byte for byte. NIST published extensive KAT files with the algorithm submission packages during standardisation, and deployers can take them directly for regression against local builds. This layer’s value is catching low-level mistakes — wrong version installed, wrong build options, a swapped underlying library — before integration. One caution: run KAT against the exact binary you will deploy, not another build with the same name and version — container images, patch levels and CPU instruction paths can all change results.

Layer two: the cross-implementation matrix

KAT proves a single implementation “computes correctly”; the cross matrix proves several implementations “can talk”. Split the two ends of the link and permute: implementation A generates keys, B encapsulates, A decapsulates; A signs, B verifies; and vice versa. The matrix spans at least:

  • Implementation dimension: every library and device firmware you will actually use;
  • Parameter-set dimension: ML-KEM-512/768/1024 and each ML-DSA security level, one by one — do not test only the default;
  • Data dimension: empty messages, very long messages, and boundary lengths that just straddle internal buffer block sizes.

The most valuable output of cross-testing is often not the failure itself but its location: decapsulation fails while verification passes, pointing at encoding rather than negotiation. Record this localisation information completely in the test report so it can be quoted directly in vendor discussions.

ACVP: how a deployer should use it

ACVP (Automated Cryptographic Validation Protocol) is NIST’s algorithm-validation channel: a server issues test vectors, the module under test returns results, and after comparison the implementation is registered. The deployer’s correct relationship to it has two parts. First, check the registration: during procurement or selection, confirm in NIST’s validation lists that the module version you use genuinely covers the target algorithms and parameter sets, rather than trusting a vendor’s “supported” claim. Second, reuse the vectors for regression: ACVP-style vectors cover far more boundary cases than home-made ones and belong in the local regression set. But be clear about the boundary: ACVP validates algorithm implementation correctness. It does not validate your protocol integration, your performance, or whether two products work when joined together — those remain the deployer’s own homework.

Register implementation differences as an asset

As cross-testing accumulates, it produces something more valuable than any single test report: an implementation difference register. Under one standard, the legal divergences between implementations are far more numerous than expected — handling of optional fields, tolerance at boundary lengths, choice of error codes, timing-distribution differences from rejection sampling. Most such differences are not defects, but under specific peer pairings and data shapes they turn into faults. Register every difference found in cross-testing (implementations and versions involved, trigger conditions, observed behaviour, disposition), and it serves three uses: upgrades regress selectively against the register instead of re-running the whole matrix; strange production faults are checked against the register first, and a known difference saves most of the diagnosis time; and in vendor discussions, register entries are the most persuasive evidence available. Keep the difference register separate from defect tracking: a difference is “the implementation is entitled to do this”, a defect is “the implementation did it wrong” — conflating them destroys the register’s credibility.

The encoding layer is where things usually break

Historical cross-matrix data points repeatedly at one conclusion: interoperability failures concentrate at the encoding layer, not the mathematics layer. Typical cases: inconsistent handling of padding bytes at the end of fixed-length arrays, byte-order disagreements in integer-to-byte-string conversion, differing assumptions about defaults when optional fields are absent, and information lost as the same key material changes hands between encapsulation formats (raw bytes, DER, PEM, JWK). These problems share a signature — every single-sided test passes and only the cross combination fails, with a stable, reproducible failure shape. That is good news: they are locatable, fixable and lockable by regression. Method-wise, beyond end-to-end cross combinations, add a layer of intermediate-value comparison: capture each step’s intermediate products on the link (the ciphertext an encapsulation produced, the digest about to be signed, a fingerprint of the derived session key) and align intermediates across implementations — this localises faults faster than comparing only final results. Intermediate comparison needs debug output from test builds, which is precisely why it must be done in pre-production and cannot wait for a production incident.

Layer three: negative testing and robustness

The part of interoperability testing most often skipped is negative cases: feed the implementation wrong inputs and check it refuses as specified. Mandatory items include truncated or stretched public keys and ciphertexts, a signature with one bit flipped, parameter sets mismatched with keys, and undeclared algorithm identifiers offered in negotiation. Two points matter. First, refusal must be a “clean failure” — return an error, do not crash, and do not silently retry with a weaker algorithm. Second, decapsulation failures should be externally indistinguishable (implicit rejection is part of ML-KEM’s design); check that the implementation leaks no extra information on error paths. Computing correctly only shows an implementation “can do the exercises”; rejecting correctly shows it “follows the rules” — for cryptographic components headed to production, the latter matters at least as much.

Tags: InteroperabilityTest VectorsACVPCross-Implementation