Internet of Medical Things Privacy and Security: Challenges, Solutions, and Future Trends from a New Perspective

: The Internet of Medical Things (IoMT), an application of the Internet of Things (IoT) in the medical domain, allows data to be transmitted across communication networks. In particular, IoMT can help improve the quality of life of citizens and older people by monitoring and managing the body’s vital signs, including blood pressure, temperature, heart rate, and others. Since IoMT has become the main platform for information exchange and making high-level decisions, it is necessary to guarantee its reliability and security. The growth of IoMT in recent decades has attracted the interest of many experts. This study provides an in-depth analysis of IoT and IoMT by focusing on security concerns from different points of view, making this comprehensive survey unique compared to other existing studies. A total of 187 articles from 2010 to 2022 are collected and categorized according to the type of applications, year of publications, variety of applications, and other novel perspectives. We compare the current studies based on the above criteria and provide a comprehensive analysis to pave the way for researchers working in this area. In addition, we highlight the trends and future work. We have found that blockchain, as a key technology, has solved many problems of security, authentication, and maintenance of IoT systems due to the decentralized nature of the blockchain. In the current study, this technology is examined from the application ﬁelds’ points of view, especially in the health sector, due to its additional importance compared to other ﬁelds.


Introduction
The Internet is a vast information network and database that is now intertwined with various aspects of life. With the advancement of science and technology, the Internet and computer network technologies have affected the economy, military, and politics [1]. With the advent of the Internet, human communication has undergone a fundamental revolution. Therefore, these communications have entered a new phase of communication. In the emerging stage of the Internet, communication is no longer limited to humans. Instead, it is about intelligent, interconnected devices that gave rise to the Internet of Things (IoT) concept. More than a decade has passed since the introduction of the concept of IoT. It aims to link various devices over the Internet. An IoT device is a system that incorporates sensors, actuators, or both. It connects to the Internet directly or through another component [2]. It opens up possibilities for directly integrating the physical world with computer-based systems. Systems, such as smart cars, refrigerators, and homes are mentioned in various topics these days. The International Telecommunication Union defines IoT as an infrastructure that combines physical and virtual devices. The IoT finds its application in almost any field to provide an advanced mode of communication between different devices and systems More appropriate product control Improves production processes Following the review and comparison of the current study with previous studies by reviewing the literature, the novel contributions of this study in summary are as follows: (1) Classification of studies conducted in improving security in IoT and IoMT according to different application fields. (2) After classifying studies according to different application fields, we compare and evaluate the collected studies from different aspects, including the fields of application, year of publication, publisher, and so on, in schematic form. (3) The classification of studies based on the most important approach used in improving security according to their main application contexts. (4) Identifying approaches to maintain and improve security in IoT. (5) Blockchain technology is also investigated in this study, especially in the medical field.

Research Questions
The authors' perspective of the current research study is to provide a comprehensive overview of security in the IoT and IoMT and examine the practical aspects that can serve as a search engine for easy access to scientific and research documentation. In this regard, the review analysis conducted in this field is based on the following research questions: (1) What is the classification and comparison of the most important areas of security work in IoT? (2) What is the most important approach used to enhance security in IoMT? (3) What are the application areas of the blockchain approach and its classification? (4) What are the application areas of the blockchain approach in the health field?
In the next step, we identify the most important and latest approaches to improve security in IoMT. The rest of the paper is organized in the following manner. Section 2 describes IoT, its definition, characteristics, and architecture. Section 3 describes the Internet of Medical Things. Section 4 contains the blockchain and its application. Finally, Section 5 concludes this research and explains future trends. Figure 1 depicts a four-layer service-oriented architecture of IoT in terms of its functions [5,6].

IoT Architecture and Applications
(1) What is the classification and comparison of the most important areas of security work in IoT? (2) What is the most important approach used to enhance security in IoMT? (3) What are the application areas of the blockchain approach and its classification? (4) What are the application areas of the blockchain approach in the health field?
In the next step, we identify the most important and latest approaches to improve security in IoMT.
The rest of the paper is organized in the following manner. Section 2 describes IoT, its definition, characteristics, and architecture. Section 3 describes the Internet of Medical Things. Section 4 contains the blockchain and its application. Finally, Section 5 concludes this research and explains future trends. Figure 1 depicts a four-layer service-oriented architecture of IoT in terms of its functions [5,6]. As shown in Figure 1, to have a fully service-oriented IoT architecture, four layers should be included, namely the sensing layer, network layer, service layer, and interface layer.

Research Process
The research process of this study consisted of six search stages. The search was performed on well-known online databases, such as IEEE, ScienceDirect, Springer, MDPI, Google Scholar, etc. The search approach used in the current study is shown in Figure 2, which has the following steps.

Interface layer
Service layer

Network layer
Sensing layer As shown in Figure 1, to have a fully service-oriented IoT architecture, four layers should be included, namely the sensing layer, network layer, service layer, and interface layer.

Research Process
The research process of this study consisted of six search stages. The search was performed on well-known online databases, such as IEEE, ScienceDirect, Springer, MDPI, Google Scholar, etc. The search approach used in the current study is shown in Figure 2, which has the following steps. Step 1: Collect articles by keywords In order to provide more accurate results and compare the results, in this section, we consider IoMT and IoT applications in other domains. This step was performed in the first  Step 1: Collect articles by keywords In order to provide more accurate results and compare the results, in this section, we consider IoMT and IoT applications in other domains. This step was performed in the first stage of collecting articles by using the following keywords: ("IoT" and "Transportation"), ("IoT" and "Medical") ("IoT" and "Business") ("IoT" and "Military") ("IoT" and "Education") ("IoT" and "Manufacturing" or "Industry") ("IoT" and "Smart Cities") ("IoT" and "Smart Grids") ("IoT" and "Agriculture") ("IoT" and "Smart Home") ("IoT" and "Supply Chain") ("IoT" and "Banking System") A total of 1233 articles were collected using these keywords and by searching databases.
Step 2: Add more keywords The first task is classifying security-related articles in the IoT by their field of application, including IoMT, E-healthcare, and others. In the second step of the search process, we filter the articles collected in the previous step by adding more keywords. We used the following keywords: ("IoT" and "Security" and "Transportation") ("IoT" and "Security" and "Medical") ("IoT" and "Security" and "Business") ("IoT" and "Security" and "Military") ("IoT" and "Security" and "Education") ("IoT" and "Security" and "Manufacturing" or "Industry") ("IoT" and "Security" and "Smart Cities") ("IoT" and "Security" and "Smart Grids") ("IoT" and "Security" and "Agriculture") ("IoT" and "Security" and "SmartHome"), ("IoT" and "Security" and "Supply Chain") ("IoT" and "Security" and "Banking Systems") Upon filtering and modifying the search, the number of articles collected in the previous step was reduced to 641.
Step 3: Remove irrelevant articles and articles published on unreliable sites At this stage of the search process, through reading the abstract, articles irrelevant to the current study, articles from unreliable sources, and duplicate articles were removed. As a result, 275 of 641 articles filtered in the previous stage were obtained as articles in line with the research topic and published in valid databases.
Step 4: Define the criteria for the collected articles: At this stage, to further improve the results that have been filtered so far, we considered additional criteria for retaining articles as follows: Criterion 1-Articles that include security applications in IoT (generalized point of view), especially in the medical field. Criterion 2-Articles published in invalid databases.
Finally, after filtering according to the above criteria, we obtained 147 articles.
Step 5: Finalize and sort the collected articles We used databases, keywords, and retention criteria to remove irrelevant and duplicate articles. We then ensured that the remaining articles were relevant to applying IoT (generalized point of view). On the other hand, at this point during this search process, we were sure that the collected articles were not impartial and biased, and we entered the next stage, which was one of the most important parts of the current study.

Research on IoT from Different Perspectives
In this section, we investigate IoT from different points of view, including years and well-known publishers. This analysis and comparison benefits researchers in academia and industry, especially new researchers. Considering the above, we have decided to categorize the collected articles in network security based on the years of publication in this section. This classification shows a growing trend in interest regarding IoT security. The number of articles published on IoT security has been growing from 2011 to 2022 ( Figure 3). next stage, which was one of the most important parts of the current study.

Research on IoT from Different Perspectives
In this section, we investigate IoT from different points of view, including years and well-known publishers. This analysis and comparison benefits researchers in academia and industry, especially new researchers.

Analysis Based on the Year of Publication of Articles
Considering the above, we have decided to categorize the collected articles in network security based on the years of publication in this section. This classification shows a growing trend in interest regarding IoT security. The number of articles published on IoT security has been growing from 2011 to 2022 ( Figure 3). In other words, the need for security has doubled with the increasing use of IoT in various fields and its impact on different aspects of life. Therefore, this issue has become a significant challenge that has attracted the attention of many researchers. Every year, many researchers aim to provide solutions to maintain and improve security in IoT.  In other words, the need for security has doubled with the increasing use of IoT in various fields and its impact on different aspects of life. Therefore, this issue has become a significant challenge that has attracted the attention of many researchers. Every year, many researchers aim to provide solutions to maintain and improve security in IoT.

IoT Publication Analysis
According to a wide range of scientific journals around the world and following the reviews of IoT-related research papers, in this section, we review the journals that publish research papers in this field and related topics. Some leading journals in this field can be seen in Figure 4.
Considering Figure 4, it is clear that the IEEE has been at the forefront of publishing security in IoT research over other journals. Springer is the second-largest publisher of IoT security articles. Concerning Figure 4, the chart highlights the journals that have led the way in publishing IoT security publications over other journals. According to the sample, 136 articles gathered for this study are shown between 2010 and 2022. Comparison based on the publishers shows how active they are, which leads to this result. For example, Emerald does not seem interested in publishing papers about IoT too much. Thus, authors can ignore it and submit their works elsewhere. According to a wide range of scientific journals around the world and following the reviews of IoT-related research papers, in this section, we review the journals that publish research papers in this field and related topics. Some leading journals in this field can be seen in Figure 4. Considering Figure 4, it is clear that the IEEE has been at the forefront of publishing security in IoT research over other journals. Springer is the second-largest publisher of IoT security articles. Concerning Figure 4, the chart highlights the journals that have led the way in publishing IoT security publications over other journals. According to the sample, 136 articles gathered for this study are shown between 2010 and 2022. Comparison based on the publishers shows how active they are, which leads to this result. For example, Emerald does not seem interested in publishing papers about IoT too much. Thus, authors can ignore it and submit their works elsewhere.

Analysis of IoT Security in Different Domains
When we are in intelligent environments and technologies, such as IoT, we must spend extra time and energy recognizing security challenges and solutions. In other words, since all objects use the Internet infrastructure to exchange information, it has exposed various security issues. Multiple reasons have led to the slow development of this concept, such as the lack of development of required technologies and security challenges.
Security has been introduced as one of the fundamental challenges of IoT. This issue happens because of the unique nature of security and its implementation in IoT networks, which differ from regular wired and wireless networks. The main reasons for the need for IoT security are as follows [7][8][9]: (1) The IoT is a multifunctional paradigm with many applications and requirements.
This nature illustrates the enormous complexity of such systems through broad IoT implementations. (2) IoT systems are immensely varied in protocols, platforms, and devices available globally, mainly comprising restricted resources, lossy connectivity, and lack of standardization.

Analysis of IoT Security in Different Domains
When we are in intelligent environments and technologies, such as IoT, we must spend extra time and energy recognizing security challenges and solutions. In other words, since all objects use the Internet infrastructure to exchange information, it has exposed various security issues. Multiple reasons have led to the slow development of this concept, such as the lack of development of required technologies and security challenges.
Security has been introduced as one of the fundamental challenges of IoT. This issue happens because of the unique nature of security and its implementation in IoT networks, which differ from regular wired and wireless networks. The main reasons for the need for IoT security are as follows [7][8][9]: (1) The IoT is a multifunctional paradigm with many applications and requirements.
This nature illustrates the enormous complexity of such systems through broad IoT implementations. (2) IoT systems are immensely varied in protocols, platforms, and devices available globally, mainly comprising restricted resources, lossy connectivity, and lack of standardization. (3) IoT devices are mostly configured to self-adapt to their environment. An effective IoT security solution that secures each device separately and provides an end-to-end security solution must be presented.
In the first phase, research studies on IoT security were gathered. As a result, from 2010 to 2022, about 136 papers on this topic were collected. The published publications in high-quality journals were divided into 12 categories based on the application area.

Articles Collected for Each Application
In this section, we examine other IoT application fields. Thus, the collected articles were independently divided into groups based on their application. The categorization can be seen in Table 2. In order to make a transparent review and comparison, these reviews and comparisons are made in the form of figures. IoT security and business [66-71] 4 IoT security and military [72-81] 5 IoT security and education [82-87] 6 IoT security and industry [88-90] 7 IoT security and smart cities [91-103] 8 IoT security and smart grid [104-113] 9 IoT security and agriculture [114-124] 10 IoT security and smart home [125-134] 11 IoT security and supply chain [135-142] 12 IoT security and banking system [143,144]

Leveraged Approaches in IoT Security Applications
In this section, we review the approaches used in IoT security. This review can be seen in the form of Table 3. It shows the approaches that each IoT application is using. In this table, the number of articles in each category is specified.

Leveraged Approaches in IoT Security Applications
In this section, we review the approaches used in IoT security. This review can be seen in the form of Table 3. It shows the approaches that each IoT application is using. In this table, the number of articles in each category is specified.  As mentioned earlier, the primary goal of this research is to examine previous studies on IoMT security and its nearby applications. In this regard, after collecting scientific articles, we entered the stage of interpretation and study. To perform this step and create comfortable and transparent evaluations, we decided to perform the interpretations in graphs at this stage. The IoT security papers are leveraging several well-known approaches, including artificial intelligence (AI), blockchain technology, fog computing, intrusion detection systems, cyber-physical systems, cloud technologies, authentication and anonymity, encryption method, encrypting communications, edge computing, the 6LoWPAN technique, and 5G cellular networks. In order to explain this diagram, it can be stated that each of the collected articles was studied in 12 categories in Table 2 to identify the adopted approach. These articles were re-categorized in each category based on IoT Security upgrade approaches. For this purpose, in Table 3, 40 articles are considered based on the approach used in the column related to medical applications. It is clear from this column that six articles have used the "Authentication and Anonymity" approach, five articles use the "AI" approach, three articles use the "embedded encryption algorithm" approach, and so on. The above review was performed for each of the 12 categories formed for the "IoT and IoMT Security method". After identifying these approaches in all articles as shown in Table 3, in many cases, the "privacy analysis" and "IoT security" using the "AI" approach have grabbed the interest of many researchers. The following is a brief introduction to this topic.
In this context, AI is a new technology science that simulates and extends human thought processes, methods, technology, and applications. Furthermore, AI can be divided into three categories, namely weak AI, strong AI, and super AI. Machine learning (ML), natural language processing (NLP), robots, computer vision, and expert systems are some of the key technologies of AI. Of these, ML is one of the most important AI technologies. It analyzes a large quantity of data to identify potential laws that can be used to guide human decision making. Deep learning (DL) is considered to be the most representative branch of machine learning. It has a multilayer perceptron structure containing multiple hidden layers, which facilitates the discovery of deeper rules in the data and provides robust feature extraction. The most common deep learning models are the convolutional neural network (CNN), the deep belief network (DBN), and the stacked autoencoder network (SAN). This ML technology can be used in the medical field to identify and diagnose diseases, which largely avoids the high error rate, low efficiency, and the emergence of many diseases associated with inaccurate diagnosis.
In medical treatment, AI technology is bringing technological innovation and altering the way that medical services are provided.

Internet of Medical Things
Many regions of the world face a great challenge in managing rapidly aging populations, people with chronic diseases, child mortality, frequent outbreaks of disease epidemics, harsh living environments with poor mental health, lack of drinking water resources, and increasing pollution. Although the global demand for medical services has increased in recent years, we still live in the traditional hospital-based model of care, where citizens visit a physician when they are sick. To manage their chronic disease, patients frequently visit hospitals or clinics for doctors to perform observations that include monitoring disease progression as well as clinical decision making that leads to treatment adjustments. In general, hospitals use a disease-and physician-centered model that is more reactive and does not involve patients as an active part of the medical process. We briefly list some of the challenges and obstacles facing hospital-based medical practices, as follows: (1) Limited time; (2) Adherence monitoring; (3) Aging population; (4) Urbanization; (5) Health care workforce shortage [145].
The IoT technology has affected medical systems in a way to support advanced medical services. The advancement of IoT technology has revolutionized how we enact activities that improve people's lives economically, professionally, and socially. The health sector cannot avoid using all these tools to benefit health care. Here, IoT-connected medical devices (Internet of Medical Things or IoMT) proactively report system drain information to operators to prevent device shutdowns. Remote monitoring can be effectively enabled with IoT-connected medical devices. Sensors attached to patients can record health data and then share this data with medical staff via wireless communication. As such, IoT technology in medical environments facilitates the management of the healthcare system and creates many possibilities for medical services, namely IoMT [146].
Here, IoMT is the connection of various medical devices and applications through computer networks. These devices allow direct communication between their servers and medical personnel. The data collected, stored, and processed by all these devices provide valuable information to humanity. Recent studies show that this information is the key to health care and prevents some diseases. Other scientific studies have shown that many diseases affecting humans are likely to be avoided by changing environments and lifestyles.

How IoMT Works
Data are collected and sent by the medical staff using computer devices and networks for analysis and storage in the cloud. After that, these data become information for personnel decision making.
There are a wide range of devices used in the health field, including the following: • External portable devices; for example, devices that monitor blood pressure, glucose, temperature, etc. • Implanted devices; for example, pacemakers, infusion pumps, drug delivery devices, glucose monitors, etc. • Stationary medical devices; X-ray and magnetic resonance devices, patient monitoring [147].

Selected Current Studies on IoMT
In this section, to clarify current studies, we explain our reasons for selecting them, which are as follows: The blockchain was examined by Alam and Shuaib [148] in conjunction with fog computing to mitigate the impact of health difficulties. According to this research, blockchain technology can potentially overcome the security concerns associated with fog computing.
Ullah and Khan [149] presented a multi-message and multi-receiver encryption strategy for an IoMT system. It ensures receivers' privacy, integrity, and anonymity in multicast channels under the random oracle model (ROM). To encrypt and authenticate signatures, the proposed scheme utilizes hyperelliptic curve cryptography.
Chaganti and Mourade [150] implemented a robust and reliable intrusion detection system in IoMT using a deep neural network and particle swarm optimization algorithm. The proposed system is more accurate than the existing methods, with a 97% accuracy rate in detecting network intrusions. Rahmani and Hosseini Mirmahaleh [151] developed a flexible clustering algorithm to classify the healthcare service providers in order to detect faults on time and select the appropriate servers to join the cluster by considering the priority of services and applications.
Alsubaei and Abuhussein [152] presented a taxonomy of IoMT security and privacy concerns based on various features of attackers, including difficulty, severity, source, method, impact, and compromise level. This taxonomy is updatable and expandable to cover new services, devices, and attacks. Hatzivasilis and Soultatos [153] presented a comprehensive analysis of basic security and privacy policies required in current IoMT scenarios to protect various stakeholders and users. The entire strategy can be regarded as a roadmap toward the safe deployment of IoMT systems, incorporating a circular economy. Sun, Lo [154] reviewed the security and privacy challenges and requirements of IoMT-based healthcare systems from the data level to the medical server level. The use of biometrics in IoMT healthcare systems was also discussed. A discussion of security schemes for implantable IoMT devices is also discussed in this paper, as medical implantable devices suffer from unique hardware challenges.
Koutras and Stergiopoulos [155] classified IoT communication protocols, considering their applications in IoMT. Then, they described the key features of IoT communication protocols adopted at the different medical device layers. They examined the security characteristics and restrictions of IoMT-specific communication protocols. Based on realistic attacks, they identified existing mitigation controls that may be useful to secure IoMT communications and current research and implementation gaps. Ghubaish and Salman [156] presented novel methods for protecting IoMT data during gathering, exchange, and storage. Their comprehensive overview covers both physical and network attacks on IoMT systems. The study results revealed that most security techniques ignore various types of attacks. Therefore, they proposed a security model that integrates multiple security approaches. The model addresses most of the known attacks against IoMT security.
Comprehensively and systematically, Hameed and Hassan [157] discussed the IoMT security and privacy issues and how machine learning approaches can be used to address them. The designated research questions are addressed by analyzing the study's methodology, good features, limitations, tools, and datasets. The results of this study indicate that machine learning techniques can effectively address IoMT security issues. As attacks on devices, such as IMDs, threaten patients' health and well-being, most studies focus on device layer or body area network security. Security solutions include anomaly detection, authentication, and access control in such devices. Awotunde, Jimoh [158] presented an overview of IoT, outlining its architecture and revealing the IoT-based healthcare application security and privacy issues. Additionally, they proposed an approach to secure healthcare information in the IoT environment. The approach protects healthcare data on the IoT platform and meets the strict privacy and security requirements of ubiquitous medical requests.
Hasan and Ghazal [159] outlined vulnerabilities potentially compromising the security, reliability, and privacy of IoMT systems. Research has revealed that IoMT can be attacked in various ways, notably eavesdropping, malware, and DoS attacks. Furthermore, IoMT faces various threats, including confidentiality, privacy, and security. Cryptographic techniques are emerging to boost the reliability and security of IoMT devices, despite various security concerns. Sadhu and Yanambaka [160] present an overview of the IoMT ecosystem, its functions, and potential threats. In this study, the existing security solutions for resourceconstrained IoT devices were analyzed in order to protect privacy and improve security. In addition, current authentication methods, such as ABE, ECC, MAC, ML, PUF, and blockchain were evaluated. Furthermore, NDN technology is also incorporated here, which is currently under investigation to enhance security. Papaioannou and Karageorgou [161] first categorized the existing and potential threats to IoMT edge network environments. These threats are classified according to key security objectives, such as availability, authorization, authentication, integrity, and confidentiality. A categorization of countermeasures against threats to IoMT edge networks was also provided. Generally, the study aims to provide researchers with insight into IoMT edge network threats and countermeasures. It also proposes a framework for organizing research efforts toward designing and developing lightweight security mechanisms that can overpower the limitations of IoMT devices in terms of resources and computation power while maintaining edge network security.

IoMT Privacy and Security Solutions
Over the last decade, several security and privacy solutions have been developed to prevent the negative use of IoMT. Indeed, IoT applications, such as IoMT, and devices are increasingly being attacked by cyber threats, highlighting the need to adopt some important practices to resolve these problems. These IoMT applications are more susceptible to security issues due to DOS attacks and other server attacks [162,163].
As IoMT technology is in the development phase and has not matured enough, it presents security risks due to a lack of user knowledge, poor maintenance, and inadequate standards. Hackers and adversaries can easily control IoMT devices with weak security by using malware for ransom [164,165]. Wearable devices, smart homes, and health-related applications are negatively affected by the control of IoMT devices. It is still necessary to carry out research in this area to make IoMT devices more secure from this type of attack. Companies launch products quickly and do not update the software promptly to remain competitive, making IoMT devices vulnerable to hacker attacks [166]. The link between a user's IoMT device and the cloud may break during an update. Hackers can access an unencrypted IoMT device through unencrypted communication. Upon a breakdown of the cloud connection, the organization will need to block ports and access immediately, and IoMT devices must be updated as necessary to remain secure [167]. Figure 6 explains the security areas of the IoMT schematically.
prevent the negative use of IoMT. Indeed, IoT applications, such as IoMT, and devices are increasingly being attacked by cyber threats, highlighting the need to adopt some important practices to resolve these problems. These IoMT applications are more susceptible to security issues due to DOS attacks and other server attacks [162,163].
As IoMT technology is in the development phase and has not matured enough, it presents security risks due to a lack of user knowledge, poor maintenance, and inadequate standards. Hackers and adversaries can easily control IoMT devices with weak security by using malware for ransom [164,165]. Wearable devices, smart homes, and health-related applications are negatively affected by the control of IoMT devices. It is still necessary to carry out research in this area to make IoMT devices more secure from this type of attack. Companies launch products quickly and do not update the software promptly to remain competitive, making IoMT devices vulnerable to hacker attacks [166]. The link between a user's IoMT device and the cloud may break during an update. Hackers can access an unencrypted IoMT device through unencrypted communication. Upon a breakdown of the cloud connection, the organization will need to block ports and access immediately, and IoMT devices must be updated as necessary to remain secure [167]. Figure 6 explains the security areas of the IoMT schematically. As Figure 6 depicts, IoMT suffers from several security issues, such as applying security in patient monitoring or malware prevention.

Blockchain and Its Application
Blockchain (BC) systems are one of the most remarkable technologies in IoMT settings because they are a distributed sharing mechanism that allows IoMT devices to connect safely. A blockchain is a chain of blocks, and each block is linked to the blocks that come before it. Every block contains the security hash code, the preceding block hash, and the contents. Each block has a hash code that points to the previous block and another to As Figure 6 depicts, IoMT suffers from several security issues, such as applying security in patient monitoring or malware prevention.

Blockchain and Its Application
Blockchain (BC) systems are one of the most remarkable technologies in IoMT settings because they are a distributed sharing mechanism that allows IoMT devices to connect safely. A blockchain is a chain of blocks, and each block is linked to the blocks that come before it. Every block contains the security hash code, the preceding block hash, and the contents. Each block has a hash code that points to the previous block and another to the next block. Each block has a timestamp, a nonce, and a transaction history. The structure of the blockchain is shown in Figure 7 [168]. the next block. Each block has a timestamp, a nonce, and a transaction history. The structure of the blockchain is shown in Figure 7 [168]. Blockchain technology is a shared private/public database involving actions performed and distributed across blockchain agents. The BT differs from present information systems in four ways, namely decentralization, security, appropriateness, and smart execution [169]. As mentioned, blockchain is a relatively new technology, and today, in many ways, it helps us live with greater security and speed. Not much time has passed since the advent of this technology. This technology has attracted the attention of researchers and scholars in this short period. Given the importance of this issue and the wide range of applications, Table 4 summarizes the various applications of blockchain. IoT security, blockchain and business [179] 2018 12 IoT security, blockchain and banking systems [180] 2020 Of course, the great potential of blockchain technology is not yet known, and it will take time to discover this. Therefore, this emerging technology, as with other technologies, has many advantages and disadvantages. Thus, this part of the present study examines the many advantages and disadvantages, summarized in Table 5 [181]. Table 5. Advantages and disadvantages of blockchain technology [130].

No
Advantages Disadvantages 1 Decentralized network High energy consumption 2 Transparency The difficult process of integration Blockchain technology is a shared private/public database involving actions performed and distributed across blockchain agents. The BT differs from present information systems in four ways, namely decentralization, security, appropriateness, and smart execution [169]. As mentioned, blockchain is a relatively new technology, and today, in many ways, it helps us live with greater security and speed. Not much time has passed since the advent of this technology. This technology has attracted the attention of researchers and scholars in this short period. Given the importance of this issue and the wide range of applications, Table 4 summarizes the various applications of blockchain. IoT security, blockchain and supply chain [177] 2020 10 IoT security, blockchain and education systems [178] 2021 11 IoT security, blockchain and business [179] 2018 12 IoT security, blockchain and banking systems [180] 2020 Of course, the great potential of blockchain technology is not yet known, and it will take time to discover this. Therefore, this emerging technology, as with other technologies, has many advantages and disadvantages. Thus, this part of the present study examines the many advantages and disadvantages, summarized in Table 5 [181]. Table 5. Advantages and disadvantages of blockchain technology [130].

No
Advantages Disadvantages 1 Decentralized network High energy consumption 2 Transparency The difficult process of integration 3 Trusty chain The implementation's high costs 4 Unalterable and indestructible technology The signature verification 5 Fast processing Opportunity to split the chain

Conclusions and Future Work
The IoT and its IoMT application have introduced a variety of platforms for exchanging information, expanding its applications in numerous fields daily. As IoMT technology is in the development phase and has not matured enough, it presents security risks due to a lack of user knowledge, poor maintenance, and inadequate standards. Hackers and adversaries can easily control IoMT devices with weak security by using malware for ransom. Hackers can access an unencrypted IoMT device through unencrypted communication. This paper offered a comprehensive survey of IoT, IoT security, IoMT, and IoMT security challenges, solutions, and future trends from new perspectives, which are briefly described as follows: (1) Presenting a comprehensive study of previous research related to IoT and security and their applications, including E-health, education, the supply chain, etc. (2) Comparison of the research works collected regarding various criteria, such as year of publication, scientific journals, and the approach adopted in multiple tables and graphs. Considering the charts, the upward trend in privacy in cyberspace uses the IoMT. (3) Determining an approach has attracted researchers' attention more than other approaches to creating privacy.
However, more research is needed to find the deep role of blockchain in IoT and IoMT, which can be a take-home for researchers. Although in the body of the paper, the roles of IoMT and AI security, as well as IoMT and blockchain, are mentioned, more investigation on this topic is needed to make it more fruitful; as such, it can be a good direction for researchers working on this topic.