###### Abstract  
The high level of security requirements and low capabilities of constrained devices that are connected to the Internet of Things (IoT) constitute a new challenge in terms of proposing an authentication solution that deals with the problem of energy constraints. The Host Identity Protocol Diet Exchange (HIP DEX) is primarily designed to be suitable for constrained devices and designed to be resistant to Denial of Service (DoS) and man-in-the-middle (MITM) attacks. In this paper, we propose an efficient saving energy solution to secure end-to-end (E2E) communications based on the compression of the IPv6 over Low Power Wireless Personal Area Networks (6 LoWPAN) header for HIP DEX packets. We implement our solution in an IoT based-WSN over Constrained Application Protocol (CoAP) in the application layer and Routing Protocol for Low power and lossy networks (RPL) in the routing layer. We also propose a novel distribution model that minimizes the number of signaling messages. Both proposed compression and distribution models for HIP DEX combined with an original implementation of an opportunistic association establishment of the handshake, constitute an efficient security solution for IoT. We called our solution Lightweight Compressed HIP DEX in the IoT (LC-DEX). Lightweight Authentication; Wireless Sensor Network; Internet of Things; 6 LoWPAN; CoAP; RPL; mesh-under; energy consumption; opportunistic mode +
Footnote †: 2021  
the most based-IoT unit [3] that we qualify as the IoT-backbone. For these reasons, research is focused on lightening existing protocols that are compliant with IP-based standards, to be suitable with WSN constraints. Being interested in studying security protocols and techniques in IoT, we can conclude that the most adaptation IP-based protocols includes Datagram Transport Layer Security (DTLS) [4], HIP DEX [5], a minimal Internet Key Exchange (IKEv2) [6] and Extensible Authentication Protocol (EAP) [7]. HIP DEX was standardized to be suitable with low power and resources constrained devices in IEEE 802.15 networks and used as a keying material in the MAC layer. While the existing authentication and key generation protocols are adapted to be suitable for constrained environments, HIP DEX was standardized to deal with the constraints of IoT and is also strong against Denial of Service attacks by its puzzle mechanism. The most difficult challenge is to propose an authentication solution that perform both high level of security in the connection establishment and low-energy consumption by the IoT device. HIP-based solutions constitute a revolution in this field since they provide multihoming and mobility of devices by decoupling the double function of IP addresses as geographical locator and device identifier. Several works focused on proposing IP-based solutions with compression techniques, minimizing exchanged messages to optimize the communication overhead, and on computation acceleration or distribution techniques. So, privacy and individual information related to mobility and health status are more critical when WSNs become opened to the Internet. In our previous works [8], we demonstrated the efficiency of HIP DEX in establishing a M2T secure association, and in [9], we proposed an efficient compression header of HIP DEX protocol over 6 LoWPAN in a T2T architecture. Evaluation results in terms of transmission delays during the handshake minimize considerably the communication overhead between the communicating peers (the initiator and the responder). Obtained results, in [9], are exploited in this paper to evaluate the energy consumption during the handshake. This work is an extended version of our recent conference paper [9] with amelioration of the proposed compression technique. We implemented HIP DEX as a Linux daemon that could be executed under any sensor node that supports either Linux and Contiki OS. This implementation was coded with the best support of IPv4, IPv6, and 6 LoWPAN protocols and tested on mesh-under network architecture.