Fog-based secure communications for low-power IoT devices