Abstract
Fog computing enables low-latency IoT applications but introduces critical privacy risks when fog nodes are untrusted. Existing privacy frameworks address cloud security or basic fog encryption, yet none provide comprehensive user-centric privacy enforcement with fine-grained preference composition for distributed IoT-fog-cloud architectures. This paper presents PrivacyGuard, a novel four-tier privacy-preserving framework for personal IoT data protection with untrusted fog infrastructure. Key innovations include: an edge layer for hierarchical privacy preferences with exceptions; GDPR-compliant data and purpose taxonomies supporting fine-grained control; automated privacy preference composition for multi-source data fusion; TEE-based privacy validation enabling secure computation on encrypted data at fog nodes; and hash-based result caching optimized for high-latency rural networks. Empirical results demonstrate sub-100ms P99 latency (97.03ms) for single requests, graceful degradation to 2,059ms under 100 concurrent users, 91.7% MITM resistance, and 6.37× cache speedup.