Stephanie Anne Timmer

Chapter 11

Testing, Validation, and Compliance

Proving Your Migration Worked

Deploying PQC is necessary. Proving it works correctly is what makes it a compliance program rather than a configuration change. An algorithm deployed incorrectly — the right library at the wrong parameter level, a cipher suite enabled but never negotiated, a certificate signed with ML-DSA but a chain that still roots to a classical CA — provides no actual security improvement while creating the false confidence of completed migration.

This chapter covers the testing and validation disciplines that separate a migration program from a migration claim. It covers NIST’s Automated Cryptographic Validation Protocol for algorithm correctness, interoperability testing across library implementations, FIPS 140-3 considerations for PQC modules, penetration testing approaches specifically designed for quantum-safe configurations, building the evidence package that satisfies auditors and assessors, and the continuous monitoring posture that keeps the migration valid over time.

What You Will Learn
How to use NIST ACVP to validate PQC algorithm implementations.
How to run interoperability tests across PQC library combinations.
FIPS 140-3 certificate verification for PQC modules.
Penetration testing scenarios specific to hybrid PQC and QKD deployments.
How to build a compliance evidence package for auditors and assessors.
A continuous monitoring framework that keeps your migration valid post-deployment.

11.1 NIST PQC Interoperability Test Vectors

Algorithm correctness is the foundation of everything else in this chapter. An ML-KEM implementation that passes ACVP known-answer tests is correctly implementing the FIPS 203 specification. One that does not has a bug that may be exploitable — and may silently produce keys that appear valid but are not.

What ACVP Is and How It Works

The NIST Automated Cryptographic Validation Protocol (ACVP) is the mechanism by which cryptographic module implementations are tested against FIPS standards. ACVP works as a client-server protocol: the NIST ACVP server generates test vectors (sets of inputs with known correct outputs) for specific algorithms and parameter sets. The implementation under test processes those vectors and returns its outputs. The server compares the implementation’s outputs against the known correct outputs and reports pass or fail for each test case.

ACVP testing for ML-KEM (FIPS 203), ML-DSA (FIPS 204), SLH-DSA (FIPS 205), and FN-DSA (FIPS 206) is available through the NIST ACVP server. Organizations seeking FIPS 140-3 validation must submit ACVP test results through the Cryptographic Module Validation Program. Organizations that want to verify algorithmic correctness without entering full CMVP certification can use the NIST ACVP demo server for known-answer testing.

Running ACVP Tests Against Your PQC Implementation

The acvp-rust client provides a practical tool for running ACVP tests against local implementations:

# Install acvp-rust client
cargo install acvp-client

# Alternatively, use the Python acvp client
pip install acvp

# Run ML-KEM known-answer tests against OpenSSL 3.5
acvp-client \
  --server demo.acvp.nist.gov \
  --algorithm ML-KEM \
  --mode keygen,encapsulation,decapsulation \
  --implementation openssl

# For direct known-answer testing without the ACVP server:
# Download test vectors from NIST ACVP repository
git clone https://github.com/usnistgov/ACVP-Server.git
cd ACVP-Server/gen-val/json-files/ML-KEM-keyGen-FIPS203

# Run OpenSSL against the known-answer test vectors
python3 << 'EOF'
import json, subprocess, base64

with open('prompt.json') as f:
    prompt = json.load(f)

for test_group in prompt['testGroups']:
    param_set = test_group['parameterSet']
    # ML-KEM-512, ML-KEM-768, or ML-KEM-1024
    for test in test_group['tests']:
        seed = test['d'] + test['z']
        # Known seed inputs from test vector
        # Run implementation against known seed
        # Compare output ek (encapsulation key) against expected
        pass
print('ACVP known-answer test framework initialized')
EOF

Interoperability Testing Across PQC Libraries

Algorithm correctness does not guarantee interoperability. Two implementations may both correctly implement FIPS 203 but encode TLS key_share extensions differently, use incompatible PKCS#8 key serialization formats, or negotiate cipher suites in incompatible orders. The OQS project maintains an interoperability matrix for TLS 1.3 PQC key exchange across liboqs, OpenSSL 3.5, BoringSSL, and s2n-tls.

Run the following interoperability tests for every library combination in your deployment:

Test PairTest CommandExpected Result
OpenSSL 3.5 client → OpenSSL 3.5 serveropenssl s_client -connect server:4433 -groups X25519MLKEM768X25519MLKEM768 negotiated
curl (OpenSSL 3.5) → nginx (OpenSSL 3.5)curl -v --tlsv1.3 https://server/ 2>&1 | grep 'SSL connection'TLSv1.3 / TLS_AES_256_GCM_SHA384
Go TLS client → OpenSSL 3.5 servergo run pqc_client_test.go -server server:4433Handshake complete; hybrid PQC
Java (Bouncy Castle) → OpenSSL 3.5java -jar BcTlsTest.jar server:4433TLS 1.3 established
s2n-tls client → OpenSSL 3.5 servers2nc --pq server 4433Key exchange: ECDHE-MLKEM
OpenSSH client → OpenSSH serverssh -vvv -o KexAlgorithms=mlkem768x25519-sha256 user@serverkex: mlkem768x25519-sha256

Known-Answer Test Vectors for Manual Verification

For quick spot-checking of a PQC implementation without the full ACVP infrastructure, NIST provides standalone known-answer test vector files for each FIPS standard. Download and verify:

# Download ML-KEM test vectors from NIST
curl -O https://csrc.nist.gov/CSRC/media/Projects/post-quantum-cryptography/\
  documents/fips-203/ML-KEM-512-KeyGen.txt

# Verify a specific key generation test case
# Test vector format: d (seed), z (randomness), ek (expected public key), dk (expected private key)
# Run your implementation with d and z; compare ek output against expected
openssl pkey -in generated-key.pem -pubout | \
  openssl base64 -d | xxd | head -4
# Compare first bytes against expected ek from test vector

11.2 FIPS 140-3 Considerations for PQC Modules

FIPS 140-3 is the federal standard for cryptographic module validation. Under FISMA, federal systems must use FIPS 140-3 validated cryptographic modules for all cryptographic operations. The transition to PQC creates a gap: the FIPS 140-3 validation ecosystem is still catching up to the NIST PQC standards finalized in August 2024.

The FIPS 140-3 PQC Validation Landscape

As of mid-2026, FIPS 140-3 certificates explicitly covering ML-KEM, ML-DSA, and SLH-DSA operations are actively being issued but not yet widely available across all commonly used cryptographic libraries. The CMVP pipeline has a significant backlog, and many modules that implemented PQC algorithms before or shortly after the August 2024 FIPS publication are awaiting certificates. Engineers should:

  1. Check the NIST CMVP database (csrc.nist.gov/projects/cryptographic-module-validation-program) for current validation certificates covering your specific library and PQC algorithm combination.
  2. Look for certificates that explicitly list ML-KEM (FIPS 203), ML-DSA (FIPS 204), or SLH-DSA (FIPS 205) in the algorithm column — a module validated before August 2024 does not cover these algorithms even if it is a recent certificate.
  3. For operations where no FIPS 140-3 validated PQC module is yet available, document the gap, implement the best available control (unvalidated implementation with known-answer testing), and track the CMVP pipeline for when validation becomes available.

Verifying FIPS 140-3 Compliance in Practice

# Check whether OpenSSL is running in FIPS mode
openssl version -a | grep 'FIPS'
# If FIPS provider is active: 'FIPS mode enabled'

# List algorithms available in FIPS mode
openssl list -digest-algorithms -provider fips
openssl list -kem-algorithms -provider fips | grep -i mlkem
# ML-KEM should appear if the FIPS provider covers FIPS 203
# Verify FIPS module certificate information
openssl version -f
# Shows the FIPS module version; cross-reference against CMVP certificate

FIPS 140-3 Validation Status by Library (Mid-2026)

Library / ModuleFIPS 140-3 StatusPQC Algorithm CoverageCMVP Certificate
OpenSSL 3.x FIPS ProviderValidated (Cert #4282 and others)Pending — PQC algorithms being added to existing cert scopeVerify at csrc.nist.gov/cmvp
AWS s2n-tls / libcryptoValidatedML-KEM in validation processVerify current cert at csrc.nist.gov/cmvp
BoringSSL (Google)Validated (BoringCrypto)PQC coverage on roadmapVerify at csrc.nist.gov/cmvp
Bouncy Castle (Java)Not FIPS 140-3 validatedML-KEM, ML-DSA, SLH-DSA implementedNo CMVP certificate
liboqsNot FIPS 140-3 validatedFull NIST PQC suiteNo CMVP certificate — dev/test only
Thales Luna HSM firmwareValidatedML-DSA, ML-KEM on roadmap — verify current firmwareVerify vendor-specific cert
Entrust nShieldValidatedSLH-DSA available; ML-DSA/KEM on roadmapVerify vendor-specific cert
Always Verify Against the CMVP Database
The table above reflects mid-2026 status and will be outdated. FIPS 140-3 PQC coverage is changing monthly as vendors submit updated certificates. Before making a compliance claim or design decision based on FIPS 140-3 coverage, verify the current state in the NIST CMVP database. Look for the specific FIPS 203/204/205 algorithm in the certificate’s algorithm listing, not just the module’s overall validation status.

11.3 Penetration Testing Quantum-Safe Configurations

Standard penetration testing methodologies were developed for classical cryptography. A pen test that correctly identifies weak TLS cipher suites, expired certificates, and SSH configuration issues does not automatically cover the failure modes specific to hybrid PQC and QKD deployments. This section provides the additional test cases that quantum-safe pen testing requires.

PQC-Specific Pen Test Scenarios

Test ScenarioWhat It TestsHow to ExecutePass Criteria
Hybrid PQC downgrade attackCan an attacker force negotiation of classical-only key exchange by removing hybrid groups from ClientHello?Use a custom TLS client that sends ClientHello without X25519MLKEM768 in supported_groups. Verify server response.Server either negotiates X25519MLKEM768 hybrid (from its own keyshare) or refuses connection if classical-only is not permitted.
Parameter level compliance (CNSA 2.0)Are NSS-scope systems using ML-KEM-1024 and ML-DSA-87, not lower parameter sets?Inspect negotiated key exchange group ID and certificate algorithm/key size.ML-KEM-1024 (not 512 or 768) for key exchange; ML-DSA-87 for signatures.
Certificate chain completenessIs the full quantum-safe chain (leaf + intermediate + root) served correctly?openssl s_client -connect server:443 -showcerts | grep 'Signature Algorithm'All certificates in chain use ML-DSA; no classical signatures in the chain.
AES-128 cipher suite presenceAre AES-128 cipher suites disabled as required by the quick win from Chapter 3?testssl.sh --cipher-per-proto server:443No AES-128 cipher suites offered in TLS 1.3.
TLS 1.2 / 1.0 fallbackCan an attacker force TLS 1.2 negotiation with classical key exchange?openssl s_client -connect server:443 -tls1_2Connection refused; no TLS 1.2 fallback available.
QKD classical channel injectionCan an attacker inject false messages into the QKD classical channel if ML-DSA authentication is not implemented?Intercept classical channel; attempt to modify key ID or basis reconciliation messages.All classical channel messages carry valid ML-DSA signatures; injected messages are rejected.
QKD key pool exhaustionDoes the system fail safely when QKD key material is depleted?Deplete the key pool by making rapid key requests; observe system behavior.System alerts and fails to PQC-only mode with operational logging; does NOT silently fall back to classical crypto.
CBOM completenessDoes the CBOM accurately capture all cryptographic components, including embedded libraries?Run cscanner against deployed containers and binaries; compare output to CBOM.No quantum-vulnerable algorithms in deployed software that are not captured in the CBOM.

Automated PQC Security Scanning

Incorporate PQC-specific checks into your automated security scanning pipeline:

#!/bin/bash
# pqc_security_scan.sh -- automated PQC security checks
HOST="$1"
PORT="${2:-443}"
PASS=0
FAIL=0

# Test 1: Verify TLS 1.3 only (no TLS 1.2 fallback)
if openssl s_client -connect $HOST:$PORT -tls1_2 2>&1 | grep -q 'no protocols available\|handshake failure'; then
  echo "PASS: TLS 1.2 correctly refused"
  PASS=$((PASS+1))
else
  echo "FAIL: TLS 1.2 accepted -- should be disabled"
  FAIL=$((FAIL+1))
fi

# Test 2: Verify hybrid PQC key exchange
TEMP_KEY=$(openssl s_client -connect $HOST:$PORT -tls1_3 -groups X25519MLKEM768 2>&1 | grep 'Server Temp Key')
if echo "$TEMP_KEY" | grep -q 'X25519MLKEM768'; then
  echo "PASS: Hybrid PQC key exchange negotiated"
  PASS=$((PASS+1))
else
  echo "FAIL: Hybrid PQC not negotiated -- got: $TEMP_KEY"
  FAIL=$((FAIL+1))
fi

# Test 3: Verify AES-256 cipher only
CIPHER=$(openssl s_client -connect $HOST:$PORT -tls1_3 2>&1 | grep 'Cipher is')
if echo "$CIPHER" | grep -q 'AES_256'; then
  echo "PASS: AES-256 cipher in use"
  PASS=$((PASS+1))
else
  echo "FAIL: Non-AES-256 cipher -- $CIPHER"
  FAIL=$((FAIL+1))
fi

# Test 4: Verify no AES-128 in offered cipher suites
if openssl s_client -connect $HOST:$PORT -tls1_3 -cipher 'TLS_AES_128_GCM_SHA256' 2>&1 | grep -q 'no ciphers available\|handshake failure'; then
  echo "PASS: AES-128 cipher suite correctly rejected"
  PASS=$((PASS+1))
else
  echo "FAIL: AES-128 cipher suite accepted"
  FAIL=$((FAIL+1))
fi

echo ""
echo "PQC Security Scan Results: $PASS passed, $FAIL failed"
[ $FAIL -eq 0 ] && exit 0 || exit 1

11.4 Building Your Compliance Evidence Package

Auditors and assessors do not take engineers at their word. They require documented, reproducible evidence that the controls described in policy documents are actually implemented in production systems. The compliance evidence package for a PQC migration is the collection of artifacts that demonstrates, to an external examiner, that the migration was planned, executed, and tested correctly.

Evidence Package Structure

Organize your compliance evidence package with the following structure. Each item should be a versioned, dated artifact stored in a document management system with access controls:

Evidence CategorySpecific ArtifactsProduced ByRetention
Migration PlanningRisk-and-feasibility matrix (Ch. 3), migration roadmap with milestones, CBOM baseline snapshot, sensitivity tier assignmentsMigration leadDuration of migration program + 3 years
Algorithm SelectionAlgorithm selection decision record referencing FIPS 203/204/205 and CNSA 2.0, parameter set justification for each systemSecurity architectDuration of migration + 3 years
Implementation RecordsACVP test results for each PQC algorithm implementation, FIPS 140-3 certificate numbers with CMVP database screenshots, library version recordsEngineering teamDuration of deployment + 3 years
Configuration Evidenceopenssl s_client output showing negotiated algorithm, ALB security policy screenshots, IKEv2 SA establishment logs, SSH algorithm negotiation logsEngineering teamQuarterly snapshots; retain 2 years
Interoperability TestingOQS interoperability test results, cross-library TLS handshake verification recordsQA / test teamPer-release; retain 2 years
Penetration TestingPQC pen test scope, methodology, findings, remediation evidence, and sign-offSecurity team / third partyRetain indefinitely
CBOM CurrencyCurrent CBOM snapshot, CBOM change log, vendor assessment records and responsesMigration leadUpdated quarterly; retain 3 years
Vendor ComplianceVendor PQC readiness questionnaire responses, contract language provisions, vendor roadmap documentationProcurement / legalDuration of contract + 3 years

Evidence Collection Commands

The following commands produce durable, dated evidence artifacts for common PQC validation scenarios:

#!/bin/bash
# collect_pqc_evidence.sh -- generate dated evidence artifacts
DATE=$(date +%Y%m%d)
HOST="$1"
EVIDENCE_DIR="./pqc-evidence/$DATE"
mkdir -p $EVIDENCE_DIR

# 1. TLS configuration evidence
openssl s_client -connect $HOST:443 -tls1_3 -groups X25519MLKEM768 \
  -showcerts 2>&1 > $EVIDENCE_DIR/tls-config-$HOST-$DATE.txt
echo "TLS evidence captured: $EVIDENCE_DIR/tls-config-$HOST-$DATE.txt"

# 2. Certificate chain evidence
echo | openssl s_client -connect $HOST:443 2>/dev/null \
  | openssl x509 -noout -text \
  | grep -A2 'Signature Algorithm\|Public Key Algorithm\|Not After\|Subject:'\
  > $EVIDENCE_DIR/cert-details-$HOST-$DATE.txt

# 3. Cipher suite evidence -- document what is and is not accepted
./testssl.sh --quiet --json $HOST:443 > $EVIDENCE_DIR/testssl-$HOST-$DATE.json

# 4. OpenSSL version and FIPS status
openssl version -a > $EVIDENCE_DIR/openssl-version-$DATE.txt
openssl list -providers >> $EVIDENCE_DIR/openssl-version-$DATE.txt

# 5. ALB security policy (if AWS environment)
aws elbv2 describe-listeners --region us-gov-east-1 \
  --query 'Listeners[?Protocol==`HTTPS`].{ARN:ListenerArn,Policy:SslPolicy}' \
  --output json > $EVIDENCE_DIR/alb-policies-$DATE.json 2>/dev/null

echo "Evidence collection complete: $EVIDENCE_DIR"
ls -la $EVIDENCE_DIR

FedRAMP and ATO Considerations

For systems operating under a FedRAMP Authorization to Operate (ATO) or a DoD Assessment and Authorization (A&A), PQC migration changes must be documented through the appropriate change management process:

11.5 Continuous Monitoring Post-Migration

Migration completion is not a steady state. Certificates expire and are renewed. Software updates change cryptographic library versions. New systems are deployed with default configurations that may not match the PQC standards you established. Vendors push updates that change TLS behavior. The continuous monitoring framework ensures that your quantum-safe posture remains valid after the initial migration is complete.

The Four Monitoring Layers

LayerWhat Is MonitoredMonitoring MechanismAlert Threshold
TLS endpoint configurationNegotiated key exchange algorithm, cipher suite, TLS version on all HTTPS endpointsWeekly automated scan (testssl.sh / sslyze); real-time via AWS Config or Azure PolicyAny endpoint negotiating classical-only key exchange or TLS 1.2
Certificate algorithm currencyCertificate signature algorithm and key size for all issued certs; expiry datesDaily certificate scan; certificate management platform alertsAny newly issued cert using classical algorithms; any cert within 30 days of expiry
CBOM currencyNew software deployments, library updates, and system changes that may introduce quantum-vulnerable algorithmsCI/CD pipeline cscanner integration; quarterly manual reviewAny new quantum-vulnerable algorithm in deployed software not in CBOM
Vendor and dependency postureVendor PQC roadmap milestones; SaaS and API dependency TLS configurationQuarterly vendor assessment; monthly automated TLS scan of known outbound endpointsAny vendor missing committed PQC roadmap milestone; any dependency using TLS 1.2

Key Metrics for the PQC Migration Dashboard

Track these metrics on a monthly basis and report to leadership quarterly:

MetricDefinitionTargetSource
PQC TLS coverage% of HTTPS endpoints negotiating X25519MLKEM768 or higher100%Weekly endpoint scan
Classical-only connection rate% of TLS connections using classical-only key exchange0%ALB access logs / Azure Monitor
TLS 1.3 adoption rate% of TLS connections using TLS 1.3100% (new systems)Load balancer access logs
Quantum-vulnerable certificatesCount of active certificates using RSA or ECDSATrending to 0 by 2030–2035Certificate management platform
CBOM coverage% of production systems with current CBOM entries100%CBOM management tool
FIPS 140-3 PQC coverage% of cryptographic operations using FIPS 140-3 validated PQC modulesTrack against CMVP availabilityCMVP database cross-reference
Vendor PQC compliance rate% of key vendors with committed PQC roadmaps100% by 2028Vendor assessment records
Open POA&M itemsCount of PQC-related POA&M items with overdue target dates0 overdueA&A / FedRAMP tracking

Cryptographic Agility as a Monitoring Requirement

Monitoring is only actionable if the systems being monitored can respond to findings. Cryptographic agility — the ability to swap algorithms through configuration — is what makes monitoring findings fixable without emergency code changes. As part of your continuous monitoring program, periodically verify that cryptographic agility is functioning as designed:

  1. Simulate an algorithm rotation: change the preferred algorithm in configuration and verify that the system adopts the new algorithm without application code changes.
  2. Test fallback behavior: verify that disabling a specific algorithm causes graceful fallback to the next preferred algorithm, not a service failure.
  3. Verify that your CBOM reflects the current configuration: if the configuration changed, the CBOM should have been updated within the change management window.
  4. Confirm that monitoring alerts fired correctly during the simulated rotation and that the dashboard reflects the change.
The Monitoring Mindset
Continuous monitoring is not a compliance checkbox. It is the mechanism by which you maintain confidence that the security controls you deployed are actually working. A monitoring program that generates metrics no one reviews, alerts no one acts on, and dashboards no one presents to leadership is not continuous monitoring — it is the appearance of continuous monitoring. Build monitoring programs that produce findings engineers act on and metrics leadership understands.

Chapter 11 Summary

Before moving to Chapter 12, you should be able to answer these questions:

Testing Is Not Optional
The most common failure mode in PQC migration programs is deploying configurations that engineers believe are correct but have never been validated end-to-end.
A cipher suite listed in a server configuration is not a cipher suite being negotiated. A certificate signed with ML-DSA is not a certificate being served. An ALB security policy set to TLS 1.3 is not a connection that actually negotiated TLS 1.3.
Test everything. Document the testing. Keep the evidence. Auditors will ask for it.

What’s Next

Chapter 12 covers operations and incident response — running quantum-safe infrastructure day-to-day. Key rotation policies for PQC, designing for cryptographic agility in operational practice, the incident response playbook for an algorithm compromise scenario, and performance monitoring and optimization for PQC deployments at scale.

References

[1] NIST. Automated Cryptographic Validation Protocol (ACVP). Available at: pages.nist.gov/ACVP. [ACVP server, client documentation, and test vector repository for FIPS 203/204/205.]

[2] NIST. Cryptographic Module Validation Program (CMVP). Available at: csrc.nist.gov/projects/cryptographic-module-validation-program. [FIPS 140-3 certificate database; search for ML-KEM, ML-DSA, SLH-DSA in algorithm listings.]

[3] NIST. (2024). FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), FIPS 205 (SLH-DSA) Test Vector Files. Available at: csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization. [Known-answer test vectors for manual verification.]

[4] Open Quantum Safe Project. OQS Interoperability Matrix. Available at: github.com/open-quantum-safe/oqs-demos. [TLS 1.3 PQC interoperability test results across OpenSSL, BoringSSL, s2n-tls, and liboqs.]

[5] NIST SP 800-53 Rev. 5. (2020). Security and Privacy Controls for Information Systems and Organizations. [SC-8, SC-12, SC-28 controls affected by PQC migration; referenced in FedRAMP/ATO documentation guidance.]

[6] FedRAMP. (2023). FedRAMP Significant Change Notification Process. Available at: fedramp.gov. [Guidance on documenting cryptographic algorithm changes in authorized systems.]

[7] NIST SP 800-137. (2011). Information Security Continuous Monitoring (ISCM). [Continuous monitoring framework referenced in Section 11.5.]

[8] testssl.sh. Available at: testssl.sh. [TLS scanning tool with JSON output; used in evidence collection script and PQC pen test scenarios.]