## 5 Techniques in the Proposed Smart Healthcare CPS for Trust Management  
Trust management is essential to guarantee the security and integrity of the proposed smart healthcare CPS. The global trust list (BRGTL), which is based on blockchain, and the Gini index are included in the composition of trust-management mechanisms. Below is a description of these methods' specifics and how they work together to thwart blackhole and greyhole attacks:  
1. Utilization of Gini Index for Trust Assessment The distribution of trust parameters gathered from the device layer is subjected to the Gini index in the context of the smart healthcare CPS [34]. Based on the gathered trust parameters, the Gini index is computed, offering insights into how the actions and behaviors of nodes are distributed throughout the network. Unanticipated trends or deviations in the behavior of the devices within the smart healthcare CPS are indicated by irregularities in the Gini index. Alerts are set off by abrupt spikes or notable deviations, which indicate possible security risks [73]. Trust is evaluated in real time by the GBG-RPL. The GBG-RPL adapts, according to the trust parameter changes, making sure the system can react quickly to new security threats.
2. Blockchain for Secure Storage A blockchain smart contract forms the basis of the revised blockchain-based global trust list (BRGTL) of the proposed framework. The device parameters, trust values, and trust parameters are all safely stored and kept up-to-date. The smart contract provides an unchangeable and impenetrable record of trust-related data. The BRGTL smart contract makes use of the distributed ledger to guarantee the distribution of trust information among nodes [82]. It minimizes the likelihood of an SPOF and increases the trust-management system's overall resilience. The BRGTL serves as a historical reference for evaluations of trust. It keeps an updated record of trust values, which enables the system to monitor changes over time and spot patterns in device behavior.
3. Trust Updating at Fog Layer In the proposed framework, trust updating is carried out by the fog layer. Real-time updates to the trust values of nodes at the device layer are continually revising the trustworthiness of devices within the smart healthcare CPS. Every time a new device connects to the network or after a predetermined amount of time, the trust values are routinely updated by the GBG-RPL [89]. However, the device or subsequent trust calculation is assigned a minimum score of acceptable trust upon its initial request to join the network. The fog layer communicates with the device layer to share the updated trust values [61]. This communication ensures that devices at the device layer are informed of changes in trust assessments and can initiate action accordingly.
4. Trust Management to Prevent Blackhole and Greyhole Attacks The GBG-RPL ensures that the system can adapt to changes in the network's behavior. If a node starts behaving maliciously, the GBG-RPL will reflect this anomaly, triggering alerts and enabling the system to take preventive actions. The BRGTL smart contract on the blockchain stores a secure and tamper-resistant record of trust values. Even if a greyhole or blackhole attack attempts to manipulate local trust values, the immutable nature of the blockchain prevents the compromise of the overall trust assessment [82]. The BRGTL smart contract acts as a decentralized source of trust. Nodes in the device layer can verify trust values against the historical records stored in the blockchain, ensuring that trust information is consistent and not manipulated by attackers.