Internet of Things (IoT) devices have grown up to comprise embedded systems and sensors with the ability to connect, collect, and transmit data over the Internet. Although, solutions to secure IoT systems exist, Class-0 IoT devices with insufficient resources to support such solutions are considered too resource constrained for a secure communication. This paper provides a distributed security mechanism that targets Class-0 IoT devices. The research goal is to secure the entire data path in two segments; device-to-gateway and gateway-to-server data communications. The main concern in the provided solution is that lighter security operations with minimal resource requirements are performed in the device, while heavier tasks are performed in the gateway side. The proposed mechanism utilizes a symmetric encryption for data objects combined with the native wireless security to offer a layered security mechanism between the device and the gateway. In the offered solution, the IoT gateways provide additional protection by securing data using Transport Layer Security (TLS). The real-time experimental evaluations have proven the applicability of the proposed mechanism pertaining to the security assurance and the consumed resources of the target IoT devices.