# Mutual Authentication Protocol for D2D Communications in a Cloud-Based E-Health System
## 1 Introduction  
Among the several applications for the development of the Internet of Things (IoT), Electronic-health(e-health)/Mobile-health(m-health) aim at providing health services through information and communication technologies. Such applications include, for example, monitoring by sensors coupled to the body of patients and connected by a wireless body area network (WBAN), diagnosis and remote provisioning of health services to patients over public channels. The assistance of cloud servers is an alternative to supplying the large demands of storage and processing generated by multiple medical service providers and increasing operational efficiency. In Telecare Medical Information Systems (TMIS), doctors and patients can be assisted by a cloud server; patients send a report containing the sensors' measures to the cloud server and a doctor collects the data, provides diagnosis and finally sends a diagnosis report to the cloud server. Both data exchanges are performed through public channels. Additionally, the use of cloud servers as auxiliaries to storage and processing in e-health/m-health/TMIS requires special attention, due to the high sensitivity of the information exchanged with the cloud server and the entities involved. Information from the sensor measurements report and patient diagnosis can be crucial for saving lives and must not be accessed or modified by possible attackers. A good example is the anonymity of entities, since the user of those systems may not be interested in having their identity disclosed. The disclosure of a patient's identity can leave it vulnerable to the action of attackers against his/her life, or the access to personal information. One of the requirements for proper functioning of e-health/m-health/TMIS and other systems for the IoT is reductions in both the consumption of computational and communication resources for energy saving and the congestionon communication channels, given a large number of new emerging devices. Therefore, computational costs must be reduced for the optimization of power resources. On the other hand, device-to-device (D2D) communication, commonly implemented by ad hoc wireless networks, enables patients' devices to connect directly to a medical entity to send health data collected by sensors and receive diagnoses faster than in the traditional way. The constant monitoring of patients and analyses of health reports are crucial for the avoidance of medical conditions, such as strokes and heart attacks, because the chances of a person being sick can be detected much faster. D2D communication provides a direct connection of devices with or without the intervention of traditional network infrastructure (e.g., 3 rd Generation Partnership Project (3 GPP) standards). Therefore, the ability to connect devices can provide data offload through nearby devices directly, thus reducing problems, such as congestion and scarcity of spectrum, and expanding network coverage by enabling devices to relay their data. D2D communication is promising for 5G technology and IoT due to its adaptation to support small and resource-constrained devices predicted by those two technologies. However, security schemes for D2D communication are still in the initial development stages, which require more research and studies for their improvement and consolidation, in addition to authentication and key agreement protocols adapted to them. D2D is suitable for e-health/m-health/TMIS since it can accelerate the transmission of data and provide a connection to devices located outside the coverage of 3 GPP networks. This might be the key for the success of e-health/m-health/TMIS applications, because most data exchanged provide information on patients' health, e.g., heartbeat, blood sugar, and pressure, which is sensitive to delays for saving lives. Moreover, since e-health/m-health/TMIS devices are mostly resource-constrained, they require adapted traditional authentication protocols that consider their limitations and avoid costly data exchanges and computations.