# Security, Privacy, and Reliability in Digital Healthcare Systems Using Blockchain
## 5 Proposed Algorithms
### Authentication Mechanism
From the simulations, it is very clear that the proposed framework provides more efficiency compared to the benchmark model with respect to \(PHR\). In Figure 18, we provide a comparative analysis of the proposed method for different domains while using sensors to monitor health records and share them through a blockchain network. We used medial sensors, such as sensors for the pulse and heartbeat, as well as temperature sensors. Each sensor collected data and sent it to the base station using smart contracts. The smart contracts delivered the transmitted patient data to the BS, and then they were stored in the blockchain ledger. We can easily observe from the simulations that the sending of packets through our proposed framework in the case of medical sensor nodes took less time for confirmation; hence, the throughput was significantly greater than that of the benchmark models. \[ETx(k,d)=ETx-Elec(k)+ETx-amp(k,d), \tag{1}\]7 Comparison of our proposed method with the benchmark models [49; 50; 51] in terms of: (**a**) the number of dead nodes, (**b**) number of live nodes, and (**c**) number of packets sent. In Figure 19, we show the intensive simulations and experiments carried out in the cross-domain case. We used different types of domains, and we evaluated the number of query requests versus the time taken. It can be observed that, as we used lightweight encryption techniques with flexible access control policies, the throughput in the cross-domain case was very efficient. From Figure 19, it is very clear that our proposed framework can provide efficient throughput up to 70 domains. Our proposed framework is thus limited to 70 domains. In comparison, Medrec and Medchain can support up to 8 and 10 domains, respectively. Hence, our method surpasses the previous schemes because they can only support 8 to 10 domains. So, in order to provide more security for patients, they can only access data, \(EHR\), or \(PHR\) in up to 70 domains. \[ETx(k,d)=ETx-Elec(k)+ETx-amp(k,d), \tag{1}\]8 Efficiency analysis of our proposed method in different domains. \[ETx(k,d)=ETx-Elec(k)+ETx-amp(k,d), \tag{1}\]9 Comparative analysis of the cross-domain module used in our proposed framework. is greater with the proposed method. Hence, our proposed framework provides more efficiency compared to the benchmark models. \[ERx(k,d)=ERx-Elec(k), \tag{2}\]0 Comparative analysis of the proposed flexible policies for the cross-domain case and the benchmark models [49; 50; 51] (number of rounds versus number of transactions). \[ERx(k,d)=ERx-Elec(k), \tag{2}\]1 Comparative analysis of the proposed access control policies and the benchmark models (number of rounds versus packets sent) [49; 50; 51]. ## 9 Conclusions and Future Work

In this research, we proposed a blockchain-based framework using Hyperledger Fabric with flexible access control policies. We used a cross-domain framework for our proposed framework. Moreover, we performed our experiments for one, two, three, and four organizations. We used Hyperledger Fabric as a tool to implement our proposed framework. Moreover, we used two types of software to implement the proposed algorithms, i.e., Hyperledger and the Ethereum tool. To evaluate our experimental data, we used PHYCHARM and Spyder \(ID\). From the analysis, it is very clear that our proposed framework provided better throughput and security, which was confirmed by the simulation results. We used the KNN clustering technique to classify the users based on their interactions with the framework. In addition, we divided the users into different clusters based on their trust values and according to the proposed access control algorithms. In order to provide more security, we used a ring signature for encryption and decryption. An efficient access control method integrated with blockchain was implemented in our framework for applications in digital health systems.