# Security Framework for IoT Based Real-Time Health Applications
## 3 IoT Layered Architecture  
According to many studies, the IoT works in three layers: perception, network, and application layers. The flow of data through these layers is shown in Figure 1. In [46], each layer has some security problems like confidentiality, integrity, and authenticity due to human involvement. The involvement of humans has increased the sensitivity; that is why collected data from the individuals and patients requires the system's permission to access the records. Such a privacy concern limits the users in getting the full advantage of the system. The security of healthcare data is paramount; thus, to secure the authenticity, integrity, and confidentiality of data, we need to develop a security framework for the real-time health monitoring system. There are many security frameworks and devices already in use by health technicians and paramedic. These systems, however, become absurd over time. Moreover, our previous efforts in this regard also support our words (see [42; 43; 44; 45; 46; 47; 48; 49; 50]). As mentioned above, IoT works in layered manners, and each layer has security loopholes that are needed to resolve strong security concerns. The first layer is the physical layer, also known as the perception layer. Data is sensed from the surroundings in terms of temperature, humidity, location, etc., through the sensor devices transmitted to the network layer. The network layer's data is routed and transmitted to different IoT hubs and devices using some emerging technologies, e.g., Wi-Fi, Bluetooth, ZigBee, and 4G LTE. The communication between other platforms like cloud computing and gateways routers has been done due to these technologies. Gateways serve as middleware between two or more different IoT nodes of the network to transmit the data. The application layer ensures the security triad confidentiality integrity and authenticity of the data through this layer. All the applications that have been deployed with IoT are defined on the application layer. The application layer provides an interface between the end devices and the network. This layer provides the services to the applications; the services may vary for each application due to the sensors' information. In recent years, WBAN technology has been increasingly used in healthcare. Numerous medical devices can be used or implanted and integrated into the WBAN to monitor patient health, treat patients with automated therapies, and more. The traditional architecture of e-health with IoT can be seen in Figure 2. These systems must protect data during collection, transmission, processing, and storing. A WBAN device is made up of smart, low-powered sensor nodes. WBAN is a wireless network composed of connected sensors capable of calculating and gathering data on a user's health situation. The patients can wear the sensors on different parts of the body and keep this under the skin. Figure 1: Flow of data from the patient to healthcare systems. The patient's psychological condition can be monitored through the sensors embedded in wireless body area networks, and the information gathered through these sensors is then forwarded to the physicians and hospitals. The transfer of health-related information between sensors of the human body and the healthcare monitoring system must be encrypted so that the patient's vital information that is being exchanged over the network remains secure and private. An IoT-based healthcare domain consists of portable WBAN sensors and devices that the patient carries with them all time, as showed in Figure 2. Sensors get the data from the surroundings and then send them to the network or cloud, where the data is analyzed, and significant decisions are taken. In the healthcare domain, a single bit of change in a patient's data can lead to serious consequences or even death. Security can be divided into two broader terms: physical security and virtual security. Physical security in the IoT deals with technological equipment like hardware and sensor devices.