A Non-Invasive Cloud-Based Migration Strategy for Post-Quantum Cybersecurity in Smart HVAC Systems: Architecture, Implementation, and Empirical Evaluation
Organizations: Islamic University of Technology, Gazipur, Bangladesh · Laurentian University, Sudbury, ON, Canada · Centennial College, Toronto, ON, Canada
Abstract
Legacy smart HVAC controllers rely on vendor-cloud TLS secured by ECDH and RSA, both broken by Shor's algorithm, and typical 10-15 year lifespans mean today's devices remain in service through the quantum-threat era. Direct on-device post-quantum cryptography is infeasible: an ESP32-S3, representative of capable HVAC hardware, has only 339 KB free heap against the 900 KB ML-KEM-768 requires, and even classical ECDH-P256 keygen (111.93 ms) dwarfs hardware AES-128 (0.032 ms). We propose a non-invasive PQC proxy, requiring no device, firmware, or vendor-cloud changes, performing ML-KEM-768 encapsulation and ML-DSA-65 authentication (NIST FIPS 203/204) with AES-256-GCM session keys via HKDF, implemented with Open Quantum Safe liboqs on a Raspberry Pi 4B gateway. Over 500 runs, the post-quantum handshake (Steps 1-6) completes in 2.48 ms, 0.38 ms slower than classical baseline, with PQC computation around 8% of handshake time at 20 ms simulated round-trip network latency. The gateway sustains 443 sessions/second, 100% success under 32 concurrent connections, extrapolating to 3546 sessions/second on a 32-core cloud instance. Five side-channel tests, including verified in-place session-key zeroization and a fixed-vs-random TVLA timing analysis, found no exploitable timing leakage or susceptibility to man-in-the-middle attacks. The architecture is vendor-agnostic and becomes unnecessary once vendors adopt NIST PQC natively.
Figures & tables
| Work | No Device | No Cloud | Vendor | HVAC | PQC | Empirical |
| Change | Change | Agnostic | Domain | Standard | Validation | |
| Malina et al. 17 | ✓ | |||||
| Varanasi 36 | ✓ | ✓ | ✓ | |||
| Chhetri 6 | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Fitzgibbon & Ottaviani 9 | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Shahid et al. 32 | ✓ | ✓ |
| Config | Op | Mean (ms) | Std | P95 | Energy (mJ) |
| ECDH-X25519 Ed25519 | keygen | 0.3300 | 0.0865 | 0.5618 | 0.198015 |
| exchange | 0.5950 | 0.0929 | 0.8219 | 0.356998 | |
| sign | 0.2835 | 0.0679 | 0.4620 | 0.170113 | |
| verify | 0.4434 | 0.0735 | 0.6371 | 0.26603 | |
| ML-KEM-512 ML-DSA-44 | keygen | 0.4631 | 0.1553 | 0.8474 | 0.277844 |
| encap | 0.4535 | 0.1423 | 0.8202 | 0.272124 |
| Config | PK (B) | CT (B) | SS (B) | Sig (B) |
| ML-KEM-512 ML-DSA-44 | 800 | 768 | 32 | 2420 |
| ML-KEM-768 ML-DSA-65 | 1184 | 1088 | 32 | 3309 |
| ML-KEM-1024 ML-DSA-87 | 1568 | 1568 | 32 | 4627 |
| Config | Phase | Mean (ms) | Std | P95 | Energy (mJ) |
| ECDH baseline | Handshake (Steps 1–6) | 2.0987 | 0.4578 | 2.9963 | 1.259242 |
| Cmd encrypt | 0.0790 | 0.0286 | 0.1334 | 0.047379 | |
| Cmd decrypt | 0.0369 | 0.0076 | 0.0496 | 0.022154 | |
| ML-KEM-768 proxy | Handshake (Steps 1–6) | 2.4765 | 0.7659 | 3.9971 | 1.485922 |
| Cmd encrypt | 0.0909 | 0.0398 | 0.1803 | 0.054524 | |
| Cmd decrypt | 0.0427 | 0.0160 | 0.0703 | 0.025628 |
| RTT (ms) | Mean (ms) | P95 (ms) | Energy (mJ) |
| 0 | 2.870 | 4.340 | 1.721997 |
| 20 | 43.517 | 44.655 | 26.109944 |
| 50 | 103.599 | 104.588 | 62.159098 |
| 100 | 203.628 | 204.989 | 122.177007 |
| 250 | 503.705 | 504.704 | 302.223219 |
| Deployment Scenario | Sessions / Second |
| Raspberry Pi 4B (1 core) | 110.8 |
| Raspberry Pi 4B (4 cores) | 443.3 |
| Cloud instance (8 cores) | 886.6 |
| Cloud instance (32 cores) | 3546.4 |
| Threads | Success (%) | Mean lat. (ms) | Max lat. (ms) | Sessions/s |
| 1 | 100.0 | 4.07 | 4.07 | 160.7 |
| 2 | 100.0 | 3.34 | 3.43 | 473.6 |
| 4 | 100.0 | 3.06 | 3.45 | 887.9 |
| 8 | 100.0 | 7.41 | 10.32 | 358.2 |
| 16 | 100.0 | 10.55 | 17.35 | 444.5 |
| 32 | 100.0 | 13.92 | 23.87 | 303.6 |
| Hardware | Classical Cryptography | Post-Quantum Cryptography | |||
| Metric | Value | Operation | Latency | Metric | Value |
| Platform | ESP32-S3 | AES-128 | 0.0320 ms | ML-KEM-768 memory | 900 KB |
| CPU frequency | 240 MHz | ECDH-P256 | 111.9270 ms | malloc(900 KB) | FAILED |
| Total SRAM | 380 KB | ML-KEM-768 feasible | No | ||
| Free heap | 339 KB | ||||
| Property | Mechanism | Guarantee |
| Quantum-safe key establishment | ML-KEM-768 20 | Shared secret protected under Module-LWE |
| Per-session forward secrecy | Fresh keypair per session 20 | Past sessions remain unrecoverable |
| Entity authentication | ML-DSA-65 21 | PQC Layer identity authenticated |
| Message confidentiality | AES-256-GCM 18 | Commands remain confidential |
| Message integrity | AES-256-GCM GHASH tag 18 | Ciphertext modification detected |
| Replay resistance | GCM tag per-session nonce registry | Replay attempts detected and rejected |
| Test | Key Result | Status |
| Memory Forensics | Session key not found post-zeroization | ✓ |
| MITM Attack Simulation | ML-DSA-65 raised ValueError, forgery blocked | ✓ |
| Nonce Collision Test | 10,000/10,000 unique, | ✓ |
| TVLA Fixed-vs-Random | (threshold ) | ✓ |
| Operation | Mean (ms) | CV (%) |
| AES-256-GCM (baseline) | 0.1377 | 80.68 |
| PQCProxy.decapsulate() | 1.2326 | 38.80 |
Cybersecurity
Cybersecurity develops methods to protect digital and cyber-physical systems from attacks, vulnerabilities, data loss, and misuse.
See all 355 papers