8 phases of post-quantum security upgrades wired into the V100 TURN server. Every credential signed with Dilithium. Every hash upgraded to SHA3-256. Every media packet validated for encryption.
March 5, 2026 — Ship Night
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 Dilithium-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 | Dilithium + ZKP PQ | ExpandedSigner |
| Webhook signatures | HMAC-SHA256 only | Dilithium + 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 |
|---|---|---|---|
| Dilithium 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 |
| Kyber 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