## 3 Proposed Approach
Thus, \(X(n)\) is computed as given in Equation (4). \[X(n)=D_{i,n}+T_{r}+N_{tr} \tag{4}\]  
The heuristic function not only optimizes the routing performance and increases network resiliency, but due to the adaptation of the bidirectional searching criteria, it also decreases the complexity. Let us consider that \(m\) is the midpoint from the initial node to the local coordinator and from the local coordinator to the initial node. Using a bidirectional search algorithm [44], the time complexity \(t_{c}\) is \(O\left(b^{\frac{d}{2}}\right)\), where \(b\) is the branching factor and \(d\) is the distance. In the RNM-SC approach, the local coordinator is further connected with the ZigBee network using wireless routers. The ZigBee routers receive the collected medical information and transmit it towards the sink node using a multi-hop system. Additionally, the ZigBee routers keep track of active routes and eliminate the inactive wireless devices from its routing tables by measuring the status of the link. In the next component, the RNM-SC approach utilizes Blum-Goldwasser cryptography, an asymmetric key encryption algorithm for securing patients' sensitive data against network attackers. It is an iterative process until biosensing data is delivered to cloud systems. Initially, the sensors' data \(D\) is divided into a sequence of \(k\) blocks \(m_{1},\ m_{2},\ldots\ \ldots\,\ m_{k}\), selecting a random number \(r\), such that \(r<n\) and computes \(Z_{0}\) as given in Equation (5). \[Z_{0}=r^{2}\ mod\ n \tag{5}\]  
where, \(n\) is a public key of the selected next-hop. Later, using the Blum Blum Shub key generator [45], the values for \(Z_{1}\), \(Z_{2},\ldots,\ \ Z_{i-1}\) are generated as given in Equation (6). \[Z_{i}={Z_{i-1}}^{2}\ mod\ n \tag{6}\]  
The least significant \(h\) bits are determined from the computed \(Z_{i}\), denoted as \(l_{i}\) and performing Exclusive-OR (XoR) operation with each sensors' data \(m_{i}\) to obtain cipher block \(C_{i}\) at each level, as given in Equation (7). \[C_{i}=m_{i},l_{i},\ xor \tag{7}\]  
This process is repeated for \(k\) blocks of a message \(M\) to ensure data encryption and integrity. As the proposed work is based on multi hopping, the obtained ciphertext \(C_{i}\) is reassembled on a cloud system to generate actual \(M\) as given in Equation (8). Figure 1:0  
Moreover, to ensure data confidentiality and authentication among cloud systems and end-users, the proposed approach utilizes a hybrid security mechanism. Firstly, the cloud system generates a secret key \(S_{k}\) and encrypts it with a public key of each end-user \(P_{u}\) for the generation of a session key \(K_{i}\) as given in Equation (9). Figure 1:1  
Secondly, upon receiving, the end-user decrypts it using a private key \(P_{k}\) and obtains the session key \(K_{i}\). Therefore, now both can send/receive the data by performing an encryption operation, as given in Equation (10). Figure 1:2  
Algorithm 1 explains the pseudocode of the proposed approach. It comprises three procedures. Firstly, the nodes are organized into an undirected graph and extract the neighbors of the source node. After the extraction of sub-nodes from the constructed graph, the proposed approach executes the process of key distribution and confirmation between the extracted nodes based on the STS algorithm. Secondly, a bidirectional routing procedure is executed and utilizes the weighted heuristics to form the optimal data transferring using IoT devices. It uses the transmission risk, node's trust, and distance parameter to strengthen the routing performance by using Zigbee wireless standards. In the end, the procedure for packet diffusion is initiated and using the security methods, the data is routed towards the cloud tier. After receiving the data packets, node-to-node sessions are created to establish security between the cloud tier and remote IoT device.