8 phases of post-quantum security upgrades wired into the V100 TURN server. Every credential signed with ML-DSA. Every hash upgraded to SHA3-256. Every media packet validated for encryption.
March 5, 2026 — Ship Night
This is a dated hardening record: each phase below is an operational control change with its own test evidence, the kind of durable record HATS records and monitors so that “protection stayed true” is reproducible rather than asserted. The counts and the ~60µs sign latency are engineering measurements from this build only — they show the changes shipped and passed their tests; they do not by themselves establish a security level (that follows from the algorithms used, e.g. ML-DSA / SHA3-256) or a compliance status. Performance is not security, and neither is compliance.
Replaced ring::SHA256 with sha3::Sha3_256 in the security audit log hash chain. Every audit entry now uses a post-quantum safe hash function.
DashMap-based per-IP token bucket rate limiter on the STUN/TURN hot path. Lock-free for zero contention on UDP packet processing.
Origin header validation, Bearer token authentication, payload size enforcement, and SDP size limits on the signaling WebSocket.
Every TURN allocation now receives a ML-DSA-signed post-quantum credential. ExpandedSigner pre-computes NTT keys at startup for ~60µs signing (vs ~244µs cold). Fail-open: standard HMAC auth continues if H33 is unavailable.
All relay data paths now validate packets are encrypted (SRTP/SRTCP). Plaintext RTP is dropped. Conservative heuristic: STUN, DTLS, and unknown protocols pass through.
API key hashing upgraded from ring::SHA256 to SHA3-256. Resistant to Grover's algorithm quantum speedup on hash preimage.
Webhook payloads now dual-signed: HMAC-SHA256 (backward compat) + Dilithium ML-DSA-65 (post-quantum). Customers verify with our public key — no shared secret leakage risk.
STUN nonces now derived from SHA3-256(timestamp || 16 random bytes). Prevents nonce prediction attacks that could bypass TURN authentication challenges.
| Component | Before | After | H33 Primitive |
|---|---|---|---|
| Audit chain hash | SHA-256 (ring) | SHA3-256 PQ | sha3::Sha3_256 |
| API key hashing | SHA-256 (ring) | SHA3-256 PQ | sha3::Sha3_256 |
| TURN credentials | HMAC-SHA1 only | ML-DSA + ZKP PQ | ExpandedSigner |
| Webhook signatures | HMAC-SHA256 only | ML-DSA + HMAC PQ | ExpandedSigner |
| ICE credentials | HMAC only | HMAC + PQ credential PQ | H33CredentialService |
| STUN nonces | timestamp-uuid | SHA3-256 derived PQ | sha3::Sha3_256 |
| STUN rate limiting | Generic per-IP | Per-method DashMap buckets | DashMap |
| Media relay | Raw UDP forward | SRTP-validated forward | is_likely_srtp() |
| WebSocket auth | None | Origin + Bearer token | — |
| Primitive | Source | Usage in V100 | Performance |
|---|---|---|---|
| ML-DSA ExpandedSigner | src/pqc/dilithium.rs |
Credential signing, webhook signing, relay attestation | ~60µs/sign |
| SHA3-256 | sha3 crate |
Audit hashing, API key hashing, STUN nonces, credential IDs | <1µs |
| DashMap | dashmap crate |
STUN rate limiter, ZKP proof cache, credential revocation | 0.085µs/lookup |
| ZKP STARK Lookup | src/zkp/zk_lookup.rs |
Credential authorization proofs (no PII in credential) | 0.085µs cached |
| BFV FHE | src/fhe/bfv.rs |
Encrypted session state, homomorphic billing counters | ~1,109µs/batch |
| ML-KEM Hybrid | src/pqc/hybrid.rs |
Domain separation (build_aad), token encryption | ~50µs |
cargo test -p v100-turn
844 passed; 0 failed; 0 ignored — finished in 5.73s