## 4 Privacy-Preserving Optimization Based on Advanced CH Selection (P2O-ACH)
### Enhanced ROA-Based CH Selection
The PIN code request message \(PINcode_{REQ}\) is encrypted with the help of the symmetric of the \(S_{node}\) as well as the \(CH_{j}\). The encrypted message consists of the \(ID_{N_{j}}\) details and \(PIN_{hash}\) is retransmitted to the \(CH_{j}\) from the \(S_{node}\). In this process, the \(CH_{j}\) computes the \(PIN^{\prime}_{hash}\) and then checks that this pin is equal to the \(PIN_{hash}\) or not. The cluster head \(CH_{j}\) also transmits the key creation request message \(KeyCreat_{REQ}\) to the node \(N_{j}\). This request message maintains \(ID_{j}\) and \(n_{CH_{j}}\). After the process of this key creation, \(N_{j}\) transmits a reply message to \(CH_{j}\), which is the encrypted acknowledgement including the newly created hash key and the new message contains (\(ID_{N_{j}}\), nonce, \(KeyCreat_{REP}\)). If the nonce of the message is not a valid one, then the message is neglected and the node is block listed. Once the node \(N_{j}\) is added as a CM node of \(CH_{j}\) it transmits a join success encrypted data packet to the node \(N_{j}\). After joining, the node \(N_{j}\) becomes the CM of the \(CH_{j}\) and then the CM node transmits the secure data to its destination through \(CH_{j}\). By using the same method, the \(CH_{j}\) also transmits the data to the \(S_{node}\). #### 4.4.2 Node Migration Process

As we know that the nodes used in our network are mobile in nature, during the process of communication they will migrate from one place to another. Due to this process at each instance of time anywhere in the network, new nodes joining and leaving the cluster will occur simultaneously. To secure this process of migration in the network, the concept of node migration is initiated. The core idea of this process is to provide both forward privacy as well as backward privacy in an effective way. In the above section, each node uses the authenticate key to join or leave a cluster and the presence and absence of the node in each cluster are periodically monitored by the \(CH_{j}\) with the help of transmitting the beacon signals. If any node is absent in the group, then automatically, \(CH_{j}\) neglects the node from its routing list. At the time of migration, the node \(N_{j}\) moves away from the coverage area of the \(CH_{j}\) as well as receives a request message from the neighbor CH. If the node in any cluster leaves the current cluster \(CH_{j}\), then that node \(N_{j}\) tries to transmit a joining request message to any neighbor cluster \(CH_{new}\) with the transfer ID \(ID_{j}\). Then, \(CH_{new}\) will accept the request of the node \(N_{j}\). Then, the \(CH_{new}\) will check the neglect list. If the current node ID is not present in that list, then it will precede the process further. Otherwise, neglect the request. If the \(ID_{j}\) is not found, then the \(CH_{new}\) will send the key request message to the \(N_{j}\). Continued on from that, the \(CH_{new}\) transmits the encrypted request message with the \(ID_{j}\) and time stamp. Then, the \(S_{node}\) sends the encrypted request message to the \(CH_{new}\). Next, \(CH_{new}\) transmits the message to the \(N_{j}\) along with the encrypted key received from the \(S_{node}\). Now, this message consists of the \(ID_{j}\), nonce, as well as the transmitted request message. Following this, the node \(N_{j}\) transmits the reply message to the \(CH_{new}\) in response to the transmitted request message. This reply also consists of the \(ID_{j}\), nonce, and time stamp, and the message is encrypted. The time stamp and the worth of the nonce is checked by the \(CH_{new}\). Once all the verification is done and after obtaining satisfaction, the \(CH_{new}\) node will accept the \(N_{j}\) node as its CM node. Finally, the \(CH_{new}\) node will update the finalized list to its \(S_{node}\). ## 5 Results and Analysis

The major operations which are proposed in the P2O-ACH approach are ROA-based CH selection and the privacy-preserving mobility model. At the initial stage of simulation, the vehicles are distributed randomly.