CNSA 2.0 Hybrid Post-Quantum Transport (SecP384r1MLKEM1024 + ML-DSA-87) + ETSI GS QKD 014 Key Engine, Active Downgrade Firewall, Side-Channel & Tamarin Formal Verification Suite
quantumguard-cnsa2 (imported in Python as quantumguard, CLI entrypoint quantumguard) is an open-source, pip-installable cryptographic transport and verification toolkit backed by OpenSSL 4.0 / cryptography>=50.0.0. It combines wire-level CNSA 2.0 hybrid post-quantum key exchange, pluggable ETSI GS QKD 014 key delivery (live REST HTTP KME or pooled finite-key LEO Decoy-BB84 simulation), an active downgrade & asymmetric-abort firewall (NSA PP-26-4956), CycloneDX v1.6 Cryptographic Bill of Materials (CBOM) CI gating (NSA CNSA 2.0, US EO 14412, India CERT-In / DST CII), and three non-AI ground-truth assurance pillars (Project Wycheproof + NIST ACVP FIPS 203/204 KATs, India TEC 91011:2026 / dudect Welch's t-test timing detector, and a Tamarin Prover symbolic handshake model).
| Risk Addressed | QuantumGuard Control | Module |
|---|---|---|
| Harvest-Now-Decrypt-Later (CRQC) | Hybrid RFC 10024 SecP384r1MLKEM1024 (1665 B) + ETSI GS QKD 014 mixed via transcript-bound HKDF-SHA384 |
quantumguard/crypto_core.py |
| Algorithm Downgrade & Key-Swap Attacks | Rejects legacy curves/suites, stripped key shares (< 1665 B), forged ML-DSA-87 signatures, and qkd_key_id swaps/replays (PP-26-4956) |
quantumguard/guard.py |
| Pre-Auth Memory DoS & Asymmetric Aborts | 64 KiB pre-auth frame ceiling (PRE_AUTH_MAX_FRAME_BYTES) + CLIENT_FINISH / SERVER_COMMIT_ACK commitment barrier before AppData |
quantumguard/tunnel.py |
Timing Side Channels (TEC 91011:2026) |
Branchless GF(2^128) WegmanCarterMAC, hmac.compare_digest key comparison, constant-time ML-KEM-1024 implicit rejection + statistical dudect verifier |
quantumguard/sidechannel.py |
| Classical-EC Compromise in Symbolic Analysis | Dolev-Yao Tamarin model proving session_key_secrecy even when classical ECDH P-384 ephemeral scalars leak |
formal/quantumguard_handshake.spthy |
| Legacy Cryptography Sprawl in CI/CD | AST + multi-language CBOM scanner failing CI (exit 1) on prohibited standalone classical crypto and emitting CycloneDX v1.6 JSON |
quantumguard/cbom_scanner.py |
flowchart LR
Cli["Client / Local TCP Proxy<br/>(quantumguard connect)"] -->|"CLIENT_HELLO<br/>RFC 10024 1665 B + Key_ID + ML-DSA-87"| FW["Active Downgrade Firewall<br/>(guard.py / PP-26-4956)"]
KMS["ETSI GS QKD 014 Provider<br/>(REST HTTPS or LEO Decoy-BB84)"] -->|"256-bit K_QKD + key_ID"| Cli
KMS -->|"key_ID lookup (no replay)"| Srv
FW -->|"Inspect Suite / Nonce / Key_ID / Sig"| Srv["Tunnel Server<br/>(quantumguard serve)"]
Srv -->|"SERVER_HELLO + HKDF-SHA384<br/>Transcript & Key_ID Bound"| Cli
Cli -->|"CLIENT_FINISH<br/>ML-DSA-87 + GF(2^128) WC MAC"| Srv
Srv -->|"SERVER_COMMIT_ACK Barrier"| Cli
Cli <-->|"AES-256-GCM AEAD + Epoch Ratchet"| Srv
Repo["Source & Configs<br/>(.py .c .cpp .h .js .ts .yml .conf Dockerfile)"] -->|"AST + Regex Audit"| CBOM["CycloneDX v1.6 CBOM Gate<br/>(quantumguard audit / GitHub Action)"]
-
Real FIPS 203 / FIPS 204 / RFC 10024 Core (
quantumguard/crypto_core.py)-
ML-KEM-1024:ek = 1568 B,ct = 1568 B,ss = 32 B -
ML-DSA-87:pk = 2592 B,sig = 4627 B -
ECDH P-384uncompressed X9.62 point (97 B,48 Bshared secret) combined into1665 BSecP384r1MLKEM1024shares (group_id = 0x11ED) - Domain-separated
HKDF-SHA384bindingK_QKD || K_MLKEM1024 || K_P384toSHA384(transcript) || suite_id || qkd_key_id(mitigating Dependent-Key attacks) -
AES-256-GCMrecord layer with strict monotonic(epoch, seq)replay rejection, HKDF-SHA384 key ratcheting, and GF(2^128)$\varepsilon$ -$\text{ASU}_2$WegmanCarterMACfor handshake commit frames - Pluggable
ETSI GS QKD 014KeyProvider: REST/HTTPSEtsi014Client(/enc_keys,/dec_keys) andSimulatedLEOBB84Provider
-
-
Active Downgrade & Asymmetric-Abort Firewall (
quantumguard/guard.py)- Blocks stripped PQ shares (
< 1665 B), legacy/forbidden cipher suites (X25519,P-256,RSA-2048,TLS 1.2,X25519MLKEM768under strict CNSA 2.0), corruptedML-DSA-87signatures,qkd_key_idswaps/replays, stale nonces, and premature aborts prior toSERVER_COMMIT_ACK - Built-in 6-vector Red-Team fuzz suite (
quantumguard attack-test)
- Blocks stripped PQ shares (
-
Low-Latency Binary Wire Tunnel & TCP Proxy (
quantumguard/tunnel.py)-
TCP_NODELAY=1, compactQG2Bbinary handshake (18,154 Btotal wire bytes vs30,809 BJSON in v0.1.0),PRE_AUTH_MAX_FRAME_BYTES = 65_536DoS ceiling, cachedAESGCMinstances, andwritelinesscatter/gather128 KiBrecord streaming (> 200 MB/slocal loopback echo) -
TunnelServer(echoor decrypted TCP--upstreamforwarding) andTunnelClient(one-shotecho probe or local port-forwarding proxy bridge via--listen)
-
-
Automated CycloneDX v1.6 CBOM Scanner (
quantumguard/cbom_scanner.py)- AST-based Python analysis (recognizing standalone vs. hybrid
ECDH-P384 + ML-KEM-1024) plus context-aware rules for.c,.cpp,.h,.js,.ts,.yml,.yaml,.conf, andDockerfile - Returns exit code
1on CNSA 2.0 policy violations and0when compliant
- AST-based Python analysis (recognizing standalone vs. hybrid
-
CLI, FastAPI Security Console & ETSI GS QKD 014 Mock KME (
quantumguard/cli.py,dashboard.py,kme_mock.py)- Interactive web UI (
/) and JSON endpoints (/api/fips-selftest,/api/handshake,/api/attack-test,/api/audit-snippet) with HTTP security headers & 256 KiB payload limits - Live ETSI GS QKD 014 v1.1.1 HTTP KME server (
quantumguard kme-mock) exposingGET /api/v1/keys/{slave_sae_id}/status,POST /api/v1/keys/{slave_sae_id}/enc_keys, and single-usePOST /api/v1/keys/{master_sae_id}/dec_keys(404/410replay & TTL rejection)
- Interactive web UI (
-
Non-AI Cryptographic Assurance Stack (
tests/test_wycheproof_and_kat.py,quantumguard/sidechannel.py,formal/)-
Project Wycheproof v1 + NIST ACVP KATs (
tests/vectors/): SHA-256 verified official JSON suites (316AES-GCM,1,047P-384 ECDH,83HKDF-SHA-384,25/55FIPS 203 ML-KEM-1024 KeyGen/encapDecap,25/60FIPS 204 ML-DSA-87 KeyGen/SigVer) plus FIPS 203 implicit rejection and 1-bit signature flip tests -
TEC 91011:2026 /
dudectTiming Detector (quantumguard sidechannel-check):time.perf_counter_ns()interleaved Class 0/1 Welch's t-test harness with pooled 5%–95% outlier cropping acrossWegmanCarterMAC.verify,HandshakeFirewall.constant_time_key_id_equal, andML-KEM-1024decapsulation (|t| < 4.5pass threshold) + in-place mutable buffer scrubberzeroize_bytes -
Tamarin Prover Symbolic Model (
formal/quantumguard_handshake.spthy): Dolev-Yao + classical CRQC ECDH P-384 oracle model with 4 formal lemmas (executable,session_key_secrecy, injectivemutual_authentication,commit_barrier_consistency), wired into Ubuntu 24.04 GitHub Actions CI
-
Project Wycheproof v1 + NIST ACVP KATs (
-
Space QKD & Erasure-Aware QEC Benchmark (
benchmarks/satqkd_erasure_bench.py)- Finite-key Decoy-BB84 LEO downlink budget (
500 kmorbit,15°–85°elevation) - Explicitly separates Regime I
circuit_level_pauli_stimrotated surface code (d=3, 5) gate-noise sweeps from Regime IIcode_capacity_memory_hold_erasure(0%vs90%heralded memory-hold erasure conversion comparingSurface-d5vsBB-qLDPC-[[144,12,12]]vialdpc.BpOsdDecoder, reporting bothblock_lerandper_logical_qubit_ler = 1 - (1 - block_ler)**(1/k))
- Finite-key Decoy-BB84 LEO downlink budget (
Requires Python 3.11+ (Python 3.13.3 Windows and 3.13.18 Ubuntu verified). Note that because quantumguard is already occupied on PyPI, the distribution package is named quantumguard-cnsa2, while Python imports (import quantumguard) and the CLI (quantumguard) stay unchanged:
# Install core package from PyPI:
pip install quantumguard-cnsa2
# Or include QEC / Sat-QKD simulator extras (stim, pymatching, ldpc, numpy, scipy):
pip install "quantumguard-cnsa2[bench]"
# Or install from GitHub source with development & QEC benchmark extras:
git clone https://github.com/Runtime-Slayers/QuantumGuard.git
cd QuantumGuard
pip install -e ".[dev,bench]"
# Build distribution wheel + source tarball (dist/quantumguard_cnsa2-0.2.0-py3-none-any.whl):
python -m build
# Or run the FastAPI security console inside Docker (port 7860):
docker build -t quantumguard-cnsa2:0.2.0 .
docker run -p 7860:7860 quantumguard-cnsa2:0.2.0Use quantumguard (or python -m quantumguard):
# Terminal 1: Start CNSA 2.0 + ETSI 014 server forwarding decrypted TCP to local service 127.0.0.1:9000
python -m quantumguard serve --listen 127.0.0.1:8443 --upstream 127.0.0.1:9000
# Terminal 2: Open local plain TCP bridge 127.0.0.1:7000 -> encrypted tunnel -> 127.0.0.1:8443
python -m quantumguard connect --peer 127.0.0.1:8443 --listen 127.0.0.1:7000Or run a one-shot encrypted echo handshake:
python -m quantumguard serve --listen 127.0.0.1:8443
python -m quantumguard connect --peer 127.0.0.1:8443 --message "CNSA 2.0 telemetry test"python -m quantumguard attack-test --spawn-local --count 1000python -m quantumguard audit . --output cbom.json# Start live ETSI GS QKD 014 v1.1.1 HTTP Mock KME server:
python -m quantumguard kme-mock --host 127.0.0.1 --port 8443
# Run TEC 91011:2026 / dudect timing side-channel verification (2,500 samples/class):
python -m quantumguard sidechannel-check
python -m quantumguard sidechannel-check --json
# Benchmark binary CNSA 2.0 handshakes & 128 KiB AES-256-GCM loopback echo:
python -m quantumguard bench --handshakes 50 --payload-mb 16 --chunk-kb 128
# Launch interactive FastAPI console:
python -m quantumguard demo --host 127.0.0.1 --port 8080# Wycheproof v1 + NIST ACVP FIPS 203/204 KATs + dudect sensitivity + Tamarin CI structural check:
python -m pytest tests/test_wycheproof_and_kat.py -v
# Full 42-test suite (including Hypothesis & Schemathesis ASGI OpenAPI fuzzing):
python -m pytest -v
# LEO Sat-QKD & Erasure-Aware QEC benchmark:
python benchmarks/satqkd_erasure_bench.py --output benchmarks/results.json
python benchmarks/satqkd_erasure_bench.py --fast
# Tamarin Prover (Linux/Docker/WSL2 — runs automatically on ubuntu-latest CI):
docker run --rm -v "${PWD}/formal:/work" infsec/tamarin-prover:latest --prove /work/quantumguard_handshake.spthyAll metrics below were measured locally on Windows 11 (AMD64, Python 3.13.3, cryptography 50.0.0 / OpenSSL 4, stim 1.16.0, pymatching 2.4.0, ldpc 2.4.1):
| Metric | Latest Measured Result (v0.2.0) |
|---|---|
ML-KEM-1024 Sizes (verify_fips_sizes) |
ek = 1568 B, ct = 1568 B, ss = 32 B |
ML-DSA-87 Sizes (verify_fips_sizes) |
pk = 2592 B, sig = 4627 B |
RFC 10024 SecP384r1MLKEM1024 Wire Share |
1665 B (97 B P-384 + 1568 B ML-KEM-1024) |
Live Binary Handshake (quantumguard bench, 50 runs) |
Mean 14.763 ms, p95 26.016 ms, 18,154 B wire total (chunk_kb=128; prior pre-assurance sample: 10.854 ms mean / 16.160 ms p95) |
Live AES-256-GCM Echo (16.0 MB, chunk_kb=128) |
0.084 s round-trip (189.47 MB/s; prior sample: 0.078 s / 205.80 MB/s) |
Red-Team Firewall (attack-test --spawn-local --count 1000) |
1000 / 1000 blocked in 8.55 s (0 bypasses across all 6 binary vectors) |
CBOM Audit (quantumguard audit .) |
20 files: 43 compliant assets, 0 violations (exit 0); RSA-2048 fixture: exit 1 |
Wycheproof & NIST ACVP KATs (test_wycheproof_and_kat.py) |
316 AES-GCM + 1,047 P-384 ECDH + 83 HKDF-SHA-384 + 25/10 FIPS 203 + 25/30 FIPS 204 vectors (100% PASS) |
Timing Side-Channel (quantumguard sidechannel-check --json) |
TEC 91011:2026 / dudect (2,500 samples/class, 5%-95% crop): wegman_carter_mac_verify |t|=1.8944, firewall_qkd_key_id_compare |t|=0.0 (raw=0.1178), mlkem1024_decapsulation |t|=0.3854 -> COMPLIANT (PASS) |
Formal Tamarin Model (formal/quantumguard_handshake.spthy) |
Tamarin 1.12.0 (Maude 3.5.1) PASS (22.02s, Ubuntu 24.04 CI): executable (18 steps), session_key_secrecy (10 steps), mutual_authentication (71 steps), commit_barrier_consistency (10 steps) — CI Run |
Static & Dependency Security (bandit, ruff, semgrep, pip-audit) |
bandit: 0 issues (3,798 LOC, 0 #nosec); ruff: 0 issues; semgrep: 0 findings (156 rules / 21 targets); pip-audit: 0 CVEs across 40 quantumguard closure packages (385 unrelated global env CVEs) |
Full Test & Fuzz Suite (pytest -v, Hypothesis + Schemathesis) |
42 passed in 80.25s on Ubuntu 24.04 CI (115.17s local Windows; 0 failed, 0 skipped) |
Packaging (python -m build / pip wheel) |
dist/quantumguard_cnsa2-0.2.0-py3-none-any.whl & .tar.gz (quantumguard-cnsa2 on PyPI) |
Everything delivered in the QuantumGuard v0.2.0 cryptographic assurance upgrade and the exact observed outputs for independent re-check are preserved below.
985e5ecc172e181eaf49e89508b9470dcf478002eb7e8559c707eb42dc97dfe7 aes_gcm_test.json
25a9c41573dbea97c5b4be2dd00369fa68dc37ac8f41807d8e16226d188ec6a7 ecdh_secp384r1_test.json
69ff6ea3657bb9c1b8cdffbbb4e7832353d08fd15c0d9997b03f7a6b180e3678 hkdf_sha384_test.json
2ce955e45ed66b87abdab56f25d28e8665035c123a85eb556685411355d189ec nist_fips203_mlkem1024_encapdecap.json
e47bf2d00d8ca63baf3cac3430e2177454fa53c7511e3afe8a656e209c4cbac7 nist_fips203_mlkem1024_keygen.json
4c92b74f21ef0abfa610766fc7204b6cf56bfbf95026e3650ed140f748456458 nist_fips204_mldsa87_keygen.json
e542a23ce10d1ffa3cdc2fc1e1ee06a2852cb6fdc07e22cc897e9aa40a8c6f01 nist_fips204_mldsa87_sigver.json
Observed Edge-Case & Conformance Findings (test_wycheproof_and_kat.py):
- Wycheproof
AES-GCM(316 / 316):202valid exact decryptions,81invalid tags/AAD rejected (InvalidTag/ValueError),33out-of-range IV lengths (< 8 Bor> 128 B, including0 B) deterministically rejected (ValueError) by OpenSSL SP 800-38D bounds. For all256-bit key +96-bit nonce vectors wrapped inAES256GCMChannel, directional AAD (c2svss2c) blocked self-reflection and 1-bit ciphertext tamper. - Wycheproof
ECDH P-384(1,047 / 1,047):771 / 771valid exact shared-secret matches,46 / 46invalid rejected,230acceptable handled (1accepted,229rejected). Raw X9.62 points (97 B) extracted from invalid SPKIs (InvalidCurveAttack,ModifiedPublicPoint,WeakPublicKey,WrongCurve), infinity(0x00 * 97), and compressed prefix0x02all raisedValueError/CryptoEngineErrorinsideresponder_encapsulate_hybrid. Note:6UnnamedCurveSPKIs (tcId 792, 793, 798, 799, 801, 803) modify ASN.1 curve order/cofactor/prime while keeping an on-curve P-384(x, y)coordinate; stripping ASN.1 leaves a valid P-384 point, which is why ASN.1/SPKI validation rejects46 / 46. Separately, FIPS 203ByteDecode_12coefficient bounds (< q = 3329) permit0x00 * 1568syntactically inMLKEM1024PublicKey.from_public_bytes. - Wycheproof
HKDF-SHA-384(83 / 83):80valid exact OKMs +3SizeTooLargerejected (ValueError). - NIST ACVP FIPS 203
ML-KEM-1024:25 / 25deterministicfrom_seed_bytes(d + z)KeyGenekbyte-exact matches +10 / 10encapsulationKeyCheckmatches + FIPS 203 §7.3 implicit rejection verified (decapsulate(corrupted_ct)returns deterministic32 BK_bar != ss, distinct across different corruptions). - NIST ACVP FIPS 204
ML-DSA-87:25 / 25from_seed_bytes(seed)KeyGenpkbyte-exact matches +15 / 15external/pureSigVer+15 / 15externalMuSigVer+ deterministic rejection across 1-bit signature flips inIdentityKeyPair.verify_with_public_bytes.
{
"standard": "TEC 91011:2026 (Section 5) / dudect Welch t-test",
"platform_info": "Windows 11 (AMD64)",
"python_version": "3.13.3",
"timer_source": "time.perf_counter_ns()",
"samples_per_class": 2500,
"warmup_samples": 500,
"crop_percentiles": [0.05, 0.95],
"threshold": 4.5,
"all_passed": true,
"results": [
{
"name": "wegman_carter_mac_verify",
"description": "WegmanCarterMAC.verify (fixed 15/16-byte prefix match vs. random mismatched tag)",
"samples_per_class": 2500,
"cropped_n0": 2258,
"cropped_n1": 2265,
"mean_ns_class0": 146310.23,
"mean_ns_class1": 145979.47,
"stdev_ns_class0": 6029.4,
"stdev_ns_class1": 5707.94,
"welch_t_abs": 1.8944,
"welch_t_raw_abs": 0.8952,
"threshold": 4.5,
"verdict": "PASS"
},
{
"name": "firewall_qkd_key_id_compare",
"description": "HandshakeFirewall.constant_time_key_id_equal (tail-only diff vs. random head diff)",
"samples_per_class": 2500,
"cropped_n0": 2383,
"cropped_n1": 2355,
"mean_ns_class0": 200.0,
"mean_ns_class1": 200.0,
"stdev_ns_class0": 0.0,
"stdev_ns_class1": 0.0,
"welch_t_abs": 0.0,
"welch_t_raw_abs": 0.1178,
"threshold": 4.5,
"verdict": "PASS"
},
{
"name": "mlkem1024_decapsulation",
"description": "FIPS 203 ML-KEM-1024 decapsulate (valid ciphertext vs. corrupted implicit-rejection)",
"samples_per_class": 2500,
"cropped_n0": 2291,
"cropped_n1": 2302,
"mean_ns_class0": 64858.27,
"mean_ns_class1": 64887.62,
"stdev_ns_class0": 2582.86,
"stdev_ns_class1": 2577.32,
"welch_t_abs": 0.3854,
"welch_t_raw_abs": 0.2325,
"threshold": 4.5,
"verdict": "PASS"
}
]
}- Calibration & Measurement Caveats:
- Synthetic leaky branch control in
test_zeroize_bytes_and_dudect_sensitivity(~50 usasymmetric busy-spin) deterministically fails with|t| >= 4.5(WARN/INVESTIGATE), proving leak sensitivity. - Windows
time.perf_counter_ns()exhibits ~100 nsQueryPerformanceCounter quantization, so sub-microsecond paths likefirewall_qkd_key_id_compareround to200.0 ns(cropped stdev0.0, raw uncropped|t| = 0.1178). - Python Buffer Zeroization Scope (
zeroize_bytes):zeroize_byteswipes mutablebytearrayand writablememoryviewbuffers in place (e.g.,ikm_bufinsidederive_hybrid_session_keys); however, CPythonbytesobjects returned by OpenSSL/C bindings remain immutable until reference-count reclamation / GC.
- Synthetic leaky branch control in
# python -m quantumguard bench
FIPS 203/204 Self-Test PASS: ML-KEM-1024 (ek=1568 B, ct=1568 B, ss=32 B) |
ML-DSA-87 (pk=2592 B, sig=4627 B) | RFC 10024 Share=1665 B
{
"handshakes": 50,
"handshake_mean_ms": 14.763,
"handshake_p95_ms": 26.016,
"handshake_wire_bytes": 18154,
"chunk_kb": 128,
"echo_payload_mb": 16.0,
"echo_roundtrip_sec": 0.084,
"throughput_mb_per_sec": 189.47
}
# python -m quantumguard attack-test --spawn-local --count 1000
stripped_pq_downgrade: 167/167 blocked (0 bypassed)
classical_suite_downgrade: 167/167 blocked (0 bypassed)
corrupted_mldsa87_sig: 167/167 blocked (0 bypassed)
qkd_key_id_swap: 167/167 blocked (0 bypassed)
nonce_replay: 166/166 blocked (0 bypassed)
asymmetric_abort_truncation: 166/166 blocked (0 bypassed)
Summary: 1000/1000 blocked in 8.55s | Bypasses: 0
# python -m pytest -v
42 passed in 80.25s (Ubuntu 24.04 CI) | 42 passed in 115.17s (Windows 11)
# python -m bandit -r quantumguard -v
No issues identified. Code scanned: 3798 lines across 10 files (0 #nosec)
# python -m ruff check quantumguard --select S,B,E,F --ignore E501
All checks passed!
# semgrep scan --config p/python --config p/owasp-top-ten quantumguard --json --output audit_semgrep.json
Ran 156 rules on 21 files: 0 findings. (semgrep results: 0 errors: 0)
# python -m quantumguard audit .
Scanned 20 files | Assets: 43 | Violations: 0 (Exit 0)
# python -m build (or python -m pip wheel --no-deps --no-build-isolation . -w dist/)
dist/quantumguard_cnsa2-0.2.0-py3-none-any.whl & dist/quantumguard_cnsa2-0.2.0.tar.gz
- Formalized Theory & Lemmas:
executable— Honest 4-step trace witness (ServerCommitted < ClientCommitAckVerified < ClientSendAppData) with zero key leaks.session_key_secrecy— Adversary cannot derivek_c2sork_s2ceven whenReveal_Classical_ECDH_Client/Reveal_Classical_ECDH_Servercompromises classical P-384 ephemeral scalars (assuming honestML-DSA-87identities and uncompromised QKD /ML-KEM-1024).mutual_authentication— Injective agreement between Client and Server on(transcript, qkd_key_id, k_c2s, k_s2c)backed by single-use linearQKD_Client_Token/QKD_Server_Tokenfacts.commit_barrier_consistency— Client linear state transition prohibitsClient_Transmit_AppDatabeforeClient_Recv_CommitAckverifiesSERVER_COMMIT_ACK.
- CI & Local Environment Execution:
- Verified live in GitHub Actions Ubuntu 24.04 CI (Run 47609459438) with
Tamarin version 1.12.0+Maude version 3.5.1(processing time: 22.02s):executable (exists-trace): verified (18 steps),session_key_secrecy (all-traces): verified (10 steps),mutual_authentication (all-traces): verified (71 steps),commit_barrier_consistency (all-traces): verified (10 steps). - On the local Windows host (which lacks a native
tamarin-proverbinary and hascom.docker.servicestopped),formal/quantumguard_handshake.spthyand its CI wiring are additionally checked viatest_formal_tamarin_model_and_ci_wiring. - Docker Hub image note:
infsec/tamarin-prover:latestresolves (HTTP 200), and official releasetamarin-prover-1.12.0-linux64-ubuntu.tar.gzinstalls cleanly on Ubuntu 24.04. Temporary Hugging Face Docker Space attempt returnedHTTP 402(Pro: No; no Space active), andnvidia-nimnim_guard_checkreturnedHTTP 410 Gone(deepseek-ai/deepseek-v4.1-flashEOL).
- Verified live in GitHub Actions Ubuntu 24.04 CI (Run 47609459438) with
LEO Decoy-BB84 Link Budget (500 km, 625 MHz) & Erasure QEC Crossover (benchmarks/satqkd_erasure_bench.py)
- LEO Link Budget: From
15.0°elevation (35.71 dBloss,4.191%QBER,8,397.38 bpsfinite-key SKR) to85.0°zenith (21.18 dBloss,1.903%QBER,367,391.20 bpsSKR). - Noise-Regime Separation (
benchmarks/results.json):- Regime I (
circuit_level_pauli_stim): Evaluates unheralded full circuit-level gate Pauli noise on rotated surface codes (d = 3, 5,10,000shots/point) via Stim. - Regime II (
code_capacity_memory_hold_erasure,1,200shots/point,p = 0.08): Evaluates heralded optical/neutral-atom memory-hold erasure on the satellite buffer using bothblock_lerand normalizedper_logical_qubit_ler = 1 - (1 - block_ler)**(1/k):Surface-d5(rate = 0.0400,n=25, k=1):block_ler/per_logical_qubit_lerdrops from0.0842[0.0698, 0.1012](0%erasure,217.1 ms) to0.0008[0.0001, 0.0047](90%erasure conversion,211.3 ms).BB-qLDPC-[[144,12,12]](rate = 0.0833,n=144, k=12, BP+OSD-cs order 2): at0%erasure (531.6 ms),block_ler = 0.4242[0.3965, 0.4523]corresponds toper_logical_qubit_ler = 0.0450; at90%erasure conversion (95.5 ms), bothblock_lerandper_logical_qubit_lercollapse to0.0000[0.0000, 0.0032]while delivering2.08xthe encoding rate ofd=5rotated surface code.
- Regime I (
QuantumGuard/
├── .github/workflows/
│ ├── ci.yml # Pytest, Bandit, 1000-attack fuzz, CBOM, dudect & Tamarin CI
│ ├── publish-pypi.yml # OIDC PyPI Trusted Publishing release workflow (`quantumguard-cnsa2`)
│ └── quantumguard-cbom.yml # Automated CycloneDX 1.6 CBOM compliance gate
├── assets/
│ └── quantumguard-architecture.svg # Architecture & assurance overview diagram
├── benchmarks/
│ ├── __init__.py
│ ├── results.json # Saved Sat-QKD + Regime I/II Erasure QEC JSON benchmark artifact
│ └── satqkd_erasure_bench.py # LEO finite-key BB84 & Stim vs. BB qLDPC runner
├── dist/ # Built `.whl` and `.tar.gz` artifacts (gitignored)
├── formal/
│ ├── README.md # Tamarin Prover Docker & CI instructions
│ └── quantumguard_handshake.spthy # Symbolic CRQC-resilient handshake model (4 lemmas)
├── quantumguard/
│ ├── __init__.py
│ ├── __main__.py
│ ├── cbom_scanner.py # AST + regex CycloneDX v1.6 scanner & policy gate
│ ├── cli.py # `quantumguard` CLI entrypoint (`kme-mock`, `sidechannel-check`, `bench`)
│ ├── crypto_core.py # ML-KEM-1024, ML-DSA-87, P-384, ETSI 014, UUIDv7 pool, AES-GCM, WC MAC
│ ├── dashboard.py # FastAPI interactive security console
│ ├── guard.py # Compact binary & JSON active downgrade/replay/abort firewall
│ ├── kme_mock.py # FastAPI ETSI GS QKD 014 v1.1.1 HTTP Mock KME server
│ ├── py.typed
│ ├── sidechannel.py # TEC 91011:2026 / dudect Welch's t-test side-channel detector
│ └── tunnel.py # Low-latency asyncio TCP_NODELAY proxy & tunnel
├── tests/
│ ├── vectors/ # SHA-256 verified C2SP Wycheproof & NIST ACVP FIPS 203/204 JSONs
│ ├── test_cbom_and_dashboard.py # CBOM multi-language audit, FastAPI UI, kme-mock & QEC tests
│ ├── test_crypto_core.py # FIPS sizes, KEM, HTTP ETSI 014, UUIDv7 TTL/LRU, HKDF, AEAD & MAC tests
│ ├── test_security_fuzz.py # Hypothesis property fuzzing & Schemathesis ASGI OpenAPI tests
│ ├── test_tunnel_and_guard.py # Live tunnel, proxy bridge, abort & 1,000-attack binary tests
│ └── test_wycheproof_and_kat.py # Wycheproof, NIST ACVP KAT, zeroization, dudect & Tamarin checks
├── .gitignore
├── Dockerfile # Non-root OCI container (port 7860)
├── LICENSE # MIT License
├── pyproject.toml # Package config (`name = "quantumguard-cnsa2"`)
├── README.md
└── SECURITY_AUDIT_REPORT.md