# Mutual Authentication Protocol for D2D Communications in a Cloud-Based E-Health System
## 2 M-Health Environments and Device-to-Device (D2D) Communication  
M-health environments have grown with the emergence of technologies such as the IoT. Many applications have been developed, thus enabling the sharing of health information in real time among doctors and specialists. Some m-health systems consider groups of sensors coupled to a patient's body: they send measurements to a mobile device and information to a gateway that can route the patient's information to the respective health center. Consequently, both the number of devices and corresponding volume of exchanged data have increased and required a new perspective on the communication of small devices, especially when the scarcity of bandwidth is considered, which imposes reductions in the demand for radio resources. High-quality healthcare services, such as remote monitoring, mobile telemedicine, remote disease diagnosis, and emergency care, require the assurance of security of both system and communication channels through which messages are exchanged. Since m-health aims to provide the monitoring and evaluation of vital signs and other important health information on patients and emergency situations 24 h a day and seven days a week, an important alternative is to use D2D communication for directly connecting devices, while maintaining control of resource allocation by the cellular network. D2D communication refers to a direct communication between two mobile devices, i.e., communication that passes no cellular base station (BS) or network core [2], thus offering multiple services based on the proximity of the devices. The benefits of D2D communications regarding the requirements imposed by the 5G networks include higher data rate, low delay, coverage extension, reliability in communications, reduction of demands imposed over cellular networks by the use of traffic offloading, and instantaneous communications between devices [3]. Moreover, D2D communications can increase the spectral efficiency of the network and potentially improve throughput and energy efficiency [2]. Different levels of control and management of D2D communication are required by the operator. This operator has either no control, or full or partial control over the resource allocation among source, destination, and relay devices. According to the functionalities associated with the cellular infrastructure, the following types of D2D communications can be defined ([PERSON] and [PERSON] [4], Llerena, Y.P. [5]):  
* D2D communication with the establishment of an operator-controlled connection: source and destination devices talk and exchange data with each other without a BS; however, they are served by a BS to establish the link. * D2D communication with the establishment of a device-controlled connection: source and destination devices communicate directly with each other with no operator control and must implement methods that guarantee limited interference with other devices on both the same layer and macrocell layer. In this study, we have considered D2D communication with establishing/managing connection through the cellular infrastructure. Among its advantages are possible offloading between the mobile network and the D2D network, and efficient allocation of the spectrum if inband D2D is used [5]. Therefore, if some information collected by a sensor used by a patient is to be transmitted through a cellular network and indicates an emergency which demands rapid decision and actuation by a physician and/or a health center, D2D communications are an excellent alternative for its rapid transmission. Moreover, regarding the protocol that uses D2D communications, D2D-based authentication protocols could be especially adapted to m-health architecture, thus reducing delays, dependency on 3 GPP core network, and costs of message exchange.